[Serusers] 0.8.12 appears to match URI against INVITE line

Jiri Kuthan jiri at iptel.org
Fri Dec 5 01:48:15 CET 2003


At 10:12 PM 12/4/2003, Jamin W. Collins wrote:
>It would appear that SER v0.8.12 is performing URI matching against the
>INVITE line rather than the To: header.  This appears to cause problems
>with Snom phones.  Below is the initial INVITE request sent by a Snom
>200:
>
>  INVITE sip:172.21.30.53 SIP/2.0..Via: SIP/2.0/UDP 172.21.20.89:5060;branch=
>  z9hG4bK-d4iq2xxwsyff..Route: <sip:5803932 at 172.21.30.53;user=phone>..From: "
>  xxxxxx" <sip:IC89 at 172.21.30.53>;tag=tf5tyz77r1..To: <sip:5803932 at 172.21.30.
>  53;user=phone>..Call-ID: 3c267820f20d-hj2ilvrq6eoj at 172-21-20-89..CSeq: 1 IN
>  VITE..Max-Forwards: 70..Contact: <sip:IC89 at 172.21.20.89:5060;line=1>..User-
>  Agent: snom200-2.02t..Accept-Language: en..Accept: application/sdp..Allow:
>  INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, SUBSCRIBE, PRACK, MESSAGE
>  , INFO..Supported: timer, 100rel, replaces..Session-Expires: 7200..Content-
>  Type: application/sdp..Content-Length: 270....v=0..o=root 9679 9679 IN IP4
>  172.21.20.89..s=SIP Call..c=IN IP4 172.21.20.89..t=0 0..m=audio 10010 RTP/A
>  VP 0 8 3 18 97..a=rtpmap:0 pcmu/8000..a=rtpmap:8 pcma/8000..a=rtpmap:3 gsm/
>  8000..a=rtpmap:18 g729/8000..a=rtpmap:97 telephone-event/8000..a=fmtp:97 0-
>  15..a=sendrecv..
>
>The SER configuration has the following directive:
>
>        if (uri=~"^sip:580[0-9][0-9][0-9][0-9]@") {
>                log(1, "Local call sent to gateway");
>                rewritehost("172.21.30.51");
>                t_relay();
>                break;
>        };
>
>This fails to match the above request even though the To: header in the
>above request contains the necessary pattern.  This same configuration
>works fine with a Cisco phone, but it's INVITE request contains the a
>complete URI:
>
>  INVITE sip:5803932 at 172.21.30.51 SIP/2.0..Max-Forwards: 10..Record-Route: <s
>  ip:5803932 at 172.21.30.53;ftag=f2be0b0014cdf23a7f153-5b3b8b0b;lr=on>..Via: SI
>  P/2.0/UDP 172.21.30.53;branch=z9hG4bK72cc.024d7ee4.0..Via: SIP/2.0/UDP 172.
>  21.20.225:5060..From: "IC225" <sip:IC225 at 172.21.30.53>;tag=f2be0b0014cdf23a
>  7f153-5b3b8b0b..To: <sip:5803932 at 172.21.30.53>..Call-ID: 000bbef2-df4c0003-
>  6004eb37-6333d578 at 172.21.20.225..Date: Thu, 04 Dec 2003 20:42:51 GMT..CSeq:
>   101 INVITE..Expires: 180..User-Agent: Cisco-SIP-IP-Phone/2..Accept: applic
>  ation/sdp..Contact: sip:IC225 at 172.21.20.225:5060..Content-Type: application
>  /sdp..Content-Length: 222....v=0..o=CiscoSystemsSIP-IPPhone-UserAgent 8030
>  16590 IN IP4 172.21.20.225..s=SIP Call..c=IN IP4 172.21.20.225..t=0 0..m=au
>  dio 26274 RTP/AVP 0 8 18 96..a=rtpmap:0 pcmu/8000..a=rtpmap:96 telephone-ev
>  ent/8000..a=fmtp:96 0-11..
>
>Is there anything I can change in the ser.cfg to instruct SER to match
>against the To: header?

SER has always matched against request URI and that's the proper thing to do.
The INVITE above should be processed using Route processing, as for example
in default script.

-jiri 




More information about the sr-users mailing list