Steve Gladden
2008-Jun-27 00:20 UTC
[asterisk-users] is it possible? 1 VOIP Provider Multiple registrations <to> multiple inbound contexts
The scenario: This is all done SIP with a VOIP provider (have to register to single IP) We have two inbound DID numbers / Accounts. We have to register each individually with the VOIP provider. I'd like inbound from each registered account (DID) to be able to come into a unique PEER or dialplan context. What matters is that the inbound call lands in the context of my choice. I've been told that the PEER can be made to match DID or account name but I'm not sure how to do this. In other words how to match a registration to a peer or inbound context other that the single defined default. I've also been told back in the asterisk 1.2 days that it was not possible. I just recently upgraded to the latest 1.4 and am wondering if there have been updates to make this work. In the past I always had to bring all calls into a default context and then use GOTO to get the inbound call where it needed to go. Do I still need to do this today? or is there a better way to make this actually work and come into the proper context. I'm confused on how to get multiple registrations to be associated with any more than one default registration inbound context, or somehow to associate them with the peer of choice. I've tried amongst other things appending /extension at context approach to a register: line which does not work. I've also tried adding "register=yes" inside a peer which seems to do nothing meaning it does not cause the system to register with the VOIP provider or even try to register. Thanks for your help! -Steve Here's a small example of what I am working with: Without getting into too much detail and showing Please realize I have everything else working well except getting an inbound call into a context that I choose. So I've not provided any more detail showing that those actually exist in the dialplan.. those work and I have working "s" and test extensions in my dialplan contexts that work as well :-) register => 7341112222:testpassword at sip.exampleprovider.net ; standard inbound to 's' in default inbound context ; would like to be able to direct that inbound call ; into context1 instead of common default defined register => 7341113333:testpassword at sip.exampleprovider.net/100 at context2 ;example of me trying to get inbound call to 102 in context: context2 [peer-1] type=peer context=context1 secret=testpassword username=7341112222 fromuser=7341112222 fromdomain=sip.exampleprovider.net host=sip.exampleprovider.net ;register=yes usereqphone=yes insecure=very nat=yes canreinvite=yes ;call-limit=5 [peer-2] type=peer context=context2 secret=testpassword username=7341113333 fromuser=7341113333 fromdomain=sip.exampleprovider.net host=sip.exampleprovider.net ;register=yes usereqphone=yes insecure=very nat=yes canreinvite=yes ;call-limit=5 -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
randulo
2008-Jun-27 04:18 UTC
[asterisk-users] is it possible? 1 VOIP Provider Multiple registrations <to> multiple inbound contexts
On Fri, Jun 27, 2008 at 2:20 AM, Steve Gladden <asterisk at michiganbroadband.com> wrote:> In other words how to match a registration to a peer or inbound context > other that the single defined default. > > I've also been told back in the asterisk 1.2 days that it was not possible.Not true. When you register the /1234 on the end of the line sends it to that extension in the context you specified in the peer entry with context=. You don't mention what exactly happens when a call comes in on one of the DID? Unless the service provider has a non-standard method of calling your asterisk, it should work as you expected. Also, you could read the sample file that has every possible line in peer entries commented and explains all the possible terms. hth, r