Folks,
supose that there is an established rtp connection between two
endpoints and the media proxy is in the middle doing the relay of
the rtp streams, let´s say
(MP = mediaproxy)
EP A <--------->[NAT with IP1]<-----------> MP <--------------------> EP B
EP A sends rtp to MP_IP:MP_PORT passing through the NAT box.
EP B sends rtp to MP_IP:MP_PORT without passing through a NAT box.
The MP know that the caller = NAT_IP1:NAT_PORT1, and the called =
EP_B_IP:EP_B_PORT
Now, supose that the NAT box change their PUBLIC IP from IP1 to IP2, so
this escenary
EP A <------->[NAT with IP1]<---------> MP <-------------> EP B
will change to this
EP A <------->[NAT with IP2]<---------> MP <--------------> EP B
so the MP should detect that change of IPs and continue relaying the rtp
streams but now to IP2:PORT2 instead of IP1:PORT1.
Well, that was the situation y have experienced.
To fix this, I developed this solution, changing rtphandler.py file:
1) When the first rtp packet of a source arrives, save the SSRC field in
the MP.
- Save the SSRC of the caller.
- Save the SSRC of the called.
2) If arrives a rtp packet with unknown source IP but with the same SSRC
field of some of the two streams, updates the binding (with the new IP
detected) between the caller and the MP or between the called and the MP
according to the field SSRC previously saved.
Note: SSRC (RFC 3550 RTP), (from the rfc: "The SSRC identifier carried in
the RTP header and in various fields of RTCP packets is a random 32-bit
number that is required to be globally unique within an RTP session ")
Somebody wants to test it?, in my installation this in production without
problems.
Regards,
--
Gonzalo J. Sambucaro
Ingeniería de Software
Tel: +54-341-4230504
MSLC
gonzalo(a)mslc.com.ar
www.mslc.com.ar
Ocampo y Esmeralda - Vivero de Empresas de Base Tecnológica
Ciudad Universitaria Rosario UNR, CCT CONICET
Rosario - Santa Fé - Argentina
Hi All I am trying to configure mediaproxy to be used with OpenSER 1.3
following the tutorial from
http://siprouter.onsip.org/doc/gettingstarted/ch08.html#id2660207
So far I got two errors
modparam("nathelper", "rtpproxy_disable", 1)
ERROR:core:set_mod_param_regex: parameter <rtpproxy_disable> not found
in module <nathelper>
Feb 11 14:50:13 [3207] CRITICAL:core:yyerror: parse error in config
file, line 194, column 19-20: Can't set module parameter
modparam("registrar", "nat_flag", 6)
Feb 11 14:50:13 [3207] ERROR:core:set_mod_param_regex: parameter
<nat_flag> not found in module <registrar>
Feb 11 14:50:13 [3207] CRITICAL:core:yyerror: parse error in config
file, line 200, column 19-20: Can't set module parameter
What should I use instead of
modparam("nathelper", "rtpproxy_disable", 1)
and
modparam("registrar", "nat_flag", 6)
so that this config becomes compatible with OpenSer 1.3
Thx
Hi, I'm trying to use blacklist but don't find the function "set_blacklist()"
in OpenSer 1.3. I've done a full search in the code without finding it. Has
it a different name now?
Thanks.
--
Iñaki Baz Castillo
ibc(a)in.ilimit.es
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I found that starting a 2nd openser with same config as a already
running openser on same machine and using module mi_datagram deletes the
socket file of the already running openser process.
This is very bad when u use openser as a frontend for sems for example. :(
Is this a bug or a feature? If it is a bug the check, whether there is
already a openser using same network resources should be befor starting
modules. Or modules should be able to handle those problematic scenarios ...
My mi_datagram conif ist this:
loadmodule "mi_datagram.so"
modparam("mi_datagram", "socket_name", "/tmp/openser_ansagen_sock")
modparam("mi_datagram", "children_count", 1)
modparam("mi_datagram", "unix_socket_mode", 0660)
modparam("mi_datagram", "unix_socket_group", "voip")
modparam("mi_datagram", "unix_socket_user", "ruth")
modparam("mi_datagram", "socket_timeout", 2000)
regards
Helmut
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHsBIl4tZeNddg3dwRAgzVAJwKfUdqhd8oEm5eFewAflnosmofYQCgibYC
WjR2C9pf0FIxJjD5JewRPww=
=0roh
-----END PGP SIGNATURE-----
Hi, this issue has been already discused, but not wure if it's supposed to
work now as expected:
OpenSer svn trunk version. When an UAC send PUBLISH with status "offline" it's
correctly notified to a X-Lite (it appears as "offline"). But later when
the "uac" sends a REGISTER forrefreshing purposes, "pua-usrloc" generates a
NOTIFY that make the user again "online" in X-Lite.
This is the trace:
"uac" sends a PUBLISH "offline":
-----------------------------------------------------------------------------------------------------------------
PUBLISH sip:uac@domain.org SIP/2.0
Via: SIP/2.0/UDP 85.58.0.144:64947;rport;branch=z9hG4bKsowasblj
Max-Forwards: 70
To: "I ako" <sip:uac@domain.org>
From: "I ako" <sip:uac@domain.org>;tag=ukotb
Call-ID: wxahiexypsywlfd(a)85.58.0.144
CSeq: 454 PUBLISH
Content-Type: application/pidf+xml
Event: presence
Expires: 3600
SIP-If-Match: a.1202691876.19145.8.2
User-Agent: Twinkle/1.1
Content-Length: 197
<?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf"
entity="sip:uac@domain.org"><tuple
id="igxiox"><status><basic>closed</basic></status></tuple></presence>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 85.58.0.144:64947;rport=64947;branch=z9hG4bKsowasblj
To: "I ako" <sip:uac@domain.org>;tag=c90c2e85033c1e1931e01d1f8303e2be.93c0
From: "I ako" <sip:uac@domain.org>;tag=ukotb
Call-ID: wxahiexypsywlfd(a)85.58.0.144
CSeq: 454 PUBLISH
Expires: 2390
SIP-ETag: a.1202691876.19144.13.3
Server: OpenSER (1.4.0dev4-tls (i386/linux))
Content-Length: 0
-----------------------------------------------------------------------------------------------------------------
Note that it has created a tuple with id="igxiox" containing "offline" status.
"presence" module sends a NOTIFY to X-Lite
-----------------------------------------------------------------------------------------------------------------
NOTIFY sip:xlite@85.58.0.144:64705;transport=TCP SIP/2.0
Via: SIP/2.0/TCP OPENSER;branch=z9hG4bK0ba1.96adda2.0
To: sip:xlite@domain.org;tag=841ea920
From: sip:uac@domain.org;tag=10.19158.1202692716.19
CSeq: 4 NOTIFY
Call-ID: NmU4Y2EwMTY1ODQzOTE0MDJhODUzM2JkYTM1NTBmMzQ.
Content-Length: 323
User-Agent: OpenSER (1.4.0dev4-tls (i386/linux))
Max-Forwards: 70
Event: presence
Contact: <sip:OPENSER>
Subscription-State: active;expires=2371
Content-Type: application/pidf+xml
<?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf"
entity="sip:uac@domain.org"><tuple
id="igxiox"><status><basic>closed</basic></status></tuple>
<tuple xmlns="urn:ietf:params:xml:ns:pidf" id="0x81b3aa8">
<status>
<basic>open</basic>
</status>
</tuple>
</presence>
SIP/2.0 200 OK
Via: SIP/2.0/TCP OPENSER;branch=z9hG4bK0ba1.96adda2.0
Contact: <sip:xlite@10.0.2.15:59680;transport=TCP>
To: <sip:xlite@domain.org>;tag=841ea920
From: <sip:uac@domain.org>;tag=10.19158.1202692716.19
Call-ID: NmU4Y2EwMTY1ODQzOTE0MDJhODUzM2JkYTM1NTBmMzQ.
CSeq: 4 NOTIFY
User-Agent: X-Lite release 1011s stamp 41150
Content-Length: 0
-----------------------------------------------------------------------------------------------------------------
Note: I'd like to know why there apper two tupples, one "online" and other
one "offline". After the test I empiet activce_watcher and watchers table and
restarted openser. No other UAC's registered as "uac" user. ¿?
Some time after, "uac" sends a REGISTER. After it, "pua_usrloc" generates this
PUBLISH:
-----------------------------------------------------------------------------------------------------------------
PUBLISH sip:uac@domain.org SIP/2.0
Via: SIP/2.0/UDP OPENSER;branch=z9hG4bKcfa7.6a5c90f.0
To: sip:uac@domain.org
From: sip:uac@domain.org;tag=8e8dc05fff8d3172da4bb428a9d4a223-793a
CSeq: 10 PUBLISH
Call-ID: 7bfbdf3d-19145@OPENSER
Content-Length: 341
User-Agent: OpenSER (1.4.0dev4-tls (i386/linux))
Max-Forwards: 70
Event: presence
Expires: 1201
Content-Type: application/pidf+xml
<?xml version="1.0"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf"
xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid"
xmlns:c="urn:ietf:params:xml:ns:pidf:cipid" entity="uac(a)domain.org">
<tuple id="0x81b36d8">
<status>
<basic>open</basic>
</status>
</tuple>
</presence>
-----------------------------------------------------------------------------------------------------------------
"presence" module generates the the NOTIFY:
-----------------------------------------------------------------------------------------------------------------
NOTIFY sip:xlite@85.58.0.144:64705;transport=TCP SIP/2.0
Via: SIP/2.0/TCP OPENSER;branch=z9hG4bK1ba1.9366d7e6.0
To: sip:xlite@domain.org;tag=841ea920
From: sip:uac@domain.org;tag=10.19158.1202692716.19
CSeq: 5 NOTIFY
Call-ID: NmU4Y2EwMTY1ODQzOTE0MDJhODUzM2JkYTM1NTBmMzQ.
Content-Length: 568
User-Agent: OpenSER (1.4.0dev4-tls (i386/linux))
Max-Forwards: 70
Event: presence
Contact: <sip:OPENSER>
Subscription-State: active;expires=2364
Content-Type: application/pidf+xml
<?xml version="1.0"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf"
xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid"
xmlns:c="urn:ietf:params:xml:ns:pidf:cipid" entity="uac(a)domain.org">
<tuple id="0x81b36d8">
<status>
<basic>open</basic>
</status>
</tuple>
<tuple xmlns="urn:ietf:params:xml:ns:pidf"
id="igxiox"><status><basic>closed</basic></status></tuple>
<tuple xmlns="urn:ietf:params:xml:ns:pidf" id="0x81b3aa8">
<status>
<basic>open</basic>
</status>
</tuple>
</presence>
-----------------------------------------------------------------------------------------------------------------
Basically, the tupple with id="igxiox" (the one with "offline" status) is not
the first one so X-Lite sees "uac" again online.
Is there anything I'm doing wrong? "uac" (Twinkle) issue? X-Lite issue?
Or is it just impossible thist to work properly since "pua_usrloc" behaviour?
Thanks for any explanation.
--
Iñaki Baz Castillo
At 18:39 08/02/2008, Alex Balashov wrote:
>On Fri, February 8, 2008 11:17 am, Iñaki Baz Castillo wrote:
>
>> - But now imagine that user B sends a BYE after 2 hours using the same
>> From&To tags and Call-ID. This is terrible!!! OpenSer will notify a
>> "Stop" action
>
>Why would it do that? Call-IDs are supposed to be GUIDs (Globally Unique
>Identifiers) and never reused. You shouldn't really be seeing collisions
>of them on a UA that properly implements the generation algorithm for them
>and fulfills the requirements of the RFC on this point.
You should not, but you do.
Anyhow, I think the confusion is of architectural nature here. IMO, usage-based
charging if placed anywhere than in the place where the charged service is actually
produced and not in a proxy to it, which may not have accurate information. I.e.,
put CDR stuff in PSTN gateway.
-jiri
--
Jiri Kuthan http://iptel.org/~jiri/
Hi,
I am having difficulty to enable SERWEB logs, even after enabling the logs in config.php and install PEAR Log package.
Here are the settings in my config.php
$config->enable_loging = true;
$config->log_file = "/var/log/serweb";
$config->log_level = "PEAR_LOG_DEBUG";
This is what I installed on my PC
SERWEB0.9.6
SER0.9.6
MYSQL5.1.17
php-mysql-4.3.9-3.15
Are there any other settings I need to enable or need to install other components?
Thanks
--Srinivas
Yep, have the mediaproxy module parts configured in openser.cfg, mine looks like:
loadmodule "mediaproxy.so"
modparam("mediaproxy","natping_interval", 30)
modparam("mediaproxy","mediaproxy_socket", "/var/run/proxydispatcher.sock")
#modparam("mediaproxy","mediaproxy_socket", "/var/run/mediaproxy.sock")
modparam("mediaproxy","sip_asymmetrics","/usr/local/etc/openser/sip-asymmetric-clients")
modparam("mediaproxy","rtp_asymmetrics","/usr/local/etc/openser/rtp-asymmetric-clients")
>From "ps" I can see:
ps -aef | grep proxy
root 30916 1 0 14:53 ? 00:00:00 python /usr/local/mediaproxy/mediaproxy.py
root 30919 1 0 14:53 ? 00:00:00 python /usr/local/mediaproxy/proxydispatcher.py
This is from my syslog, includes info written during mediaproxy startup and a test call:
Feb 9 14:53:16 serbox mediaproxy[30916]: Listening for commands on local socket `/var/run/mediaproxy.sock'
Feb 9 14:53:16 serbox mediaproxy[30916]: Listening for remote commands is disabled
Feb 9 14:53:16 serbox mediaproxy[30916]: Using IP address `12.12.16.10' for the RTP/RTCP proxy
Feb 9 14:53:16 serbox proxydispatcher[30919]: Listening for commands on local socket `/var/run/proxydispatcher.sock'
Feb 9 14:53:16 serbox proxydispatcher[30919]: Listening for mediaproxy media timeout requests on 0.0.0.0:25061
Feb 9 14:53:16 serbox proxydispatcher[30919]: Default mediaproxy server is on `/var/run/mediaproxy.sock'
Feb 9 14:55:15 serbox proxydispatcher[30919]: request 71fa800f7337023a178362de41fe673b(a)12.12.16.9 12.12.16.9:10220:audio 12.12.16.9 12.12.16.9 remote serbox.ukgrid.net local Asterisk=20PBX info=from:0042*001@12.12.16.9,to:0044208888888@serbox.ukgrid.net,fromtag:as145fa099,totag:
Feb 9 14:55:15 serbox mediaproxy[30916]: request 71fa800f7337023a178362de41fe673b(a)12.12.16.9 12.12.16.9:10220:audio 12.12.16.9 12.12.16.9 remote serbox.ukgrid.net local Asterisk=20PBX info=totag:,to:0044208888888@serbox.ukgrid.net,from:0042*001@12.12.16.9,fromtag:as145fa099
Feb 9 14:55:15 serbox mediaproxy[30916]: session 71fa800f7337023a178362de41fe673b(a)12.12.16.9: started. listening on 12.12.16.10:60000
Feb 9 14:55:15 serbox mediaproxy[30916]: execution time: 3.73 ms
Feb 9 14:55:15 serbox proxydispatcher[30919]: forwarding to mediaproxy on /var/run/mediaproxy.sock: got: '12.12.16.10 60000'
Feb 9 14:55:15 serbox proxydispatcher[30919]: execution time: 7.59 ms
Feb 9 14:55:24 serbox proxydispatcher[30919]: delete 71fa800f7337023a178362de41fe673b(a)12.12.16.9 info=
Feb 9 14:55:24 serbox mediaproxy[30916]: delete 71fa800f7337023a178362de41fe673b(a)12.12.16.9 info=
Feb 9 14:55:24 serbox mediaproxy[30916]: session 71fa800f7337023a178362de41fe673b(a)12.12.16.9: 0/0/0 packets, 0/0/0 bytes (caller/called/relayed)
Feb 9 14:55:24 serbox mediaproxy[30916]: session 71fa800f7337023a178362de41fe673b(a)12.12.16.9: ended.
Feb 9 14:55:24 serbox mediaproxy[30916]: execution time: 0.55 ms
Feb 9 14:55:24 serbox proxydispatcher[30919]: forwarding to mediaproxy on /var/run/mediaproxy.sock: got: ''
Feb 9 14:55:24 serbox proxydispatcher[30919]: execution time: 1.59 ms
Hi Iñaki,
yep I have ;) Sorry my config is actually with start=yes, but Id gotten so frustrated I even tried running the mediaproxy
portion on a seperate server with only the dispatcher on the OpenSER system (this made no difference to my problem).
In my syslog I see both the dispatcher and the mediaproxy running, and the socket files are created. Sessions are even
started per call as you'd expect but at the end of the call the mediaproxy summary (in syslog) states that it has forwarded
0 bytes/packets of data :((.
So it seems the OpenSER mediaproxy module is correctly making the request to the dispatcher for a proxy session, but
something is not updating the SIP IP and PORT to redirect the RTP via the proxy....
Any ideas? There seems so little you can configure regarding this in the route that I feel at a dead end...
>Have you really read the doc? ;)
>
>; start Boolean value that specifies if to start the RTP proxy server.
>; Default value: Yes
>Also, after setting tha parameter to "yes" do a "tail -f /var/log/syslog" to
>see mediaproxy and proxydispatcher messages.
Hi list,
can anyone help? I've been trying to get mediaproxy working for a week without success :(
My mediaproxy config is as follows:
[Dispatcher]
start = yes
socket = /var/run/proxydispatcher.sock
group = openser
defaultProxy = /var/run/mediaproxy.sock
[MediaProxy]
start = no
socket = /var/run/mediaproxy.sock
group = openser
listen = None
allow = Any
proxyIP =x.x.x.x
portRange = 60000:65000
TOS = 0xb8
idleTimeout = 60
holdTimeout = 3600
forceClose = 0
I have use_media_proxy() in the route for any INVITEs, but Im not getting any RTP data successfully routed via mediaproxy,
is there anyone on the list who has got this going who can give me a little guidance or suggestions? Would be much appreciated!
thanks, Andy.