[OpenSIPS-Users] RTPProxy + OpenSIPS 1.7 Integration

2011-12-19 Thread Nick Khamis
Hello Everyone,

I am having trouble getting the RTPProxy 1.2.0 to work with OpenISP 1.7.

Starting the proxy using:
./rtpproxy -s udp:127.0.0.1:12221 -l public/private -p
/var/run/rtpproxy.pid -u root root -F -d INFO LOG_LOCAL0

opensips.cf relevant pieces

modparam("rtpproxy", "rtpproxy_sock", "udp:127.0.0.1:12221")
modparam("rtpproxy", "rtpproxy_autobridge", 1)
modparam("rtpproxy", "rtpproxy_timeout", "0.5")
modparam("rtpproxy", "rtpproxy_retr", 3)

if (has_totag() && is_method("INVITE")) {
engage_rtp_proxy("ie");
}
if (is_method("ACK") && has_body("application/sdp")) {
rtpproxy_answer();
}

route[1] {
xlog("Enter route 1");

if (has_body("application/sdp")) rtpproxy_answer();

if (is_method("INVITE")) {
xlog("New Call for route [ fu=$fu/ tu=$tu /ru=$ru/ ci=$ci]");

if (rtpproxy_offer()) {
t_on_reply("1");
}
else {
t_on_reply("2");
}


t_on_branch("2");
t_on_failure("1");
}

if (!t_relay()) {
sl_reply_error();
}   

exit;
}

onreply_route[1] {
xlog("incoming reply\n");
if (has_body("application/sdp")) rtpproxy_answer();
exit;
}

onreply_route[2] {
xlog("incoming reply\n");
if (has_body("application/sdp")) rtpproxy_offer();
exit;
}

When starting OpenSIPS everything looks fine:

Dec 19 21:38:58 [3397] INFO:rtpproxy:rtpp_test: rtp proxy
 found, support for it enabled
Dec 19 21:38:58 [3400] INFO:rtpproxy:rtpp_test: rtp proxy
 found, support for it enabled
Dec 19 21:38:58 [3398] INFO:rtpproxy:rtpp_test: rtp proxy
 found, support for it enabled
Dec 19 21:38:58 [3395] INFO:rtpproxy:rtpp_test: rtp proxy
 found, support for it enabled
Dec 19 21:38:58 [3401] INFO:rtpproxy:rtpp_test: rtp proxy
 found, support for it enabled
Dec 19 21:38:58 [3402] INFO:rtpproxy:rtpp_test: rtp proxy
 found, support for it enabled


Making a call howver, yields the following error (watch it work now ;):

ERROR:rtpproxy:force_rtp_proxy_body: no available proxies

/var/log/syslog

Dec 19 21:28:18 opensips1 rtpproxy[3348]: INFO:main: rtpproxy started, pid 3348
Dec 19 21:28:31 opensips1 rtpproxy[3348]: INFO:handle_command: new
session f679c215-bae17257-a0a8a5b8@192.168.2.11, tag C0847B09-9D90A2;1
requested, type strong
Dec 19 21:28:31 opensips1 rtpproxy[3348]: ERR:create_twinlistener:
can't bind to the IPv4 port 50570: Cannot assign requested address
Dec 19 21:28:31 opensips1 rtpproxy[3348]: ERR:handle_command: can't
create listener
Dec 19 21:38:49 opensips1 rtpproxy[3379]: INFO:main: rtpproxy started, pid 3379
Dec 19 21:39:36 opensips1 rtpproxy[3379]: INFO:handle_command: new
session 5537fa8e-69de2248-78eef465@192.168.2.11, tag
A2311CB2-BB413627;1 requested, type strong
Dec 19 21:39:36 opensips1 rtpproxy[3379]: ERR:create_twinlistener:
can't bind to the IPv4 port 57636: Cannot assign requested address
Dec 19 21:39:36 opensips1 rtpproxy[3379]: ERR:handle_command: can't
create listener

Your help is greatly appreciated,

Nick.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] RTPProxy + OpenSIPS 1.7 Integration

2011-12-20 Thread Bogdan-Andrei Iancu

Hi Nick,

are you sure the public and private IPs are local to the machine where 
you run rtpproxy ? as I see that rtpproxy complain on not being able to 
use the ips you configured via the "-l" param.


Regards,
Bogdan

On 12/20/2011 04:45 AM, Nick Khamis wrote:

Hello Everyone,

I am having trouble getting the RTPProxy 1.2.0 to work with OpenISP 1.7.

Starting the proxy using:
./rtpproxy -s udp:127.0.0.1:12221 -l public/private -p
/var/run/rtpproxy.pid -u root root -F -d INFO LOG_LOCAL0

opensips.cf relevant pieces

modparam("rtpproxy", "rtpproxy_sock", "udp:127.0.0.1:12221")
modparam("rtpproxy", "rtpproxy_autobridge", 1)
modparam("rtpproxy", "rtpproxy_timeout", "0.5")
modparam("rtpproxy", "rtpproxy_retr", 3)

if (has_totag()&&  is_method("INVITE")) {
engage_rtp_proxy("ie");
}
if (is_method("ACK")&&  has_body("application/sdp")) {
rtpproxy_answer();
}

