<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Please do not write private emails, keep the mailing list cc-ed.<br>
<br>
Can you get the output of:<br>
<br>
ngrep -d any -qt -W byline port 5040<br>
<br>
on kamailio server for such a call? Include all messages, since you
may miss something in your filtering (like you did below), of course
you can mask the ip addresses.<br>
<br>
Also, be sure you do t_relay() to forward the invite from kamailio
on.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
On 5/20/11 3:47 PM, Carl Wagner wrote:
<blockquote cite="mid:4DD670EB.1060504@verbalworld.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Daniel,<br>
<br>
With a non-2xx reply being hop-by-hop, shouldn't Kamailio receive
the 486, send the ACK to the sender, and then proxy the 486?<br>
<br>
I am not seeing the 486 message in the Kamailio log so I assume
that it automatically handles it without hitting the kamailio.cfg
script? Or do I need to set up a failure_route to catch the 486
and send the ACK there?<br>
<br>
Please see the log below.<br>
<br>
Thanks,<br>
Carl<br>
<br>
<br>
<br>
# Asterisk to Kamailio<br>
U 2011/05/19 14:13:01.467157 3.4.5.167:5060 -> 3.4.5.164:5060<br>
INVITE <a moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:sip:+13031112222@3.4.5.164">sip:+13031112222@3.4.5.164</a>
SIP/2.0.<br>
Via: SIP/2.0/UDP 3.4.5.167:5060;branch=z9hG4bK3183c9de;rport.<br>
From: "+13032223333" <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:sip:+13032223333@3.4.5.167"><sip:+13032223333@3.4.5.167></a>;tag=as1f559f5a.<br>
To: <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:sip:+13031112222@3.4.5.164"><sip:+13031112222@3.4.5.164></a>.<br>
Contact: <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:sip:+13032223333@3.4.5.167"><sip:+13032223333@3.4.5.167></a>.<br>
Call-ID: <a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:37ef92a26c31a7f85958ae996d49a872@3.4.5.167">37ef92a26c31a7f85958ae996d49a872@3.4.5.167</a>.<br>
CSeq: 102 INVITE.<br>
User-Agent: Asterisk.<br>
Max-Forwards: 70.<br>
Date: Thu, 19 May 2011 20:13:01 GMT.<br>
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE,
NOTIFY.<br>
Supported: replaces.<br>
Content-Type: application/sdp.<br>
Content-Length: 238.<br>
.<br>
v=0.<br>
o=root 27806 27806 IN IP4 3.4.5.167.<br>
s=session.<br>
c=IN IP4 3.4.5.167.<br>
t=0 0.<br>
m=audio 13424 RTP/AVP 0 101.<br>
a=rtpmap:0 PCMU/8000.<br>
a=rtpmap:101 telephone-event/8000.<br>
a=fmtp:101 0-16.<br>
a=silenceSupp:off - - - -.<br>
a=ptime:20.<br>
a=sendrecv.<br>
<br>
# Kamailio to provider<br>
U 2011/05/19 14:13:01.468627 3.4.5.164:5060 -> 2.3.4.40:5060<br>
INVITE <a moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:sip:+13031112222@2.3.4.40:5060">sip:+13031112222@2.3.4.40:5060</a>
SIP/2.0.<br>
Record-Route: <a class="moz-txt-link-rfc2396E" href="sip:3.4.5.164;lr=on"><sip:3.4.5.164;lr=on></a>.<br>
Via: SIP/2.0/UDP 3.4.5.164;branch=0.<br>
Via: SIP/2.0/UDP 3.4.5.167:5060;branch=z9hG4bK3183c9de;rport=5060.<br>
From: "+13032223333" <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:sip:+13032223333@3.4.5.167"><sip:+13032223333@3.4.5.167></a>;tag=as1f559f5a.<br>
To: <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:sip:+13031112222@2.3.4.40:5060"><sip:+13031112222@2.3.4.40:5060></a>.<br>
Contact: <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:sip:+13032223333@3.4.5.167"><sip:+13032223333@3.4.5.167></a>.<br>
Call-ID: <a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:37ef92a26c31a7f85958ae996d49a872@3.4.5.167">37ef92a26c31a7f85958ae996d49a872@3.4.5.167</a>.<br>
CSeq: 102 INVITE.<br>
User-Agent: Asterisk.<br>
Max-Forwards: 69.<br>
Date: Thu, 19 May 2011 20:13:01 GMT.<br>
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE,
NOTIFY.<br>
Supported: replaces.<br>
Content-Type: application/sdp.<br>
Content-Length: 238.<br>
.<br>
v=0.<br>
o=root 27806 27806 IN IP4 3.4.5.167.<br>
s=session.<br>
c=IN IP4 3.4.5.167.<br>
t=0 0.<br>
m=audio 13424 RTP/AVP 0 101.<br>
a=rtpmap:0 PCMU/8000.<br>
a=rtpmap:101 telephone-event/8000.<br>
a=fmtp:101 0-16.<br>
a=silenceSupp:off - - - -.<br>
a=ptime:20.<br>
a=sendrecv.<br>
<br>
<br>
U 2011/05/19 14:13:01.511775 2.3.4.40:37897 -> 3.4.5.164:5060<br>
SIP/2.0 100 Trying.<br>
Via: SIP/2.0/UDP 3.4.5.164;branch=0,SIP/2.0/UDP
3.4.5.167:5060;branch=z9hG4bK3183c9de;rport=5060.<br>
From: "+13032223333" <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:sip:+13032223333@3.4.5.167"><sip:+13032223333@3.4.5.167></a>;tag=as1f559f5a.<br>
To: <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:sip:+13031112222@2.3.4.40:5060"><sip:+13031112222@2.3.4.40:5060></a>.<br>
Call-ID: <a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:37ef92a26c31a7f85958ae996d49a872@3.4.5.167">37ef92a26c31a7f85958ae996d49a872@3.4.5.167</a>.<br>
CSeq: 102 INVITE.<br>
Content-Length: 0.<br>
.<br>
<br>
<br>
U 2011/05/19 14:13:01.513162 3.4.5.164:5060 -> 3.4.5.167:5060<br>
SIP/2.0 100 Trying.<br>
Via: SIP/2.0/UDP 3.4.5.167:5060;branch=z9hG4bK3183c9de;rport=5060.<br>
From: "+13032223333" <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:sip:+13032223333@3.4.5.167"><sip:+13032223333@3.4.5.167></a>;tag=as1f559f5a.<br>
To: <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:sip:+13031112222@2.3.4.40:5060"><sip:+13031112222@2.3.4.40:5060></a>.<br>
Call-ID: <a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:37ef92a26c31a7f85958ae996d49a872@3.4.5.167">37ef92a26c31a7f85958ae996d49a872@3.4.5.167</a>.<br>
CSeq: 102 INVITE.<br>
Content-Length: 0.<br>
.<br>
<br>
# provider says they are busy<br>
U 2011/05/19 14:13:03.239462 2.3.4.40:37897 -> 3.4.5.164:5060<br>
SIP/2.0 486 Busy Here.<br>
Via: SIP/2.0/UDP 3.4.5.164;branch=0,SIP/2.0/UDP
3.4.5.167:5060;branch=z9hG4bK3183c9de;rport=5060.<br>
Record-Route: <a class="moz-txt-link-rfc2396E" href="sip:3.4.5.164;lr=on"><sip:3.4.5.164;lr=on></a>.<br>
From: "+13032223333" <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:sip:+13032223333@3.4.5.167"><sip:+13032223333@3.4.5.167></a>;tag=as1f559f5a.<br>
To: <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:sip:+13031112222@2.3.4.40:5060"><sip:+13031112222@2.3.4.40:5060></a>;tag=VPST506071629352.<br>
Call-ID: <a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:37ef92a26c31a7f85958ae996d49a872@3.4.5.167">37ef92a26c31a7f85958ae996d49a872@3.4.5.167</a>.<br>
CSeq: 102 INVITE.<br>
Contact: <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:sip:+13031112222@2.3.4.40:5060;transport=udp"><sip:+13031112222@2.3.4.40:5060;transport=udp></a>.<br>
Content-Length: 0.<br>
.<br>
<br>
#<br>
# should Kamailio send the ACK here?<br>
#<br>
<br>
# Kamailio proxies the 486 to Asterisk<br>
U 2011/05/19 14:13:03.240820 3.4.5.164:5060 -> 3.4.5.167:5060<br>
SIP/2.0 486 Busy Here.<br>
Via: SIP/2.0/UDP 3.4.5.167:5060;branch=z9hG4bK3183c9de;rport=5060.<br>
Record-Route: <a class="moz-txt-link-rfc2396E" href="sip:3.4.5.164;lr=on"><sip:3.4.5.164;lr=on></a>.<br>
From: "+13032223333" <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:sip:+13032223333@3.4.5.167"><sip:+13032223333@3.4.5.167></a>;tag=as1f559f5a.<br>
To: <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:sip:+13031112222@2.3.4.40:5060"><sip:+13031112222@2.3.4.40:5060></a>;tag=VPST506071629352.<br>
Call-ID: <a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:37ef92a26c31a7f85958ae996d49a872@3.4.5.167">37ef92a26c31a7f85958ae996d49a872@3.4.5.167</a>.<br>
CSeq: 102 INVITE.<br>
Contact: <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:sip:+13031112222@2.3.4.40:5060;transport=udp"><sip:+13031112222@2.3.4.40:5060;transport=udp></a>.<br>
Content-Length: 0.<br>
.<br>
<br>
<br>
# ACK from Asterisk - should be swallowed by Kamailio<br>
U 2011/05/19 14:13:03.243870 3.4.5.167:5060 -> 3.4.5.164:5060<br>
ACK <a moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:sip:+13031112222@3.4.5.164">sip:+13031112222@3.4.5.164</a>
SIP/2.0.<br>
Via: SIP/2.0/UDP 3.4.5.167:5060;branch=z9hG4bK3183c9de;rport.<br>
From: "+13032223333" <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:sip:+13032223333@3.4.5.167"><sip:+13032223333@3.4.5.167></a>;tag=as1f559f5a.<br>
To: <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:sip:+13031112222@3.4.5.164"><sip:+13031112222@3.4.5.164></a>;tag=VPST506071629352.<br>
Contact: <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:sip:+13032223333@3.4.5.167"><sip:+13032223333@3.4.5.167></a>.<br>
Call-ID: <a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:37ef92a26c31a7f85958ae996d49a872@3.4.5.167">37ef92a26c31a7f85958ae996d49a872@3.4.5.167</a>.<br>
CSeq: 102 ACK.<br>
User-Agent: Asterisk.<br>
Max-Forwards: 70.<br>
Content-Length: 0.<br>
.<br>
<br>
<br>
==== a bunch of retransmitted 486's chopped =============<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
On 05/19/2011 02:30 AM, Daniel-Constantin Mierla wrote:
<blockquote cite="mid:4DD4D521.3000303@gmail.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Hello,<br>
<br>
the ACK for non-2xx replies is hop-by-hop, meaning that kamailio
will generate one when the reply is received, will send back the
reply and when the ack comes from upstream, it will absorb it.<br>
<br>
In this case it seems that ack is not matching any invite
transaction and thus is not known where to send it.<br>
<br>
Can you send the invite, reply and the ack requests taken with
ngrep for such case? Maybe is something broken in the content of
the message.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
On 5/18/11 11:23 PM, Carl Wagner wrote:
<blockquote cite="mid:4DD438B6.8040809@verbalworld.com"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-text-flowed" style="font-family: -moz-fixed;
font-size: 12px;" lang="x-western">Hi, <br>
<br>
I have Kamailio set up to act as a proxy and load balancer.
Most things are working correctly but for some reason I
can't get Kamailio to proxy an ACK to a 486 Busy. <br>
I assume that it is something wrong that I have done in the
kamailio.cfg file but I am not seeing it. <br>
<br>
Does the t_check_trans() return false because the call state
is Busy? <br>
<br>
Please let me know if you need other logs or information. <br>
<br>
Thanks in advance, <br>
Carl <br>
<br>
<br>
<br>
================== Call flow: (from ngrep)
====================== <br>
<br>
Asterisk Kamailio Provider <br>
INVITE---------> <br>
INVITE---------> <br>
<----------100 Trying <br>
<---------100 Trying <br>
<----------486 Busy <br>
<---------486 Busy <br>
ACK-------------> <br>
====== Kamailio does not proxy the ACK here ======= <br>
<----------486 Busy <br>
<---------486 Busy <br>
ACK-------------> <br>
<----------486 Busy <br>
<---------486 Busy <br>
<br>
<br>
=== kamailio.cfg snippet <br>
... <br>
route <br>
{ <br>
route(REQINIT); # remove malformed messages <br>
<br>
# handle requests within SIP dialogs <br>
route(WITHINDLG); <br>
... <br>
} <br>
<br>
###################################################################
<br>
# Handle requests within SIP dialogs (request has a TO: Tag)
<br>
route[WITHINDLG] <br>
{ <br>
if (has_totag()) <br>
{ <br>
xlog("L_INFO", " WITHINDLG: SIP Request: [$rm] ruri=[$ru]
(from [$fu] to [$tu], Call-ID=[$ci], CSeq=[$cs])\n"); <br>
if (loose_route()) <br>
{ <br>
... <br>
} <br>
else # not loose_route <br>
{ <br>
if ( is_method("ACK") ) <br>
{ <br>
if ( t_check_trans() ) # see if a message is
related to a transaction <br>
{ <br>
... <br>
} <br>
else <br>
{ <br>
# ACK without matching transaction ... ignore
and discard <br>
xlog("L_INFO", " WITHINDLG: has TO: tag AND loose_route is
NOT true and is_method = ACK and t_check_trans=FALSE\n"); <br>
<br>
# not forwarded here!!! Tried both t_relay and forward. <br>
# $var(a) = t_relay(); <br>
$var(a) = forward(); <br>
xlog ("L_INFO", " WITHINDLG: (ReturnCode =
[$var(a)] exiting)\n"); <br>
<br>
exit; <br>
} <br>
} <br>
sl_send_reply("404","Not here"); <br>
} <br>
exit; <br>
} <br>
} <br>
<br>
============= End of kamailio.cfg ================ <br>
<br>
<br>
============= /var/log/messages - snippit of the message
========== <br>
<br>
May 18 11:21:05 kam0 /usr/sbin/kamailio[21282]: INFO:
<script>: ======== processing new message <br>
May 18 11:21:05 kam0 /usr/sbin/kamailio[21282]: INFO:
<script>: MAIN: SIP Request: [ACK] ruri=[<a
moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:sip:+13031112222@2.3.4.5">sip:+13031112222@2.3.4.5</a>]
(from [<a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:sip:+13031112222@3.4.5.6">sip:+13031112222@3.4.5.6</a>]
to [<a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:sip:+13031112222@2.3.4.5">sip:+13031112222@2.3.4.5</a>],
Call-ID=[<a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:21a30b9168e0a8c963d47ca1361cef77@3.4.5.6">21a30b9168e0a8c963d47ca1361cef77@3.4.5.6</a>])
CSeq=[102] <br>
May 18 11:21:05 kam0 /usr/sbin/kamailio[21282]: INFO:
<script>: WITHINDLG: SIP Request: [ACK] ruri=[<a
moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:sip:+13031112222@2.3.4.5">sip:+13031112222@2.3.4.5</a>]
(from [<a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:sip:+13031112222@3.4.5.6">sip:+13031112222@3.4.5.6</a>]
to [<a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:sip:+13031112222@2.3.4.5">sip:+13031112222@2.3.4.5</a>],
Call-ID=[<a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:21a30b9168e0a8c963d47ca1361cef77@3.4.5.6">21a30b9168e0a8c963d47ca1361cef77@3.4.5.6</a>],
CSeq=[102]) <br>
May 18 11:21:05 kam0 /usr/sbin/kamailio[21282]: INFO:
<script>: WITHINDLG: has TO: tag <br>
May 18 11:21:05 kam0 /usr/sbin/kamailio[21282]: INFO:
<script>: WITHINDLG: has TO: tag AND loose_route is
NOT true and is_method = ACK and t_check_trans=FALSE <br>
May 18 11:21:05 kam0 /usr/sbin/kamailio[21282]: INFO:
<script>: WITHINDLG: the ACK to a 486 was not
being processed so I am adding t_relay here <br>
May 18 11:21:05 kam0 /usr/sbin/kamailio[21282]: INFO:
<script>: WITHINDLG: (ReturnCode = [1] exiting) <br>
<br>
<br>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a></pre>
</blockquote>
<br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a></pre>
</body>
</html>