[SR-Users] nat_uac_test mode parameter 16

Daniel-Constantin Mierla miconda at gmail.com
Wed Aug 5 10:37:24 CEST 2009


Hello,

On 31.07.2009 14:20 Uhr, Andrew O. Zhukov wrote:
> Daniel-Constantin Mierla пишет:
>>
>>
>> On 31.07.2009 11:55 Uhr, Andrew O. Zhukov wrote:
>>> I just spend a lot of time to fix a trouble with Cisco AS5300 
>>> (AS5350) BYE message disapearing.
>>> The same not resolved case here:
>>> http://lists.iptel.org/pipermail/serusers/2005-July/021698.html
>>>
>>> The source of trouble was in the nat_uac_test parameter 16:
>>>
>>> Here is the part of cisco log:
>>> Jul 31 12:16:00.726 UKR: CCSIP-SPI-CONTROL: 
>>> act_idle_connection_created: Connid(1) created to 
>>> 193.28.184.13:5060, local_port 50058
>>>
>>> --Skipped---
>>> Jul 31 12:16:00.738 UKR: Sent:
>>> INVITE sip:3039100 at 193.28.184.13:5060 SIP/2.0
>>> Via: SIP/2.0/UDP  193.28.184.21:5060
>>> From: <sip:2308228 at 193.28.184.21>;tag=12E601F8-10C7
>>> To: <sip:3039100 at 193.28.184.13>
>>>
>>> Via header the same in the all availible IOS-es.
>>>
>>> As the result openser considerate the Cisco is out of the nat box.
>>>
>>> The question is: Can someone show me the case when this parameter is 
>>> necessary, before I'll switch it of on the production server?
>> I am not sure I got the problem here. Can you send entire sip trace 
>> for such a call? ser/openser does not store dialog state, so the ua 
>> should update details within calls. be sure you can the nathelper 
>> contact update function for ack as well.
>>
>> Daniel
>>
> route[5] {
> #    if (src_ip==193.28.184.21) {
> #            xlog("L_INFO", "AS5300 requrst - M=$rm RURI=$ru F=$fu 
> T=$tu IP=$si ID=$ci\n");
> #            return;
> #    }
>     if (nat_uac_test("19")) {
>         force_rport();
>         if (method=="REGISTER") {
>             fix_nated_register();
>         } else {
>             fix_nated_contact();
>         };
>         setflag(5);
>
> http://www.ipshka.com/core/Nat.txt

caught in some other task meanwhile ... however, the nat is changed for 
the cisco indeed, from PRACK there is a different source port. But the 
200ok for invite goes to old port and is accepted by cisco. Then the ACK 
comes from the new port -- pretty strange.

Since the PRACK and ACK do not have contact header, you can try add it. 
Might help, although the callee should update its dialog state otherwise 
there is not a easy solution.

So:

if(is_method("PRACK|ACK") && !is_present_hf("Contact"))
   append_hf("Contact: <sip:$si:$sp;nat=yes>\r\n");

Let me know if works.

Cheers,
Daniel


> commented if src=
> http://www.ipshka.com/core/NoNat.txt
> Not commented
>
> _______________________________________________
> sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
* SIP Router Bootcamp
* Kamailio (OpenSER) and Asterisk Training
* Berlin, Germany, Sep 1-4, 2009
* http://www.asipto.com/index.php/sip-router-bootcamp/





More information about the sr-users mailing list