[SR-Users] SIP Notify use UDP instead TCP

denislav.tsonev at musala.com denislav.tsonev at musala.com
Mon Jun 18 16:15:32 CEST 2018


Hello,

I'm trying to configure Kamailio 5.1 like "presence"  server. Pretty much 
with default settings of kamailio:

# ----- presence params -----
modparam("presence", "db_url", DBURL)
;modparam("presence", "server_address", "sip:10.0.6.226:5060" )
modparam("presence", "send_fast_notify", 0)
modparam("presence", "db_update_period", 20)
modparam("presence", "clean_period", 40)
modparam("presence", "subs_db_mode", 2)
modparam("presence", "fetch_rows", 1000)

# ----- presence_xml params -----
modparam("presence_xml", "db_url", DBURL)
modparam("presence_xml", "force_active", 1)

# ----- presence_dialoginfo params -----
modparam("presence_dialoginfo", "force_single_dialog", 0)

# ----- pua params -----
modparam("pua", "db_url", DBURL)
modparam("pua", "db_mode", 2)
modparam("pua", "update_period", 60)
modparam("pua", "dlginfo_increase_version", 0)
modparam("pua", "reginfo_increase_version", 0)
modparam("pua", "check_remote_contact", 1)
modparam("pua", "fetch_rows", 1000)

# ----- pua_dialoginfo params -----
modparam("pua_dialoginfo", "include_callid", 1)
modparam("pua_dialoginfo", "send_publish_flag", FLT_DLGINFO)
modparam("pua_dialoginfo", "caller_confirmed", 0)
modparam("pua_dialoginfo", "include_tags", 1)
modparam("pua_dialoginfo", "override_lifetime", 124)

# ----- dialog params -----
modparam("dialog", "db_url", DBURL)
modparam("dialog", "enable_stats", 1)
modparam("dialog", "db_mode", 1)
modparam("dialog", "dlg_flag", FLT_DLG)


And when UDP transport is using, everything works perfect. But when TCP is 
using (only "listen: tcp:IP:5060" is set) NOTIFY is not send. When 
"listen: tcp:IP:5060" and "listen: udp:IP:5060" I receive NOTIFY but 
through UDP. SIP trace is bellow:

No.     Time                          Source                Destination    
 Protocol Length Info
    715 2018-06-18 17:05:13,164685    10.0.8.249            10.0.6.226   
SIP      585    Request: SUBSCRIBE sip:71010 at 10.0.6.226:5060;transport=tcp 
| 

Frame 715: 585 bytes on wire (4680 bits), 585 bytes captured (4680 bits) 
on interface 0
Ethernet II, Src: LcfcHefe_86:92:0a (28:d2:44:86:92:0a), Dst: 
8e:5c:a8:56:db:cb (8e:5c:a8:56:db:cb)
Internet Protocol Version 4, Src: 10.0.8.249, Dst: 10.0.6.226
Transmission Control Protocol, Src Port: 50636, Dst Port: 5060, Seq: 1, 
Ack: 1, Len: 531
Session Initiation Protocol (SUBSCRIBE)
    Request-Line: SUBSCRIBE sip:71010 at 10.0.6.226:5060;transport=tcp 
SIP/2.0
    Message Header
        Via: SIP/2.0/TCP 
10.0.8.249:5060;transport=tcp;branch=z9hG4bK-10772-1-0
        From: <sip:61010 at 10.0.8.249>;transport=tcp;tag=1
        To: <sip:71010 at 10.0.6.226:5060>
        Call-ID: 1-10772 at 10.0.8.249
        CSeq: 1 SUBSCRIBE
        Contact: sip:61010 at 10.0.8.249:5060;transport=tcp
        Max-Forwards: 10
        Event: dialog
        Expires: 7200
        [Expert Info (Warning/Malformed): Header has no colon after the 
name]
        User-Agent: SIPp/Win32
        Accept: application/dialog-info+xml, multipart/related, 
application/rlmi+xml
        Content-Length: 0

No.     Time                          Source                Destination    
 Protocol Length Info
    870 2018-06-18 17:05:13,259323    10.0.6.226            10.0.8.249   
SIP      439    Status: 202 OK | 

Frame 870: 439 bytes on wire (3512 bits), 439 bytes captured (3512 bits) 
on interface 0
Ethernet II, Src: 8e:5c:a8:56:db:cb (8e:5c:a8:56:db:cb), Dst: 
LcfcHefe_86:92:0a (28:d2:44:86:92:0a)
Internet Protocol Version 4, Src: 10.0.6.226, Dst: 10.0.8.249
Transmission Control Protocol, Src Port: 5060, Dst Port: 50636, Seq: 1, 
Ack: 532, Len: 385
Session Initiation Protocol (202)
    Status-Line: SIP/2.0 202 OK
    Message Header
        Via: SIP/2.0/TCP 
10.0.8.249:5060;transport=tcp;branch=z9hG4bK-10772-1-0
        From: <sip:61010 at 10.0.8.249>;transport=tcp;tag=1
        To: 
<sip:71010 at 10.0.6.226:5060>;tag=b3c72a85f6f978c1e325d5994421001b-970f
        Call-ID: 1-10772 at 10.0.8.249
        CSeq: 1 SUBSCRIBE
        Expires: 3600
        Contact: <sip:10.0.6.226:5060;transport=tcp>
        Server: kamailio (5.1.3 (x86_64/linux))
        Content-Length: 0

