Hey Guys,
I have the following scenario:
UA1 (UDP) -> Kamailio Proxy -> (TCP) UA2
As per the signaling sample, I would expect that in-dialog SUBSCRIBEs
are bridged between UDP and TCP network but for some reason this does
not happen (the subscribe comes in over UDP and leaves still over UDP
although tcp is present in the route headers). Are we somehow forced to
mangle contact header and add transport parameter to it or the
record-route headers should serve for this purpose?
Any tip would be highly appreciated.
Ta,
DanB
Bellow the traces for initial SUBSCRIBEs as well as in-dialog ones (info
mangled to protect privacy).
#####################################
Normally routed request (non-dialog one, correctly bridged)
#####################################
"""
#
U 2014/11/12 19:04:51.293887 pub_ip_ua:54705 -> pub_ip_ep:5060
SUBSCRIBE sip:user1@fakedomain.com:5060 SIP/2.0.
Via: SIP/2.0/UDP 192.168.243.82:5062;branch=z9hG4bK1114302228.
From: "user2" <sip:user2@fakedomain.com>;tag=1003326118.
To: <sip:user1@fakedomain.com>.
Call-ID: 1273081718.
CSeq: 2 SUBSCRIBE.
Contact: <sip:user2@192.168.243.82:5062>.
Accept: application/dialog-info+xml.
Max-Forwards: 70.
User-Agent: Tiptel IP 284 6.70.13.18 0015651b574f.
Expires: 60.
Event: dialog.
Content-Length: 0.
.
#
T 2014/11/12 19:04:51.295706 pub_ip_ep:34052 -> 192.168.51.168:5060 [AP]
SUBSCRIBE sip:user1@192.168.51.168:5060;transport=tcp SIP/2.0.
Record-Route: <sip:pub_ip_ep;transport=tcp;r2=on;lr;nat=yes>.
Record-Route: <sip:pub_ip_ep;r2=on;lr;nat=yes>.
Via: SIP/2.0/TCP
pub_ip_ep;branch=z9hG4bKe26f.3dce66bd1976447b88f6096e926ce68c.0.
Via: SIP/2.0/UDP
192.168.243.82:5062;rport=54705;received=pub_ip_ua;branch=z9hG4bK1114302228.
From: "user2" <sip:user2@fakedomain.com>;tag=1003326118.
To: <sip:user1@fakedomain.com>.
Call-ID: 1273081718.
CSeq: 2 SUBSCRIBE.
Contact: <sip:user2@192.168.243.82:5062;alias=pub_ip_ua~54705~1>.
Accept: application/dialog-info+xml.
Max-Forwards: 65.
User-Agent: Tiptel IP 284 6.70.13.18 0015651b574f.
Expires: 60.
Event: dialog.
Content-Length: 0.
.
#
T 2014/11/12 19:04:51.300350 192.168.51.168:5060 -> pub_ip_ep:34052 [AP]
SIP/2.0 202 Accepted.
Via: SIP/2.0/TCP
pub_ip_ep;branch=z9hG4bKe26f.3dce66bd1976447b88f6096e926ce68c.0;rport=34052.
Via: SIP/2.0/UDP
192.168.243.82:5062;rport=54705;received=pub_ip_ua;branch=z9hG4bK1114302228.
Record-Route: <sip:pub_ip_ep;transport=tcp;r2=on;lr;nat=yes>.
Record-Route: <sip:pub_ip_ep;r2=on;lr;nat=yes>.
From: "user2" <sip:user2@fakedomain.com>;tag=1003326118.
To: <sip:user1@fakedomain.com>;tag=PFxfnedC0jP7.
Call-ID: 1273081718.
CSeq: 2 SUBSCRIBE.
Contact: <sip:user1@192.168.51.168:5060>.
Expires: 60.
User-Agent: Sipean-AS 1.2.10.
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE,
REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE.
Supported: timer, path, replaces.
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=60.
Content-Length: 0.
.
##
U 2014/11/12 19:04:51.300745 pub_ip_ep:5060 -> pub_ip_ua:54705
SIP/2.0 202 Accepted.
Via: SIP/2.0/UDP
192.168.243.82:5062;rport=54705;received=pub_ip_ua;branch=z9hG4bK1114302228.
Record-Route: <sip:pub_ip_ep;transport=tcp;r2=on;lr;nat=yes>.
Record-Route: <sip:pub_ip_ep;r2=on;lr;nat=yes>.
From: "user2" <sip:user2@fakedomain.com>;tag=1003326118.
To: <sip:user1@fakedomain.com>;tag=PFxfnedC0jP7.
Call-ID: 1273081718.
CSeq: 2 SUBSCRIBE.
Contact: <sip:user1@192.168.51.168:5060>.
Expires: 60.
User-Agent: Sipean-AS 1.2.10.
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE,
REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE.
Supported: timer, path, replaces.
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=60.
Content-Length: 0.
"""
######################
NOT BRIDGED, IN-DIALOG requests:
######################
"""
#
U 2014/11/12 19:46:18.448550 pub_ip_ua:54705 -> pub_ip_ep:5060
SUBSCRIBE sip:user1@192.168.51.168:5060 SIP/2.0.
Via: SIP/2.0/UDP 192.168.243.82:5062;branch=z9hG4bK459444805.
Route: <sip:pub_ip_ep;r2=on;lr;nat=yes>.
Route: <sip:pub_ip_ep;transport=tcp;r2=on;lr;nat=yes>.
From: "user2" <sip:user2@fakedomain.com>;tag=1902678123.
To: <sip:user1@fakedomain.com>;tag=2518urgZJFet.
Call-ID: 2104228355.
CSeq: 3 SUBSCRIBE.
Contact: <sip:user2@192.168.243.82:5062>.
Accept: application/dialog-info+xml.
Max-Forwards: 70.
User-Agent: Tiptel IP 284 6.70.13.18 0015651b574f.
Expires: 60.
Event: dialog.
Content-Length: 0.
.
#
U 2014/11/12 19:46:18.449161 pub_ip_ep:5060 -> 192.168.51.168:5060
SUBSCRIBE sip:user1@192.168.51.168:5060 SIP/2.0.
Via: SIP/2.0/UDP
pub_ip_ep;branch=z9hG4bK7de2.a9aed4070706f93b25b4d2d3d7963a19.0.
Via: SIP/2.0/UDP
192.168.243.82:5062;rport=54705;received=pub_ip_ua;branch=z9hG4bK459444805.
From: "user2" <sip:user2@fakedomain.com>;tag=1902678123.
To: <sip:user1@fakedomain.com>;tag=2518urgZJFet.
Call-ID: 2104228355.
CSeq: 3 SUBSCRIBE.
Contact: <sip:user2@192.168.243.82:5062;alias=pub_ip_ua~54705~1>.
Proxy-Authorization: Digest username="user2", realm="fakedomain.com",
nonce="VGOr71RjqsMDoDyEqMnELO4fotFJLYhV",
uri="sip:user1@192.168.51.168:5060",
response="12fbfa50428b37bd55dbb4b51f8d5cba", algorithm=MD5.
Accept: application/dialog-info+xml.
Max-Forwards: 65.
User-Agent: Tiptel IP 284 6.70.13.18 0015651b574f.
Expires: 60.
Event: dialog.
Content-Length: 0.
"""