maddr patch (was Re: [Serdev] Re: [Sems] Stale CSeq Value with BYE

Jiri Kuthan jiri at iptel.org
Mon May 3 21:15:12 UTC 2004


thanks, a good catch! 

-jiri

At 10:57 PM 5/3/2004, Ulrich Holeschak wrote:
>Hello,
>thanks for the hint with subst_uri, i didn't know that this command is
>existing.
>But i had to modify your regular expression a bit, i think you forgot that
>the port is written behind the host name as in this example:
>
>sip:494755 at router.local:14039;maddr=192.168.42.242;transport=tcp
>
>You expression won't match because you don't match the port (:14039) part.
>
>Now i use:
>
>        if
>(subst_uri("/(sip:)([a-zA-Z0-9_.!~*'()%&=+$,;?-]+@)?([a-zA-Z0-9.-]+)(:[0-9]+
>;.*)(maddr=)([0-9.]{7,15})/\1\2\6\4\5\6/"))
>        {
>                log("destination replaced with maddr\n");
>                route(1);
>                break;
>        }
>
>this works well ...
>
>This creates:
>sip:494755 at 192.168.42.242:14039;maddr=192.168.42.242;transport=tcp
>and leaves the port untouched.
>
>In my expression before i have removed the 494755@, i am not sure if this is
>a problem.
>
>Thanks,
>
>Ulrich
>
>----- Original Message ----- 
>From: "Jiri Kuthan" <jiri at iptel.org>
>To: "Ulrich Holeschak" <ulrich at holeschak.de>; "Raphael Coeffic"
><rco at iptel.org>
>Cc: <serdev at lists.iptel.org>
>Sent: Monday, May 03, 2004 12:12 AM
>Subject: maddr patch (was Re: [Serdev] Re: [Sems] Stale CSeq Value with BYE
>
>
>> At 10:29 PM 5/2/2004, Ulrich Holeschak wrote:
>> >Hello,
>> >thanks for the modification, i tried the same thing myself, its working
>now.
>> >
>> >But i had to modify my routing script again to let also the BYE get
>routed
>> >correctly (with maddr present), see here:
>> >
>> >route{
>> >
>> >...
>> >        # Don't accept messages that are too long. Don't change this
>> >setting.
>> >        if ( msg:len > max_len ) {
>> >                sl_send_reply("513", "Message too big");
>> >                break;
>> >        };
>> >       # for Windows Messenger: if maddres is present route telegranms
>there
>> >        if(uri=~"sip:.*@.*:[0-9]*;maddr=.*;.*"){
>>
>>
>> FYI: I made my computer's life easier in that I avoided use of per-request
>> execs by use of subst_uri, a rough but mostly working (no IPv6, foomaddr
>> parameters processed too, etc.)
>>
>>
>subst_uri("/(sip:)([a-zA-Z0-9_.!~*'()%&=+$,;?-]+@)?([a-zA-Z0-9.-]+)(;.*)(mad
>dr=)([0-9.]{7,15})/\1\2\6\4\5\6/");
>>
>> -jiri
>
>_______________________________________________
>Serdev mailing list
>serdev at lists.iptel.org
>http://lists.iptel.org/mailman/listinfo/serdev

--
Jiri Kuthan            http://iptel.org/~jiri/ 




More information about the Serdev mailing list