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

Leif Neland leifn at neland.dk
Sat Jan 28 17:50:45 MST 2006


---- Original Message ----
From: <usenet at netassist.info>
To: <asterisk-users at lists.digium.com>
Sent: Sunday, January 29, 2006 1:29 AM
Subject: [Asterisk-Users] Multiple Subscriptions to SIP accounts at
SameDomain

> Sorry not to have observed etiquet and lurked here for a bit before
> wading in with a question but I have an issue that may well be because
> I dont know enough about what asterisk is actually doing under the
> hood to understand why I cant do what I want with asterisk.
>
> Im hoping that someone can point me in the right direction :-)
>
> This is what I have:
>
> Mandrake 2006 running Asterisk 1.2.3 - no additional hardware -
> everything is going to be running via SIP.
>
> To enable inbound and outbound connectivity I have been experimenting
> with using various accounts provided by Gosspitel, Sipgate, aql and
> others and have found the most sucessful have been those provided by
> Gossiptel.
>
> Herein lies the problem.  I need to register about six incoming lines
> all provided by Gossiptel - half of them to be active within one
> context and half within another.
>
> I have sucessfully registered all the lines within sip.conf as
> follows:
>
> 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.  Thats
> fine as far as it goes but I need to be able to handle each SIP
> account in its own context.  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:
>
> register => username1:password1:authuser1 at sip.gossiptel.com/ext1
> register => username2:password2:authuser2 at sip.gossiptel.com/ext2
>
> 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).
>
>From sip.conf:
;register => 2345 at mysipprovider.com/1234
;
;    Register 2345 at sip provider.  Calls from this provider connect to 
local
;    extension 1234 in extensions.conf default context, unless you define
;    [mysipprovider.com] in a section below, and configure a context

Wild guess: A kludge is if you run your own dns:

*.gossiptel.mydom.dom.    IN    CNAME    sip.gossiptel.com.

Then register each user to his "own" domain:

register => username1:password1:authuser1 at username1.gossiptel.mydom.dom
register => username2:password2:authuser2 at username2.gossiptel.mydom.dom

Then define
[username1.gossiptel.mydom.dom]
context=user1context
[username2.gossiptel.mydom.dom]
context=user2context

Otherwise, you should just create a patch to allow the syntax

register => user[:secret[:authuser]]@host[:port][/context[/extension]]

Shouldn't be so hard to do :-)

Leif




More information about the asterisk-users mailing list