route[1] {
xlog("Enter route 1");

if (has_body("application/sdp")) rtpproxy_answer();

if (is_method("INVITE")) {
xlog("New Call for route [ fu=$fu/ tu=$tu /ru=$ru/ ci=$ci]");

if (rtpproxy_offer()) {
t_on_reply("1");
}
else {
t_on_reply("2");
}


t_on_branch("2");
t_on_failure("1");
}

if (!t_relay()) {
sl_reply_error();
}   

exit;
}

onreply_route[1] {
xlog("incoming reply\n");
if (has_body("application/sdp")) rtpproxy_answer();
exit;
}

onreply_route[2] {
xlog("incoming reply\n");
if (has_body("application/sdp")) rtpproxy_offer();
exit;
}

When starting OpenSIPS everything looks fine:

Dec 19 21:38:58 [3397] INFO:rtpproxy:rtpp_test: rtp proxy
  found, support for it enabled
Dec 19 21:38:58 [3400] INFO:rtpproxy:rtpp_test: rtp proxy
  found, support for it enabled
Dec 19 21:38:58 [3398] INFO:rtpproxy:rtpp_test: rtp proxy
  found, support for it enabled
Dec 19 21:38:58 [3395] INFO:rtpproxy:rtpp_test: rtp proxy
  found, support for it enabled
Dec 19 21:38:58 [3401] INFO:rtpproxy:rtpp_test: rtp proxy
  found, support for it enabled
Dec 19 21:38:58 [3402] INFO:rtpproxy:rtpp_test: rtp proxy
  found, support for it enabled


Making a call howver, yields the following error (watch it work now ;):

ERROR:rtpproxy:force_rtp_proxy_body: no available proxies

/var/log/syslog

Dec 19 21:28:18 opensips1 rtpproxy[3348]: INFO:main: rtpproxy started, pid 3348
Dec 19 21:28:31 opensips1 rtpproxy[3348]: INFO:handle_command: new
session f679c215-bae17257-a0a8a5b8@192.168.2.11, tag C0847B09-9D90A2;1
requested, type strong
Dec 19 21:28:31 opensips1 rtpproxy[3348]: ERR:create_twinlistener:
can't bind to the IPv4 port 50570: Cannot assign requested address
Dec 19 21:28:31 opensips1 rtpproxy[3348]: ERR:handle_command: can't
create listener
Dec 19 21:38:49 opensips1 rtpproxy[3379]: INFO:main: rtpproxy started, pid 3379
Dec 19 21:39:36 opensips1 rtpproxy[3379]: INFO:handle_command: new
session 5537fa8e-69de2248-78eef465@192.168.2.11, tag
A2311CB2-BB413627;1 requested, type strong
Dec 19 21:39:36 opensips1 rtpproxy[3379]: ERR:create_twinlistener:
can't bind to the IPv4 port 57636: Cannot assign requested address
Dec 19 21:39:36 opensips1 rtpproxy[3379]: ERR:handle_command: can't
create listener

Your help is greatly appreciated,

Nick.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




--
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
OpenSIPS solutions and "know-how"


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] RTPProxy + OpenSIPS 1.7 Integration

2011-12-20 Thread Nick Khamis
Hello Bogdan,

Thank you so much for your response and time. I've been really
struggling trying to get two way audio going.
I think at some point I broke down in tears! This is a test virtual
machine setup before migrating to the host servers.
What I have is the following


Router--->OpenSIPS/RTPProxy> Asterisk 1..n---> WAN ITSP

Router 192.168.2.1
UC Polycom: 192.168.2.11
OpenSIPS: 192.168.2.102
Asterisk 1: 192.168.2.10
Asterisk 2: 192.168.2.11

My frist question is, do I need NAT and/or RTP Proxy since everything
but the ITSP
is on the same subnet? If not, I guess there is something wrong with
my configuration.
Eventually I will need NAT, and RTP, so I might as well try to get a
grasp, and correct
configuration using them.
Can RTP proxy work when behind a router?

Kind Regards,

Nick.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] RTPProxy + OpenSIPS 1.7 Integration

2011-12-20 Thread Nick Khamis
After resolving the incorrect rtp proxy -l flag, i'm still having a
hard time getting two way audio behind a router.
What I have in my config is the following:

./rtpproxy -s udp:127.0.0.1:7789 -l 192.168.2.102 -m 1 -M 2 -u
root root -F -d INFO LOG_LOCAL0

modparam("rtpproxy", "rtpproxy_sock", "udp:127.0.0.1:7789")

route{

if (is_method("INVITE") && has_totag()) 
engage_rtp_proxy("ie","192.168.2.102");

if (is_method("ACK") && has_body("application/sdp")) rtpproxy_answer();

}

route[1] {
if (is_method("INVITE")) {
xlog("Start Call for route [ fu=$fu/ tu=$tu /ru=$ru/ ci=$ci]");
if (has_body("application/sdp")) {
if (rtpproxy_offer("ie","192.168.2.102")) 
t_on_reply("1");
else t_on_reply("2");
}

t_on_branch("2");
t_on_failure("1");
}
...
}

onreply_route[1] {
xlog("incoming reply\n");

if (has_body("application/sdp")) rtpproxy_answer();
exit;
}


onreply_route[2] {
xlog("incoming reply\n");

if (has_body("application/sdp")) rtpproxy_offer();
exit;
}

I do have two way audio once every 30-50 calls, but cannot pin any
combination that would keep things
working. Outgoing audio always works. I really appreciate any help on this.

Kind Regards,

Nick.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users