[Asterisk-Users] Incoming SIP matching

James H. Thompson jht at lj.net
Mon Jan 26 00:52:19 MST 2004


I ran some tests and reviewed the source code.
It appears that for incoming INVITE messages, Asterisk first checks for
[name] entries that match the user portion of the SIP URI in the From: header of the INVITE
message..
i.e. if you are calling From sip:123 at ab.com it looks for [123] in the sip.conf file.
If this fails then it checks for an IP match.
If the IP match fails then it looks in the extensions.conf file (in the context set as default in
sip.conf)  for a matching extension.

If I've intereperted it correctly, it seems a strange way for it to operate.

Adding some debug log messages about which sip.conf entry is being selected would make figuring out
what is happening a lot easier.


Jim

James H. Thompson
jht at lava.net

----- Original Message ----- 
From: "Thomas B. Clark" <digium at clark.durham.nc.us>
To: <asterisk-users at lists.digium.com>
Sent: Sunday, January 25, 2004 3:01 AM
Subject: [Asterisk-Users] Incoming SIP matching


> Incoming FWD calls from other FWD users, iaxtel, or via ipkall, need to
> have dtmfmode=rfc2833.  However, incoming FWD calls from the dialup
> access numbers (such as libretel) need to have dtmfmode=inband.  To
> solve this problem, I created a second FWD account and configured
> sip.conf as follows, in order to match the incoming number to the proper
> dtmfmode:
>
> [fwd-rfc]
> type=friend
> secret=*****
> host=dynamic
> dtmfmode=rfc2833
> username=76153
> callerid="CLARK THOMAS B" <76153>
>
> [fwd-inband]
> type=friend
> secret=*****
> host=dynamic
> dtmfmode=inband
> username=244006
> callerid="CLARK THOMAS B" <244006>
>
> What I find is that, no matter what I change (for example, host-dynamic
> in order to prevent matching by IP address), I cannot make the incoming
> SIP calls match successfully. With the configuration above, all incoming
> calls use dtmfmode=rfc2833, but that could be because it's the default.
>   Either entry works correctly alone (with the other commented out.)
>
> I found some discussion in the archives about incoming sip matching, but
> no patches.
>
> Is there a better way to handle the two types of incoming FWD calls?  If
> not, is there something else I could change in order to make them match
> the correct section?  Any ideas would be appreciated.
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
>




More information about the asterisk-users mailing list