olivluca / danube-voip

This is a sip client using the 2 FXS ports available on routers based on the Infineon Danube and running openwrt.
16 stars 10 forks source link

One way only communication problem #11

Closed olivluca closed 4 years ago

olivluca commented 4 years ago

Fixed the one way only communication problem by editing svd.c around line 300: removed the comment tags to activate 'SOATAG_ADDRESS()' to use the manual 'local_ip' setting; otherwise the ip address for eth0 is used for outbound rtp/udp packets (easybox/wlan0 -> fritzbox:192.168.10.254). However this will break outgoing communication since eth0 is set to a separate (unused) address (in my case 192.168.3.1) from a different local network when using relayd to establish a software bridge between eth0 and the wlan interface (openwrt wireless bridge setup).

Before (log level 5):

soa_init_sdp_connection_with_session: selected IN IP4 192.168.3.1 (a local address)
...
o=- 2856140970662321986 2882795031805088096 IN IP4 192.168.3.1

After (with local_ip set 192.168.10.250):

soa_init_sdp_connection_with_session: using SOATAG_ADDRESS("192.168.10.250")
...
o=- 5558836881994820095 1424336700861334178 IN IP4 192.168.10.250

Now voip communication between the easybox (with a phone connected to a fxs port) and my fritzbox (acting as a local "ip phone" registrar for the easybox) works as expected. I can place internal calls (fritzbox with 3 DECT phones <-> easybox) and external calls to a voip number registered at 1&1 (as part of the fritzbox voip setup) are routed through the fritzbox to the easybox connected to local wireless network (192.168.10.0/24).

I'd like to thank Luca for sharing danube-voip with us.

Originally posted by @dosenflieger in https://github.com/olivluca/danube-voip/issues/8#issuecomment-235088449

olivluca commented 4 years ago

fixed in commit e5412f1a351d038a46d2734c4207ea0520365adf (better late than never :wink: )