Hey James,
Thanks for your interest! Indeed this functionality is somewhat broken (in
the module), not very well documented and some of the documentation is not
actually correct, so let me explain some basics:
1. The rtpproxy notification mechanism is rather low-level, it has no
notion of http/xmlrpc in it.
2. Apart from timeout_socket, you are also supposed to provide an arbitrary
"notify tag", which could be either a single no-spaces string or
URL-encoded binary blob.
Now looking at the Kamailio rtpproxy module code, it seems that this
functionality has been added in 2010 with a reference to
"ngcp-mediaproxy-ng" (that has later become rtpengine), so I suppose it was
never really working with the "real" RTPProxy. :( To make it useful it
needs to be extended to also take a timeout_tag parameter. Assuming it is
there, the usage pattern should look something like the following:
---
modparam("rtpproxy", "timeout_socket",
"tcp:192.168.155.64:8888")
modparam("rtpproxy", "timeout_tag_pv", "$avp(rtpp_ntag)")
route {
....
$avp( rtpp_ntag) =
"POST%20/XMLRPC%20HTTP/1.0%0AContent-Type%3A%20text/xml%0AContent-Length%3A%20175%0A%0A%3C%3Fxml%20version%3D%221.0%22%3F%3E%0A%3CmethodCall%3E%0A%3CmethodName%3Esess_disc%3C/methodName%3E%0A%3Cparams%3E%0A%3Cparam%3E%0A%3Cvalue%3E%3Cstring%3Efoobar%40123.456.789.000%3C/string%3E%3C/value%3E%0A%3C/param%3E%0A%3C/params%3E%0A%3C/methodCall%3E%0A";
....
}
---
This would make the RTPProxy issue the following request:
---
POST /XMLRPC HTTP/1.0
Content-Type: text/xml
Content-Length: 175
<?xml version="1.0"?>
<methodCall>
<methodName>sess_disc</methodName>
<params>
<param>
<value><string>foobar(a)123.456.789.000</string></value>
</param>
</params>
</methodCall>
---
Of course this is not a very practical method to generate the XMLRPC, so in
practice you may look at using some built-in languages (or string
operations) to generate one automatically. Better yet, someone might come
over and add a XMLRPC accounting module into rtpproxy to provide a more
high level interface.
Until then, however, I've added a pull request to implement the feature in
question here, please feel free to give it a spin and let me know if
something is still not working:
https://github.com/kamailio/kamailio/pull/3598
Regards,
Maksym
On Mon, Oct 9, 2023 at 6:23 PM James Lipski via sr-users <
sr-users(a)lists.kamailio.org> wrote:
Hello,
I'm a bit confused about a piece of the documentation. I'm using rtpproxy
3.0.1 + rtpproxy module on kamailio 5.6.4.
On the rtpproxy module, I'm trying to get the "timeout_socket" param
working. From the documentation, I have
modparam("rtpproxy", "timeout_socket", "xmlrpc:
http://192.168.155.64:8888/XMLRPC")
modparam("xmlrpc", "route", "XMLRPC_ROUTE")
modparam("xmlrpc", "mode", 1)
modparam("xmlrpc", "url_match", "^/XMLRPC")
/usr/bin/rtpproxy -i -u rtpproxy -n tcp:192.168.155.64:8888 -l
192.168.155.64 -s udp:127.0.0.1:7333 -m 29152 -M 49150 -d DBUG
However when purposely trying to timeout RTP, I'm seeing the following in
my rtpproxy logs:
Oct 10 00:31:22 localhost rtpproxy[3802129]:
DBUG:GLOBAL:rtpp_command_split:401: received command "3801518_4
USc9,0,8,18,101 219b2465decc-n7al36xva4lw 192.168.155.168 2266
C60D788E-8E14A9FA;1 w6p2ke9ttk;1 xmlrpc:http://192.168.155.64:8888/XMLHTTP
"
Oct 10 00:31:22 localhost rtpproxy[3802129]:
ERR:219b2465decc-n7al36xva4lw:rtpp_command_ul_handle:603: invalid socket
name w6p2ke9ttk;1
I'm just wondering if I'm missing anything, do I need to define
"listen=tcp:192.168.155.64:8888" in my configs? I know that rtpengine is
recommended/ I would like to experiement with rtpproxy. Do I need a
specific version of rtpproxy in order for this to work -- I did try it with
2.1.1 however that didn't work.
Thanks.
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-leave(a)lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to
the sender!
Edit mailing list options or unsubscribe:
--
Maksym Sobolyev
Sippy Software, Inc.
Internet Telephony (VoIP) Experts
Tel (Canada): +1-778-783-0474
Tel (Toll-Free): +1-855-747-7779
Fax: +1-866-857-6942
Web:
http://www.sippysoft.com
MSN: sales(a)sippysoft.com
Skype: SippySoft