[asterisk-users] context problem

Dave Platt dplatt at radagast.org
Thu Jan 20 13:11:18 CST 2011


> I may be wrong here, but I think you can only register once. The last 
> registration received will overwrite the first one. You will need to 
> specify a second entry and register that one separately. This is the 
> same reason you cannot register two devices to the same extension.

Yes, that's very likely what is happening.  The provider is seeing
two SIP registrations arrive, for the same provider account, from
the same peer at the same IP address.  It is very likely that the
second registration is (by design) replacing the first.

Then, whenever someone dials a DID associated with this provider
account, the provider is routing the call based on the information
in the most current registration... it's either going to the
context and extension specified in that registration (if their
is one) or to the "s" extension for the relevant context.

(Some providers do allow multiple registration for a given account,
 and will INVITE all of them when an incoming call arrives,
 but (if I recall correctly) the registrations have to come from
 different IP addresses (and perhaps different peers) in order to
 be recognized as being distinct.)

There are probably several ways around this:

(1) Use two different provider accounts, and associate each
    DID with a different account.  Use two "register" statements,
    one per account, and specify different routing extensions on
    these.

(2) Use a provider which will let you register once, and will
    "pass through" the DID number which was dialed as the
    target extension.

(3) Use a provider which will let you set up your DIDs for
    hardwired-IP-address routing (i.e. no "register" being
    required) and who passes through the DID as the extension
    to be called.

I recently set up an account with Vitelity, and they support
option (3).  I simply entered the public IP address of my SIP
server for the routing, and everything works correctly... the
incoming INVITE requests say "sip:MYDID at MYIPADDRESS".  Asterisk
then uses "MYDID" as the desired extension in my dialplan, and
routes the call appropriately.

I'd suggest that the OP ask the current SIP provider whether
they handle (2) i.e. whether it's possible for different DIDs
associated with a single account to have different information
in the INVITE requests sent to the registered client.





More information about the asterisk-users mailing list