Asterisk 17.x+ et PJSIP Trunk OVH
Created on:
/extensions.txt 566 B (text/plain)
123456789101112131415
  1. just create a dialplan for "dp_from_ovh" for incoming calls
  2. and do something like that for dialing out (extensions.lua but you get the idea):
  3. DIAL_OPTS = "rg"
  4. DIAL_OPTS_OUT = "KXWT"
  5. TIMEOUT = 45
  6. extensions.outgoing["_0[67]X."] = function(c, e)
  7. channel.CDR("context"):set("outgoing_mobiles")
  8. name = channel.CALLERID("name"):get()
  9. channel.CDR("context"):set("outgoing_mobile")
  10. app.NoOp(name .. " want to call mobile " .. e)
  11. app.Dial("PJSIP/" .. e .. "@ovh", TIMEOUT, DIAL_OPTS .. DIAL_OPTS_OUT)
  12. app.Congestion(3)
  13. end
/pjsip.conf 730 B (text/plain)
123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. [general]
  2. udpbindaddr=0.0.0.0
  3. [transport-udp]
  4. type=transport
  5. protocol=udp
  6. bind=0.0.0.0
  7. ; TRUNK CONFIG: ovh
  8. [ovh]
  9. type=registration
  10. transport=transport-udp
  11. outbound_auth=ovh
  12. server_uri=sip:0033XXXXXXXXX@sip3.ovh.fr:5962
  13. client_uri=sip:0033XXXXXXXXX@sip3.ovh.fr:5962
  14. retry_interval=60
  15. expiration=1800
  16. max_retries=20
  17. [ovh]
  18. type=auth
  19. auth_type=userpass
  20. password=superPassw0rd
  21. username=0033XXXXXXXXX
  22. [ovh]
  23. type=aor
  24. contact=sip:0033XXXXXXXXX@sip3.ovh.fr:5962
  25. [ovh]
  26. type=endpoint
  27. transport=transport-udp
  28. context=dp_from_ovh
  29. disallow=all
  30. allow=ulaw,alaw
  31. outbound_auth=ovh
  32. auth=ovh
  33. aors=ovh
  34. from_user=0033XXXXXXXXX
  35. from_domain=sip3.ovh.fr
  36. [ovh]
  37. type=identify
  38. endpoint=ovh
  39. match=sip3.ovh.fr
© 2017-2018 git.txt - version: 0.5.2 - b28934a7ddecd31f2e40cb7058fa1fb5e9a1acc8 - page: 34ms - template: 17ms
Gitxts: 57, managed: 117
Sources - Go1.11.5