Hi all,
Got another anomaly in 4.1.5. I have this block of code which does t_relay_tcp:
if ($var(isTpgw) == 1)
{
xlog("L_INFO","[$ci][$mi][CSeq $cs] isTpgw = $var(isTpgw)");
if (!t_relay_to_tcp())
{
xlog("L_INFO","[$ci][$mi][CSeq $cs] $ua Relaying [$rm] from ($si) to ($rd) via tcp....Error...\n");
t_on_failure("DISPATCHER_FAIL");
}
else
{
xlog("L_INFO","[$ci][$mi][CSeq $cs] $ua Relaying [$rm] from ($si) to ($rd) via tcp\n");
}
}
But when I looked at my sip capture tool, it showed the Via marked by the Kam to use UDP:
INVITE sip:######@<some domain>:5060 SIP/2.0 Record-Route: sip:206.81.191.30;r2=on;lr=on Record-Route: sip:206.81.191.30;transport=tcp;r2=on;lr=on Call-ID: DL9dc0c8dd93-1079779342@gs-3924.GSLAB.COM To: "sip:6204857@sjomaintpsg50.fuzemeeting.com" sip:6204857@sjomaintpsg50.fuzemeeting.com From: "LifesizeSIP" sip:LifesizeSIP@gs-3924.GSLAB.COM:5060;tag=DL325a9e10c7;epid=062EE468 CSeq: 1 INVITE Max-Forwards: 69 Via: SIP/2.0/UDP 206.81.191.30;branch=z9hG4bKb16b.bd6a0791c798e3c859f8608993d584ae.1;i=5611 Via: SIP/2.0/TCP 10.101.199.105:5060;rport=53272;branch=z9hG4bK-fc8090ecf8-DL
206.81.191.30 is the Kam.
I also log the activity as seen in the code with those xlog:
Apr 11 19:38:37 sjomaintpsg50 /usr/local/sbin/kamailio[16348]: INFO: <script>: [DL9dc0c8dd93-1079779342@gs-3924.GSLAB.COM][42][CSeq 1] isTpgw = 1
Apr 11 19:38:37 sjomaintpsg50 /usr/local/sbin/kamailio[16348]: INFO: <script>: [DL9dc0c8dd93-1079779342@gs-3924.GSLAB.COM][42][CSeq 1] LifeSize Softphone 8.1.12 (Windows) Relaying [INVITE] from (10.101.19
9.105) to (206.81.191.72) via tcp
So why did the Kamailio mark the Via header on the outgoing INVITE UDP?
Hello Andrew,
4.1.x is really really old. Please update to a supported version of Kamailio, e.g. from the 5.1 or 5.2 branch. There are many bugs fixed.
Cheers,
Henning
Am 11.04.19 um 22:36 schrieb Andrew Chen: Hi all,
Got another anomaly in 4.1.5. I have this block of code which does t_relay_tcp:
if ($var(isTpgw) == 1)
{
xlog("L_INFO","[$ci][$mi][CSeq $cs] isTpgw = $var(isTpgw)");
if (!t_relay_to_tcp())
{
xlog("L_INFO","[$ci][$mi][CSeq $cs] $ua Relaying [$rm] from ($si) to ($rd) via tcp....Error...\n");
t_on_failure("DISPATCHER_FAIL");
}
else
{
xlog("L_INFO","[$ci][$mi][CSeq $cs] $ua Relaying [$rm] from ($si) to ($rd) via tcp\n");
}
}
But when I looked at my sip capture tool, it showed the Via marked by the Kam to use UDP:
INVITE sip:######@<some domain>:5060 SIP/2.0 Record-Route: sip:206.81.191.30;r2=on;lr=on Record-Route: sip:206.81.191.30;transport=tcp;r2=on;lr=on Call-ID: DL9dc0c8dd93-1079779342@gs-3924.GSLAB.COMmailto:DL9dc0c8dd93-1079779342@gs-3924.GSLAB.COM To: "sip:6204857@sjomaintpsg50.fuzemeeting.commailto:sip%3A6204857@sjomaintpsg50.fuzemeeting.com" <sip:6204857@sjomaintpsg50.fuzemeeting.commailto:sip%3A6204857@sjomaintpsg50.fuzemeeting.com> From: "LifesizeSIP" <sip:LifesizeSIP@gs-3924.GSLAB.COM:5060http://sip:LifesizeSIP@gs-3924.GSLAB.COM:5060>;tag=DL325a9e10c7;epid=062EE468 CSeq: 1 INVITE Max-Forwards: 69 Via: SIP/2.0/UDP 206.81.191.30;branch=z9hG4bKb16b.bd6a0791c798e3c859f8608993d584ae.1;i=5611 Via: SIP/2.0/TCP 10.101.199.105:5060;rport=53272;branch=z9hG4bK-fc8090ecf8-DL
206.81.191.30 is the Kam.
I also log the activity as seen in the code with those xlog:
Apr 11 19:38:37 sjomaintpsg50 /usr/local/sbin/kamailio[16348]: INFO: <script>: [DL9dc0c8dd93-1079779342@gs-3924.GSLAB.COMmailto:DL9dc0c8dd93-1079779342@gs-3924.GSLAB.COM][42][CSeq 1] isTpgw = 1
Apr 11 19:38:37 sjomaintpsg50 /usr/local/sbin/kamailio[16348]: INFO: <script>: [DL9dc0c8dd93-1079779342@gs-3924.GSLAB.COMmailto:DL9dc0c8dd93-1079779342@gs-3924.GSLAB.COM][42][CSeq 1] LifeSize Softphone 8.1.12 (Windows) Relaying [INVITE] from (10.101.19
9.105) to (206.81.191.72) via tcp
So why did the Kamailio mark the Via header on the outgoing INVITE UDP?
-- Andy Chen Sr. Telephony Lead Engineer achen@mailto:achen@thinkingphones.comfuze.comhttp://fuze.com
*Confidentiality Notice: The information contained in this e-mail and any attachments may be confidential. If you are not an intended recipient, you are hereby notified that any dissemination, distribution or copying of this e-mail is strictly prohibited. If you have received this e-mail in error, please notify the sender and permanently delete the e-mail and any attachments immediately. You should not retain, copy or use this e-mail or any attachment for any purpose, nor disclose all or any part of the contents to any other person. Thank you.*
_______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Henning Westerholt - https://skalatan.de/blog/ Kamailio services - https://skalatan.de/services