I have installed kamailio 5.1.4 version in ubuntu server. I need to route RTP packets through kamailio with SIP packets. I will explain the way i have set up everything.
I have installed rtpproxy by apt-get install rtpproxy.
i have edited "/etc/default/rtpproxy" file with the line 'EXTRA_OPTS="-F -s udp:127.0.0.1:7722 -l 34.201.122.249 -d DBUG:LOG_LOCAL0"'
i have edited "/etc/init.d/rtpproxy" file as follows, DAEMON=/usr/bin/$NAME PIDFILE="/run/$NAME/$NAME.pid
I have provided "#!define WITH_NAT" and "modparam("rtpproxy", "rtpproxy_sock", "udp:127.0.0.1:7722")" in my cfg file.
started rtpproxy "service rtpproxy start"
when i try "netstat -tulpn | grep rtp" it shows udp 0 0 127.0.0.1:7722 0.0.0.0:* 1437/rtpproxy
So i think the rtpproxy is currently running fine.
Now we can go to kamailio part.
I have gone through the document " https://www.kamailio.org/docs/modules/5.0.x/modules/rtpproxy.html" to set up rtpproxy in the cfg file.
checking the rtp ports "kamcmd rtpproxy.list" showing { setid: 0 url: udp:127.0.0.1:7722 index: 0 disabled: 0 weight: 1 recheck: 0 }
I have enabled rtp proxy using "kamcmd rtpproxy.enable udp:127.0.0.1:7722 1".
So i think ports are ready for rtp proxy.
Now i will explain the call flow. I have enabled log using L_BUG.
when i try a call from hangout number through my twilio trunk to my asterisk freepbx extension, set_rtp_proxy_set("1"); giving true value. But rtpproxy_offer(); giving -1 as result. syslog shows some errors like below, Aug 13 10:28:57 ip-172-30-0-10 rtpproxy[1437]: DBUG:handle_command: received command "1934_4 Uc0,8,3,111,9,101 52001b5b71435b1c5392b39f2f6c975b@asterisk_ip:5060 asterisk_ip 14540 as4083c85f;1" Aug 13 10:28:57 ip-172-30-0-10 rtpproxy[1437]: INFO:handle_command: new session 52001b5b71435b1c5392b39f2f6c975b@asterisk_ip:5060, tag as4083c85f;1 requested, type strong Aug 13 10:28:57 ip-172-30-0-10 rtpproxy[1437]: ERR:create_twinlistener: can't bind to the IPv4 port 47926: Cannot assign requested address Aug 13 10:28:57 ip-172-30-0-10 rtpproxy[1437]: ERR:handle_command: can't create listener Aug 13 10:28:57 ip-172-30-0-10 rtpproxy[1437]: DBUG:doreply: sending reply "1934_4 E10#012"
And also my header is not changed. As a result actuall rtp is going end to end between asterisk and twilio not through kamailio. Please help me with the details.
Am Montag, 13. August 2018, 13:32:29 CEST schrieb ANOOP V M:
I have installed kamailio 5.1.4 version in ubuntu server. I need to route RTP packets through kamailio with SIP packets. I will explain the way i have set up everything. [...] Aug 13 10:28:57 ip-172-30-0-10 rtpproxy[1437]: ERR:create_twinlistener: can't bind to the IPv4 port 47926: Cannot assign requested address Aug 13 10:28:57 ip-172-30-0-10 rtpproxy[1437]: ERR:handle_command: can't create listener
Hello Anoop,
I am not an rtpproxy expert. But I would suggest that you look into the error quoted above. This means that rtproxy can't bind to the respective port and or address. There are several possible reasons for that:
- this IP is not configured (correctly) on the server - the port is already allocated to another process - there is some other error in network configuration
Best regards,
Henning
Are your ports open?
-----Original Message----- From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Henning Westerholt Sent: Tuesday, August 14, 2018 1:08 PM To: sr-users@lists.kamailio.org Subject: Re: [SR-Users] kamailio rtp proxy set not working
Am Montag, 13. August 2018, 13:32:29 CEST schrieb ANOOP V M:
I have installed kamailio 5.1.4 version in ubuntu server. I need to route RTP packets through kamailio with SIP packets. I will explain the way i have set up everything. [...] Aug 13 10:28:57 ip-172-30-0-10 rtpproxy[1437]: ERR:create_twinlistener: can't bind to the IPv4 port 47926: Cannot assign requested address Aug 13 10:28:57 ip-172-30-0-10 rtpproxy[1437]: ERR:handle_command: can't create listener
Hello Anoop,
I am not an rtpproxy expert. But I would suggest that you look into the error quoted above. This means that rtproxy can't bind to the respective port and or address. There are several possible reasons for that:
- this IP is not configured (correctly) on the server - the port is already allocated to another process - there is some other error in network configuration
Best regards,
Henning
-- Henning Westerholt https://skalatan.de/blog/
_______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
I do not know how to make that ports open. I am using aws EC2 instance as server. So when i open the specified port and reboot my server, this error telling me that again it can not bind with a new port. Each time it changing the port. Shall i provide my cfg file here? Can you guys check it and tell me what is wrong in it?
On Wed, Aug 15, 2018 at 12:22 AM Wilkins, Steve swwilkins@mitre.org wrote:
Are your ports open?
-----Original Message----- From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Henning Westerholt Sent: Tuesday, August 14, 2018 1:08 PM To: sr-users@lists.kamailio.org Subject: Re: [SR-Users] kamailio rtp proxy set not working
Am Montag, 13. August 2018, 13:32:29 CEST schrieb ANOOP V M:
I have installed kamailio 5.1.4 version in ubuntu server. I need to route RTP packets through kamailio with SIP packets. I will explain the way i have set up everything. [...] Aug 13 10:28:57 ip-172-30-0-10 rtpproxy[1437]: ERR:create_twinlistener: can't bind to the IPv4 port 47926: Cannot assign requested address Aug 13 10:28:57 ip-172-30-0-10 rtpproxy[1437]: ERR:handle_command: can't create listener
Hello Anoop,
I am not an rtpproxy expert. But I would suggest that you look into the error quoted above. This means that rtproxy can't bind to the respective port and or address. There are several possible reasons for that:
- this IP is not configured (correctly) on the server
- the port is already allocated to another process
- there is some other error in network configuration
Best regards,
Henning
-- Henning Westerholt https://skalatan.de/blog/
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Am Mittwoch, 15. August 2018, 08:03:19 CEST schrieb ANOOP V M:
I do not know how to make that ports open. I am using aws EC2 instance as server. So when i open the specified port and reboot my server, this error telling me that again it can not bind with a new port. Each time it changing the port. Shall i provide my cfg file here? Can you guys check it and tell me what is wrong in it? [..]
Hello Anoop,
have you checked that the IP address configuration also is ok? Regarding this ports issue you should probably refer to the documentation or support of the particular cloud provider.
Generally speaking - you could provide your cfg here, sure.
But another option would be to simple test your setup on a local (not AWS) machine. This way you can see if the issue is related to your cfg, Kamailio, AWS or something else. This would be my suggested next step.
Best regards,
Henning