Hello,

My SIP device is giving bad contact header when I'm trying to register via softphone. Below are the SIP TRACE I have posted.

    freeswitch@domU-12-31-39-02-85-BD> recv 569 bytes from udp/[189.234.223.22]:10604 at 19:32:38.981695:
       ------------------------------------------------------------------------
       REGISTER sip:54.225.79.159;transport=udp SIP/2.0
       Via: SIP/2.0/UDP 189.234.223.22:10604;branch=z9hG4bK-d8754z-7ac384e9b8979fec-1---d8754z-;rport
       Max-Forwards: 70
       Contact: <sip:1000@189.234.223.22:10604;rinstance=830f25b897d4ecb9;transport=udp>
       To: "1000"<sip:1000@54.225.79.159>
       From: "1000"<sip:1000@54.225.79.159>;tag=a4771acf
       Call-ID: Nzk3Mjk3MmE0YjY5MjkxNmNiZGQyMDdmODI1NjhmNWM
       CSeq: 1 REGISTER
       Expires: 3600
       Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
       User-Agent: X-Lite release 4.5 stamp 69607
       Content-Length: 0
     
       ------------------------------------------------------------------------
    send 672 bytes to udp/[189.234.223.22]:10604 at 19:32:38.982923:
       ------------------------------------------------------------------------
       SIP/2.0 401 Unauthorized
       Via: SIP/2.0/UDP 189.234.223.22:10604;branch=z9hG4bK-d8754z-7ac384e9b8979fec-1---d8754z-;rport=10604
       From: "1000"<sip:1000@54.225.79.159>;tag=a4771acf
       To: "1000" <sip:1000@54.225.79.159>;tag=120rgNHa202Xc
       Call-ID: Nzk3Mjk3MmE0YjY5MjkxNmNiZGQyMDdmODI1NjhmNWM
       CSeq: 1 REGISTER
       User-Agent: FreeSWITCH-mod_sofia/1.5.1b+git~20130406T213201Z~1e251568cc
       Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
       Supported: precondition, path, replaces
       WWW-Authenticate: Digest realm="54.225.79.159", nonce="8b341bb6-0b60-45bd-9c12-d2fba508c185", algorithm=MD5, qop="auth"
       Content-Length: 0
     
       ------------------------------------------------------------------------
    2013-04-25 19:32:38.982782 [WARNING] sofia_reg.c:1587 SIP auth challenge (REGISTER) on sofia profile 'internal' for [1000@54.225.79.159] from ip 189.234.223.22
    recv 834 bytes from udp/[189.234.223.22]:10604 at 19:32:39.159706:
       ------------------------------------------------------------------------
       REGISTER sip:54.225.79.159;transport=udp SIP/2.0
       Via: SIP/2.0/UDP 189.234.223.22:10604;branch=z9hG4bK-d8754z-5015538769fafb1a-1---d8754z-;rport
       Max-Forwards: 70
       Contact: <sip:1000@189.234.223.22:10604;rinstance=830f25b897d4ecb9;transport=udp>
       To: "1000"<sip:1000@54.225.79.159>
       From: "1000"<sip:1000@54.225.79.159>;tag=a4771acf
       Call-ID: Nzk3Mjk3MmE0YjY5MjkxNmNiZGQyMDdmODI1NjhmNWM
       CSeq: 2 REGISTER
       Expires: 3600
       Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
       User-Agent: X-Lite release 4.5 stamp 69607
       Authorization: Digest username="1000",realm="54.225.79.159",nonce="8b341bb6-0b60-45bd-9c12-d2fba508c185",uri="sip:54.225.79.159;transport=udp",response="428a6156713f632381221a14fbd4fd52",cnonce="d7aa657b759663a6b51d81c568efdbdc",nc=00000001,qop=auth,algorithm=MD5
       Content-Length: 0
     
       ------------------------------------------------------------------------
    send 674 bytes to udp/[189.234.223.22]:10604 at 19:32:39.162185:
       ------------------------------------------------------------------------
       SIP/2.0 200 OK
       Via: SIP/2.0/UDP 189.234.223.22:10604;branch=z9hG4bK-d8754z-5015538769fafb1a-1---d8754z-;rport=10604
       From: "1000"<sip:1000@54.225.79.159>;tag=a4771acf
       To: "1000" <sip:1000@54.225.79.159>;tag=2BtHjg2DZ9rgr
       Call-ID: Nzk3Mjk3MmE0YjY5MjkxNmNiZGQyMDdmODI1NjhmNWM
       CSeq: 2 REGISTER
       Contact: <sip:1000@189.234.223.22:10604;rinstance=830f25b897d4ecb9;transport=udp>;expires=3600
       Date: Thu, 25 Apr 2013 19:32:39 GMT
       User-Agent: FreeSWITCH-mod_sofia/1.5.1b+git~20130406T213201Z~1e251568cc
       Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
       Supported: precondition, path, replaces
       Content-Length: 0
     
       ------------------------------------------------------------------------
    recv 829 bytes from udp/[189.234.223.22]:10604 at 19:32:39.339465:
       ------------------------------------------------------------------------
       REGISTER sip:54.225.79.159;transport=udp SIP/2.0
       Via: SIP/2.0/UDP 189.234.223.22:10604;branch=z9hG4bK-d8754z-b7e8bd30145a2cb4-1---d8754z-;rport
       Max-Forwards: 70
       Contact: <sip:1000@189.234.223.22:10604;rinstance=830f25b897d4ecb9;transport=udp>;expires=0
       To: "1000"<sip:1000@54.225.79.159>
       From: "1000"<sip:1000@54.225.79.159>;tag=a4771acf
       Call-ID: Nzk3Mjk3MmE0YjY5MjkxNmNiZGQyMDdmODI1NjhmNWM
       CSeq: 3 REGISTER
       Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
       User-Agent: X-Lite release 4.5 stamp 69607
       Authorization: Digest username="1000",realm="54.225.79.159",nonce="8b341bb6-0b60-45bd-9c12-d2fba508c185",uri="sip:54.225.79.159;transport=udp",response="a957575e31cdba10c7be41a9db26eda2",cnonce="70b4da67f9ae2f1ab6f2599658e00548",nc=00000002,qop=auth,algorithm=MD5
       Content-Length: 0
     
       ------------------------------------------------------------------------
    send 578 bytes to udp/[189.234.223.22]:10604 at 19:32:39.341224:
       ------------------------------------------------------------------------
       SIP/2.0 200 OK
       Via: SIP/2.0/UDP 189.234.223.22:10604;branch=z9hG4bK-d8754z-b7e8bd30145a2cb4-1---d8754z-;rport=10604
       From: "1000"<sip:1000@54.225.79.159>;tag=a4771acf
       To: "1000" <sip:1000@54.225.79.159>;tag=3mKamBKHvjF3K
       Call-ID: Nzk3Mjk3MmE0YjY5MjkxNmNiZGQyMDdmODI1NjhmNWM
       CSeq: 3 REGISTER
       Date: Thu, 25 Apr 2013 19:32:39 GMT
       User-Agent: FreeSWITCH-mod_sofia/1.5.1b+git~20130406T213201Z~1e251568cc
       Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
       Supported: precondition, path, replaces
       Content-Length: 0
     
       ------------------------------------------------------------------------
    recv 840 bytes from udp/[189.234.223.22]:10604 at 19:32:39.517716:
       ------------------------------------------------------------------------
       REGISTER sip:54.225.79.159;transport=udp SIP/2.0
       Via: SIP/2.0/UDP 189.234.223.22:10604;branch=z9hG4bK-d8754z-c43ad0c3c11ccbe2-1---d8754z-;rport
       Max-Forwards: 70
       Contact: <sip:1000@189.234.223.22:10604:10604;transport=udp;rinstance=6860708eab0fb92b>
       To: "1000"<sip:1000@54.225.79.159>
       From: "1000"<sip:1000@54.225.79.159>;tag=a4771acf
       Call-ID: Nzk3Mjk3MmE0YjY5MjkxNmNiZGQyMDdmODI1NjhmNWM
       CSeq: 4 REGISTER
       Expires: 3600
       Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
       User-Agent: X-Lite release 4.5 stamp 69607
       Authorization: Digest username="1000",realm="54.225.79.159",nonce="8b341bb6-0b60-45bd-9c12-d2fba508c185",uri="sip:54.225.79.159;transport=udp",response="89e4f1175f553d3fcc27811f956dcf1a",cnonce="418a6e48bdec6d7e8c4ae68f1e80dd27",nc=00000003,qop=auth,algorithm=MD5
       Content-Length: 0
     
       ------------------------------------------------------------------------
    send 334 bytes to udp/[189.234.223.22]:10604 at 19:32:39.517869:
       ------------------------------------------------------------------------
       SIP/2.0 400 Bad Contact Header
       Via: SIP/2.0/UDP 189.234.223.22:10604;branch=z9hG4bK-d8754z-c43ad0c3c11ccbe2-1---d8754z-;rport=10604
       From: "1000" <sip:1000@54.225.79.159>;tag=a4771acf
       To: "1000" <sip:1000@54.225.79.159>;tag=4Xc3N63mSU5NF
       Call-ID: Nzk3Mjk3MmE0YjY5MjkxNmNiZGQyMDdmODI1NjhmNWM
       CSeq: 4 REGISTER
       Content-Length: 0
     
       ------------------------------------------------------------------------  

At last its sending contact like this : Contact: <sip:1000@189.234.223.22:10604:10604;transport=udp;rinstance=6860708eab0fb92b>

Port 10604 is attached 2 times and I think this may be the issue. I have also turned off SIP ALG in router.

Please help me as its very critical issue.

Thanks
Manish Khilwani

        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://freeswitch-users.2379917.n2.nabble.com/BAD-CONTACT-HEADER-tp7590229.html">BAD CONTACT HEADER</a><br/>
Sent from the <a href="http://freeswitch-users.2379917.n2.nabble.com/">freeswitch-users mailing list archive</a> at Nabble.com.<br/>