Hoola!
Estoy hecho un lío sobre como gestionar los ACK:
* En situaciones in-dialog hago lo siguiente:
if (method=="ACK") { xlog("L_INFO","$C(px) -- ACK -- $C(xx)\n"); if (t_check_trans()) { ## non loose-route, but stateful ACK; must be an ACK after a 487 or e.g. 404 from upstream server route(1); exit; } else { ## ACK without matching transaction ... ignore and discard. exit; } }
* Pero cuando llamo a un usuario inexistente me llegan un montón de ACKs fuera del diálogo :-O
U +3.918025 10.245.145.27:5060 -> 10.10.0.117:2054 SIP/2.0 486 Busy Here Via: SIP/2.0/UDP 10.10.0.117:2054;branch=z9hG4bK-4q9dht0vt0qh;rport=2054 From: "1001" sip:1001@10.245.145.27;tag=7jzn8lgj9h To: sip:1123@10.245.145.27;tag=as186a86b9 Call-ID: 3c26a67168fb-pmn33w87knd0@snom320-00041327D5A5 CSeq: 2 INVITE User-Agent: Asterisk PBX Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Supported: replaces Content-Length: 0 X-Asterisk-HangupCause: No route to destination X-Asterisk-HangupCauseCode: 3
# U +0.077320 10.10.0.117:2054 -> 10.245.145.27:5060 ACK sip:1123@10.245.145.27 SIP/2.0 Via: SIP/2.0/UDP 10.10.0.117:2054;branch=z9hG4bK-4q9dht0vt0qh;rport From: "1001" sip:1001@10.245.145.27;tag=7jzn8lgj9h To: sip:1123@10.245.145.27;tag=as186a86b9 Call-ID: 3c26a67168fb-pmn33w87knd0@snom320-00041327D5A5 CSeq: 2 ACK Max-Forwards: 70 Contact: sip:1001@10.10.0.117:2054;line=xqknsd62;flow-id=1 Content-Length: 0
Esto unas 8 veces!!
Qué se supone que debería hacer con esto?
Gracias por cualquier pista...
ya he llegado a una conclusión, y he resuleto el problema, pero no entiendo muy bien porqué :-0
El tema antes era tal que así:
if (has_totag() && $var(loose_route))
ups, sigo :)
if (has_totag() && $var(loose_route)) if (method=="ACK") blablabla
Pero es que no cumple esas 2 condiciones?!
así si que tira:
if (has_totag()) if ($var(loose_route)) { if (method=="INVITE") route(x) ....... } else { if (methos=="ACK") .......... }
Porqué ese ACK tiene totag pero no Route? Si hago un record-route al principio y demás... Hay algún otro mensaje in-dialog que no lleve route? Por lo que veo en el ejemplo del paquete de OpenSER, el SUBSCRIBE tampoco....
Algo de luz?
Thnx!!
El Tuesday 27 May 2008 21:15:07 Saúl Ibarra escribió:
# ----------------------------------------------------------------- # in-dialog # -----------------------------------------------------------------
if (has_totag()) { if (loose_route()) { # Por aquí pasan: # - ACK ante el 200 OK de un INVITE, re-INVITE, REFER, INFO, BYE, PRACK... if (!t_relay()) sl_reply_error(); exit; } else { if (is_method("ACK")) { if (t_check_trans()) { # non loose-route, but stateful ACK; must be an ACK after a 487 or e.g. # 404 from upstream server. if (!t_relay()) sl_reply_error(); exit; } else { # ACK without matching transaction ... ignore and discard. exit; } } sl_send_reply("404","Not here"); } exit; }
OK, era lo que me imaginaba, thnx Iñaki, no sabes lo que me dolía la cabeza ayer con esto... :)
sr-users-es@lists.kamailio.org