No.     Time                          Source                Destination    
 Protocol Length Info
    871 2018-06-18 17:05:13,259815    10.0.8.249            10.0.6.226   
SIP      337    Status: 200 OK | 

Frame 871: 337 bytes on wire (2696 bits), 337 bytes captured (2696 bits) 
on interface 0
Ethernet II, Src: LcfcHefe_86:92:0a (28:d2:44:86:92:0a), Dst: 
8e:5c:a8:56:db:cb (8e:5c:a8:56:db:cb)
Internet Protocol Version 4, Src: 10.0.8.249, Dst: 10.0.6.226
Transmission Control Protocol, Src Port: 50636, Dst Port: 5060, Seq: 532, 
Ack: 386, Len: 283
Session Initiation Protocol (200)
    Status-Line: SIP/2.0 200 OK
    Message Header
        Via: SIP/2.0/TCP 
10.0.8.249:5060;transport=tcp;branch=z9hG4bK-10772-1-0
        From: <sip:61010 at 10.0.8.249>;transport=tcp;tag=1
        To: 
<sip:71010 at 10.0.6.226:5060>;tag=b3c72a85f6f978c1e325d5994421001b-970f
        Call-ID: 1-10772 at 10.0.8.249
        CSeq: 1 SUBSCRIBE
        Content-Length: 0

No.     Time                          Source                Destination    
 Protocol Length Info
   1924 2018-06-18 17:05:19,259639    10.0.6.226            10.0.8.249   
SIP      1193   Request: NOTIFY sip:61010 at 10.0.8.249:5060 | 

Frame 1924: 1193 bytes on wire (9544 bits), 1193 bytes captured (9544 
bits) on interface 0
Ethernet II, Src: 8e:5c:a8:56:db:cb (8e:5c:a8:56:db:cb), Dst: 
LcfcHefe_86:92:0a (28:d2:44:86:92:0a)
Internet Protocol Version 4, Src: 10.0.6.226, Dst: 10.0.8.249
User Datagram Protocol, Src Port: 5060, Dst Port: 5060
Session Initiation Protocol (NOTIFY)
    Request-Line: NOTIFY sip:61010 at 10.0.8.249:5060 SIP/2.0
    Message Header
        Via: SIP/2.0/UDP 
10.0.6.226;branch=z9hG4bKe05d.273c9ca6000000000000000000000000.0
        To: <sip:61010 at 10.0.8.249>;tag=1
        From: 
<sip:71010 at 10.0.6.226>;tag=b3c72a85f6f978c1e325d5994421001b-970f
        CSeq: 2 NOTIFY
        Call-ID: 1-10772 at 10.0.8.249
        Content-Length: 644
        User-Agent: kamailio (5.1.3 (x86_64/linux))
        Max-Forwards: 70
        Event: dialog
        Contact: <sip:10.0.6.226:5060;transport=tcp>
        Subscription-State: active;expires=3594
        Content-Type: application/dialog-info+xml
    Message Body

No.     Time                          Source                Destination    
 Protocol Length Info
   1989 2018-06-18 17:05:19,705774    10.0.6.226            10.0.8.249   
SIP      1193   Request: NOTIFY sip:61010 at 10.0.8.249:5060 | 

Frame 1989: 1193 bytes on wire (9544 bits), 1193 bytes captured (9544 
bits) on interface 0
Ethernet II, Src: 8e:5c:a8:56:db:cb (8e:5c:a8:56:db:cb), Dst: 
LcfcHefe_86:92:0a (28:d2:44:86:92:0a)
Internet Protocol Version 4, Src: 10.0.6.226, Dst: 10.0.8.249
User Datagram Protocol, Src Port: 5060, Dst Port: 5060
Session Initiation Protocol (NOTIFY)
    Request-Line: NOTIFY sip:61010 at 10.0.8.249:5060 SIP/2.0
    Message Header
        Via: SIP/2.0/UDP 
10.0.6.226;branch=z9hG4bKe05d.273c9ca6000000000000000000000000.0
        To: <sip:61010 at 10.0.8.249>;tag=1
        From: 
<sip:71010 at 10.0.6.226>;tag=b3c72a85f6f978c1e325d5994421001b-970f
        CSeq: 2 NOTIFY
        Call-ID: 1-10772 at 10.0.8.249
        Content-Length: 644
        User-Agent: kamailio (5.1.3 (x86_64/linux))
        Max-Forwards: 70
        Event: dialog
        Contact: <sip:10.0.6.226:5060;transport=tcp>
        Subscription-State: active;expires=3594
        Content-Type: application/dialog-info+xml
    Message Body

Could someone help? Thanks in advance.

Best regards,



Denislav Raychev Tsonev  |  Integration and Infrastructure Engineer |  
Musala Soft JSC 
www.musala.com  |  t: +359 2 969 58 21   |  m: +359 878 270 965   |  f: 
+359 2 969 58 22 
World Trade Center, 36 Dragan Tsankov blvd., Sofia 1057, Bulgaria 







-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180618/9801ef9c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 5133 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180618/9801ef9c/attachment.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 1825 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180618/9801ef9c/attachment-0001.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 2091 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180618/9801ef9c/attachment-0002.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 3074 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180618/9801ef9c/attachment-0003.jpe>


More information about the sr-users mailing list