< Previous by Date Date Index Next by Date >
  Thread Index  

[reSIProcate] Possible problem with contact


Hello DUM team,

I noticed what might be a small problem with the generation of the
Contact field in provisional responses. Below is a trace of what I am
seeing, but basically after I send out a 100, any other provisional
responses have two contact fields. Now, according to the RFC:

.... The Contact header field MUST be present and contain exactly one
SIP or SIPS URI in any request that can result in the establishment of a
dialog.... 

I would think this would imply that any response which generates a
dialog should also have one contact field (I may be wrong). The reason
DUM generates more then one contact is that the
Helper::makeResponse(...) method is called for the 100 which generates
the first contact. The  Helper::makeResponse(...) method is called to
generate the 180 and it adds the mLocalContact to the contacts field,
thus, giving two contacts.

In order to make sure that provisional messages (> 100) have one contact
you can change the code in the Dialog::makeResponse(...) to the clear
any existing headers contact headers and then add the mLocalContact.

Brian.

=========================================================================
FWD Trace.


Frame 252 (1104 bytes on wire, 1104 bytes captured)
Linux cooked capture
Internet Protocol, Src Addr: 65.39.205.114 (65.39.205.114), Dst Addr:
192.168.0.57 (192.168.0.57)
User Datagram Protocol, Src Port: 5082 (5082), Dst Port: 5060 (5060)
Session Initiation Protocol
    Request line: INVITE sip:78003@xxxxxxxxxxxx:5060 SIP/2.0
    Message Header
        Record-Route:
<sip:PPC1260502@xxxxxxxxxxxxx:5082>,<sip:78003@xxxxxxxxxxxxxx;ftag=6ed5296e;lr=on>,<sip:PPC1260429@xxxxxxxxxxxxx:5065>
        t: <sip:78003@xxxxxxxxxxxxxx>
        f: 52017 <sip:52017@xxxxxxxxxxxxxx>;tag=6ed5296e
        v: SIP/2.0/UDP
65.39.205.114:5082;branch=PPC1260502.z9hG4bK86c,SIP/2.0/UDP
192.246.69.223;branch=z9hG4bK86c.081531d4.0,SIP/2.0/UDP
65.39.205.114:5065;branch=PPC1260429.z9hG4bK-c87542-421116385-1--c87542-,SIP/2.0/UDP
 192.168.0.57:5060;branc
        i: 56efc6780477b564
        CSeq: 2 INVITE
        m: <sip:PPC1260429@xxxxxxxxxxxxx:5082>
        Max-Forwards: 69
        c: application/sdp
        Proxy-Authorization: Digest
username=52017,realm="fwd.pulver.com",nonce="40f2e73b57fda64e77388dc7aee3ed4b6c35e2b0",uri="sip:78003@xxxxxxxxxxxxxx",response="026d094255efd2ca171f78d4f71e3f22",algorithm=MD5
        l: 187
Session Description Protocol

(Here we send a 100 -> the contact is right)

Frame 253 (593 bytes on wire, 593 bytes captured)
Linux cooked capture
Internet Protocol, Src Addr: 192.168.0.57 (192.168.0.57), Dst Addr:
65.39.205.114 (65.39.205.114)
User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5082 (5082)
Session Initiation Protocol
    Status line: SIP/2.0 100 Trying
    Message Header
        To: <sip:78003@xxxxxxxxxxxxxx>;tag=2a02144c
        From: 52017 <sip:52017@xxxxxxxxxxxxxx>;tag=6ed5296e
        Via: SIP/2.0/UDP
65.39.205.114:5082;branch=PPC1260502.z9hG4bK86c;received=65.39.205.114
        Via: SIP/2.0/UDP 192.246.69.223;branch=z9hG4bK86c.081531d4.0
        Via: SIP/2.0/UDP
65.39.205.114:5065;branch=PPC1260429.z9hG4bK-c87542-421116385-1--c87542-
        Via: SIP/2.0/UDP
192.168.0.57:5060;branch=z9hG4bK-c87542-421116385-1--c87542-;rport
        Call-ID: 56efc6780477b564
        CSeq: 2 INVITE
        Contact: <sip:78003@xxxxxxxxxxxx:5060>
        Content-Length: 0


(Here we send a 180 -> the contacts header has too many values)

Frame 254 (798 bytes on wire, 798 bytes captured)
Linux cooked capture
Internet Protocol, Src Addr: 192.168.0.57 (192.168.0.57), Dst Addr:
65.39.205.114 (65.39.205.114)
User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5082 (5082)
Session Initiation Protocol
    Status line: SIP/2.0 180 Ringing
    Message Header
        To: <sip:78003@xxxxxxxxxxxxxx>;tag=2a02144c
        From: 52017 <sip:52017@xxxxxxxxxxxxxx>;tag=6ed5296e
        Via: SIP/2.0/UDP
65.39.205.114:5082;branch=PPC1260502.z9hG4bK86c;received=65.39.205.114
        Via: SIP/2.0/UDP 192.246.69.223;branch=z9hG4bK86c.081531d4.0
        Via: SIP/2.0/UDP
65.39.205.114:5065;branch=PPC1260429.z9hG4bK-c87542-421116385-1--c87542-
        Via: SIP/2.0/UDP
192.168.0.57:5060;branch=z9hG4bK-c87542-421116385-1--c87542-;rport
        Call-ID: 56efc6780477b564
        CSeq: 2 INVITE
        Record-Route: <sip:PPC1260502@xxxxxxxxxxxxx:5082>
        Record-Route: <sip:78003@xxxxxxxxxxxxxx;ftag=6ed5296e;lr=on>
        Record-Route: <sip:PPC1260429@xxxxxxxxxxxxx:5065>
        Contact: <sip:78003@xxxxxxxxxxxx:5060>
        Contact: <sip:78003@xxxxxxxxxxxx:5060>
        Content-Length: 0