<div><div dir="auto">Thanks. It works well. But retransmission timeout problem still exists... I suppose it was not wrong ACK problem.</div></div><div dir="auto">But many thanks!!</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">вс, 4 авг. 2019 г. в 19:46, Henning Westerholt <<a href="mailto:hw@skalatan.de">hw@skalatan.de</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>Hello Zhan,</p>
<p>you need to also execute it also for the ACK request. I just tested it on a test setup, I just placed it here for a quick test (refer to the default cfg):</p>
<p>...<br>
</p>
<p> uac_replace_from("",<a class="m_5586149817623083557moz-txt-link-rfc2396E" href="mailto:sip:batman@gotham.org" target="_blank">"sip:batman@gotham.org"</a>);<br>
uac_replace_to("",<a class="m_5586149817623083557moz-txt-link-rfc2396E" href="mailto:sip:robin@gotham.org" target="_blank">"sip:robin@gotham.org"</a>);<br>
<br>
# handle requests within SIP dialogs<br>
route(WITHINDLG);<br>
...<br>
</p>
<div class="m_5586149817623083557moz-cite-prefix">Works just fine:</div>
<div class="m_5586149817623083557moz-cite-prefix"><br>
</div>
<div class="m_5586149817623083557moz-cite-prefix">2019/08/04 18:43:21.727990 XXX.XXX.178.27:5060 -> XXX.XXX.167.107:5060<br>
ACK <a class="m_5586149817623083557moz-txt-link-abbreviated" href="mailto:sip:customer-2@XXX.XXX.64.8:5096;ob" target="_blank">
sip:customer-2@XXX.XXX.64.8:5096;ob</a> SIP/2.0<br>
Via: SIP/2.0/UDP XXX.XXX.178.27;branch=z9hG4bK8cfc.358f1178964b526f50452ba03db8ee3e.0<br>
Via: SIP/2.0/UDP XXX.XXX.167.107;rport=5060;branch=z9hG4bK8cfc.85decb742f8d4df6ca0216d3065be210.0<br>
v: SIP/2.0/UDP XXX.XXX.64.8:5095;received=XXX.XXX.64.8;rport=5095;branch=z9hG4bKPjpwl1uGwlM1NDPbYauTk6DazXWBA1yrzV<br>
Max-Forwards: 68<br>
f: <a class="m_5586149817623083557moz-txt-link-abbreviated" href="mailto:sip:batman@gotham.org;tag=TVDG0gI90HONs9GOc0dw7ykSYFgyWUWZ" target="_blank">
sip:batman@gotham.org;tag=TVDG0gI90HONs9GOc0dw7ykSYFgyWUWZ</a><br>
t: <a class="m_5586149817623083557moz-txt-link-abbreviated" href="mailto:sip:robin@gotham.org;tag=ufPqkX.gDlvL.ammPR9QkQ6beeh4fbOL" target="_blank">
sip:robin@gotham.org;tag=ufPqkX.gDlvL.ammPR9QkQ6beeh4fbOL</a><br>
i: E3JNM13kkWFd8gCbt0EAvbGRow6zU8OX<br>
CSeq: 19753 ACK<br>
Route: <sip:XXX.XXX.167.107;lr><br>
l: 0</div>
<div class="m_5586149817623083557moz-cite-prefix"><br>
</div>
<div class="m_5586149817623083557moz-cite-prefix">Cheers,</div>
<div class="m_5586149817623083557moz-cite-prefix"><br>
</div>
<div class="m_5586149817623083557moz-cite-prefix">Henning<br>
</div>
<div class="m_5586149817623083557moz-cite-prefix"><br>
</div>
<div class="m_5586149817623083557moz-cite-prefix">Am 04.08.19 um 18:22 schrieb Zhan Bazarov:<br>
</div></div><div text="#000000" bgcolor="#FFFFFF">
<blockquote type="cite">
<div>
<div dir="auto">Hello, </div>
</div>
<div dir="auto">Thanks, I will try!</div>
<div dir="auto">Should I add this into the same route? </div>
<div dir="auto">I execute uac_replace into route[FROMASTERISK] if method is invite. </div>
<div><br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">вс, 4 авг. 2019 г. в 19:15, Henning Westerholt <<a href="mailto:hw@skalatan.de" target="_blank">hw@skalatan.de</a>>:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>Hello Zhan,</p>
<p>I obvious don't know your cfg details. But I would try to just call the uac_replace_from/ .._to in the main request_route and see if it works at all in your routing logic. Also add some xlog messages to see that it is executed. You can also output with $rm
the SIP request method, with $ru the request URI etc.. (see the cookbook for pseudo-variables for all that are available).</p>
<p>Cheers,</p>
<p>Henning<br>
</p>
<div class="m_5586149817623083557m_-955760154614805366moz-cite-prefix">Am 03.08.19 um 22:40 schrieb Zhan Bazarov:<br>
</div>
</div>
<div text="#000000" bgcolor="#FFFFFF">
<blockquote type="cite">
<div>
<div dir="auto">Hello,</div>
</div>
<div dir="auto">It didn’t make any sense, unfortunately...</div>
<div dir="auto">In additional - kamailio relay right 200 to Asterisk, and asterisk send ACK with wrong from/to(initial values like it was before uac_replace) and then kamailio doesn’t change it to right from/to values. </div>
<div dir="auto"><br>
</div>
<div dir="auto">Any idea, please.</div>
<div><br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">сб, 3 авг. 2019 г. в 19:17, Henning Westerholt <<a href="mailto:hw@skalatan.de" target="_blank">hw@skalatan.de</a>>:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>Hello Zhan,</p>
<p>there is no need to execute a branch_route on an ACK. The ACK should be just routed "normally" through Kamailio. Have a look to the default cfg, for example. The ACK in a normal call setup is just a "normal" request.<br>
</p>
<p>Cheers,</p>
<p>Henning<br>
</p>
<div class="m_5586149817623083557m_-955760154614805366m_7587134519702050477moz-cite-prefix">Am 02.08.19 um 19:27 schrieb Zhan Bazarov:<br>
</div>
</div>
<div text="#000000" bgcolor="#FFFFFF">
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">Thanks! <br>
Rly appreciate your help! <br>
<br>
So, I can try to execute the same branch_route for ACK method?<br>
I have this branch route:<br>
<br>
branch_route[MODIFY]{<br>
uac_replace_from("","$avp(from)");<br>
uac_replace_to($avp(to));<br>
}<br>
<br>
Now I execute this when request goes from asterisk through kamailio to carriers...<br>
<br>
Should I execute this branch route into ACK method from asterisk too?</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">пт, 2 авг. 2019 г. в 20:11, Henning Westerholt <<a href="mailto:hw@skalatan.de" target="_blank">hw@skalatan.de</a>>:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p>Hello Zhan,</p>
<p>possible reasons:</p>
<p>- the ACK is not routed through your proxy (missing record-route for the INVITE)<br>
</p>
<p>- the user agent mangles the Route header, therefore the uac module can't does it work correctly (look to the kamailio error logs if you spot something)<br>
</p>
<p>Have a look to your SIP e.g. with "ngrep -qt -d any -W byline port 5060" on your proxy.</p>
<p>Cheers,</p>
<p>Henning<br>
</p>
<div class="m_5586149817623083557m_-955760154614805366m_7587134519702050477gmail-m_7843342980955209549moz-cite-prefix">
Am 02.08.19 um 19:02 schrieb Zhan Bazarov:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hello,<br>
Thanks for reply! Yes I execute uac_replace_to/from in branch_route in INVITE method... But it doesn't work for ACK method...</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">пт, 2 авг. 2019 г. в 18:11, Henning Westerholt <<a href="mailto:hw@skalatan.de" target="_blank">hw@skalatan.de</a>>:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p>Hello Zhan,</p>
<p>have a look to the "uac" module, there are functions to rewrite the From and To header for passing messages. It works together with the rr module.<br>
</p>
<p>Cheers,</p>
<p>Henning<br>
</p>
<div class="m_5586149817623083557m_-955760154614805366m_7587134519702050477gmail-m_7843342980955209549gmail-m_6951659668443512399moz-cite-prefix">
Am 02.08.19 um 13:30 schrieb Zhan Bazarov:<br>
</div>
<blockquote type="cite">
<div dir="ltr"><span style="color:rgba(0,0,0,0.9);font-family:-apple-system,system-ui,system-ui,"Segoe UI",Roboto,"Helvetica Neue","Fira Sans",Ubuntu,Oxygen,"Oxygen Sans",Cantarell,"Droid Sans","Apple Color Emoji","Segoe UI Emoji","Segoe UI Emoji","Segoe UI Symbol","Lucida Grande",Helvetica,Arial,sans-serif;font-size:14px;white-space:pre-line;background-color:rgb(243,246,248)">Hello!
Please, is it possible to change from/to headers in ACK message to provider? this is exactly our case, please, look it when u get a chance.
</span><a rel="noopener" href="http://sip-router.1086192.n5.nabble.com/Wrong-ACK-to-Provider-td130050.html#a130052" id="m_5586149817623083557m_-955760154614805366m_7587134519702050477gmail-m_7843342980955209549gmail-m_6951659668443512399ember488" class="m_5586149817623083557m_-955760154614805366m_7587134519702050477gmail-m_7843342980955209549gmail-m_6951659668443512399gmail-app-aware-link m_5586149817623083557m_-955760154614805366m_7587134519702050477gmail-m_7843342980955209549gmail-m_6951659668443512399ember-view" style="box-sizing:inherit;padding:0px;text-decoration-line:none;margin:0px;font-size:14px;vertical-align:baseline;background:0px 0px transparent;font-weight:600;border:0px;color:rgb(102,94,208);font-family:-apple-system,system-ui,system-ui,"Segoe UI",Roboto,"Helvetica Neue","Fira Sans",Ubuntu,Oxygen,"Oxygen Sans",Cantarell,"Droid Sans","Apple Color Emoji","Segoe UI Emoji","Segoe UI Emoji","Segoe UI Symbol","Lucida Grande",Helvetica,Arial,sans-serif;white-space:pre-line" target="_blank">http://sip-router.1086192.n5.nabble.com/Wrong-ACK-to-Provider-td130050.html#a130052</a><br>
</div>
<br>
<fieldset class="m_5586149817623083557m_-955760154614805366m_7587134519702050477gmail-m_7843342980955209549gmail-m_6951659668443512399mimeAttachmentHeader">
</fieldset>
<pre class="m_5586149817623083557m_-955760154614805366m_7587134519702050477gmail-m_7843342980955209549gmail-m_6951659668443512399moz-quote-pre">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="m_5586149817623083557m_-955760154614805366m_7587134519702050477gmail-m_7843342980955209549gmail-m_6951659668443512399moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>
<a class="m_5586149817623083557m_-955760154614805366m_7587134519702050477gmail-m_7843342980955209549gmail-m_6951659668443512399moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="m_5586149817623083557m_-955760154614805366m_7587134519702050477gmail-m_7843342980955209549gmail-m_6951659668443512399moz-signature" cols="72">--
Henning Westerholt - <a class="m_5586149817623083557m_-955760154614805366m_7587134519702050477gmail-m_7843342980955209549gmail-m_6951659668443512399moz-txt-link-freetext" href="https://skalatan.de/blog/" target="_blank">https://skalatan.de/blog/</a>
Kamailio services - <a class="m_5586149817623083557m_-955760154614805366m_7587134519702050477gmail-m_7843342980955209549gmail-m_6951659668443512399moz-txt-link-freetext" href="https://skalatan.de/services" target="_blank">https://skalatan.de/services</a></pre>
</div>
</blockquote>
</div>
</blockquote>
<pre class="m_5586149817623083557m_-955760154614805366m_7587134519702050477gmail-m_7843342980955209549moz-signature" cols="72">--
Henning Westerholt - <a class="m_5586149817623083557m_-955760154614805366m_7587134519702050477gmail-m_7843342980955209549moz-txt-link-freetext" href="https://skalatan.de/blog/" target="_blank">https://skalatan.de/blog/</a>
Kamailio services - <a class="m_5586149817623083557m_-955760154614805366m_7587134519702050477gmail-m_7843342980955209549moz-txt-link-freetext" href="https://skalatan.de/services" target="_blank">https://skalatan.de/services</a></pre>
</div>
</blockquote>
</div>
</div>
</blockquote>
<pre class="m_5586149817623083557m_-955760154614805366m_7587134519702050477moz-signature" cols="72">--
Henning Westerholt - <a class="m_5586149817623083557m_-955760154614805366m_7587134519702050477moz-txt-link-freetext" href="https://skalatan.de/blog/" target="_blank">https://skalatan.de/blog/</a>
Kamailio services - <a class="m_5586149817623083557m_-955760154614805366m_7587134519702050477moz-txt-link-freetext" href="https://skalatan.de/services" target="_blank">https://skalatan.de/services</a></pre>
</div>
</blockquote>
</div>
</div>
</blockquote>
<pre class="m_5586149817623083557m_-955760154614805366moz-signature" cols="72">--
Henning Westerholt - <a class="m_5586149817623083557m_-955760154614805366moz-txt-link-freetext" href="https://skalatan.de/blog/" target="_blank">https://skalatan.de/blog/</a>
Kamailio services - <a class="m_5586149817623083557m_-955760154614805366moz-txt-link-freetext" href="https://skalatan.de/services" target="_blank">https://skalatan.de/services</a></pre>
</div>
</blockquote>
</div>
</div>
</blockquote>
<pre class="m_5586149817623083557moz-signature" cols="72">--
Henning Westerholt - <a class="m_5586149817623083557moz-txt-link-freetext" href="https://skalatan.de/blog/" target="_blank">https://skalatan.de/blog/</a>
Kamailio services - <a class="m_5586149817623083557moz-txt-link-freetext" href="https://skalatan.de/services" target="_blank">https://skalatan.de/services</a></pre>
</div>
</blockquote></div></div>