siproxd-users Mailing List for siproxd - SIP proxy/masquerading daemon (Page 5)
Status: Beta
Brought to you by:
tries
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(4) |
Oct
(1) |
Nov
(3) |
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(3) |
Feb
|
Mar
(9) |
Apr
(7) |
May
|
Jun
(3) |
Jul
(1) |
Aug
(1) |
Sep
(5) |
Oct
(1) |
Nov
|
Dec
(1) |
2004 |
Jan
(3) |
Feb
(3) |
Mar
|
Apr
(4) |
May
(1) |
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
2005 |
Jan
(14) |
Feb
(1) |
Mar
(1) |
Apr
(2) |
May
(6) |
Jun
|
Jul
|
Aug
(7) |
Sep
(1) |
Oct
(5) |
Nov
|
Dec
|
2006 |
Jan
(5) |
Feb
(4) |
Mar
(3) |
Apr
(2) |
May
|
Jun
(1) |
Jul
|
Aug
(4) |
Sep
|
Oct
|
Nov
(2) |
Dec
(4) |
2007 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(10) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(7) |
2008 |
Jan
(2) |
Feb
(2) |
Mar
(2) |
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
(2) |
Dec
|
2009 |
Jan
|
Feb
(4) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(4) |
Dec
(1) |
2010 |
Jan
(2) |
Feb
(4) |
Mar
|
Apr
(4) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
(2) |
Oct
(2) |
Nov
(4) |
Dec
(4) |
2011 |
Jan
(2) |
Feb
(1) |
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(2) |
2012 |
Jan
(2) |
Feb
|
Mar
(3) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
2013 |
Jan
|
Feb
|
Mar
|
Apr
(9) |
May
(2) |
Jun
(1) |
Jul
|
Aug
(2) |
Sep
(5) |
Oct
|
Nov
|
Dec
|
2014 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
(1) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(1) |
Nov
(4) |
Dec
|
2018 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: Thomas R. <tr...@gm...> - 2009-02-09 19:33:18
|
Likely you are trying to use siproxd in a way it is not intended for. Siproxd can be used to masquerade asterisk as UAC (asterist connected to an external SIP provider - "SIP Trunk") but not See the siproxd online documentation chapter 7.5 "Masquerading an Asterisk box". What you describe would be some kind of "far side NAT traversal", having Asterisk as SIP registrar and a remote UA isolated via NAT; this does not work with siproxd. You can place siproxd to the remote UA (softphone) in a "Standard Scenario" or "siproxd in front of NAT router" scenario. Regards, /Thomas On 9 Feb, Tamer Higazi wrote: > Hi people! > Asterisk PBX (version 1.6.5): I have Asterisk behind a NAT (192.168.1.2) > SIP Phone: A client behind NAT (192.168.1.3) > Softphone: One other client somewhere in the internet (also behind an > NAT). > > they want to speak with each other, and if they do, there is no sound. > > if softphone in the internet is no more behind a NAT router, it can > hear SIP Phone but SIP Phone is not able to hear Softphone. > > siproxd is installed on the same machine where the asterisk PBX is > installed, and I don't know how to configure it properly as well how > the sip.conf of the asterisk PBX should have to look like. > > > For any support I would thank you gladly. > > > Tamer > > > ------------------------------------------------------------------------------ > Create and Deploy Rich Internet Apps outside the browser with > Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use > existing skills and code to build responsive, highly engaging > applications that combine the power of local resources and data with > the reach of the web. Download the Adobe AIR SDK and Ajax docs to > start building applications today-http://p.sf.net/sfu/adobe-com > _______________________________________________ > Siproxd-users mailing list > Sip...@li... > https://lists.sourceforge.net/lists/listinfo/siproxd-users -- -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GE d s+: a C+++ UL+++ P+++ L++++ E-- W++ N++ o+ K w-- O- M- V PS+ PE Y+ PGP++ t+ 5++ X R tv+ b+ DI++ D+ G e++ h r+++ y+++ ------END GEEK CODE BLOCK------ |
From: Tamer H. <th...@go...> - 2009-02-09 17:44:26
|
Hi people! Asterisk PBX (version 1.6.5): I have Asterisk behind a NAT (192.168.1.2) SIP Phone: A client behind NAT (192.168.1.3) Softphone: One other client somewhere in the internet (also behind an NAT). they want to speak with each other, and if they do, there is no sound. if softphone in the internet is no more behind a NAT router, it can hear SIP Phone but SIP Phone is not able to hear Softphone. siproxd is installed on the same machine where the asterisk PBX is installed, and I don't know how to configure it properly as well how the sip.conf of the asterisk PBX should have to look like. For any support I would thank you gladly. Tamer |
From: Thomas R. <tr...@gm...> - 2009-02-06 16:53:17
|
Hello Peter, I will have a look at it when I get some time, thanks for reporting. Currently the use_rport configuration parameter does only tell siproxd to add an rport header, if does not affect processing of existing headers. Siproxd does (currently) not honor an existing rport header. So let's put RFC3581 onto the TODO list... Regards, /Thomas On 4 Feb, Peter Apian-Bennewitz wrote: > Hi, > > problem: > login with twinkle via siproxd to callcentric.com fails with "network > failure" on callcentric's side. Running twinkle without siproxd works. > > SIP provider's answer: > callcentric's support says siproxd is not following RFC3581 regarding > the rport parameter. As far as I understand RFC3581 this is correct, > even if the Via header in question is only the second Via (not the > topmost) that callcentric's server sees. > > data: > The header of the outgoing REQUEST SIP packet with the MD5 hash, > leaving my gateway, after siproxd processing, looks like: > > Via: SIP/2.0/UDP > 84.56.215.75:5060;branch=z9hG4bKb508ec9eb039c974bd1cccba6117cc33 > Via: SIP/2.0/UDP 192.168.0.11;rport;branch=z9hG4bKcykecwos > From: <sip:XX...@ca...>;tag=mkqua > To: <sip:XX...@ca...> > Call-ID: tmvgrhodrsbtzae@mylocalname > CSeq: 935 REGISTER > Contact: <sip:XXX@84.56.215.75> > Proxy-Authorization: Digest username="XXX", realm="callcentric.com", > nonce="88a438c17e962decdb3091df2c300169", uri="sip:callcentric.com", > response="XXXX", algorithm=MD5 > Allow: INVITE > Allow: ACK > Allow: BYE > Allow: CANCEL > Allow: OPTIONS > Allow: PRACK > Allow: REFER > Allow: NOTIFY > Allow: SUBSCRIBE > Allow: INFO > Allow: MESSAGE > Max-forwards: 69 > Expires: 1800 > User-agent: Twinkle/1.2 > Content-Length: 0 > > (with userid details set to XXX). After that there's a 30 second > silence, followed by a "network failure" packet. > > My question is specific about the "rport" parameter in the second Via > header. RFC3581 says: > > "When a server compliant to this specification (which can be a proxy > or UAS) receives a request, it examines the topmost Via header > field value. If this Via header field value contains an "rport" > parameter with no value, it MUST set the value of the parameter to > the source port of the request." > > Which sounds to me (SIP newbie, UNIX/network veteran) like siproxd > should add an rport number to the incoming packet sent by twinkle. > Furthermore, shouldn't "use_rport = 3" add a string "rport=" before > the UDP port number ? At least the RFC seems to give that as example. > - ? Whether callcentric's server should stall at a Via header that > doesn't matter to it may be another question, but before I nag them I > would like to be sure that what my siproxd sends them is correct. > > any insight much appreciated, > (meaculpa if this is RTFM, I tried to check the mail archives on > sourceforge) > > thanks > Peter > -- -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GE d s+: a C+++ UL+++ P+++ L++++ E-- W++ N++ o+ K w-- O- M- V PS+ PE Y+ PGP++ t+ 5++ X R tv+ b+ DI++ D+ G e++ h r+++ y+++ ------END GEEK CODE BLOCK------ |
From: Peter Apian-B. <ap...@pa...> - 2009-02-04 23:21:03
|
Hi, problem: login with twinkle via siproxd to callcentric.com fails with "network failure" on callcentric's side. Running twinkle without siproxd works. SIP provider's answer: callcentric's support says siproxd is not following RFC3581 regarding the rport parameter. As far as I understand RFC3581 this is correct, even if the Via header in question is only the second Via (not the topmost) that callcentric's server sees. data: The header of the outgoing REQUEST SIP packet with the MD5 hash, leaving my gateway, after siproxd processing, looks like: Via: SIP/2.0/UDP 84.56.215.75:5060;branch=z9hG4bKb508ec9eb039c974bd1cccba6117cc33 Via: SIP/2.0/UDP 192.168.0.11;rport;branch=z9hG4bKcykecwos From: <sip:XX...@ca...>;tag=mkqua To: <sip:XX...@ca...> Call-ID: tmvgrhodrsbtzae@mylocalname CSeq: 935 REGISTER Contact: <sip:XXX@84.56.215.75> Proxy-Authorization: Digest username="XXX", realm="callcentric.com", nonce="88a438c17e962decdb3091df2c300169", uri="sip:callcentric.com", response="XXXX", algorithm=MD5 Allow: INVITE Allow: ACK Allow: BYE Allow: CANCEL Allow: OPTIONS Allow: PRACK Allow: REFER Allow: NOTIFY Allow: SUBSCRIBE Allow: INFO Allow: MESSAGE Max-forwards: 69 Expires: 1800 User-agent: Twinkle/1.2 Content-Length: 0 (with userid details set to XXX). After that there's a 30 second silence, followed by a "network failure" packet. My question is specific about the "rport" parameter in the second Via header. RFC3581 says: "When a server compliant to this specification (which can be a proxy or UAS) receives a request, it examines the topmost Via header field value. If this Via header field value contains an "rport" parameter with no value, it MUST set the value of the parameter to the source port of the request." Which sounds to me (SIP newbie, UNIX/network veteran) like siproxd should add an rport number to the incoming packet sent by twinkle. Furthermore, shouldn't "use_rport = 3" add a string "rport=" before the UDP port number ? At least the RFC seems to give that as example. - ? Whether callcentric's server should stall at a Via header that doesn't matter to it may be another question, but before I nag them I would like to be sure that what my siproxd sends them is correct. any insight much appreciated, (meaculpa if this is RTFM, I tried to check the mail archives on sourceforge) thanks Peter -- pab-opto, Freiburg, Germany, http://www.pab-opto.de [see web page to check digital email signature] |
From: sp4rc <sam...@gm...> - 2008-11-26 18:17:36
|
Just for others who maybe struggling with the Nokia N95 VoIP Client and siproxd. As you may derive from my TCP dump its not possible to disable the mobiles STUN functionality and that's the reason it fails in registering with the voice service provider (sipgate in this case). Simply rejecting (!= DROP) 3478/udp (STUN) made the trick, this took me about 2 weeks to figure it out... yes I am new to SIP/SDP/RTP :-) This is what my sipgate.de configuration for the Nokia device looks like: - Profilename: sipgate-profile - Dienstprofile: IETF - Std-Zug-Pkt: your AP - Öff. Benutzername: sip:you...@si... - Komprimierung verwenden: nein - Anmeldung: Bei Bedarf... or whatever - Sicherheitsmech. verwenden: Nein - Proxyserver - Proxyserveradr: sip:192.168.1.1 - Gebiet: sipgate.de - Benutzername: your_user_id - Password: your_pass - Loose Routing erlauben: ja - Transporttyp: UDP - Port: 5060 - Anmeldeserver - Anmeldeserveradr: sip:sipgate.de - Gebiet: sipgate.de - Benutzername: your_user_id - Password: your_pass - Transporttyp: UDP - Port: 5060 Have fun... /sp4rc > $ tcpdump -i ath0 -n -p host 192.168.1.20 > ------------------------------------------------ [...] > 20:57:47.431802 arp who-has 192.168.1.1 tell 192.168.1.20 > 20:57:47.431891 arp reply 192.168.1.1 is-at 00:0b:6b:db:1f:f1 > 20:57:47.435378 IP 192.168.1.20.38231 > 192.168.1.1.53: 60361+ AAAA? > stun.sipgate.net. (34) > 20:57:47.436050 IP 192.168.1.1.53 > 192.168.1.20.38231: 60361 0/0/0 > (34) > 20:57:47.494034 IP 192.168.1.20.5060 > 217.10.79.2.3478: SIP, length: 20 > 20:57:47.516204 IP 217.10.79.2.3478 > 192.168.1.20.5060: SIP, length: 88 > 20:57:47.527910 IP 192.168.1.20.5060 > 192.168.1.1.5060: SIP, length: [...] > ------------------------------------------------ |
From: sp4rc <sam...@gm...> - 2008-11-24 20:04:50
|
Dear list members I am running siproxd version 0.7.0-4577 on a pfSense box which is FreeBSD based. Siproxd works great in conjunction with Ekiga, but when it comes to my Nokia N95 there seems to fail something which I need help on... There is no way to get connection with sipgate.de over the proxy Any hints on this? /sp4rc $ cat siproxd.conf ------------------------------------------------ if_inbound = vr1 if_outbound = vr0 sip_listen_port = 5060 daemonize = 0 silence_log = 0 log_calls = 1 user = nobody chrootjail = /usr/local/siproxd/ registration_file = siproxd_registrations pid_file = siproxd.pid rtp_proxy_enable = 1 rtp_port_low = 7070 rtp_port_high = 7079 rtp_timeout = 300 default_expires = 600 debug_level = 0x00000000 ------------------------------------------------ $ siproxd -d 1 ------------------------------------------------ 20:57:44 register.c:508 sip_agemap, t=1227556664 20:57:46 register.c:508 sip_agemap, t=1227556666 20:57:47 siproxd.c:320 back from sipsock_wait 20:57:47 security.c:48 security_check_raw: size=450 20:57:47 register.c:238 sip_register: 20:57:47 siproxd.c:294 going into sipsock_wait 20:57:49 register.c:508 sip_agemap, t=1227556669 20:57:50 siproxd.c:320 back from sipsock_wait 20:57:50 security.c:48 security_check_raw: size=450 20:57:50 register.c:238 sip_register: 20:57:50 siproxd.c:294 going into sipsock_wait 20:57:52 register.c:508 sip_agemap, t=1227556672 20:57:54 register.c:508 sip_agemap, t=1227556674 20:57:56 register.c:508 sip_agemap, t=1227556676 20:57:56 siproxd.c:320 back from sipsock_wait 20:57:56 security.c:48 security_check_raw: size=450 20:57:56 register.c:238 sip_register: 20:57:56 siproxd.c:294 going into sipsock_wait 20:57:58 register.c:508 sip_agemap, t=1227556678 20:58:00 register.c:508 sip_agemap, t=1227556680 20:58:02 register.c:508 sip_agemap, t=1227556682 20:58:04 register.c:508 sip_agemap, t=1227556684 20:58:06 register.c:508 sip_agemap, t=1227556686 20:58:08 siproxd.c:320 back from sipsock_wait 20:58:08 security.c:48 security_check_raw: size=450 20:58:08 register.c:238 sip_register: 20:58:08 siproxd.c:294 going into sipsock_wait 20:58:10 register.c:508 sip_agemap, t=1227556690 20:58:12 register.c:508 sip_agemap, t=1227556692 20:58:14 register.c:508 sip_agemap, t=1227556694 ------------------------------------------------ This is what a tcpdump shows: $ tcpdump -i ath0 -n -p host 192.168.1.20 ------------------------------------------------ 20:56:21.224644 IP 217.10.77.22.37890 > 192.168.1.20.49152: UDP, length 172 20:56:21.240860 IP 217.10.77.22.37890 > 192.168.1.20.49152: UDP, length 172 20:56:21.256726 IP 217.10.77.22.37890 > 192.168.1.20.49152: UDP, length 172 20:56:21.256814 IP 192.168.1.20 > 217.10.77.22: ICMP 192.168.1.20 udp port 49152 unreachable, length 36 20:56:21.259100 IP 192.168.1.20 > 217.10.77.22: ICMP 192.168.1.20 udp port 49152 unreachable, length 36 20:56:21.261044 IP 192.168.1.20 > 217.10.77.22: ICMP 192.168.1.20 udp port 49152 unreachable, length 36 20:56:21.272913 IP 217.10.77.22.37890 > 192.168.1.20.49152: UDP, length 172 20:56:21.273566 IP 192.168.1.20.5060 > 217.10.79.9.5060: SIP, length: 621 20:56:21.276265 IP 192.168.1.20 > 217.10.77.22: ICMP 192.168.1.20 udp port 49152 unreachable, length 36 20:56:21.310743 IP 217.10.79.9.5060 > 192.168.1.20.5060: SIP, length: 435 20:56:32.228930 IP 217.10.79.9.5060 > 192.168.1.20.5060: SIP, length: 4 20:56:45.351943 IP 217.10.79.9.5060 > 192.168.1.20.5060: SIP, length: 4 20:56:50.972278 IP 192.168.1.20.5060 > 217.10.79.9.5060: SIP, length: 4 20:56:50.974190 IP 192.168.1.20.5060 > 217.10.79.2.3478: SIP, length: 20 20:56:51.010056 IP 217.10.79.2.3478 > 192.168.1.20.5060: SIP, length: 88 20:57:41.467983 IP 217.10.79.9.5060 > 192.168.1.20.5060: SIP, length: 4 20:57:46.081619 arp who-has 192.168.1.20 tell 0.0.0.0 20:57:47.431802 arp who-has 192.168.1.1 tell 192.168.1.20 20:57:47.431891 arp reply 192.168.1.1 is-at 00:0b:6b:db:1f:f1 20:57:47.435378 IP 192.168.1.20.38231 > 192.168.1.1.53: 60361+ AAAA? stun.sipgate.net. (34) 20:57:47.436050 IP 192.168.1.1.53 > 192.168.1.20.38231: 60361 0/0/0 (34) 20:57:47.494034 IP 192.168.1.20.5060 > 217.10.79.2.3478: SIP, length: 20 20:57:47.516204 IP 217.10.79.2.3478 > 192.168.1.20.5060: SIP, length: 88 20:57:47.527910 IP 192.168.1.20.5060 > 192.168.1.1.5060: SIP, length: 450 20:57:50.571125 IP 192.168.1.20.5060 > 192.168.1.1.5060: SIP, length: 450 20:57:56.356536 IP 217.10.79.9.5060 > 192.168.1.20.5060: SIP, length: 4 20:57:56.609895 IP 192.168.1.20.5060 > 192.168.1.1.5060: SIP, length: 450 20:58:08.656036 IP 192.168.1.20.5060 > 192.168.1.1.5060: SIP, length: 450 20:58:09.641543 IP 217.10.79.9.5060 > 192.168.1.20.5060: SIP, length: 4 20:58:13.665192 arp who-has 192.168.1.1 tell 192.168.1.20 20:58:13.665244 arp reply 192.168.1.1 is-at 00:0b:6b:db:1f:f1 20:58:38.468707 IP 217.10.79.9.5060 > 192.168.1.20.5060: SIP, length: 4 20:58:40.745251 IP 192.168.1.20.5060 > 192.168.1.1.5060: SIP, length: 450 20:58:45.752056 arp who-has 192.168.1.1 tell 192.168.1.20 20:58:45.752109 arp reply 192.168.1.1 is-at 00:0b:6b:db:1f:f1 20:58:52.434611 IP 217.10.79.9.5060 > 192.168.1.20.5060: SIP, length: 4 20:58:56.779893 IP 192.168.1.20.5060 > 192.168.1.1.5060: SIP, length: 450 20:59:06.476641 IP 217.10.79.9.5060 > 192.168.1.20.5060: SIP, length: 4 ------------------------------------------------ |
From: Dick M. <di...@fo...> - 2008-09-11 14:34:51
|
Hello, I'm trying to use siproxd with sipgate and I have a problem with incoming calls. The problem is that I register with a username which is the last 7 digits of the related phone number but incoming calls use the full phone number as username so siproxd can't recognise it. Sep 11 08:31:57 Geronimo siproxd[9373]: sip_utils.c:262 comparing urls: sip:004...@si... -> sip:12...@si... Sep 11 08:31:57 Geronimo siproxd[9373]: sip_utils.c:277 compare_url: username mismatch Sep 11 08:31:57 Geronimo siproxd[9373]: sip_utils.c:1137 sip_find_direction: unable to determine direction of SIP packet What can I do about this? Outgoing calls are fine. siproxd version 0.5.13 Dick |
From: VG <vik...@gm...> - 2008-06-06 13:32:51
|
Can we use Siproxd reversly. Like my sip server is behind net and siproxd is on static ip for registration by remote users. Will it create any problem? Regards Vikas |
From: Marko R. <ma...@pa...> - 2008-04-15 10:06:31
|
The Guide (<URL: http://siproxd.sourceforge.net/siproxd_guide/siproxd_guide_c7s3.html>) describes the setup '7.3. GS BT-100 with Siproxd running "in front of" a NAT router'. I have the reverse situation: 'Asterisk with Siproxd running "in front of" of NAT router', where there is no external registrar. In other words, I'm building this setup: +-----------+ | SIP Phone | +-----+-----+ | ____|________ __( )__ ( Public IP ) (_________________) | | abc.myhome.net:5060 +--+--+ | NAT | +--+--+ | | 192.168.100.202:5061 +----+----+ | siproxd | +----+----+ | | 192.168.100.202:5060 +----+-----+ | asterisk | +----------+ I can't seem to find a configuration parameter that would make siproxd advertise abc.company.com:5060 instead of 192.168.100.202:5061. Running siproxd on the NAT would solve the problem but is not an option for me. My current siproxd.conf is enclosed. Marko ===siproxd begin======================================================== if_inbound = eth4 if_outbound = eth4 hosts_allow_reg = 0.0.0.0/0 sip_listen_port = 5061 daemonize = 0 silence_log = 0 user = nobody registration_file = /var/lib/siproxd/siproxd_registrations pid_file = /var/run/siproxd/siproxd.pid rtp_proxy_enable = 1 rtp_port_low = 7070 rtp_port_high = 7089 rtp_timeout = 300 default_expires = 600 debug_level = 0 debug_port = 0 outbound_proxy_host = 192.168.100.202 outbound_proxy_port = 5060 ===siproxd end========================================================== |
From: Reza A. <re...@rn...> - 2008-03-24 17:23:04
|
Hello for some reason siproxd just started giving me the following errors this is on freebsd 6.2-RELEASE-p11 the errors are 13:47:55 ERROR:sock.c:175 sendto() [204.14.39.36:5060 size=649] call failed: Operation not permitted here is my config if_inbound = vr0 if_outbound = rl0 sip_listen_port = 5060 daemonize = 0 silence_log = 0 log_calls = 1 user = root <-- when set to nobody i receive the error above chrootjail = /usr/local/siproxd/ registration_file = siproxd_registrations pid_file = siproxd.pid rtp_proxy_enable = 1 rtp_port_low = 7070 rtp_port_high = 7079 rtp_timeout = 300 default_expires = 300 debug_level = 0x00000000 outbound_proxy_host = las-obproxy.*****.us outbound_proxy_port = 5060 09:51:01 siproxd.c:320 back from sipsock_wait 09:51:01 security.c:48 security_check_raw: size=562 09:51:01 register.c:238 sip_register: 09:51:01 sip_utils.c:772 looking for magic cookie [z9hG4bK9e63911FFC8E92] 09:51:01 sip_utils.c:786 existing branch -> branch hash [ecb3ad80fc56fa4c103f998cee1e35ff] 09:51:01 sip_utils.c:586 adding VIA:SIP/2.0/UDP 70.166.35.44:5060;branch=z9hG4bKecb3ad80fc56fa4c103f998cee1e35ff 09:51:01 ERROR:sock.c:175 sendto() [204.14.39.36:5060 size=645] call failed: Operation not permitted 09:51:01 siproxd.c:294 going into sipsock_wait 09:51:02 siproxd.c:320 back from sipsock_wait 09:51:02 security.c:48 security_check_raw: size=567 09:51:02 register.c:238 sip_register: 09:51:02 sip_utils.c:772 looking for magic cookie [z9hG4bKde49a53666CE8D7D] 09:51:02 sip_utils.c:786 existing branch -> branch hash [f943627343cb464fa1c256d671bb4461] 09:51:02 sip_utils.c:586 adding VIA:SIP/2.0/UDP 70.166.35.44:5060;branch=z9hG4bKf943627343cb464fa1c256d671bb4461 09:51:02 ERROR:sock.c:175 sendto() [204.14.39.36:5060 size=650] call failed: Operation not permitted 09:51:02 siproxd.c:294 going into sipsock_wait thanks for any advice/help -reza |
From: Thomas R. <tr...@gm...> - 2008-03-09 13:39:21
|
Thanks, This is now included in newest snapshot from today. The ./configure script checks for old/new names and if required creates some #defines so siproxd does build with libosip2-3.0.x as well as 3.1.x. Regards, /Thomas On 24 Feb, Chi-Thanh Christopher Nguyen wrote: > Hi, > > Building siproxd against libosip2-3.1.0 will fail because of changes > in osip_md5.h. Attached patch makes it compile again. > Note that the patch breaks compatibility to liposip2-3.0.3-2 and > earlier. > > > Regards, > Chi-Thanh Christopher Nguyen > -- -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GE d s+: a C+++ UL+++ P+++ L++++ E-- W++ N++ o+ K w-- O- M- V PS+ PE Y-- PGP++ t+ 5++ X R tv+ b+ DI+ D+ G e++ h r+++ y+++ ------END GEEK CODE BLOCK------ |
From: Chi-Thanh C. N. <chi...@cs...> - 2008-02-24 21:29:17
|
Hi, Building siproxd against libosip2-3.1.0 will fail because of changes in osip_md5.h. Attached patch makes it compile again. Note that the patch breaks compatibility to liposip2-3.0.3-2 and earlier. Regards, Chi-Thanh Christopher Nguyen |
From: Tristan <tr...@te...> - 2008-02-22 14:47:46
|
diff -rdEbU3 -ruN siproxd-0.7.0.orig/src/Makefile siproxd-0.7.0/src/Makefile --- siproxd-0.7.0.orig/src/Makefile 2008-02-22 15:27:13.000000000 +0100 +++ siproxd-0.7.0/src/Makefile 2008-02-20 15:44:04.000000000 +0100 @@ -34,6 +34,14 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# PJSIP stuff +PJBASE=/root/src/pjproject-0.8.0 +include $(PJBASE)/build.mak +# +# LDFLAGS = ${APP_LDFLAGS} +# LDLIBS = ${APP_LDLIBS} +# CFLAGS = ${APP_CFLAGS} +# CPPFLAGS= ${CFLAGS} srcdir = . @@ -88,7 +96,7 @@ accessctl.$(OBJEXT) route_processing.$(OBJEXT) \ security.$(OBJEXT) auth.$(OBJEXT) fwapi.$(OBJEXT) \ resolve.$(OBJEXT) plugin_shortdial.$(OBJEXT) \ - dejitter.$(OBJEXT) + dejitter.$(OBJEXT) plugin_mediarelay.$(OBJEXT) siproxd_OBJECTS = $(am_siproxd_OBJECTS) siproxd_LDADD = $(LDADD) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) @@ -131,10 +139,11 @@ INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s LDFLAGS = LIBOBJS = -LIBS = -lresolv -lresolv -losipparser2 -losip2 +# PATCH PJLIB +LIBS = -lresolv -lresolv -losipparser2 -losip2 ${APP_LDFLAGS} $(APP_LDLIBS) LN_S = ln -s LTLIBOBJS = -MAKEINFO = ${SHELL} /root/src/siproxd-0.7.0.orig/scripts/missing --run makeinfo +MAKEINFO = ${SHELL} /root/src/siproxd-0.7.0/scripts/missing --run makeinfo OBJEXT = o PACKAGE = siproxd PACKAGE_BUGREPORT = @@ -204,12 +213,11 @@ target_vendor = redhat AM_CFLAGS = -Wall -D_GNU_SOURCE \ -DBUILDSTR="\"`cat .buildno`\"" - siproxd_SOURCES = siproxd.c proxy.c register.c sock.c utils.c \ sip_utils.c sip_layer.c log.c readconf.c rtpproxy.c \ rtpproxy_relay.c accessctl.c route_processing.c \ security.c auth.c fwapi.c resolve.c \ - plugin_shortdial.c dejitter.c + plugin_shortdial.c dejitter.c plugin_mediarelay.c # addrcache.c diff -rdEbU3 -ruN siproxd-0.7.0.orig/src/plugin_mediarelay.c siproxd-0.7.0/src/plugin_mediarelay.c --- siproxd-0.7.0.orig/src/plugin_mediarelay.c 1970-01-01 01:00:00.000000000 +0100 +++ siproxd-0.7.0/src/plugin_mediarelay.c 2008-02-22 15:16:32.000000000 +0100 @@ -0,0 +1,960 @@ +/* + Copyright (C) 2008 Tristan Mahé <tri...@gm...> + + This file is part of Siproxd. + + Siproxd is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + Siproxd is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Siproxd; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "plugin_mediarelay.h" + +static char const ident[]="$Id: plugin_mediarelay.c,v 0.2$"; + +/* RTP proxy with advanced functions + * Process INVITE, 200/ok, BYE, CANCEL... + * don't forget to NEVER activate proxy_rtp in siproxd configuration as it will mess up everything + */ + +int plugin_mediarelay(sip_ticket_t *ticket) +{ + int sts=STS_SUCCESS; + int direction;int tableidx;int idx;int status_code; + + if (!ticket || !ticket->sipmsg) return STS_FAILURE; + + status_code = osip_message_get_status_code(ticket->sipmsg); + + /* We have an sdp, create or start relay */ + if ( MSG_IS_INVITE(ticket->sipmsg) + || ( MSG_IS_RESPONSE_FOR(ticket->sipmsg,"INVITE") && status_code == 200) ) + { + direction = rtp_find_direction(ticket); + tableidx = is_in_mediatable(ticket); + if (tableidx < -1) return STS_FAILURE; // something wrong happened ?! should be logged + + if ( tableidx == -1 && MSG_IS_INVITE(ticket->sipmsg) ) + { + DEBUGC(DBCLASS_PLUGIN, "plugin_mediarelay: " + "INVITE callid is not in mediatable, filling table"); + idx = add_mediatable_t(ticket); + { + pthread_mutex_lock(&mediatable_mutex); + sts = media_rewrite_sdp(ticket,direction,idx); + pthread_mutex_unlock(&mediatable_mutex); + } + } + else if ( tableidx > -1 && mediatable[tableidx].local_port_dst == 0 + && MSG_IS_RESPONSE_FOR(ticket->sipmsg,"INVITE") ) + { + DEBUGC(DBCLASS_PLUGIN, "plugin_mediarelay: " + "200/OK received [%d]",tableidx); + { + pthread_mutex_lock(&mediatable_mutex); + sts = media_rewrite_sdp(ticket,direction,tableidx); + pthread_mutex_unlock(&mediatable_mutex); + } + launch_rtp_thread(tableidx); + } + return sts; + } /* We have to delete created conference */ + else if ( MSG_IS_BYE(ticket->sipmsg) || MSG_IS_CANCEL(ticket->sipmsg) ) + { + DEBUGC(DBCLASS_PLUGIN, "plugin_mediarelay: " + "BYE|CANCEL received, stopping forward"); + while ( (tableidx = is_in_mediatable(ticket)) > -1 ) + { + { + pthread_mutex_lock(&mediatable_mutex); + memset(&mediatable[tableidx], 0, sizeof(mediatable[0])); + pthread_mutex_unlock(&mediatable_mutex); + } + } + } /* catch all errors corresponding to an invite */ + else if (MSG_IS_RESPONSE_FOR(ticket->sipmsg,"INVITE") && + (status_code >= 300 && status_code <= 699 ) + ) + { + DEBUGC(DBCLASS_PLUGIN, "plugin_mediarelay: " + "ERROR for invite received, deleting entries"); + while ( (tableidx = is_in_mediatable(ticket)) > -1 ) + { + { + pthread_mutex_lock(&mediatable_mutex); + memset(&mediatable[tableidx], 0, sizeof(mediatable[0])); + pthread_mutex_unlock(&mediatable_mutex); + } + } + } + return sts; +} + +/* is called by media_rewrite_sdp which is within a mutex so no problems */ +static int get_local_port() { + int local_port;int i; + for (local_port=configuration.rtp_port_low;local_port<configuration.rtp_port_high;local_port+=2) + { + for (i=0; i<RTPPROXY_SIZE; i++) + { + if (local_port == mediatable[i].local_port_orig || local_port == mediatable[i].local_port_dst) + break; + } /* for i */ + if (i<RTPPROXY_SIZE) + continue; + else + break; + } /* for (local_port)*/ + + if (local_port >= configuration.rtp_port_high) + local_port = 0; + DEBUGC(DBCLASS_PLUGIN, "plugin_mediarelay: " + "local port allocated: %d",local_port); + return local_port; +} + +static int is_local_uri(osip_uri_t *url) { + int i; + /* search for an entry */ + { + for (i=0;i<URLMAP_SIZE;i++){ + if (urlmap[i].active == 0) continue; + if ( compare_url(url, urlmap[i].true_url)==STS_SUCCESS) break; + if ( compare_url(url, urlmap[i].reg_url)==STS_SUCCESS) break; + if ( compare_url(url, urlmap[i].masq_url)==STS_SUCCESS) break; + } + } + + /* found a mapping entry */ + if (i<URLMAP_SIZE) + return 1; + else + return 0; +} + + +static int add_mediatable_t(sip_ticket_t *ticket) +{ + int freeidx=-1;int j; + osip_call_id_t *callid=NULL; + + pthread_mutex_lock(&mediatable_mutex); + + for (j=0; j<RTPPROXY_SIZE; j++) + { + if (mediatable[j].active==0) + { + freeidx=j; + break; + } + } + if (freeidx == -1) + { + ERROR("plugin_mediarelay: mediatable is full!"); + } + else + { + callid = osip_message_get_call_id(ticket->sipmsg); + if (!callid) + freeidx = -1; + else + { + mediatable[freeidx].active=1; + + if (callid->number) { + strcpy(mediatable[freeidx].callid_number, callid->number); + } else { + mediatable[freeidx].callid_number[0]='\0'; + } + + if (callid->host) { + strcpy(mediatable[freeidx].callid_host, callid->host); + } else { + mediatable[freeidx].callid_host[0]='\0'; + } + } + } + pthread_mutex_unlock(&mediatable_mutex); + + return freeidx; +} + +static int is_in_mediatable(sip_ticket_t *ticket) +{ + osip_call_id_t *callid=NULL; + osip_call_id_t cid; + int ret = -1;int i; + callid = osip_message_get_call_id(ticket->sipmsg); + + /* very important sanity checks */ + if ( ! callid ) + return -2; + if (callid->number && (strlen(callid->number) >= CALLIDNUM_SIZE)) { + ERROR("media_rewrite_sdp: received callid number [%s] " + "has too many characters (%ld, max=%i)", + callid->number, (long)strlen(callid->number),CALLIDNUM_SIZE); + return -2; + } + if (callid->host && (strlen(callid->host) >= CALLIDHOST_SIZE)) { + ERROR("media_rewrite_sdp: received callid host [%s] " + "has too many characters (%ld, max=%i)", + callid->host, (long)strlen(callid->host),CALLIDHOST_SIZE); + return -2; + } + { + pthread_mutex_lock(&mediatable_mutex); + for (i=0; i<RTPPROXY_SIZE; i++) + { + cid.number = mediatable[i].callid_number; + cid.host = mediatable[i].callid_host; + if (compare_callid(callid, &cid) == STS_SUCCESS ) + { + ret = i; + break; + } + } + pthread_mutex_unlock(&mediatable_mutex); + } + return ret; +} + +void destroy_mediatable() +{ + int i; + pthread_mutex_lock(&mediatable_mutex); + for (i=0; i<RTPPROXY_SIZE; i++) + { + if (mediatable[i].active==1) + { + memset(&mediatable[i], 0, sizeof(mediatable[0])); + } + } + pthread_mutex_unlock(&mediatable_mutex); +} + +static int rtp_find_direction(sip_ticket_t *ticket) +{ + int direction; + direction = sip_find_direction(ticket, NULL); + + if ( is_local_uri(ticket->sipmsg->to->url) && is_local_uri(ticket->sipmsg->from->url) ) + { + DEBUGC(DBCLASS_PLUGIN, "plugin_mediarelay: " + "%s to local from local",MSG_IS_INVITE(ticket->sipmsg) ? "INVITE" :"200/OK" ); + direction = DIR_INCOMING; + } + else if ( is_local_uri(ticket->sipmsg->to->url) ) // && ! is_local(ticket->sipmsg->from->url) ) + { + if ( MSG_IS_INVITE(ticket->sipmsg) ) + { + DEBUGC(DBCLASS_PLUGIN, "plugin_mediarelay: " + "INVITE to local from ext"); + direction = DIR_INCOMING; + } + else // 200/OK + { + DEBUGC(DBCLASS_PLUGIN, "plugin_mediarelay: " + "200/OK to local from ext"); + direction = DIR_OUTGOING; + } + } + else + { + if ( MSG_IS_INVITE(ticket->sipmsg) ) + { + DEBUGC(DBCLASS_PLUGIN, "plugin_mediarelay: " + "INVITE to ext from local"); + direction = DIR_OUTGOING; + } + else // 200/OK + { + DEBUGC(DBCLASS_PLUGIN, "plugin_mediarelay: " + "200/OK to ext from local"); + direction = DIR_INCOMING; + } + } + return direction; +} + +static pj_status_t create_stream( pj_pool_t *pool, + pjmedia_endpt *med_endpt, + const pjmedia_codec_info *codec_info, + pjmedia_dir dir, + pj_uint16_t local_port, + char *remote_addr, + pj_uint16_t remote_port, + pjmedia_stream **p_stream ) +{ + DEBUGC(DBCLASS_PLUGIN, "media_rewrite_sdp: " + "entering create_stream()"); + pjmedia_stream_info info; + pjmedia_transport *transport; + pj_status_t status; + + /* Reset stream info. */ + pj_bzero(&info, sizeof(info)); + + /* Initialize stream info formats */ + info.type = PJMEDIA_TYPE_AUDIO; +// info.proto = PJMEDIA_TP_PROTO_RTP_AVP; + info.dir = dir; + pj_memcpy(&info.fmt, codec_info, sizeof(pjmedia_codec_info)); + info.tx_pt = codec_info->pt; + info.ssrc = pj_rand(); + + DEBUGC(DBCLASS_PLUGIN, "media_rewrite_sdp: " + "create_stream() copying remote_addr now [%s:%d]",remote_addr,remote_port); + + /* Copy remote address */ + pj_str_t ip = pj_str(remote_addr); + status = pj_sockaddr_in_init ( &info.rem_addr,&ip,remote_port ); + if (status != PJ_SUCCESS) + ERROR("Invalid remote address [%s:%d] [%d]",remote_addr,remote_port, status); + + DEBUGC(DBCLASS_PLUGIN, "media_rewrite_sdp: " + "create_stream() creating udp transport"); + /* Create media transport */ + status = pjmedia_transport_udp_create(med_endpt, NULL, local_port, + 0, &transport); + if (status != PJ_SUCCESS) { + DEBUGC(DBCLASS_PLUGIN, "media_rewrite_sdp: " + "create_stream() FAILURE creating udp transport"); + return status; + } + /* Now that the stream info is initialized, we can create the + * stream. + */ + DEBUGC(DBCLASS_PLUGIN, "media_rewrite_sdp: " + "create_stream() stream creation final step"); + status = pjmedia_stream_create( med_endpt, pool, &info, + transport, NULL, p_stream); + + if (status != PJ_SUCCESS) { + ERROR("Error creating stream [%d]", status); + pjmedia_transport_udp_close(transport); + return status; + } + + return PJ_SUCCESS; +} + + +int media_rewrite_sdp(sip_ticket_t *ticket, int direction, int url_map_idx) { + int map_port = 0; /* Default */ + osip_message_t *mymsg=ticket->sipmsg; + osip_body_t *body; + sdp_message_t *sdp; + struct in_addr map_addr, addr_sess, addr_media, outside_addr, inside_addr; + int sts; + char *buff; + size_t buflen; + char clen[8]; /* content length: probably never more than 7 digits !*/ + int msg_port; + int media_stream_no; + sdp_connection_t *sdp_conn; + sdp_media_t *sdp_med; + int rtp_direction=0; + int have_c_media=0; + int isrtp = 0 ; + + map_port = get_local_port(); + if (map_port == 0) + return STS_FAILURE; + + /* + * get SDP structure + */ + sts = osip_message_get_body(mymsg, 0, &body); + if (sts != 0) { + DEBUGC(DBCLASS_PLUGIN, "media_rewrite_sdp: " + "no body found in message"); + return STS_FAILURE; + } + + sts = sip_body_to_str(body, &buff, &buflen); + if (sts != 0) { + ERROR("media_rewrite_sdp: unable to sip_body_to_str"); + return STS_FAILURE; + } + + DEBUGC(-1, "media_rewrite_sdp: payload %ld bytes", (long)buflen); + DUMP_BUFFER(-1, buff, buflen); + + + sts = sdp_message_init(&sdp); + sts = sdp_message_parse (sdp, buff); + if (sts != 0) { + ERROR("media_rewrite_sdp: unable to sdp_message_parse body"); + DUMP_BUFFER(-1, buff, buflen); + osip_free(buff); + sdp_message_free(sdp); + return STS_FAILURE; + } + osip_free(buff); + + /* + * RTP proxy: get ready and process + * rewrite for each media stream ('m=' item in SIP message) + */ + + /* get outbound address */ + if (get_interface_ip(IF_OUTBOUND, &outside_addr) != STS_SUCCESS) { + sdp_message_free(sdp); + return STS_FAILURE; + } + + /* get inbound address */ + if (get_interface_ip(IF_INBOUND, &inside_addr) != STS_SUCCESS) { + sdp_message_free(sdp); + return STS_FAILURE; + } + + /* figure out what address to use for RTP masquerading TO REWRITE !!! */ + /* + if (MSG_IS_INVITE && ticket->direction == DIR_INCOMING) + // rewrite using internal iface. ( vl16 ) + else if (MSG_IS_RESPONSE_FOR(ticket->sipmsg,"INVITE") && ticket->direction == DIR_OUTGOING) + // 200/OK + */ + if (MSG_IS_REQUEST(mymsg)) { + if (direction == DIR_INCOMING) { + memcpy(&map_addr, &inside_addr, sizeof (map_addr)); + rtp_direction = DIR_OUTGOING; + } else { + memcpy(&map_addr, &outside_addr, sizeof (map_addr)); + rtp_direction = DIR_INCOMING; + } + } else /* MSG_IS_REPONSE(mymsg) */ { + if (direction == DIR_INCOMING) { + memcpy(&map_addr, &inside_addr, sizeof (map_addr)); + rtp_direction = DIR_OUTGOING; + } else { + memcpy(&map_addr, &outside_addr, sizeof (map_addr)); + rtp_direction = DIR_INCOMING; + } + } + + if ( MSG_IS_INVITE(ticket->sipmsg) ) + { + memcpy(&mediatable[url_map_idx].local_ipaddr_orig, &map_addr, sizeof (mediatable[url_map_idx].local_ipaddr_orig)); + mediatable[url_map_idx].local_port_orig = map_port; + } + else + { + memcpy(&mediatable[url_map_idx].local_ipaddr_dst, &map_addr, sizeof (mediatable[url_map_idx].local_ipaddr_dst)); + mediatable[url_map_idx].local_port_dst = map_port; + } + + DEBUGC(DBCLASS_PLUGIN, "proxy_media_rewrite_sdp: SIP[%s %s] RTP[%s %s]", + MSG_IS_REQUEST(mymsg)? "RQ" : "RS", + (direction==DIR_INCOMING)? "IN" : "OUT", + (rtp_direction==DIR_INCOMING)? "IN" : "OUT", + utils_inet_ntoa(map_addr)); + + + /* + * first, check presence of a 'c=' item on session level + */ + if (sdp->c_connection==NULL || sdp->c_connection->c_addr==NULL) { + /* + * No 'c=' on session level, search on media level now + * + * According to RFC2327, ALL media description must + * include a 'c=' item now: + */ + media_stream_no=0; + while (!sdp_message_endof_media(sdp, media_stream_no)) { + /* check if n'th media stream is present */ + if (sdp_message_c_addr_get(sdp, media_stream_no, 0) == NULL) { + ERROR("SDP: have no 'c=' on session level and neither " + "on media level (media=%i)",media_stream_no); + sdp_message_free(sdp); + return STS_FAILURE; + } + media_stream_no++; + } /* while */ + } + + /* Required 'c=' items ARE present */ + + /* + * rewrite 'c=' item on session level if present and not yet done. + * remember the original address in addr_sess + */ + memset(&addr_sess, 0, sizeof(addr_sess)); + if (sdp->c_connection && sdp->c_connection->c_addr) { + sts = get_ip_by_host(sdp->c_connection->c_addr, &addr_sess); + if (sts == STS_FAILURE) { + ERROR("SDP: cannot resolve session 'c=' host [%s]", + sdp->c_connection->c_addr); + sdp_message_free(sdp); + return STS_FAILURE; + } + if ( MSG_IS_INVITE(ticket->sipmsg) ) + { + sprintf(mediatable[url_map_idx].remote_ipaddr_orig,"%s", sdp->c_connection->c_addr); + } + else + { + sprintf(mediatable[url_map_idx].remote_ipaddr_dst,"%s", sdp->c_connection->c_addr); + } + /* + * Rewrite + * an IP address of 0.0.0.0 means *MUTE*, don't rewrite such + */ + if (strcmp(sdp->c_connection->c_addr, "0.0.0.0") != 0) { + osip_free(sdp->c_connection->c_addr); + sdp->c_connection->c_addr=osip_malloc(HOSTNAME_SIZE); + sprintf(sdp->c_connection->c_addr, "%s", utils_inet_ntoa(map_addr)); + } else { + /* 0.0.0.0 - don't rewrite */ + DEBUGC(DBCLASS_PLUGIN, "proxy_mdia_rewrite_sdp: " + "got a MUTE c= record (on session level - legal?)"); + } + } + + + /* + * rewrite 'o=' item (originator) on session level if present. + */ + if (sdp->o_addrtype && sdp->o_addr) { + if (strcmp(sdp->o_addrtype, "IP4") != 0) { + ERROR("got IP6 in SDP originator - not yet suported by siproxd"); + sdp_message_free(sdp); + return STS_FAILURE; + } + + osip_free(sdp->o_addr); + sdp->o_addr=osip_malloc(HOSTNAME_SIZE); + sprintf(sdp->o_addr, "%s", utils_inet_ntoa(map_addr)); + } + + /* + * loop through all media descritions,rewrite them + */ + for (media_stream_no=0;;media_stream_no++) { + /* check if n'th media stream is present */ + if (sdp_message_m_port_get(sdp, media_stream_no) == NULL) break; + + /* + * check if a 'c=' item is present in this media description, + * if so -> rewrite it + */ + memset(&addr_media, 0, sizeof(addr_media)); + have_c_media=0; + sdp_conn=sdp_message_connection_get(sdp, media_stream_no, 0); + if (sdp_conn && sdp_conn->c_addr) { + if (strcmp(sdp_conn->c_addr, "0.0.0.0") != 0) { + sts = get_ip_by_host(sdp_conn->c_addr, &addr_media); + have_c_media=1; + /* have a valid address */ + osip_free(sdp_conn->c_addr); + sdp_conn->c_addr=osip_malloc(HOSTNAME_SIZE); + sprintf(sdp_conn->c_addr, "%s", utils_inet_ntoa(map_addr)); + } else { + /* 0.0.0.0 - don't rewrite */ + DEBUGC(DBCLASS_PLUGIN, "media_rewrite_sdp: got a " + "MUTE c= record (media level)"); + } + } + + /* start an RTP proxying stream */ + if (sdp_message_m_port_get(sdp, media_stream_no)) { + msg_port=atoi(sdp_message_m_port_get(sdp, media_stream_no)); + if ((msg_port > 0) && (msg_port <= 65535)) { + if ( MSG_IS_INVITE(ticket->sipmsg) ) + { + mediatable[url_map_idx].remote_port_orig = msg_port; + } + else + { + mediatable[url_map_idx].remote_port_dst = msg_port; + } + client_id_t client_id; + osip_contact_t *contact = NULL; + char *tmp=NULL; + char *protocol=NULL; + + /* try to get some additional UA specific unique ID. + * This Client-ID should be guaranteed persistent + * and not depend on if a UA/Server does include a + * particular Header (Contact) or not. + * I should just go for the remote IP address here, no? + */ + /* &&& NO, using the sender IP will cause troubles if + * the remote peer (Proxy/registrar) is thrown out of + * the signalling path. Then suddenly the IP address changes. + * + * I should probably go back to the Contact Header based idea, + * with fallback to IP. + * I must use a n-item structure, including all things that + * can be used for comparing. Then, in the RTP proxy, comparison + * must take place according to priorities with the item + * with highest priority present in the RTP table *and* + * extracted from the SIP message. + * To start with, this can be just 2 things, the Contact header + * and the Layer 3 IP address. As long as the UAs include the + * Contact header, we survive IP changes (e.g. when the SIP + * Registrar/Proxy is removed from signalling path within an + * ongoing call. This may happen if the Registrar/Proxy does + * not explicitely ask to stay in the signalling path using + * Record-Route headers - which is perfectly legal + * + */ + + memset(&client_id, 0, sizeof(client_id)); + + /* get the Contact Header if present */ + osip_message_get_contact(mymsg, 0, &contact); + if (contact) osip_contact_to_str(contact, &tmp); + if (tmp) strncpy(client_id.contact, tmp, CLIENT_ID_SIZE-1); + + /* store the IP address of the sender */ + memcpy(&client_id.from_ip, &ticket->from.sin_addr, + sizeof(client_id.from_ip)); + + /* + * is this an RTP stream ? If yes, set 'isrtp=1' + */ + protocol = sdp_message_m_proto_get (sdp, media_stream_no); + if (protocol == NULL) { + DEBUGC(DBCLASS_PLUGIN, "no protocol definition found!"); + } else { + char *check; + char *cmp; + isrtp = 1; + check = protocol ; + cmp = "RTP/" ; + while (*cmp && (isrtp = isrtp && *check) && + (isrtp = isrtp && (*cmp++ == toupper(*check++))) ) {} ; + if (isrtp) { + DEBUGC(DBCLASS_PLUGIN, "found RTP protocol [%s]!", protocol); + } else { + DEBUGC(DBCLASS_PLUGIN, "found non RTP protocol [%s]!", protocol); + } + } + + /* + * do we have a 'c=' item on media level? + * if not, use the same as on session level + */ + if (have_c_media == 0) { + memcpy(&addr_media, &addr_sess, sizeof(addr_sess)); + } + + /* + * Am I running in front of the routing device? Then I cannot + * use the external IP to bind a listen socket to, but should + * use my real IP on the outbound interface (which may legally + * be the same as the inbound interface if only one interface + * is used). + */ + if ((rtp_direction == DIR_INCOMING) && + (configuration.outbound_host) && + (strcmp(configuration.outbound_host, "")!=0)) { + DEBUGC(DBCLASS_PLUGIN, "media_rewrite_sdp: " + "in-front-of-NAT-Router, use real outboud IP"); + if (get_interface_real_ip(IF_OUTBOUND, &map_addr) + != STS_SUCCESS) { + ERROR("cannot get my real outbound interface address"); + /* as we do not know better, take the internal address */ + memcpy(&map_addr, &inside_addr, sizeof (map_addr)); + } + } + + /* rewrite the port */ + sdp_med=osip_list_get(&(sdp->m_medias), media_stream_no); + if (sdp_med && sdp_med->m_port) { + osip_free(sdp_med->m_port); + sdp_med->m_port=osip_malloc(8); /* 5 digits, \0 + align */ + sprintf(sdp_med->m_port, "%i", map_port); + DEBUGC(DBCLASS_PLUGIN, "media_rewrite_sdp: " + "m= rewrote port to [%i]",map_port); + } else { + ERROR("rewriting port in m= failed sdp_med=%p, " + "m_number_of_port=%p", sdp_med, sdp_med->m_port); + } + } /* if msg_port > 0 */ + } else { + /* no port defined - skip entry */ + WARN("no port defined in m=(media) stream_no=%i", media_stream_no); + continue; + } + } /* for media_stream_no */ + + + + /* remove old body */ + sts = osip_list_remove(&(mymsg->bodies), 0); + osip_body_free(body); + + /* dump new body */ + sdp_message_to_str(sdp, &buff); + buflen=strlen(buff); + + /* free sdp structure */ + sdp_message_free(sdp); + + /* include new body */ + sip_message_set_body(mymsg, buff, buflen); + if (sts != 0) { + ERROR("media_rewrite_sdp: unable to sip_message_set_body body"); + } + + /* free content length resource and include new one*/ + osip_content_length_free(mymsg->content_length); + mymsg->content_length=NULL; + sprintf(clen,"%ld",(long)buflen); + sts = osip_message_set_content_length(mymsg, clen); + + /* free old body */ + osip_free(buff); + + return STS_SUCCESS; +} + +static void launch_rtp_thread(int tableidx) { + DEBUGC(DBCLASS_PLUGIN, "media_rewrite_sdp: launch_rtp_thread [%d]",tableidx); + pthread_t thread; + int ret; + ret = pthread_create( &thread, NULL, run_rtp_proxy, (void*) &tableidx); /* is not unallocated */ + pj_thread_sleep(500); /* 500 ms to wait for run_rtp_proxy to get tableidx value */ +} + +/* Main thread for running conference bridge. + - We should export conf to enable other relay to start + - we should add record support +*/ +static void *run_rtp_proxy(void *ptr) +{ + /* thread stuff */ + pj_thread_desc tdesc; + pj_thread_t *thread; + + int url_map_idx; + url_map_idx = (int) *((int *) ptr); + DEBUGC(DBCLASS_PLUGIN, "media_rewrite_sdp: starting rtp_proxy with index [%d]",url_map_idx); + + /* REGISTER new thread into PJLIB*/ + pj_thread_register(NULL,tdesc,&thread); + + /* PJMEDIA declarations */ + pjmedia_dir dir = PJMEDIA_DIR_ENCODING_DECODING; + pj_status_t status;pjmedia_transport *tp; + + pjmedia_conf *conf; + pjmedia_port *conf_port; + pjmedia_port *null; /* null port for the master to operate correctly */ + pjmedia_master_port *master_port; /* Global master port for the conf */ + const pjmedia_codec_info *codec_info; + pj_pool_t *pool; + + /* for streams */ + pjmedia_stream *stream_orig; /* Unique RTP stream */ + pjmedia_port *stream_port_orig; + unsigned media_slot_orig; /* slot index of the port in the conference bridge */ + + pjmedia_stream *stream_dst; /* Unique RTP stream */ + pjmedia_port *stream_port_dst; + unsigned media_slot_dst; /* slot index of the port in the conference bridge */ + + /* + * start PJMEDIA relay by creating a conf, easier to extend than just a buffer based relay + */ + DEBUGC(DBCLASS_PLUGIN, "media_rewrite_sdp: get codec mgr for alaw"); + pjmedia_codec_mgr_get_codec_info( pjmedia_endpt_get_codec_mgr(med_endpt), + 8, &codec_info); + + /* Create memory pool for application purpose */ + pool = pj_pool_create( &pjPoolFactory.factory, /* pool factory */ + mediatable[url_map_idx].callid_number, /* pool name. */ + 4000, /* init size */ + 4000, /* increment size */ + NULL /* callback on error */ + ); + + status = pjmedia_conf_create( pool, /* pool to use */ + NCONFPORTS, /* number of ports */ + CLOCK_RATE, + NCHANNELS, + NSAMPLES, + NBITS, + PJMEDIA_CONF_NO_DEVICE, /* options */ + &conf /* result */ + ); + if (status != PJ_SUCCESS) + { + conf = NULL; + ERROR("Unable to create conference bridge: %d",status); + goto on_exit; + } + + DEBUGC(DBCLASS_PLUGIN, "media_rewrite_sdp: " + "conference ready"); + conf_port = pjmedia_conf_get_master_port(conf); + DEBUGC(DBCLASS_PLUGIN, "media_rewrite_sdp: " + "creating null port"); + status = pjmedia_null_port_create(pool, CLOCK_RATE, + NCHANNELS, NSAMPLES, NBITS, &null); + if (status != PJ_SUCCESS) + { + ERROR("Unable to create NULL port: %d",status); + } + DEBUGC(DBCLASS_PLUGIN, "media_rewrite_sdp: " + "creating master port"); + status = pjmedia_master_port_create(pool, null, conf_port, 0, &master_port); + if (status != PJ_SUCCESS) + { + ERROR("Unable to create MASTER port: %d",status); + } + /* INIT RTP STREAMS */ + DEBUGC(DBCLASS_PLUGIN, "media_rewrite_sdp: " + "now creating orig stream [%d] [%s:%d]", + mediatable[url_map_idx].local_port_orig, + mediatable[url_map_idx].remote_ipaddr_orig, + mediatable[url_map_idx].remote_port_orig); + status = create_stream( pool, + med_endpt, + codec_info, + dir, + mediatable[url_map_idx].local_port_orig, + mediatable[url_map_idx].remote_ipaddr_orig, + mediatable[url_map_idx].remote_port_orig, + &stream_orig + ); + if (status != PJ_SUCCESS) + { + ERROR("Unable to create stream: %d",status); + } + DEBUGC(DBCLASS_PLUGIN, "media_rewrite_sdp: " + "getting stream port"); + status = pjmedia_stream_get_port( stream_orig, &stream_port_orig); + DEBUGC(DBCLASS_PLUGIN, "media_rewrite_sdp: " + "now creating dst stream [%d] [%s:%d]", + mediatable[url_map_idx].local_port_dst, + mediatable[url_map_idx].remote_ipaddr_dst, + mediatable[url_map_idx].remote_port_dst); + status = create_stream( pool, + med_endpt, + codec_info, + dir, + mediatable[url_map_idx].local_port_dst, + mediatable[url_map_idx].remote_ipaddr_dst, + mediatable[url_map_idx].remote_port_dst, + &stream_dst + ); + if (status != PJ_SUCCESS) + { + ERROR("Unable to create stream: %d",status); + } + DEBUGC(DBCLASS_PLUGIN, "media_rewrite_sdp: " + "getting stream port"); + status = pjmedia_stream_get_port( stream_dst, &stream_port_dst); + + if (status != PJ_SUCCESS) + { + ERROR("Unable to get stream port: %d",status); +// return STS_FAILURE; + } + DEBUGC(DBCLASS_PLUGIN, "media_rewrite_sdp: " + "adding stream port to conf"); + status = pjmedia_conf_add_port( conf, + pool, + stream_port_orig, + NULL, + &media_slot_orig + ); + status = pjmedia_conf_add_port( conf, + pool, + stream_port_dst, + NULL, + &media_slot_dst + ); + DEBUGC(DBCLASS_PLUGIN, "media_rewrite_sdp: " + "starting stream"); + pjmedia_stream_start(stream_orig); + pjmedia_stream_start(stream_dst); + + status = pjmedia_master_port_start(master_port); + // Connect the two streams in unidirectionnal way + pjmedia_conf_connect_port(conf,media_slot_orig,media_slot_dst,0); + pjmedia_conf_connect_port(conf,media_slot_dst,media_slot_orig,0); + + /* wait there for BYE */ + for (;;) + { + pthread_mutex_lock(&mediatable_mutex); + if ( mediatable[url_map_idx].active == 0 ) + break; + pthread_mutex_unlock(&mediatable_mutex); + pj_thread_sleep(500); /* sleep for 500ms waiting for bye */ + } + pthread_mutex_unlock(&mediatable_mutex); + + /* Deinit right now */ +on_exit: + DEBUGC(DBCLASS_PLUGIN, "plugin_mediarelay: " + "disconnecting conf ports"); + pjmedia_conf_disconnect_port(conf,media_slot_orig,media_slot_dst); + pjmedia_conf_disconnect_port(conf,media_slot_dst,media_slot_orig); + + DEBUGC(DBCLASS_PLUGIN, "plugin_mediarelay: " + "destroying streams now"); + if (media_slot_orig) + status = pjmedia_conf_remove_port( conf, media_slot_orig); + if (stream_port_orig) + pjmedia_port_destroy(stream_port_orig); + if (stream_orig) + { + tp = pjmedia_stream_get_transport(stream_orig); + pjmedia_stream_destroy(stream_orig); + pjmedia_transport_udp_close(tp); + } + if (media_slot_dst) + status = pjmedia_conf_remove_port( conf, media_slot_dst); + if (stream_port_dst) + pjmedia_port_destroy(stream_port_dst); + if (stream_dst) + { + tp = pjmedia_stream_get_transport(stream_dst); + pjmedia_stream_destroy(stream_dst); + pjmedia_transport_udp_close(tp); + } + + DEBUGC(DBCLASS_PLUGIN, "plugin_mediarelay: " + "destroying master port"); + if (master_port) + { + pjmedia_master_port_stop(master_port); + pjmedia_master_port_destroy(master_port, PJ_FALSE); + } + DEBUGC(DBCLASS_PLUGIN, "plugin_mediarelay: " + "destroying conference"); + if (conf) + status = pjmedia_conf_destroy( conf ); + + DEBUGC(DBCLASS_PLUGIN, "plugin_mediarelay: " + "destroying null port"); + if (null) + { + pjmedia_port_destroy(null); + } + DEBUGC(DBCLASS_PLUGIN, "plugin_mediarelay: " + "destroying pool"); + if (pool) + pj_pool_release( pool ); + + pj_thread_destroy(thread); + + pthread_exit(NULL); +} diff -rdEbU3 -ruN siproxd-0.7.0.orig/src/plugin_mediarelay.h siproxd-0.7.0/src/plugin_mediarelay.h --- siproxd-0.7.0.orig/src/plugin_mediarelay.h 1970-01-01 01:00:00.000000000 +0100 +++ siproxd-0.7.0/src/plugin_mediarelay.h 2008-02-22 15:11:31.000000000 +0100 @@ -0,0 +1,125 @@ +/* + Copyright (C) 2008 Tristan Mahé <tri...@gm...> + + This file is part of Siproxd. + + Siproxd is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + Siproxd is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Siproxd; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <netinet/in.h> +#include <osipparser2/osip_parser.h> +#include <osipparser2/sdp_message.h> +#include "siproxd.h" +#include "log.h" +#include <pthread.h> + +#define PJMEDIA_SOUND_IMPLEMENTATION 0 +#define PJMEDIA_CODEC_MAX_SILENCE_PERIOD 16000 +#define PJMEDIA_MAX_MTU 1500 +#define PJMEDIA_PASOUND_MAX_LATENCY 100 + +/*Pjsip stuff */ +#include <pjlib.h> +#include <pjlib-util.h> +#include <pjmedia.h> +#include <pjmedia-codec.h> + +#include <pjmedia/session.h> +#include <pjmedia/errno.h> +#include <pjmedia/endpoint.h> +#include <pjmedia/stream.h> +#include <pjmedia/sdp.h> +#include <pj/log.h> +#include <pj/os.h> +#include <pj/pool.h> +#include <pj/string.h> +#include <pj/assert.h> +#include <pj/ctype.h> +#include <pj/rand.h> + +#include <pjsua-lib/pjsua.h> + +#define CALLIDNUM_SIZE 256 +#define CALLIDHOST_SIZE 128 + +/* Constants */ +#define CLOCK_RATE 8000 +#define NSAMPLES (CLOCK_RATE * 20 / 1000) +#define NCHANNELS 1 +#define NBITS 16 +/*Maximum ports in the conf (1 for master, 2 for streams, 1 for recorder and 1 for listener) */ +#define NCONFPORTS 5 + +extern pj_caching_pool pjPoolFactory; +extern pjmedia_endpt *med_endpt; + +extern struct siproxd_config configuration; +extern struct urlmap_s urlmap[]; /* URL mapping table */ + +/* contains the stream for ONE phone. opposite_entry contains the index for the nated relay */ +typedef struct { + int active; /* (0 -> free slot)*/ + char callid_number[CALLIDNUM_SIZE]; /* call ID */ + char callid_host[CALLIDHOST_SIZE]; /* --"-- */ + + /* For call originator*/ + struct in_addr local_ipaddr_orig; /* local IP */ + int local_port_orig; /* local allocated port */ + char remote_ipaddr_orig[32]; /* remote IP */ + int remote_port_orig; /* remote port */ + + /* For call destination */ + struct in_addr local_ipaddr_dst; /* local IP */ + int local_port_dst; /* local allocated port */ + char remote_ipaddr_dst[32]; /* remote IP */ + int remote_port_dst; /* remote port */ +} mediatable_t; + +mediatable_t mediatable[RTPPROXY_SIZE]; + +static pthread_mutex_t mediatable_mutex = PTHREAD_MUTEX_INITIALIZER; + +static void *run_rtp_proxy(void *ptr); + +static void launch_rtp_thread(int tableidx); + +/* is called by media_rewrite_sdp which is within a mutex so no problems */ +static int get_local_port(); + +static int is_local_uri(osip_uri_t *url); + +static int add_mediatable_t(sip_ticket_t *ticket); + +static int is_in_mediatable(sip_ticket_t *ticket); + +void destroy_mediatable(); + +static int rtp_find_direction(sip_ticket_t *ticket); + +static pj_status_t create_stream( pj_pool_t *pool, + pjmedia_endpt *med_endpt, + const pjmedia_codec_info *codec_info, + pjmedia_dir dir, + pj_uint16_t local_port, + char *remote_addr, + pj_uint16_t remote_port, + pjmedia_stream **p_stream ); +/* + * is called within a mediatable mutex, so no problem to update mediatable entry + */ +int media_rewrite_sdp(sip_ticket_t *ticket, int direction, int url_map_idx); diff -rdEbU3 -ruN siproxd-0.7.0.orig/src/plugins.h siproxd-0.7.0/src/plugins.h --- siproxd-0.7.0.orig/src/plugins.h 2005-12-26 17:39:12.000000000 +0100 +++ siproxd-0.7.0/src/plugins.h 2008-02-22 14:34:49.000000000 +0100 @@ -24,3 +24,9 @@ /* short Dial plugin */ int plugin_shortdial(sip_ticket_t *ticket); + +/* replace RTP proxy with full media control */ +int plugin_mediarelay(sip_ticket_t *ticket); + +/* current media rtp destroyer */ +void destroy_mediatable(); diff -rdEbU3 -ruN siproxd-0.7.0.orig/src/siproxd.c siproxd-0.7.0/src/siproxd.c --- siproxd-0.7.0.orig/src/siproxd.c 2007-11-28 21:51:45.000000000 +0100 +++ siproxd-0.7.0/src/siproxd.c 2008-02-22 14:41:47.000000000 +0100 @@ -40,6 +40,15 @@ #include "plugins.h" #include "log.h" + +// #include <pjsua-lib/pjsua.h> +#include <pjlib.h> +#include <pjmedia.h> +#include <pjmedia-codec.h> +// #include <pjlib-util.h> + +#define PJMEDIA_SOUND_IMPLEMENTATION PJMEDIA_SOUND_NULL_SOUND + static char const ident[]="$Id: siproxd.c,v 1.72 2007/11/28 20:51:45 hb9xar Exp $"; /* configuration storage */ @@ -73,6 +82,8 @@ */ static int dmalloc_dump=0; static int exit_program=0; +struct pj_caching_pool pjPoolFactory; +struct pjmedia_endpt *med_endpt; /* * local prototypes @@ -80,6 +91,7 @@ static void sighandler(int sig); + int main (int argc, char *argv[]) { int sts; @@ -97,6 +109,18 @@ int cmdline_debuglevel=0; char *pidfilename=NULL; struct sigaction act; + pj_status_t pj_status; + + pj_status = pj_init(); + pj_caching_pool_init(&pjPoolFactory, &pj_pool_factory_default_policy, 0); + pj_status = pjmedia_endpt_create(&pjPoolFactory.factory, NULL, 2, &med_endpt); + if (pj_status != PJ_SUCCESS) + ERROR("Unable to create media endpoint: %d",pj_status); + + DEBUGC(DBCLASS_PLUGIN, "media_rewrite_sdp: init codec"); + pj_status = pjmedia_codec_g711_init(med_endpt); +// status = init_codecs( med_endpt); +// pjsua_set_no_snd_dev(); log_init(); @@ -456,7 +480,8 @@ sts = plugin_shortdial(&ticket); if (sts == STS_SIP_SENT) goto end_loop; } - + sts = plugin_mediarelay(&ticket); + if (sts == STS_SIP_SENT) goto end_loop; /********************************* * finally proxy the message. @@ -583,6 +608,17 @@ } } + /* Destroy mediatable going on to remove objects */ + destroy_mediatable(); + sleep(1); + DEBUGC(DBCLASS_PLUGIN, "PJMEDIA: " + "destroying endpoint"); + pjmedia_endpt_destroy( med_endpt ); + DEBUGC(DBCLASS_PLUGIN, "PJMEDIA: " + "destroying pool factory"); + pj_caching_pool_destroy( &pjPoolFactory ); + pj_shutdown(); + /* END */ log_end(); return 0; |
From: Thomas R. <tr...@gm...> - 2008-01-22 17:41:12
|
Uh, thanks. On 22 Jan, Chi-Thanh Christopher Nguyen wrote: > The following error is encountered when building siproxd-0.7.0 docs: > --- > > Making all in doc > make[2]: Entering directory > `/var/tmp/portage/net-misc/siproxd-0.7.0/work/siproxd-0.7.0/doc' > make[3]: Entering directory > `/var/tmp/portage/net-misc/siproxd-0.7.0/work/siproxd-0.7.0/doc' mkdir > -p html if [ html/siproxd_guide.html -ot siproxd_guide.sgml ]; then \ > docbook2html -o html/ siproxd_guide.sgml; \ > fi > mkdir -p pdf > Using catalogs: /etc/sgml/sgml-docbook-4.2.cat > Using stylesheet: > /usr/share/sgml/docbook/utils-0.6.14/docbook-utils.dsl#html Working > on: > /var/tmp/portage/net-misc/siproxd-0.7.0/work/siproxd-0.7.0/doc/siproxd_guide.sgml > jade:/var/tmp/portage/net-misc/siproxd-0.7.0/work/siproxd-0.7.0/doc/siproxd_guide.sgml:79:34:E: document type does not allow element "CHAPTER" here > jade:/var/tmp/portage/net-misc/siproxd-0.7.0/work/siproxd-0.7.0/doc/siproxd_guide.sgml:137:51:E: document type does not allow element "CHAPTER" here > jade:/var/tmp/portage/net-misc/siproxd-0.7.0/work/siproxd-0.7.0/doc/siproxd_guide.sgml:206:39:E: document type does not allow element "CHAPTER" here > jade:/var/tmp/portage/net-misc/siproxd-0.7.0/work/siproxd-0.7.0/doc/siproxd_guide.sgml:500:34:E: document type does not allow element "CHAPTER" here > jade:/var/tmp/portage/net-misc/siproxd-0.7.0/work/siproxd-0.7.0/doc/siproxd_guide.sgml:549:41:E: document type does not allow element "CHAPTER" here > jade:/var/tmp/portage/net-misc/siproxd-0.7.0/work/siproxd-0.7.0/doc/siproxd_guide.sgml:638:47:E: document type does not allow element "CHAPTER" here > jade:/var/tmp/portage/net-misc/siproxd-0.7.0/work/siproxd-0.7.0/doc/siproxd_guide.sgml:1135:6:E: end tag for "CHAPTER" omitted, but OMITTAG NO was specified > jade:/var/tmp/portage/net-misc/siproxd-0.7.0/work/siproxd-0.7.0/doc/siproxd_guide.sgml:54:2: start tag was here > make[3]: *** [docbook_html] Error 8 > make[3]: Leaving directory > `/var/tmp/portage/net-misc/siproxd-0.7.0/work/siproxd-0.7.0/doc' > make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory > `/var/tmp/portage/net-misc/siproxd-0.7.0/work/siproxd-0.7.0/doc' > make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory > `/var/tmp/portage/net-misc/siproxd-0.7.0/work/siproxd-0.7.0' make: *** > [all] Error 2 > > --- > Patch is attached. > > Regards, > Chi-Thanh Christopher Nguyen > -- -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GE d s+: a C+++ UL+++ P+++ L++++ E-- W++ N++ o+ K w-- O- M- V PS+ PE Y-- PGP++ t+ 5++ X R tv+ b+ DI+ D+ G e++ h r+++ y+++ ------END GEEK CODE BLOCK------ |
From: Chi-Thanh C. N. <chi...@cs...> - 2008-01-22 17:12:40
|
The following error is encountered when building siproxd-0.7.0 docs: --- Making all in doc make[2]: Entering directory `/var/tmp/portage/net-misc/siproxd-0.7.0/work/siproxd-0.7.0/doc' make[3]: Entering directory `/var/tmp/portage/net-misc/siproxd-0.7.0/work/siproxd-0.7.0/doc' mkdir -p html if [ html/siproxd_guide.html -ot siproxd_guide.sgml ]; then \ docbook2html -o html/ siproxd_guide.sgml; \ fi mkdir -p pdf Using catalogs: /etc/sgml/sgml-docbook-4.2.cat Using stylesheet: /usr/share/sgml/docbook/utils-0.6.14/docbook-utils.dsl#html Working on: /var/tmp/portage/net-misc/siproxd-0.7.0/work/siproxd-0.7.0/doc/siproxd_guide.sgml jade:/var/tmp/portage/net-misc/siproxd-0.7.0/work/siproxd-0.7.0/doc/siproxd_guide.sgml:79:34:E: document type does not allow element "CHAPTER" here jade:/var/tmp/portage/net-misc/siproxd-0.7.0/work/siproxd-0.7.0/doc/siproxd_guide.sgml:137:51:E: document type does not allow element "CHAPTER" here jade:/var/tmp/portage/net-misc/siproxd-0.7.0/work/siproxd-0.7.0/doc/siproxd_guide.sgml:206:39:E: document type does not allow element "CHAPTER" here jade:/var/tmp/portage/net-misc/siproxd-0.7.0/work/siproxd-0.7.0/doc/siproxd_guide.sgml:500:34:E: document type does not allow element "CHAPTER" here jade:/var/tmp/portage/net-misc/siproxd-0.7.0/work/siproxd-0.7.0/doc/siproxd_guide.sgml:549:41:E: document type does not allow element "CHAPTER" here jade:/var/tmp/portage/net-misc/siproxd-0.7.0/work/siproxd-0.7.0/doc/siproxd_guide.sgml:638:47:E: document type does not allow element "CHAPTER" here jade:/var/tmp/portage/net-misc/siproxd-0.7.0/work/siproxd-0.7.0/doc/siproxd_guide.sgml:1135:6:E: end tag for "CHAPTER" omitted, but OMITTAG NO was specified jade:/var/tmp/portage/net-misc/siproxd-0.7.0/work/siproxd-0.7.0/doc/siproxd_guide.sgml:54:2: start tag was here make[3]: *** [docbook_html] Error 8 make[3]: Leaving directory `/var/tmp/portage/net-misc/siproxd-0.7.0/work/siproxd-0.7.0/doc' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/net-misc/siproxd-0.7.0/work/siproxd-0.7.0/doc' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/net-misc/siproxd-0.7.0/work/siproxd-0.7.0' make: *** [all] Error 2 --- Patch is attached. Regards, Chi-Thanh Christopher Nguyen |
From: Chi-Thanh C. N. <chi...@cs...> - 2007-12-28 12:38:27
|
I sent this message a while ago, but it seems that it got lost somewhere. Apologies if this is a duplicate. Thomas Ries <tries@...> writes: > > Support for libosip2-3.x is quite on top of the TODO list. Work will > > start earliest end of January next year (due to some constraints on my > > personal agenda). > > > > What would be the deadline for the Debian release? I am not involved with Debian, so I can't say for sure. But it doesn't look as if they are anywhere near release now[1]. Usually, they will announce several weeks before they freeze. For Gentoo, I have hacked together an ebuild that builds libosip2-2.2.2 internally. It can be found in the voip overlay[2]. Best regards, Chi-Thanh Christopher Nguyen [1] http://lists.debian.org/debian-devel-announce/2007/06/msg00005.html [2] http://overlays.gentoo.org/proj/voip/browser/trunk/net-misc/siproxd |
From: Chi-Thanh C. N. <chi...@cs...> - 2007-12-18 00:45:05
|
Thomas Ries <tries@...> writes: > Support for libosip2-3.x is quite on top of the TODO list. Work will > start earliest end of January next year (due to some constraints on my > personal agenda). > > What would be the deadline for the Debian release? I am not involved with Debian, so I can't say for sure. But it doesn't look as if they are anywhere near release now[1]. Usually, they will announce several weeks before they freeze. For Gentoo, I have hacked together an ebuild that builds libosip2-2.2.2 internally. It can be found in the voip overlay[2]. Best regards, Chi-Thanh Christopher Nguyen [1] http://lists.debian.org/debian-devel-announce/2007/06/msg00005.html [2] http://overlays.gentoo.org/proj/voip/browser/trunk/net-misc/siproxd |
From: Thomas R. <tr...@gm...> - 2007-12-17 18:19:09
|
Hi, Support for libosip2-3.x is quite on top of the TODO list. Work will start earliest end of January next year (due to some constraints on my personal agenda). What would be the deadline for the Debian release? Regards, /Thomas Chi-Thanh Christopher Nguyen wrote: > Hi, > > are there any plans to make siproxd support >=libosip2-3.0.1? Both Fedora and > Debian now have that version, so I think maintaining backwards compatibility to > libosip2-2.2.2 is not very important. > > If it is not planned to support >=libosip2-3.0.1 anytime soon, maybe it could be > considered to integrate libosip2-2.2.2 into siproxd, as eg. Debian might not > ship siproxd in its next release otherwise[1]. > > Best regards, > Chi-Thanh Christopher Nguyen > > [1] http://bugs.debian.org/439450 > > |
From: Chi-Thanh C. N. <chi...@cs...> - 2007-12-17 17:15:32
|
Hi, are there any plans to make siproxd support >=libosip2-3.0.1? Both Fedora and Debian now have that version, so I think maintaining backwards compatibility to libosip2-2.2.2 is not very important. If it is not planned to support >=libosip2-3.0.1 anytime soon, maybe it could be considered to integrate libosip2-2.2.2 into siproxd, as eg. Debian might not ship siproxd in its next release otherwise[1]. Best regards, Chi-Thanh Christopher Nguyen [1] http://bugs.debian.org/439450 |
From: Marcel W. <mw...@gm...> - 2007-12-10 18:56:22
|
While doing lots of testing with siproxd and SIP video endpoints, I ran into a strange problem where I couldn't make successful calls to one video endpoint brand and software release when going over siproxd. Detailed trace analysis together with the vendor shed some light: siproxd rewrites the SIP headers and changes upper/lower cases: "User-Agent" becomes "User-agent". Basically only the first letter of each keyword is capitalized. The RFC clearly states that keywords are case-insensitive. Anyone else seeing similar non-compliance issues? I simply added a quick hack for now to siproxd to write 'User-Agent' as requested until that software release is phased out. The vendor already fixed it. Marcel |
From: Thomas R. <tr...@gm...> - 2007-12-09 22:09:29
|
Hi Marcel, Seems that I'll nedd to have a closer look at this. You would'nt happen to have a network trace (inbound and outbound side of siproxd) for such an starting RTP stream? However, it will likely be next year when I get time to do this... Regards, /Thomas On 9 Dec, Marcel Wiget wrote: > Hi > > i recently added siproxd 0.6.0 into m0n0wall 1.3 branch > (http://m0n0.ch/wall) to work around some NAT issues I have with HD > Video endpoints (who aren't too smart when it comes to NAT). > > Trouble was, I often got good video quality one way, but not the > other. I suspected initially performance problems with the low > powered hardware (WRAP). > > Looking at traces, I found many of blocks of 5 packets sent out with > reverse sequence numbers for H.264 packets (sent out the public > interface). Haven't checked other RTP streams. Recompiling without > dejitter resolved the problem. > > Now it really works nice. Thanks for this great software! > > Marcel > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Siproxd-users mailing list > Sip...@li... > https://lists.sourceforge.net/lists/listinfo/siproxd-users -- -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GE d s+: a C+++ UL+++ P+++ L++++ E-- W++ N++ o+ K w-- O- M- V PS+ PE Y-- PGP++ t+ 5++ X R tv+ b+ DI+ D+ G e++ h r+++ y+++ ------END GEEK CODE BLOCK------ |
From: Marcel W. <mw...@gm...> - 2007-12-09 21:53:37
|
Hi i recently added siproxd 0.6.0 into m0n0wall 1.3 branch (http://m0n0.ch/wall) to work around some NAT issues I have with HD Video endpoints (who aren't too smart when it comes to NAT). Trouble was, I often got good video quality one way, but not the other. I suspected initially performance problems with the low powered hardware (WRAP). Looking at traces, I found many of blocks of 5 packets sent out with reverse sequence numbers for H.264 packets (sent out the public interface). Haven't checked other RTP streams. Recompiling without dejitter resolved the problem. Now it really works nice. Thanks for this great software! Marcel |
From: Peter M. <pm...@wm...> - 2007-11-25 00:13:56
|
Hi list, I've got a WRT router with siproxd running and a Linksys SPA 1001. The SPA features 2 ``lines'' what means that I can register with 2 SIP accounts. For the 2 ``lines'', the SPA uses different SIP ports (5062 and 9999). The two SIP accounts have different user ids. If I configure only 1 line, everything works fine. But as soon as I configure a second line, dialing works, but sound doesn't. A tcpdump on the router shows, that there is incoming and outgoing traffic on the RTP ports and the SIP traffic looks reasonable to me too. Does anybody have an idea what could be wrong? Thanks Peter The (obfuscated) contents of the registration_file: ***:1:1195949150 sip uid1 192.168.10.114 5062 sip uid1 xxx.xxx.xxx.xxx <-- my external IP sip uid1 at43.tuwien.ac.at ***:1:1195949744 sip uid2 192.168.10.114 9999 sip uid2 xxx.xxx.xxx.xxx <-- my external IP sip uid2 sipgate.at ***:0:0 ***:0:0 ... |
From: Mateus I. <p.z...@gm...> - 2007-11-13 14:33:31
|
Hello, I'm trying to use siproxd to fix the voip here at the company. Here's the deal, we had a Windows 2003 Server running as a router and firewall, and we decided to change to a Gentoo Linux box, running iptables and Kernel 2.6.20-8, and sudenly, the voip fone start working in a very peculiar way. I'm in brazil, if I call from the voip fone, to a brazilian fone, it works just fine, but if we call from a norwegian telefone to the voip, it makes the connection(rings), but no audio can be heard on any side. :O Fiddling a little with tcpdump, I think the error was the ip header that the Linux box is actually sending Telio(the norwegian guys that gave us the voip box), so I was trying to use siproxd to correct this. Now, if I run the siproxd, and from an external server try to connect to the host at port 5060, it works just fine, the logs show a connection, but when I use the voip phone(or dial to it), nothing happens at the siproxd side, like if it wasn't even seeing the call, here's a tcpdump for an incomingo connection (got on the firewall) tcpdump udp and port 5060 or portrange 16300-16700 -i eth1 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes 12:08:57.412303 IP AAA.BBB.CCC.DDD.1182 > aaa.bbb.ccc.ddd.5060: SIP, length: 328 12:08:57.645884 IP aaa.bbb.ccc.ddd.5060 > AAA.BBB.CCC.DDD.1182: SIP, length: 376 12:09:01.476811 IP aaa.bbb.ccc.ddd.5060 > AAA.BBB.CCC.DDD.1182:85.119.136.102 SIP, length: 1133 12:09:01.489918 IP AAA.BBB.CCC.DDD.1182 > aaa.bbb.ccc.ddd.5060: SIP, length: 520 12:09:01.502569 IP AAA.BBB.CCC.DDD.1182 > aaa.bbb.ccc.ddd.5060: SIP, length: 544 (This is where it started ringing) where AAA.BBB.CCC.DDD is the firewall IP, and aaa.bbb.ccc.ddd is the SIP provider IP. Can anybody please help me? I'm getting desperate over this. Thanks. Mateus |
From: Thomas R. <tr...@gm...> - 2007-09-27 20:55:50
|
Hi, Might be caused by: [ 1667420 ] 64-bit problem in libosip 2.2.2 <http://sourceforge.net/tracker/index.php?func=detail&aid=1667420&group_id=60374&atid=493974> Regards, /Thomas On 26 Sep, Franck Barel wrote: > Hello, > I use siproxd 0.5.13 and lib64osip2 2.2.2 on a mandriva spring ( 2007.1 ). > Then i try to register to the sip server ( asterisk ) with Express > Talk from inside my lan ( 172.16.0.44 ) , i've got this log : > > siproxd: sock.c:125 received UDP packet from 172.16.0.44, count=399 > siproxd: accessctl.c:53 deny list (SIP):*NULL* > siproxd: accessctl.c:55 allow list (SIP):*NULL* > siproxd: accessctl.c:57 allow list (REG):172.16.0.0/16 > siproxd: accessctl.c:154 [0] extracted address=172.16.0.0 > siproxd: accessctl.c:155 [0] extracted mask =16 > siproxd: utils.c:114 DNS lookup - from cache: 172.16.0.0 -> 172.16.0.0 > siproxd: accessctl.c:172 check match: entry=0, filter=ac100000, > from=ac100000 siproxd: accessctl.c:95 granted REG/SIP access > siproxd: accessctl.c:102 access check =3 > siproxd: security.c:48 security_check_raw: size=399 > siproxd: security.c:268 ERROR:security check failed: NULL To Header > siproxd: siproxd.c:348 ERROR:security_check_sip() failed... this is > not good siproxd: siproxd.c:270 going into sipsock_wait > > I've try with x-lite too, and it's the same result : NULL To Header > What can i do to solve this ? > Thank's in advance > > Franck Barel > fr...@fb... > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Siproxd-users mailing list > Sip...@li... > https://lists.sourceforge.net/lists/listinfo/siproxd-users -- -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GE d s+: a C+++ UL+++ P+++ L++++ E-- W++ N++ o+ K w-- O- M- V PS+ PE Y-- PGP++ t+ 5++ X R tv+ b+ DI+ D+ G e++ h r+++ y+++ ------END GEEK CODE BLOCK------ |