Reg: Unable to stream through RTP

456 views
Skip to first unread message

Srinivas Desai

unread,
Oct 30, 2009, 4:17:15 AM10/30/09
to uni...@googlegroups.com
Hi All,

I notice that Arsen is on leave, hence, it would be helpful if someone else in this mailing list could also help me with the issue.

I have the UniMRCP server and client with flite setup in both Linux and Windows.
When I run the server and client in the same system, there are no issues.

However, when the server and the client are on two different systems, we get an error "Failed to Bind Socket to ..."
We added few lines in code to find the issue where the above error is printed.  The actual error was "requested address is not valid in its context".

We tried Linux to Windows, Windows to Linux, Windows to Windows and Linux to Linux combinations.
But the error is the same.

As the client and server are on two different systems, I have modified the configuration file accordingly.
As the client is unable to bind a port, it sends "m=audio 0 RTP/AVP 0 8 96" instead of "m=audio 5000 RTP/AVP 0 8 96", where 5000 represents the port.

Could someone help me resolve this issue?

Thanks in advance,
Srinivas Desai.

Anthony Masse

unread,
Oct 30, 2009, 5:20:04 AM10/30/09
to uni...@googlegroups.com
Hi,

We had done tests with same configurations and we hadn't issue.

Can you tell us the IP of your host ? (192.168.1.x ???)

Anthony

2009/10/30 Srinivas Desai <sriniv...@gmail.com>

Srinivas Desai

unread,
Oct 30, 2009, 6:02:35 AM10/30/09
to uni...@googlegroups.com
Hi Anthony,

Thanks for the quick reply.

192.168.0.** is the IP series.

However, we just tried the following thing and it works. However, we are not sure if its the right way.

In File: libs/mpf/src/mpf_rtp_stream.c
Line: if(status = apr_socket_bind(stream->socket,stream->local_sockaddr) != APR_SUCCESS) {

we replaced "bind" by "connect" and recompiled.
This thing works.

Do you think its a temporary work around and not a solution?

Thanks,
Srinivas Desai

Anthony Masse

unread,
Oct 30, 2009, 6:40:01 AM10/30/09
to uni...@googlegroups.com
Yes it's a temporary work around !!! Do you have a test which test your RTP stream with this work around ?

Can you tell us the complete error with "apr_socket_bind" :

Failed to Bind Socket to %s:%hu

Srinivas Desai

unread,
Oct 30, 2009, 7:00:50 AM10/30/09
to uni...@googlegroups.com
Yes it's a temporary work around !!! Do you have a test which test your RTP stream with this work around ?
I am sorry, I did not understand what you asked for.  However, with the use of this workaround, the log was as expected. i.e.,
1. The client provided the RTP port
2. No Bind error
3. RTP Transmit was opened
4. The call flow continued till "Remove Session <bd9ab146c54111de>"
Without the workaround, it had issues with the RTP port binding and also the session would hang immediately after synthesis. ("Process SPEAK-COMPLETE Event"  does not show up)

Can you tell us the complete error with "apr_socket_bind" :

Failed to Bind Socket to %s:%hu
Failed to Bind Socket to 192.168.0.31:5000
It tries for the port: 5000 to 5998 as configured.

Sincerely,
Srinivas Desai.
On Fri, Oct 30, 2009 at 4:10 PM, Anthony Masse <amasse...@gmail.com> wrote:
Yes it's a temporary work around !!! Do you have a test which test your RTP stream with this work around ?
I am sorry, I did not understand what you asked for.

Can you tell us the complete error with "apr_socket_bind" :

Failed to Bind Socket to %s:%hu
Failed to Bind Socket to 192.168.0.31:5000
It tries for the port: 5000 to 5998 as configured.

Anthony Masse

unread,
Oct 30, 2009, 9:32:19 AM10/30/09
to uni...@googlegroups.com
Ok,

I don't understand why you meet with this issue.

Note: I always work with local network like that : 192.198.x.y and x > 0.

But I suppose you have other processes which bind ports on these hosts.

Anthony

patrick nunes

unread,
Oct 30, 2009, 10:51:00 AM10/30/09
to uni...@googlegroups.com
Dear Srinivas,

you said you have modified the configuration files.
May you tell us what these modifications are ?

Patrick

2009/10/30 Srinivas Desai <sriniv...@gmail.com>

Srinivas Desai

unread,
Oct 30, 2009, 10:57:37 AM10/30/09
to uni...@googlegroups.com
Hi Patrick,

I believe that you are referring to the modifications in the very first email.

Well, they cannot be modifications, but what I meant was that I set the client-ip and server-ip correctly.
Made sure that the RTP ports the client and server are configured to are correct.

Thanks,
Srinivas Desai

Arsen Chaloyan

unread,
Nov 2, 2009, 3:47:28 AM11/2/09
to uni...@googlegroups.com
Hi Srinivas,

I've just followed up the discussion and it's not so clear what the
final status is.
Anyway, I'd strongly suggest to revert your changes and use the
original apr_socket_bind(). This is the only valid way to go. If you
continue experiencing bind errors, there is definitely something wrong
either in config or your net interfaces.
As Anthony mentioned, ip:port could be used by other process. Use
netstat to determine what is going on.
Another reason could be wrong ip address. You should specify local ip
address to bind to, but not remote ip.

If issue remains, please provide us your client and server
configuration files as Patrick suggested. Probably the configuration
isn't very user friendly, as you have to manually substitute all the
"auto" directives if needed. However UniMRCP client and server do work
on different Linux and Windows hosts for sure.
--
Arsen Chaloyan
The author of UniMRCP
http://www.unimrcp.org

Srinivas Desai

unread,
Nov 9, 2009, 6:41:30 AM11/9/09
to uni...@googlegroups.com
Hi Arsen,

Sorry for the delay.

I am still unable to use apr_socket_bind()
Made sure that the ports are free and I have provided local IP addresses.

Please find the config files attached with this email.

Thanks,
Srinivas Desai
unimrcpclient.xml
unimrcpserver.xml

Arsen Chaloyan

unread,
Nov 9, 2009, 12:30:51 PM11/9/09
to uni...@googlegroups.com
Hi Srinivas,

I assume you're trying to run client and server on the same host now,
as you specified the same IP address to bind to for both client and
server. So everything looks good, except for RTP port range, which is
the same for client and server running on the same host! You may have
noticed that by default the RTP port range for client is 4000-5000,
while 5000-6000 is the default range for server.
Reply all
Reply to author
Forward
0 new messages