Joe-Palmer / rtmplite

Automatically exported from code.google.com/p/rtmplite
0 stars 0 forks source link

Handle multiple IP interfaces correctly #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
First reported by Joshua Shaffner <joshua@seadragons.us> on Mar 5, 2011.
In summary, if the machine has multiple IP addresses, the siprtmp listens on 
one IP address for RTMP but another for SIP. Fix this, so that if IP address is 
supplied from command line, always use that.

--
I was able to register VideoIO with Freeswitch via siprtmp gateway but
there was no audio when I make a call. How do you suggest to
troubleshoot the issue?

Thank you,
Joshua

---
Hi,

Can you start siprtmp with -d option, and send me the program trace as
a text file. That can give some idea about what might be going wrong
in SIP/SDP negotiation. Problem could be in SDP codec negotiation or
in media port behind NAT/firewall.

Also, for next step, can you check if you can make call to your
freeswitch using X-lite (or some other SIP client) with only speex
enabled?
--
Any idea why sometimes it it will show 10.0.1.10 which is correct but
sometimes it show 10.211.55.2 (no idea where that came from)?

I had to register, unregister, restart servers, etc until it shows
10.0.1.10 for the contact before I could make a call

j

User:           1001@10.0.1.10
Contact:        "1001 videoio" <sip:1001@10.211.55.2:52948>

--
from rtmplite

rtmp-register scheme= sip aor= 1001@10.0.1.10 login= 1001 passwd= ****
display= 1001 videoio
User created on ('10.211.55.2', 50486)
 registering addr= "1001 videoio" <sip:1001@10.0.1.10> port= 50486
createClient <UserAgent call-id=502484685@10.211.55.2>
sending[356] to ('10.0.1.10', 5060)
REGISTER sip:10.0.1.10 SIP/2.0
Content-Length: 0
Via: SIP/2.0/UDP 10.211.55.2:50486;rport;branch=z9hG4bK-RdvxJKS0AmOqI8HIv90aQ..
From: "1001 videoio" <sip:1001@10.0.1.10>;tag=190882210157
Expires: 180
To: "1001 videoio" <sip:1001@10.0.1.10>
Contact: <sip:1001@10.211.55.2:50486>
CSeq: 1 REGISTER
Max-Forwards: 70
Call-ID: 502484685@10.211.55.2
--
ah, interesting, check this out, it looks like self.sockaddr in
voip.py picks up ip from vnic0 even tho i dont use it. I use en1
(10.0.1.10). What do you suggest?

ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
       inet6 ::1 prefixlen 128
       inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
       inet 127.0.0.1 netmask 0xff000000
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
       ether c4:2c:03:16:b2:c1
       media: autoselect
       status: inactive
fw0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 4078
       lladdr 78:ca:39:ff:fe:32:16:12
       media: autoselect <full-duplex>
       status: inactive
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
       ether c8:bc:c8:b8:fd:3d
       inet 10.0.1.10 netmask 0xffffff00 broadcast 10.0.1.255
       media: autoselect
       status: active
vnic0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
       ether 00:1c:42:00:00:08
       inet 10.211.55.2 netmask 0xffffff00 broadcast 10.211.55.255
       inet6 fe80::21c:42ff:fe00:8%vnic0 prefixlen 64 scopeid 0x7
       inet6 fec0:0:0:fea9::1 prefixlen 64
       media: autoselect
       status: active
vnic1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
       ether 00:1c:42:00:00:09
       inet 10.37.129.2 netmask 0xffffff00 broadcast 10.37.129.255
       inet6 fe80::21c:42ff:fe00:9%vnic1 prefixlen 64 scopeid 0x8
       inet6 fec0:0:0:feaa::1 prefixlen 64
       media: autoselect
       status: active

---
okay, I am not sure what makes it work this time..maybe after I make
"ip6" thingy auto instead of off in my network setting (OSX)

I did test using xlite with just speex and could hear playback (MOH)
but not with flash/speex. here is the trace

register and answering the call from FS which will then park the call
and play back music (for off hook agent)

---
got it working this time..did not publish/play when accepting call, my bad :)

Original issue reported on code.google.com by kundan10 on 10 Mar 2011 at 10:21

GoogleCodeExporter commented 9 years ago
Fixed in SVN r51.

Added a new -s or --siphost command line option to specify the listening SIP IP 
address, which is used when creating the SIP User object. The reason for 
separating this from -i option for listening RTMP IP address is that in some 
scenarios when siprtmp is running locally on the same host, you may want to 
receive RTMP connection only on local host for security reason and allow SIP 
connection to other hosts. Hence you can start siprtmp.py with -i 127.0.0.1 -s 
192.1.2.3 where '192.1.2.3' is your actual IP address. (or just leave -s option 
to bind to 0.0.0.0).

This does not really handle multiple IP interfaces, but allows the user to 
select one IP address if there are multiple.

Original comment by voiprese...@gmail.com on 13 Mar 2011 at 8:01