[Asterisk-Users] Help with incoming SIP routing

Christopher Aloi chris.aloi at gmail.com
Wed Jun 28 17:36:30 MST 2006


Hello -

Thanks for the suggestions, I actually learned since my post that the
problem is related to the formation of the initial SIP invite sent from our
Sonus gateway through our NexTone SBC.  Using your idea regarding the
variable I think i've found a work-around.

When the Sonus sends the inital invite the format is:

INVITE sip:315579xxxx;npdi=yes at 66.218.x.xx SIP/2.0

It appears the Asterisk server is able to parse this message if I am only
using one context, it appears to fail when I use multiple contexts to route
my ingress calls.

>From what I can tell Asterisk parses the invite and looks to send the call
to s in the default context (domain 315579xxxx).

Looking for s in default (domain 315579xxxx)

If 's' doesn't exist in [315579xxxx] the call chokes.

If I create a variable based on the ingress 'domain' using:

exten => s,1,Goto(${SIPDOMAIN},s,1)

The call is sent to the correct context.

I think it's a work-around, but it seems to do the trick.

    -- Executing Goto("SIP/15241-08198868", "315579xxxx|s|1") in new stack
    -- Goto (315579xxxx,s,1)
    -- Executing Answer("SIP/15241-08198868", "") in new stack


Notes on Digium:

http://bugs.digium.com/view.php?id=7208&nbn=24











On 6/28/06, El Flynn <el_flynn at lanvik-icu.com> wrote:
>
> Christopher Aloi wrote:
> > Hello -
> >
> > I currently have 10 DID's coming into one Asterisk server, I seem to be
> > having some difficulty routing based on the DID dialed and am hoping
> > someone
> > on the list can assist me.
> >
> <snip>
>
> Unless I'm misunderstanding you, how about trying this:
>
> 1. In your sip.conf:
>
> [general]
> useragent=Asterisk
> port=5060
> context=default
> tos=lowdelay
> disallow=all
> allow=ulaw
> allow=alaw
> allow=gsm
> rtptimeout=300
> rtpholdtimeout=600
>
> 2. In your extensions.conf:
>
> [default]
> exten => s,1,Goto(${CALLERIDNUM},s,1)
>
> [123456789]
> exten => s,1,Answer()
> exten => s,2,Playback(beep)
> exten => s,3,GoTo(queue-test,s,1)
>
>
> So if you get an incoming SIP call from 123456789, it enters the "default"
> context and is then routed to the "123456789" context.
>
> Flynn
>
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060628/661f08fb/attachment.htm


More information about the asterisk-users mailing list