Ezz123
January 6, 2010, 7:33pm
1
Hi All,
quick question, I have the following in my extensions.conf:
exten => _1700.,1,Dial(SIP/${EXTEN}); * sample extension is 17005121212
exten => _1.,1,Dial(Zap/g2/${EXTEN});
but it seems that exten => _1.,1,Dial(Zap/g2/${EXTEN}); is taking priority… so we I call 1700xxxxx it goes through Zap channel
how can I change this so all 1700. Dial(SIP… and 1. Dial(zap…?
Thanks
You need to specify the exact long for SIP or ZAP with the X for avoid that issue.
exten => _1700XXXXXXX,1,Dial(SIP/${EXTEN}); * sample extension is 17005121212
exten => _1XXXX.,1,Dial(Zap/g2/${EXTEN});
Ezz123
January 6, 2010, 8:46pm
3
thanks… it’s 10 digit number in both cases… that wont be an issue? so if I do this:
exten => _1700XXXXXXX,1,Dial(SIP/${EXTEN}); * sample extension is 17005121212
exten => _1XXXXXXXXXX,1,Dial(Zap/g2/${EXTEN});
then it should work?
Also another question, how can I make it so if calling SIP fails then calls IAX the same extension…
Thanks a lot
The issue will be present if one desired zap number contains 1700, so its much better use a code per example
exten => _771700XXXXXXX,1,Dial(SIP/${EXTEN:2}); * sample extension is 17005121212
exten => _661XXXXXXXXXX,1,Dial(Zap/g2/${EXTEN:2});
{EXTEN:2} will trunk the 2 front digits in that case 77 and 66.
For use IAX when SIP fails you need to configure an IAX peer in both servers and only do this:
exten => _771700XXXXXXX,1,Dial(SIP/${EXTEN:2}); * sample extension is 17005121212
exten => _771700XXXXXXX,2,Dial(IAX2/peername/${EXTEN:2}); * sample extension is 17005121212
Ezz123
January 6, 2010, 9:03pm
5
got it…ok…
the SIP to IAX is actually within the same server so is this ok:
exten => _771700XXXXXXX,1,Dial(SIP/${EXTEN:2}); * sample extension is 17005121212
exten => _771700XXXXXXX,2,Dial(IAX2/${EXTEN:2}); * sample extension is 17005121212
Thanks
If your Phone support IAX protocol is ok, but before you need to define all peers in iax.conf, like sip.conf. There are few softphones and hardphones wich can support IAX.
Ezz123
January 7, 2010, 3:49pm
7
All good and working fine…Thanks for your help