<div dir="ltr">Hi all.<div><br></div><div>I have a problem with t_relay_to_udp function.</div><div><br></div><div>My topology:<br>UAC -> tcp -> kamailio <-> udp <-> asterisk<br><br>Kamailio processes requests from clients over TCP and relays requests to asterisk over UDP.</div><div><br>Kamailio gets INVITE from client, relays it to asterisk, then he sends 100 trying to user client and abruptly sends 500 internal error to client (after 100 trying).<br>But the main interesting thing is, that asterisk answers on INVITE and dialog continues between kamailio and asterisk (without user agent client) - it reaches the  destination then, without originator : )<br><br>How error on kamailio looks like:<br><div>Nov  8 15:23:37 ip-10-2-1-229 kamailio[10339]: ERROR: tm [t_fwd.c:1716]: t_forward_nonack(): ERROR: t_forward_nonack: no branches for forwarding</div><div>Nov  8 15:23:37 ip-10-2-1-229 kamailio[10339]: ERROR: sl [sl_funcs.c:363]: sl_reply_error(): ERROR: sl_reply_error used: I'm terribly sorry, server error occurred (6/SL)</div><div><br></div><div>The same problem is, when I change transport protocol between kamailio and asterisk to TCP,<br>using the t_relay_to_tcp function.<br>When I use t_relay function, it works fine, nothing happens that can drop dialogs between kamailio and clients.<br><br>Relaying code part:<br><div>if ($var(to_asterisk)=="1") {</div><div><span style="white-space:pre">  </span>xlog("L_NOTICE","Relaying to asterisk - change socket to udp:<a href="http://10.1.1.1:5070">10.1.1.1:5070</a>\n");</div><div><br></div><div><span style="white-space:pre"> </span>force_send_socket(udp:<a href="http://10.1.1.1:5070">10.1.1.1:5070</a>);</div><div><br></div><div><span style="white-space:pre">       </span>if (!t_relay_to_udp()) {</div><div><span style="white-space:pre">              </span>sl_reply_error();</div><div><span style="white-space:pre">             </span>}</div><div>}</div></div><div><br></div><div>I need to use t_relay_to_udp with force_send_socket, because kamailio changes the source port (source socket) every time he generate new INVITEs to asterisk and this is irrelevant.</div><div><br><div>Dump between kamailio and user agent client:</div><div><br><div>INVITE sip:1111111111example@kam1.domain.com:5070;transport=TCP SIP/2.0</div><div>Via: SIP/2.0/TCP uac.domain.example:5065;branch=z9hG4bK-d8754z-67b9ad24dbc5c1d0-1---d8754z-</div><div>Max-Forwards: 70</div><div>Contact: <sip:debug.device-example@uac.domain.example:5065;transport=TCP></div><div>To: <sip:1111111111example@kam1.domain.com:5070;transport=TCP></div><div>From: <sip:debug.device-example@kam1.domain.com:5070;transport=TCP>;tag=93394e63</div><div>Call-ID: NzQ1NWU5NzUxYmY4ZWVjMjYwNDYwMTBmYzYxODZkZmM.</div><div>CSeq: 2 INVITE</div><div>Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE</div><div>Content-Type: application/sdp</div><div>Proxy-Authorization: Digest username="debug.device-example",realm="<a href="http://kam1.domain.com">kam1.domain.com</a>",nonce="WgQGlVoEBWnhH3CF6DE77uKxKJx0tT4e",uri="sip:1111111111example@kam1.domain.com:5070;transport=TCP",response="4753aa849715d26d0dde1b3c2314c843",a</div><div>orithm=MD5</div><div>Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri</div><div>User-Agent: Z 3.3.25608 r25552</div><div>Allow-Events: presence, kpml</div><div>Content-Length: 241</div><div><br></div><div>v=0</div><div>o=Z 0 0 IN IP4 uac.domain.example</div><div>s=Z</div><div>c=IN IP4 uac.domain.example</div><div>t=0 0</div><div>m=audio 8000 RTP/AVP 8 3 110 0 98 101</div><div>a=rtpmap:110 speex/8000</div><div>a=rtpmap:98 iLBC/8000</div><div>a=fmtp:98 mode=20</div><div>a=rtpmap:101 telephone-event/8000</div><div>a=fmtp:101 0-15</div><div>a=sendrecv</div><div><br></div><div>SIP/2.0 100 trying -- your call is important to us</div><div>Via: SIP/2.0/TCP uac.domain.example:5065;branch=z9hG4bK-d8754z-67b9ad24dbc5c1d0-1---d8754z-;rport=43486</div><div>To: <sip:1111111111example@kam1.domain.com:5070;transport=TCP></div><div>From: <sip:debug.device-example@kam1.domain.com:5070;transport=TCP>;tag=93394e63</div><div>Call-ID: NzQ1NWU5NzUxYmY4ZWVjMjYwNDYwMTBmYzYxODZkZmM.</div><div>CSeq: 2 INVITE</div><div>Server: MS Lync</div><div>Content-Length: 0</div><div><br></div><div>SIP/2.0 500 I'm terribly sorry, server error occurred (6/SL)</div><div>Via: SIP/2.0/TCP uac.domain.example:5065;branch=z9hG4bK-d8754z-67b9ad24dbc5c1d0-1---d8754z-;rport=43486</div><div>To: <sip:1111111111example@kam1.domain.com:5070;transport=TCP>;tag=9a78ee8ed9a3d4ba441c41d83ba2e904.4113</div><div>From: <sip:debug.device-example@kam1.domain.com:5070;transport=TCP>;tag=93394e63</div><div>Call-ID: NzQ1NWU5NzUxYmY4ZWVjMjYwNDYwMTBmYzYxODZkZmM.</div><div>CSeq: 2 INVITE</div><div>Server: example</div><div>Content-Length: 0</div></div></div><div><br><br>Thanks in advance for hints.</div><br></div><div><br></div><div><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><span>-- <br></span>BR, Donat Zenichev
<br>Wnet VoIP team
<br>Tel:  +380(44) 5-900-800
<br><a href="http://wnet.ua" target="_blank">http://wnet.ua</a></div></div>
</div></div>