[SR-Users] maddr parameter in contact header and fix_nated_contact

Daniel-Constantin Mierla miconda at gmail.com
Tue Jun 12 11:28:49 CEST 2012


Hello,

thanks for feedback, the patch was backported to 3.2

Cheers,
Daniel

On 6/11/12 10:30 AM, Morten Isaksen wrote:
> Hi Daniel,
>
> Sorry for the late reply. The patch is working ok.
>
> /Morten
>
> On Fri, Jun 1, 2012 at 1:25 PM, Morten Isaksen <misak at misak.dk> wrote:
>> Hi Daniel,
>>
>> Thanks for a very quick response. The patch seems to work fine on
>> 3.2.2. I will do some more testing later today.
>>
>> /Morten
>>
>> On Fri, Jun 1, 2012 at 11:37 AM, Daniel-Constantin Mierla
>> <miconda at gmail.com> wrote:
>>> Hello,
>>>
>>> I committed a patch to remove maddr in fix_nated_contact() as it makes no
>>> sense anymore if contact uri is updated:
>>>
>>> http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c3caaa4c12f76c77381c6a0afc8688bc38b16999
>>>
>>> If you can give it a try and all goes ok, then I will backport.
>>>
>>> Cheers,
>>> Daniel
>>>
>>>
>>> On 6/1/12 9:45 AM, Morten Isaksen wrote:
>>>> Hi Again,
>>>>
>>>> For some reason my e-mail got truncated. Here is the complete e-mail:
>>>>
>>>> I have this setup:
>>>>
>>>> Mediation server with internal ip -- NAT firewall -- Kamailio proxy --
>>>> PSTN gateway
>>>>
>>>> The mediation server sends a contact header with maddr=<internal IP>
>>>>
>>>> fix_nated_contact only changes the host part and leaves the maddr intact.
>>>>
>>>> When the PSTN gateway sends a PRACK or a BYE it puts the <internal IP>
>>>> in the RURI, and kamailio then try to forward the message directly to
>>>> the <internal IP> and not the NAT ip.
>>>>
>>>>   From RFC 3261 19.1.1:
>>>>
>>>> The maddr parameter indicates the server address to be
>>>> contacted for this user, overriding any address derived from
>>>> the host field.  When an maddr parameter is present, the port
>>>> and transport components of the URI apply to the address
>>>> indicated in the maddr parameter value.  [4] describes the
>>>> proper interpretation of the transport, maddr, and hostport in
>>>> order to obtain the destination address, port, and transport
>>>> for sending a request.
>>>>
>>>> I can see that OpenSIPS has fixed this.
>>>>
>>>> http://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3312423&group_id=232389
>>>>
>>>> Would it be possible to get this patch into Kamailio also?
>>>>
>>>> /Morten
>>>>
>>>>
>>>>
>>>> On Fri, Jun 1, 2012 at 8:57 AM, Morten Isaksen <misak at misak.dk> wrote:
>>>>> Hi,
>>>>>
>>>>> I have this setup:
>>>>>
>>>>> Mediation server with internal ip -- NAT firewall -- Kamailio proxy --
>>>>> PSTN gateway
>>>>>
>>>>> The mediation server sends a contact header with maddr=<internal IP>
>>>>>
>>>>> fix_nated_contact only changes the host part and leaves the maddr intact.
>>>>>
>>>>> When the PSTN gateway sends a PRACK or a BYE it puts the <internal IP>
>>>>> in the RURI, and kamailio then try to forward the message directly to
>>>>> the <internal IP> and not the NAT ip.
>>>>>
>>>>>
>>>>>   From RFC 3261 19.1.1:
>>>>>
>>>>>          The maddr parameter indicates the server address to be
>>>>>          contacted for this user, overriding any address derived from
>>>>>          the host field.  When an maddr parameter is present, the port
>>>>>          and transport components of the URI apply to the address
>>>>>          indicated in the maddr parameter value.  [4] describes the
>>>>>          proper interpretation of the transport, maddr, and hostport in
>>>>>          order to obtain the destination address, port, and transport
>>>>>          for sending a request.
>>>>>
>>>>>
>>>>> I can see that OpenSIPS has fixed this.
>>>>>
>>>>> http://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3312423&group_id=232389
>>>>>
>>>>> Would it be possible to get this patch into Kamailio also?
>>>>>
>>>>> --
>>>>> Morten Isaksen
>>>>
>>>>
>>> --
>>> Daniel-Constantin Mierla - http://www.asipto.com
>>> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
>>> Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 -
>>> http://asipto.com/u/katu
>>> Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 -
>>> http://asipto.com/u/kpw
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> sr-users at lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>> --
>> Morten Isaksen
>
>

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 - http://asipto.com/u/katu
Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - http://asipto.com/u/kpw






More information about the sr-users mailing list