"MyDomain="
The first line should display the MyDomain variable. If it is empty or doesn’t match the SIPDOMAIN entry, the outbound call will fail. To fix it, add an entry to the Asterisk database from the Asterisk CLI using syntax like the following: database put MyDomain FQDN 10.0.0.11 or database put MyDomain FQDN sip.me.com where 10.0.0.11 or sip.me.com matches the SIPDOMAIN entry shown on the second line. Then retry your outbound call, and it should complete successfully.
cd /tmp
wget http://incrediblepbx.com/sipuri-mod.tar.gz
tar zxvf sipuri-mod.tar.gz
rm -f sipuri-mod.tar.gz
./install-sip-uri-mod.sh
[ext-local-custom]
exten => _.,1,NoOp(SIPCALLID: ${SIPCALLID})
exten => _.,n,NoOp(SIPDOMAIN: ${SIPDOMAIN})
exten => _.,n,NoOp(EXTEN: ${EXTEN})
exten => _.,n,Set(URI=${SHELL(echo ${EXTEN} | grep @ | awk -F "@" '{ print $(NF) }'):0:-1})
; from this debugging I got:
; 1. softphone:
; call: 380306 (german local number)
; [email protected]
; SIPDOMAIN: 192.168.88.120
; EXTEN: 380306
; URI:
;
; call: [email protected]
; [email protected]
; SIPDOMAIN: sip2sip.info
; EXTEN: 2233435945
; URI:
; 2. click-to-dial:
; call: 380306
; [email protected]:5060
; SIPDOMAIN:
; EXTEN: 380306
; URI:
;
; call: [email protected]
; [email protected]:5060
; SIPDOMAIN:
; EXTEN: [email protected]
; URI: sip2sip.info
; 3. speeddial:
; call: 0123456789
; SIPCALLID=3264821342@192_168_88_108
; SIPDOMAIN: 192.168.88.120
; EXTEN: 0123456789
; URI:
;
; call: [email protected]
; SIPCALLID=311316250@192_168_88_108
; SIPDOMAIN: 192.168.88.120
; EXTEN: [email protected]
; URI: sip2sip.info
; if IP is used
exten => _.,n,Set(MyDomain=${SHELL(hostname -I | sed -e 's/[^[0-9][.]//g' | awk -F " " '{ print $1 }'):0:-1})
; NOT a SIP-URI-call, if:
; ${SIPDOMAIN} = ${MyDomain} AND ${URI} is empty
; OR
; ${SIPDOMAIN} AND ${URI} are empty
exten => _.,n,GotoIf($["${MyDomain}" = "${SIPDOMAIN}" && "${URI}" = ""]?OutAllRoutes
exten => _.,n,GotoIf($["${SIPDOMAIN}" = "" && "${URI}" = ""]?OutAllRoutes
; if FQDN is used
exten => _.,n,Set(MyDomain=${SHELL(hostname | awk -F " " '{ print $1 }'):0:-1})
exten => _.,n,GotoIf($["${MyDomain}" = "${SIPDOMAIN}" && "${URI}" = ""]?OutAllRoutes
exten => _.,n,GotoIf($["${SIPDOMAIN}" = "" && "${URI}" = ""]?OutAllRoutes
exten => _.,n,ExecIf($["${URI}" != ""]?Macro(uridial,${EXTEN})
exten => _.,n,ExecIf($["${URI}" = ""]?Macro(uridial,${EXTEN}@${SIPDOMAIN})
exten => _.,n(OutAllRoutes),Goto(outbound-allroutes,${EXTEN},1)
@wardmundy: again thanks, for some reason, my test calls to [email protected], does work, however calls to other sip address fail. Example: weather, news, etc @demo.nerdvittles.com and [email protected]. Please see asterisk cli log for call: https://pastebin.com/p9fZu836
If one SIP URI works, then it's not a problem with the SIP URI code. It's a problem elsewhere. Perhaps your IP address is blocked. PM your IP address to me, and I can at least check our server.
If one SIP URI works, then it's not a problem with the SIP URI code. It's a problem elsewhere. Perhaps your IP address is blocked. PM your IP address to me, and I can at least check our server.
exten => _.,n,Set(SIPDOMAIN=${DB(MyDomain/FQDN)})
As I said, I can't reproduce the issue. All of my SIP URI outbound calls work. Are you running Incredible PBX 13-13 on CentOS 6 platform??
Try commenting out the following line and see if that helps. Not sure it won't break something else.
Code:exten => _.,n,Set(SIPDOMAIN=${DB(MyDomain/FQDN)})
Link up your team and customers Phone System Live Chat Video Conferencing
Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.
Check your inbox!
We’ve sent you an email. Click on the button in the email body to verify your email address – (if you can not find it, check your spam folder).
Upon verification you will be directed to the 3CX setup wizard.