<div dir="ltr">Hello!<div><br></div><div>The script that I'm trying to convert to B2B uses the dispatcher module to balance traffic and accordingly, I have a question:</div><div>If I call <b>ds_select_dst()</b> before jumping into the b2b context, then how can I catch the request in <b>failure_route</b>, pull out the next peer through <b>ds_next_dst()</b>, and return it to b2b again?<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">чт, 19 окт. 2023 г. в 21:55, Ovidiu Sas <<a href="mailto:osas@voipembedded.com">osas@voipembedded.com</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 dir="auto">If the internal has a private ip and the external has a public ip, then it should work ok.</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 19, 2023 at 03:14 Denys Pozniak <<a href="mailto:denys.pozniak@gmail.com" target="_blank">denys.pozniak@gmail.com</a>> wrote:<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 dir="ltr">>
If you have one socket per transport, then the automatic selection should work ok.<div>For example, I have 3 external interfaces (sip/udp, sip/tcp, sip/tls) and 1 internal one (sip/udp).</div><div>If a request comes for an internal one, how will the outgoing routing proceed as per needed transport (eg, this is sip/tls) in b2b? What will OpenSIPS look at ($ru/Route/...)?<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">ср, 18 окт. 2023 г. в 19:34, Ovidiu Sas <<a href="mailto:osas@voipembedded.com" target="_blank">osas@voipembedded.com</a>>:<br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">I haven’t experimented with this … so I can’t comment.</div><div dir="auto"><br></div><div dir="auto">-ovidiu</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 18, 2023 at 11:13 Denys Pozniak <<a href="mailto:denys.pozniak@gmail.com" target="_blank">denys.pozniak@gmail.com</a>> wrote:<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 dir="ltr">and comment please this question if possible:<br><div>- If nodes operate in anycast + clusterer mode, then in what route should function t_anycast_replicate() be called?<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">ср, 18 окт. 2023 г. в 16:49, Denys Pozniak <<a href="mailto:denys.pozniak@gmail.com" target="_blank">denys.pozniak@gmail.com</a>>:<br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Thank you for such a cool and detailed answer!<br><div>But I would like to clarify the following:<br></div><div><br></div><div>>Custom headers can be set for each b2b_entity during the entity setup via the extra_hdrs and extra_hdrs_bodies [4] [5].<br></div><div>Do I understand correctly that this only works for initial invites?<br></div><div><br></div><div>>For now, the outgoing socket is set by opensips internally. There were</div>some fixes related to this, make sure that you are using the latest<br>opensips version.<div>But I have several sockets and how can I influence the choice?<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">ср, 18 окт. 2023 г. в 15:59, Ovidiu Sas <<a href="mailto:osas@voipembedded.com" target="_blank">osas@voipembedded.com</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">Hello Denys,<br>
<br>
Dialog module should *never* be mixed with the b2b module.<br>
For b2b calls one can use the $b2b_logic.ctx vars [1].<br>
For b2b tracing use the 'b' scope in trace() [2].<br>
There are some issues as not all provisional replies are traced [3].<br>
Custom headers can be set for each b2b_entity during the entity setup<br>
via the extra_hdrs and extra_hdrs_bodies [4] [5].<br>
For now, the outgoing socket is set by opensips internally. There were<br>
some fixes related to this, make sure that you are using the latest<br>
opensips version.<br>
<br>
-ovidiu<br>
<br>
[1] <a href="https://opensips.org/docs/modules/3.4.x/b2b_logic.html#b2b_logic.ctx" rel="noreferrer" target="_blank">https://opensips.org/docs/modules/3.4.x/b2b_logic.html#b2b_logic.ctx</a><br>
[2] <a href="https://opensips.org/docs/modules/3.4.x/tracer.html#func_trace" rel="noreferrer" target="_blank">https://opensips.org/docs/modules/3.4.x/tracer.html#func_trace</a><br>
[3] <a href="https://github.com/OpenSIPS/opensips/issues/3194" rel="noreferrer" target="_blank">https://github.com/OpenSIPS/opensips/issues/3194</a><br>
[4] <a href="https://opensips.org/docs/modules/3.4.x/b2b_logic.html#func_b2b_server_new" rel="noreferrer" target="_blank">https://opensips.org/docs/modules/3.4.x/b2b_logic.html#func_b2b_server_new</a><br>
[5] <a href="https://opensips.org/docs/modules/3.4.x/b2b_logic.html#func_b2b_client_new" rel="noreferrer" target="_blank">https://opensips.org/docs/modules/3.4.x/b2b_logic.html#func_b2b_client_new</a><br>
<br>
<br>
On Wed, Oct 18, 2023 at 9:16 AM Denys Pozniak <<a href="mailto:denys.pozniak@gmail.com" target="_blank">denys.pozniak@gmail.com</a>> wrote:<br>
><br>
> Hello!<br>
><br>
> I'm trying to implement topology hiding (b2b_logic) in an existing config, but there are points that are not clear to me:<br>
> - Can I somehow use dialog variables in b2b mode? if not, any alternative? I see they are created for the initial leg (with state=3), but not available in the b2b mode;<br>
> - How to configure a tracer (proto_hep) in b2b mode?<br>
> - How to convert transport and select outgoing socket (the question has already been asked in a separate mail)?<br>
> - How can I add the necessary custom X-headers also for in-dialog requests (for example, for re-INVITE)? It does not work via insert_hf in [script_req_route] neither via function b2b_client_new() as well;<br>
> - If nodes operate in anycast + clusterer mode, then in what route should function t_anycast_replicate() be called?<br>
><br>
> --<br>
><br>
> BR,<br>
> Denys Pozniak<br>
><br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
<br>
<br>
--<br>
VoIP Embedded, Inc.<br>
<a href="http://www.voipembedded.com" rel="noreferrer" target="_blank">http://www.voipembedded.com</a><br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><br><div><div>BR,</div><div>Denys Pozniak<br></div><div><br></div><div><br></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><br><div><div>BR,</div><div>Denys Pozniak<br></div><div><br></div><div><br></div></div></div></div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div></div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><br><div><div>BR,</div><div>Denys Pozniak<br></div><div><br></div><div><br></div></div></div></div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div></div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><br><div><div>BR,</div><div>Denys Pozniak<br></div><div><br></div><div><br></div></div></div></div>