[Users] OperSER can't handle a maddr tag in the RURI

Dr. Rodney G. McDuff mcduff at its.uq.edu.au
Mon Mar 6 03:02:08 CET 2006


I am try to get Windows Messenger v5.1 to play nicely with other UAs and
SER/OpenSER and Asterisk. One of the problems that is confounding me is
WM5 non-standard contact header which is of the form:

    Contact:
<sip:user at domain.net:5060;maddr=xxx.xxx.152.57;transport=tcp>;proxy=replace.

The SIP RFC say that a maddr URL tag overrides the host part of the url
(at least for the Via header). However when a UA uses this contact to
send an ACK or BYE back to the WM5 UA , OpenSER does seem to be able to
route it to xxx.xxx.152.57. If fact Openser pops the route header off
(which contains the IP for the proxy) into the RURI and the response
goes nowhere. (See attached trace) 

When I rewrite the contact in the config file but put the following code
in route[0]:

    if (method=="INVITE") {
        if (search("^Contact:.*;maddr=")) {
            # find the host name and replace it withj the maddr tag
            if
(!subst("/^Contact:(.*)sip:([^@]+)@([a-zA-Z0-9.]+)(.*);maddr=([0-9.]+)(.*)/Contact:\1sip:\2@\5\4;maddr=\5\6/i"))
{
                xlog("L_NOTICE", "route[0]: ERROR rewriting maddr
contact $hdr(contact[0])\n");
            } else {
                xlog("L_NOTICE", "route[0]: Rewrote maddr contact
$hdr(contact[0])\n");
            }
        }
    }

and the following in onreply_route[1]:

    if (status=="200") {
        if (search("^Contact:.*;maddr=")) {
            # find the host name and replace it withj the maddr tag
            if
(!subst("/^Contact:(.*)sip:([^@]+)@([a-zA-Z0-9.]+)(.*);maddr=([0-9.]+)(.*)/Contact:\1sip:\2@\5\4;maddr=\5\6/i"))
{
                xlog("L_NOTICE", "onreply_route[1]: ERROR rewriting
maddr contact $hdr(contact[0])\n");
            } else {
                xlog("L_NOTICE", "onreply_route[1]: Rewrote maddr
contact $hdr(contact[0])\n");
            }
        }
    }

the calls proceed and terminate correctly in both directions.

The question then arises should OpenSER handle maddr URL tags in the RURI




PS. Does anyone know what the proxy=replace header tag means?

-- 
Dr. Rodney G. McDuff                 |Ex ignorantia ad sapientiam
Manager, Strategic Technologies Group|    Ex luce ad tenebras
Information Technology Services      |
The University of Queensland         |
EMAIL: mcduff at its.uq.edu.au          |
TELEPHONE: +61 7 3365 8220           | 

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: wm5.txt
Url: http://lists.kamailio.org/pipermail/users/attachments/20060306/b082803c/attachment.txt 


More information about the Users mailing list