Greetings all:
Having a weird issue with BLF relay from Kamailio <-> FreeSWITCH on the EC2 network.
Set-up:
Natted Client <-> Natted Kamailio <-> Natted FreeSWITCH
Kamailio has a public advertised IP (Amazon Cloud) and sends to FreeSWITCH's public IP (Amazon Cloud). Clients register to Kamailio and the registration sent to FreeSWITCH (via uac).
What works:
When a client registers to kamailio via UDP, all works beautifully.
What doesn't work:
When a client registers to kamailio via TCP, a NOTIFY is sent with almost no information.
Example of UDP traffic:
U 2015/03/26 22:12:30.483767 FREESWITCH_IPADDR:5060 -> KAMAILIO_NAT_IPADDR:5060 NOTIFY sip:3000@CLIENT_PUBLIC_IPADDR:42477;line=51w5wsns SIP/2.0. Via: SIP/2.0/UDP FREESWITCH_IPADDR;rport;branch=z9hG4bKv7X88FmKg04UF. Route: sip:KAMAILIO_PUBLIC_IPADDR;lr=on;ftag=xew5nmpr9q;nat=yes. Record-Route: sip:KAMAILIO_PUBLIC_IPADDR;lr=on;ftag=xew5nmpr9q;nat=yes. Max-Forwards: 70. From: sip:3000@CLIENT_DOMAIN;user=phone;tag=YF4HMSQNlOOt. To: sip:3000@CLIENT_DOMAIN;tag=xew5nmpr9q. Call-ID: 3134323734303730333531303039-ji1sw7gyd7uj. CSeq: 366877453 NOTIFY. Contact: sip:3000@FREESWITCH_IPADDR:5060. User-Agent: FreeSWITCH-mod_sofia/1.4.18+git~20150312T185523Z~4eed221b69~64bit. Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE. Supported: timer, path, replaces. Event: dialog. Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer. Subscription-State: active;expires=2686. Content-Type: application/dialog-info+xml. Content-Length: 546. . <?xml version="1.0"?> <dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="14" state="full" entity="sip:3000@CLIENT_DOMAIN"> <dialog id="312b3bee-d405-11e4-a8b6-41b65d0bd045" direction="initiator"> <state>confirmed</state> <local> <identity display="3000">sip:3000@CLIENT_DOMAIN</identity> <target uri="sip:3000@CLIENT_DOMAIN"> <param pname="+sip.rendering" pvalue="yes"/> </target> </local> <remote> <identity display="*98">sip:*98@CLIENT_DOMAIN</identity> <target uri="sip:**3000@CLIENT_DOMAIN"/> </remote> </dialog> </dialog-info>
U 2015/03/26 22:12:30.483877 KAMAILIO_NAT_IPADDR:5060 -> CLIENT_PUBLIC_IPADDR:42477 NOTIFY sip:3000@CLIENT_PUBLIC_IPADDR:42477;line=51w5wsns SIP/2.0. Via: SIP/2.0/UDP KAMAILIO_PUBLIC_IPADDR:5060;branch=z9hG4bKfabf.4908255bf1623d250ddf7d51a3b49fb8.0. Via: SIP/2.0/UDP FREESWITCH_IPADDR;received=FREESWITCH_IPADDR;rport=5060;branch=z9hG4bKv7X88FmKg04UF. Record-Route: sip:KAMAILIO_PUBLIC_IPADDR;lr=on;ftag=xew5nmpr9q;nat=yes. Max-Forwards: 69. From: sip:3000@CLIENT_DOMAIN;user=phone;tag=YF4HMSQNlOOt. To: sip:3000@CLIENT_DOMAIN;tag=xew5nmpr9q. Call-ID: 3134323734303730333531303039-ji1sw7gyd7uj. CSeq: 366877453 NOTIFY. Contact: sip:3000@FREESWITCH_IPADDR:5060. User-Agent: FreeSWITCH-mod_sofia/1.4.18+git~20150312T185523Z~4eed221b69~64bit. Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE. Supported: timer, path, replaces. Event: dialog. Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer. Subscription-State: active;expires=2686. Content-Type: application/dialog-info+xml. Content-Length: 546. . <?xml version="1.0"?> <dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="14" state="full" entity="sip:3000@CLIENT_DOMAIN"> <dialog id="312b3bee-d405-11e4-a8b6-41b65d0bd045" direction="initiator"> <state>confirmed</state> <local> <identity display="3000">sip:3000@CLIENT_DOMAIN</identity> <target uri="sip:3000@CLIENT_DOMAIN"> <param pname="+sip.rendering" pvalue="yes"/> </target> </local> <remote> <identity display="*98">sip:*98@CLIENT_DOMAIN</identity> <target uri="sip:**3000@CLIENT_DOMAIN"/> </remote> </dialog> </dialog-info>
Example of TCP failure:
U 2015/03/26 22:19:45.963196 FREESWITCH_IPADDR:5060 -> KAMAILIO_NAT_IPADDR:5160 NOTIFY sip:3001@CLIENT_PUBLIC_IPADDR:5065;transport=tcp SIP/2.0. Via: SIP/2.0/UDP FREESWITCH_IPADDR;rport;branch=z9hG4bKjH5Nt8QKUU9Sp. Route: sip:KAMAILIO_PUBLIC_IPADDR:5160;r2=on;lr=on;ftag=9jSFr02tgvHym;nat=yes. Route: sip:KAMAILIO_PUBLIC_IPADDR:5160;transport=tcp;r2=on;lr=on;ftag=9jSFr02tgvHym;nat=yes. Max-Forwards: 70. From: "3000" sip:3000@CLIENT_DOMAIN;tag=9jSFr02tgvHym. To: sip:3001@CLIENT_DOMAIN;tag=1dba0f3ceb32436bi0. Call-ID: 0882b1bc-4ea9-1233-f3a2-12e513dfd8f0. CSeq: 73368127 NOTIFY. Contact: sip:mod_sofia@FREESWITCH_IPADDR:5060. User-Agent: FreeSWITCH-mod_sofia/1.4.18+git~20150312T185523Z~4eed221b69~64bit. Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE. Supported: timer, path, replaces. Event: refer;id=101. Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer. Subscription-State: terminated;reason=noresource. Content-Type: message/sipfrag;version=2.0. Content-Length: 16. . SIP/2.0 200 OK.
T 2015/03/26 22:19:45.963407 KAMAILIO_NAT_IPADDR:5160 -> CLIENT_PUBLIC_IPADDR:5065 [AP] NOTIFY sip:3001@CLIENT_PUBLIC_IPADDR:5065;transport=tcp SIP/2.0. Via: SIP/2.0/TCP KAMAILIO_PUBLIC_IPADDR:5160;branch=z9hG4bKe961.8d1f19f1acc0295e5e397afa76910115.0. Via: SIP/2.0/UDP FREESWITCH_IPADDR;received=FREESWITCH_IPADDR;rport=5060;branch=z9hG4bKjH5Nt8QKUU9Sp. Max-Forwards: 69. From: "3000" sip:3000@CLIENT_DOMAIN;tag=9jSFr02tgvHym. To: sip:3001@CLIENT_DOMAIN;tag=1dba0f3ceb32436bi0. Call-ID: 0882b1bc-4ea9-1233-f3a2-12e513dfd8f0. CSeq: 73368127 NOTIFY. Contact: sip:mod_sofia@FREESWITCH_IPADDR:5060. User-Agent: FreeSWITCH-mod_sofia/1.4.18+git~20150312T185523Z~4eed221b69~64bit. Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE. Supported: timer, path, replaces. Event: refer;id=101. Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer. Subscription-State: terminated;reason=noresource. Content-Type: message/sipfrag;version=2.0. Content-Length: 16. . SIP/2.0 200 OK.
My thoughts is that this is on FreeSWITCH, just not sending a NOTIFY with anything of value. That being said, I'd love to know if (a) anyone else has had this issue or (b) if someone has a different theory.
Thanks!