[asterisk-users] how asterisk knows which context forward the call to?

Joseph syscon780 at gmail.com
Fri Feb 19 08:35:53 CST 2010


I think you are correct, thank you for pointing it out.

I just switch entries in sip.Cong put [pstn-9998] "first' and [pstn-4444] "second"
and the second entry was selected :-( (so you are right on).
Audiocodes gateway, has two FXO ports, I was convinced that entry is selected based on registration context in [square-bracket] of sip.conf but it 
doesn't appear to be the case; the last registered entry is selected as default.

Is it a limitation how SIP works or asterisk limitation?
Is it possible to split registration into two different sip.conf files (sip1.conf and sip2.conf)?

--
Joseph

On 02/19/10 09:05, Ioan Indreias wrote:
>I hope I'm not wrong but I think the problem is related to the fact
>that on incoming calls Asterisk find the peers based on their IP and
>not on their IP+PORT. Thus, if you have several extensions on the same
>devices (=> one single IP with different SIP ports), the last entry
>into your sip.conf file is taken into consideration => all calls are
>sent to the context of that last extension.
>
>You could check this if you configure a higher verbose/debug level
>(like more than 10) and check into the Asterisk logs the information
>displayed by chan_sip.c
>
>HTH,
>Ioan Indreias
>www.modulo.ro
>
>### extract from:
>http://www.voip-info.org/tiki-index.php?page=Asterisk%20SIP%20Channels
>###
>Incoming SIP Connections
>===================
>When Asterisk receives an incoming SIP call, the SIP Channel Module
> + first tries to find a [user] section matching the caller name
>(From: username),
> + then tries to find a [peer] section matching the caller's IP address.
> + If no matching user or peer is found, the call is sent to the
>context defined in the [general] section of sip.conf.
>See: Asterisk SIP user vs peer
>###
>
>On Fri, Feb 19, 2010 at 7:48 AM, Joseph <syscon780 at gmail.com> wrote:
>> Yes, it should but it doesn't.
>> And the gurus at Audiocodes support can not explain why?
>>
>> --
>> Joseph
>>
>> On 02/18/10 19:27, C F wrote:
>>>It should use the context of the device
>>>
>>>On Wed, Feb 17, 2010 at 8:40 PM, Joseph <syscon780 at gmail.com> wrote:
>>>> Is there any asterisk guru who can explain me how how asterisk knows which context forward the call to?
>>>>
>>>> --
>>>> Joseph



More information about the asterisk-users mailing list