<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="monospace">Hi Alex,<br>
<br>
Have you tried something like this (for calls from Internet) :<br>
</font><br>
<div>b2b_server_new("server1",$avp(b2b_hdrs), $avp(b2b_hdr_bodies));</div>
<div>force_send_socket("udp:10.130.23:5070");
b2b_client_new("Unistar","<a
href="mailto:sip%3A09876543322@provider.com">sip:09876543322@provider.com</a>",<a class="moz-txt-link-rfc2396E" href="sip:provider">"sip:provider"</a>,"test","<a
href="mailto:sip%3A1234567@1.1.1.1">sip:1234567@1.1.1.1</a>");<br>
</div>
b2b_init_request("top hiding");<font face="monospace"><br>
<br>
Regards,<br>
</font>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
OpenSIPS Summit 27-30 Sept 2022, Athens
<a class="moz-txt-link-freetext" href="https://www.opensips.org/events/Summit-2022Athens/">https://www.opensips.org/events/Summit-2022Athens/</a></pre>
<div class="moz-cite-prefix">On 8/19/22 6:12 PM, Alex wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CA+cY-YtsRLS3VW79yfM736FsgbA1UW=YvOzLq1qpyN4=WF9wrA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>Hello,</div>
<div><br>
</div>
<div>My opensips is behind NAT in cloud <br>
</div>
<div>internet - (1.1.1.1)Cone_NAT -
port_5060__10.130.0.23(opensips)__port_5070 -
main_registrar_sip_server</div>
<div><br>
</div>
<div>So I made 2 sockets</div>
<div>socket=udp:<a href="http://10.130.0.23:5070"
moz-do-not-send="true">10.130.0.23:5070</a> # for LAN<br>
socket=udp:<a href="http://10.130.0.23:5060"
moz-do-not-send="true">10.130.0.23:5060</a> as <a
href="http://1.1.1.1:5060" moz-do-not-send="true">1.1.1.1:5060</a>
#for Internet</div>
<div><br>
</div>
<div>I try to make call from lan to Tel provider with using
b2bua.</div>
<div><br>
</div>
<div>Is any way to setup b2bua with more than one socket?<br>
</div>
<div>
<div><br>
</div>
<div>loadmodule "b2b_entities.so"<br>
loadmodule "b2b_logic.so"<br>
modparam("b2b_logic", "custom_headers",
"P-Asserted-Identity") #"User-Agent;Date")<br>
#modparam("b2b_logic", "contact_user", 1)<br>
modparam("b2b_logic", "server_address", "<a
href="mailto:sip%3A1234567@1.1.1.1" moz-do-not-send="true">sip:1234567@1.1.1.1</a>")</div>
<div><br>
</div>
<div><br>
</div>
<div>#force_send_socket("udp:10.130.23:5060"); <br>
</div>
<div>b2b_server_new("server1",$avp(b2b_hdrs),
$avp(b2b_hdr_bodies));</div>
<div>force_send_socket("udp:10.130.23:5060");
b2b_client_new("Unistar","<a
href="mailto:sip%3A09876543322@provider.com"
moz-do-not-send="true">sip:09876543322@provider.com</a>",<a class="moz-txt-link-rfc2396E" href="sip:provider">"sip:provider"</a>,"test","<a
href="mailto:sip%3A1234567@1.1.1.1" moz-do-not-send="true">sip:1234567@1.1.1.1</a>");<br>
</div>
#force_send_socket("udp:10.130.23:5070");<br>
b2b_init_request("top hiding");<br>
exit;</div>
<div><br>
</div>
<div>I use this construction in route[relay]. And I`ve tried to
insert in before b2b_server_new. But it didn`t help<br>
</div>
<div>if ($socket_in == "udp:<a href="http://10.130.0.23:5070"
moz-do-not-send="true">10.130.0.23:5070</a>") {<br>
$socket_out = "udp:<a
href="http://10.130.0.23:5060" moz-do-not-send="true">10.130.0.23:5060</a>";<br>
} else {<br>
$socket_out = "udp:<a
href="http://10.130.0.23:5070" moz-do-not-send="true">10.130.0.23:5070</a>";<br>
}<br>
</div>
<div><br clear="all">
</div>
<div>1) with force_send_socket I made to send requests from
:5070 to :5060 . But my provider`s Udpates and re-Invites go
to my LAN directly from socket :5060 . They don`t go through
:5070</div>
<div>2) I can`t change contact in request to provider. Default
contact looks like this Contact: <a class="moz-txt-link-rfc2396E" href="sip:1.1.1.1"><sip:1.1.1.1 ></a>. I whant
to change to "<a href="mailto:sip%3A1234567@1.1.1.1"
moz-do-not-send="true">sip:1234567@1.1.1.1</a>"</div>
<div><br>
-- <br>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">С уважением,<br>
Якимкин Алексей</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>