[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sr-dev
Subject:    [Devel] remove_hf / fix_nated_contact problems
From:       junk () urtho ! net (Urtho)
Date:       2006-04-29 15:16:09
Message-ID: 068E240C-8338-471F-9011-41DD2617C9F3 () urtho ! net
[Download RAW message or body]

Hi,


I have the following script logic:

   if (method=="REGISTER") {
     setflag(6);
     fix_nated_contact();
     save_noreply("location");
     if(remove_hf("Contact")) {
       insert_hf("Contact: <sip:foo@bar>\r\n","CSeq");
     }
   }

   if (!t_relay()) {
     sl_reply_error();
   }

Packets coming out of OpenSER 1.1.0 dev16 box contain  
fix_nated_contact garbage
in a line that should be removed in remove_hf call.

Incoming packet:

REGISTER sip:sipx.vw SIP/2.0.
Via: SIP/2.0/UDP 192.168.1.173:5062;branch=z9hG4bKff0a7dd220cf3149.
From: "Pawel Pierscionek" <sip:201@sipx.vw>;tag=073a4b606ef0a0a3.
To: <sip:201@sipx.vw>.
Contact: <sip:201@192.168.1.173:5062>.
Authorization: Digest username="201", realm="vw", algorithm=MD5,  
uri="sip:sipx.vw",  
nonce="71844b8957f35797a26aa17b9e9177e41146309374",  
response="e426e6a08a5cb8b2c44f643618181cce".
Call-ID: df1db51e06834941@192.168.1.173.
CSeq: 20003 REGISTER.
Expires: 18000.
User-Agent: Grandstream GXP2000 1.0.2.8.
Max-Forwards: 70.
Allow:  
INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK.
Content-Length: 0.

Outgoing packet with remove_hf/fix_nated_contact problems:

REGISTER sip:sipx.vw SIP/2.0.
Via: SIP/2.0/UDP 83.18.203.134;branch=z9hG4bK2688.1678c586.0.
Via: SIP/2.0/UDP  
192.168.1.173:5062;rport=5062;received=212.202.236.178;branch=z9hG4bKff0 
a7dd220cf3149.
From: "Pawel Pierscionek" <sip:201@sipx.vw>;tag=073a4b606ef0a0a3.
To: <sip:201@sipx.vw>.
sip:201@212.202.236.178:5062Authorization: Digest username="201",  
realm="vw", algorithm=MD5, uri="sip:sipx.vw",  
nonce="71844b8957f35797a26aa17b9e9177e41146309374",  
response="e426e6a08a5cb8b2c44f643618181c
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Call-ID: df1db51e06834941@192.168.1.173.
Contact: <sip:201@83.18.203.134:5060>.
CSeq: 20003 REGISTER.
Expires: 18000.
User-Agent: Grandstream GXP2000 1.0.2.8.
Max-Forwards: 69.
Allow:  
INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK.
Content-Length: 0.

Urtho,

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic