Is it possible to route incoming external SIP calls basing on the called number?
For example, I have 2 SIP trunks defined, which have registrations like 222@sip.provider.com to extension #200 ?
I can do the routing with the trunks in the different contexts, but I think it will be nice to have just one context per provider. Any comments are welcome.
Thanks
if i understand you right
you have two sip registrations to servers
but you want calls coming into different destination numbers to go differently regardless of which registration it came in on.
this is easy
in your register statement remove the destination
ie
register => user:pass@provider/12223334444 remove the bit in bold
then in your context
[context]
exten => YOURFIRSTNUMBER,1,Goto(somewhere)
exten => YOUROTHERNUMBER,1,Goto(somewhereelse)
hope that helps!
thank you, but…
I do not have any statements like “register => user:pass@provider/12223334444” in my config, instead I have the trunk definition in users.conf as I described here: forums.digium.com/viewtopic.php?t=12590
i’m not too familiar with users.conf yet but i think what i suggested should work… does it?