Hi!
I use lxc containers with asterisk wich their are connecting to kamailio, so far so good they work when i put the containers with public ips, but when i switched to private ip I have one-way audio.
I tried to with rtpengine but no luck:
rtpengine --table=42 --listen-ng=127.0.0.1:2223 --interface=56.12.19.100 --tos=184 --pidfile=/run/rtpengine.pid --no-fallback --log-level=7 --log-facility=local3
the setup looks like this: VM-KAMAILIO-(public ip 56.12.19.100 with static routes for the private IP) --> LxC(n) (with private class 192.168.0.n)
The problem i think is when LxC asterisk is sending back the 200 OK from Invite it puts his private ip in the sdp filed:
v=0 o=- 2171376102 3 IN IP4 192.168.0.2 s=Asterisk c=IN IP4 192.168.0.2 t=0 0 m=audio 11336 RTP/AVP 8 101 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=ptime:20 a=maxptime:150 a=sendrecv
i've loaded the modules, but after this i am stuck.... loadmodule "nathelper.so" loadmodule "rtpengine.so" modparam("nathelper", "received_avp", "$avp(RECEIVED)") modparam("nathelper", "nortpproxy_str", "a=sdpmangled:yes\r\n") modparam("nathelper", "natping_interval", 30) modparam("nathelper", "ping_nated_only", 1) modparam("nathelper", "sipping_bflag", FLB_NATSIPPING) modparam("nathelper", "sipping_from", "sip:pinger@proxy")
# params needed for NAT traversal in other modules modparam("nathelper|registrar", "received_avp", "$avp(RECEIVED)") modparam("usrloc", "nat_bflag", FLB_NATB)
modparam("rtpengine", "rtpengine_sock", "udp:localhost:2223") modparam("rtpengine", "rtpengine_retr", 2) modparam("rtpengine", "hash_table_size", 256) modparam("rtpengine", "hash_table_tout", 600)
Hi Mihai,
You need to provide both public and private interface in rtpengine params. Further, you will have to provide the direction while invoking rtpengine_manage/offer/answer. Check the rtpengine module documentation for details.
On Wed, May 19, 2021, 3:13 AM Mihai Cezar cezar@mokalife.ro wrote:
Hi!
I use lxc containers with asterisk wich their are connecting to kamailio, so far so good they work when i put the containers with public ips, but when i switched to private ip I have one-way audio.
I tried to with rtpengine but no luck:
rtpengine --table=42 --listen-ng=127.0.0.1:2223 --interface=56.12.19.100 --tos=184 --pidfile=/run/rtpengine.pid --no-fallback --log-level=7 --log-facility=local3
the setup looks like this: VM-KAMAILIO-(public ip 56.12.19.100 with static routes for the private IP) --> LxC(n) (with private class 192.168.0.n)
The problem i think is when LxC asterisk is sending back the 200 OK from Invite it puts his private ip in the sdp filed:
v=0 o=- 2171376102 3 IN IP4 192.168.0.2 s=Asterisk c=IN IP4 192.168.0.2 t=0 0 m=audio 11336 RTP/AVP 8 101 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=ptime:20 a=maxptime:150 a=sendrecv
i've loaded the modules, but after this i am stuck.... loadmodule "nathelper.so" loadmodule "rtpengine.so" modparam("nathelper", "received_avp", "$avp(RECEIVED)") modparam("nathelper", "nortpproxy_str", "a=sdpmangled:yes\r\n") modparam("nathelper", "natping_interval", 30) modparam("nathelper", "ping_nated_only", 1) modparam("nathelper", "sipping_bflag", FLB_NATSIPPING) modparam("nathelper", "sipping_from", "sip:pinger@proxy")
# params needed for NAT traversal in other modules modparam("nathelper|registrar", "received_avp", "$avp(RECEIVED)") modparam("usrloc", "nat_bflag", FLB_NATB)
modparam("rtpengine", "rtpengine_sock", "udp:localhost:2223") modparam("rtpengine", "rtpengine_retr", 2) modparam("rtpengine", "hash_table_size", 256) modparam("rtpengine", "hash_table_tout", 600)
Kamailio - Users Mailing List - Non Commercial Discussions
- sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
Hei Rahul,
RTPengine should be on the machine with the LxC containers ? Because on the proxy-kamailio machine i use on nic with 1 IP and a static route that goes to the LxC VM with containers.
On Wed, May 19, 2021 at 7:22 AM Rahul mm rahul.ultimate@gmail.com wrote:
Hi Mihai,
You need to provide both public and private interface in rtpengine params. Further, you will have to provide the direction while invoking rtpengine_manage/offer/answer. Check the rtpengine module documentation for details.
On Wed, May 19, 2021, 3:13 AM Mihai Cezar cezar@mokalife.ro wrote:
Hi!
I use lxc containers with asterisk wich their are connecting to kamailio, so far so good they work when i put the containers with public ips, but when i switched to private ip I have one-way audio.
I tried to with rtpengine but no luck:
rtpengine --table=42 --listen-ng=127.0.0.1:2223 --interface=56.12.19.100 --tos=184 --pidfile=/run/rtpengine.pid --no-fallback --log-level=7 --log-facility=local3
the setup looks like this: VM-KAMAILIO-(public ip 56.12.19.100 with static routes for the private IP) --> LxC(n) (with private class 192.168.0.n)
The problem i think is when LxC asterisk is sending back the 200 OK from Invite it puts his private ip in the sdp filed:
v=0 o=- 2171376102 3 IN IP4 192.168.0.2 s=Asterisk c=IN IP4 192.168.0.2 t=0 0 m=audio 11336 RTP/AVP 8 101 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=ptime:20 a=maxptime:150 a=sendrecv
i've loaded the modules, but after this i am stuck.... loadmodule "nathelper.so" loadmodule "rtpengine.so" modparam("nathelper", "received_avp", "$avp(RECEIVED)") modparam("nathelper", "nortpproxy_str", "a=sdpmangled:yes\r\n") modparam("nathelper", "natping_interval", 30) modparam("nathelper", "ping_nated_only", 1) modparam("nathelper", "sipping_bflag", FLB_NATSIPPING) modparam("nathelper", "sipping_from", "sip:pinger@proxy")
# params needed for NAT traversal in other modules modparam("nathelper|registrar", "received_avp", "$avp(RECEIVED)") modparam("usrloc", "nat_bflag", FLB_NATB)
modparam("rtpengine", "rtpengine_sock", "udp:localhost:2223") modparam("rtpengine", "rtpengine_retr", 2) modparam("rtpengine", "hash_table_size", 256) modparam("rtpengine", "hash_table_tout", 600)
Kamailio - Users Mailing List - Non Commercial Discussions
- sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
Kamailio - Users Mailing List - Non Commercial Discussions
- sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
after some try-and-fail i've found that for asterisk/pjsip you ca set external_media_address and this will change the SDP field to you media server. now i am still facing the one-way audio problem. any suggestions?
On Wed, May 19, 2021 at 9:25 AM Mihai Cezar cezar@mokalife.ro wrote:
Hei Rahul,
RTPengine should be on the machine with the LxC containers ? Because on the proxy-kamailio machine i use on nic with 1 IP and a static route that goes to the LxC VM with containers.
On Wed, May 19, 2021 at 7:22 AM Rahul mm rahul.ultimate@gmail.com wrote:
Hi Mihai,
You need to provide both public and private interface in rtpengine params. Further, you will have to provide the direction while invoking rtpengine_manage/offer/answer. Check the rtpengine module documentation for details.
On Wed, May 19, 2021, 3:13 AM Mihai Cezar cezar@mokalife.ro wrote:
Hi!
I use lxc containers with asterisk wich their are connecting to kamailio, so far so good they work when i put the containers with public ips, but when i switched to private ip I have one-way audio.
I tried to with rtpengine but no luck:
rtpengine --table=42 --listen-ng=127.0.0.1:2223 --interface=56.12.19.100 --tos=184 --pidfile=/run/rtpengine.pid --no-fallback --log-level=7 --log-facility=local3
the setup looks like this: VM-KAMAILIO-(public ip 56.12.19.100 with static routes for the private IP) --> LxC(n) (with private class 192.168.0.n)
The problem i think is when LxC asterisk is sending back the 200 OK from Invite it puts his private ip in the sdp filed:
v=0 o=- 2171376102 3 IN IP4 192.168.0.2 s=Asterisk c=IN IP4 192.168.0.2 t=0 0 m=audio 11336 RTP/AVP 8 101 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=ptime:20 a=maxptime:150 a=sendrecv
i've loaded the modules, but after this i am stuck.... loadmodule "nathelper.so" loadmodule "rtpengine.so" modparam("nathelper", "received_avp", "$avp(RECEIVED)") modparam("nathelper", "nortpproxy_str", "a=sdpmangled:yes\r\n") modparam("nathelper", "natping_interval", 30) modparam("nathelper", "ping_nated_only", 1) modparam("nathelper", "sipping_bflag", FLB_NATSIPPING) modparam("nathelper", "sipping_from", "sip:pinger@proxy")
# params needed for NAT traversal in other modules modparam("nathelper|registrar", "received_avp", "$avp(RECEIVED)") modparam("usrloc", "nat_bflag", FLB_NATB)
modparam("rtpengine", "rtpengine_sock", "udp:localhost:2223") modparam("rtpengine", "rtpengine_retr", 2) modparam("rtpengine", "hash_table_size", 256) modparam("rtpengine", "hash_table_tout", 600)
Kamailio - Users Mailing List - Non Commercial Discussions
- sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
Kamailio - Users Mailing List - Non Commercial Discussions
- sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: