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

Michiel van Baak michiel at vanbaak.info
Sat Jan 28 18:50:46 MST 2006


On 18:57, Sat 28 Jan 06, Joe Greco wrote:
> > 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.

We don't use SIP but IAX instead.
Protocol doesn't matter in this case.
It all boils down to extensions.conf magic.
Hell, we even get all our numbers using only 1 account.

This is a snippet from our extensions.conf:

CUST001DID = XXXXXXXXa
CUST002DID = XXXXXXXXb

[incoming-from-provider]
exten => XXXXXXXa,1,Goto(CUST001,${EXTEN},1)
exten => XXXXXXXb,1,Goto(CUST002,${EXTEN},1)

etc etc etc

Works like a charm for multiple customers on 1 asterisk
cluster.
-- 
Michiel van Baak
http://michiel.vanbaak.info
michiel at vanbaak.info
GnuPG key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x7E0B9A2D

"Why is it drug addicts and computer afficionados are both called users?"




More information about the asterisk-users mailing list