Hi Alex,

Have you tried something like this (for calls from Internet) :

b2b_server_new("server1",$avp(b2b_hdrs), $avp(b2b_hdr_bodies));
force_send_socket("udp:10.130.23:5070"); b2b_client_new("Unistar","sip:[email protected] <mailto:sip%[email protected]>","sip:provider","test","sip:[email protected] <mailto:sip%[email protected]>");
b2b_init_request("top hiding");

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 27-30 Sept 2022, Athens
  https://www.opensips.org/events/Summit-2022Athens/

On 8/19/22 6:12 PM, Alex wrote:
Hello,

My opensips is behind NAT in cloud
internet - (1.1.1.1)Cone_NAT - port_5060__10.130.0.23(opensips)__port_5070 - main_registrar_sip_server

So I made 2 sockets
socket=udp:10.130.0.23:5070 <http://10.130.0.23:5070>   # for LAN
socket=udp:10.130.0.23:5060 <http://10.130.0.23:5060> as 1.1.1.1:5060 <http://1.1.1.1:5060> #for Internet

I try to make call from lan to Tel provider with using b2bua.

Is any way to setup b2bua with more than one socket?

loadmodule "b2b_entities.so"
loadmodule "b2b_logic.so"
modparam("b2b_logic", "custom_headers", "P-Asserted-Identity") #"User-Agent;Date")
#modparam("b2b_logic", "contact_user", 1)
modparam("b2b_logic", "server_address", "sip:[email protected] <mailto:sip%[email protected]>")


#force_send_socket("udp:10.130.23:5060");
b2b_server_new("server1",$avp(b2b_hdrs), $avp(b2b_hdr_bodies));
force_send_socket("udp:10.130.23:5060"); b2b_client_new("Unistar","sip:[email protected] <mailto:sip%[email protected]>","sip:provider","test","sip:[email protected] <mailto:sip%[email protected]>");
#force_send_socket("udp:10.130.23:5070");
b2b_init_request("top hiding");
exit;

I use this construction in route[relay]. And I`ve tried to insert in before b2b_server_new. But  it didn`t help
if ($socket_in == "udp:10.130.0.23:5070 <http://10.130.0.23:5070>") {
                $socket_out = "udp:10.130.0.23:5060 <http://10.130.0.23:5060>";
        } else {
                $socket_out = "udp:10.130.0.23:5070 <http://10.130.0.23:5070>";
        }

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 2) I can`t change contact in request to provider. Default contact looks like this Contact: <sip:1.1.1.1 >. I whant to change to "sip:[email protected] <mailto:sip%[email protected]>"

--
С уважением,
Якимкин Алексей

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to