[OpenSIPS-Users] siprec issue when listening on multiple sockets.

johan johan at democon.be
Fri Jul 2 09:44:51 EST 2021


Hi,

My server has 2 listening sockets.

my phones register on 192.168.68.115

my siprec server is in 10.x.x.x segment.

my ip config is like htis :

2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP group default qlen 1000
    link/ether 00:0c:29:80:52:64 brd ff:ff:ff:ff:ff:ff
    inet 192.168.68.115/24 brd 192.168.68.255 scope global dynamic
noprefixroute ens33
       valid_lft 4962sec preferred_lft 4962sec
    inet6 fe80::20c:29ff:fe80:5264/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
3: ens34: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP group default qlen 1000
    link/ether 00:0c:29:80:52:6e brd ff:ff:ff:ff:ff:ff
    inet 10.33.0.34/27 brd 10.33.0.63 scope global dynamic noprefixroute
ens34
       valid_lft 81834sec preferred_lft 81834sec
    inet6 fe80::d7c2:9c5e:8233:6bba/64 scope link noprefixroute
       valid_lft forever preferred_lft forever

so I have 2 sockets in opensips :

socket=udp:en33:5060
socket=udp:ens34:5060

The routing on the machine is correct (ping uses the correct interface). 

johan at debian10opensips31:/etc/systemd/system$ sudo route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
0.0.0.0         192.168.68.1    0.0.0.0         UG    100    0        0
ens33
10.0.0.0        10.33.0.33      255.0.0.0       UG    90     0        0
ens34
10.33.0.32      0.0.0.0         255.255.255.224 U     101    0        0
ens34
192.168.68.0    0.0.0.0         255.255.255.0   U     100    0        0
ens33

Problem : siprec_startrecording always initiates it's connection from
the 192.168 interface.

How can I specify that it needs to go via the other socket ? I tried
mhomed=1 but that didn't help.



....

    rtpproxy_engage(,"10.33.0.34");
    siprec_start_recording("sip:10.254.100.134:5060",,,,,"10.33.0.34");

...


Does anyone have a solution for this ? Or what logs are needed ?


wkr,



More information about the Users mailing list