[Asterisk-Users] Multiple Subscriptions to SIP accounts at Same

Joe Greco jgreco at ns.sol.net
Sat Jan 28 17:57:14 MST 2006


> register => username1:password1:authuser1 at sip.gossiptel.com
> register => username2:password2:authuser2 at sip.gossiptel.com
> etc
> 
> and then I created a peer and a user for the sip.gossiptel.com domain,
> but I now find that any calls that come in to any of these registered
> accounts all ring the 's' extension within the default context.

change the context within sip.conf to "from-sip-provider" or something
like that.

> Thats
> fine as far as it goes but I need to be able to handle each SIP account
> in its own context.

use extensions.conf for this purpose (we did).

in sip.conf you have:
register => username1:password1:authuser1 at sip.gossiptel.com/ext1
register => username2:password2:authuser2 at sip.gossiptel.com/ext2

then in extensions.conf you have

[from-sip-provider]
exten => ext1,1,Goto(context-for-ext1,s,1)
exten => ext2,1,Goto(context-for-ext2,s,1)

> As a half way house, in the course of testing this
> I did play with creating extensions for each sip account and directing
> them thus:

so you were halfway there

> and this works fine as well - inbound calls end up activating the
> assigned extensions within extensions.conf but the problem remains that
> these extensions themselves have to be within a single context (in my
> case the default context).

that's the dialplan's problem - to sort it all out.  :-)

note that we're doing this with dozens of numbers with no problem.  as a
possibly helpful hint, it is nice to include the phone number as part of
the extension, such as "ext4148441414" or "did4148441414" rather than
"ext1".  there may be some downsides to using just the number by itself;
it's been a while and i don't recall for sure.

it seems like there should be a way to make this work within sip.conf
itself, but the interactions between the registrations and definitions
has always seemed to be loose at best and i've never been able to get
them to work the way i would expect, so beware that other more "correct"
solutions may exist.

... JG
-- 
Joe Greco - sol.net Network Services - Milwaukee, WI - http://www.sol.net
"We call it the 'one bite at the apple' rule. Give me one chance [and] then I
won't contact you again." - Direct Marketing Ass'n position on e-mail spam(CNN)
With 24 million small businesses in the US alone, that's way too many apples.



More information about the asterisk-users mailing list