sippy / go-b2bua

The GO port of the Sippy B2BUA
BSD 2-Clause "Simplified" License
65 stars 16 forks source link

Option -p #5

Closed denser closed 5 years ago

denser commented 5 years ago

Option -p wont work.

I suggest to make opportunity to run app on several interfaces and ports. i.e.: ./b2bua_simple -n 10.125.184.2 -l 10.125.125.120:5060,8.8.8.8:5080 Now I cant use both interfaces when try to connect with 2 adat\pters. Somewhy connection dont look at routing table and try to connect with local IP in -n parameter from -l IP and it wrong.

I.E. i try to use kamailio and it conects according to routing table and my backend SIP server allowing conections from this IP

bambyster commented 5 years ago

The -p option should work now, please check again.

Regarding the different ports on different interfaces. The library currently is not designed to work in such configuration and so the b2bua_simple cannot do it too.

In order to use a correct source IP address in a multihomed configuration you should not specify the -l parameter at all. In such case the b2bua_simple listens on 0.0.0.0 and [::] addresses and tries to deduce a correct source address for outgoing packets.