[sr-dev] Trying to setup RTCP-XR collection for Polycom phones on Kamailio 4.2 + Homer 3.6
Alexandr Dubovikov
alexandr.dubovikov at gmail.com
Fri Nov 21 08:52:51 CET 2014
Hi Ashlin,
you should implement it in this way:
1. set for all Polycom devices IP of your homer capture server as
collector IP.
2. check if method is PUBLISH and it has Event == vq-rtcpxr and/or
Content-type: application/vq-rtcpxr
3. extract CallID: from SDP body. (don't use Call-ID from PUBLISH)
4. make custom SQL insert to the log_capture or to the sip_capture table
with original CallID value from SDP body
5. send reply 200 OK
something like this:
if (method == "PUBLISH" && hash_body("application/sdp"))
{
if(sdp_get_line_startswith("$avp(callid)", "CalllID:)) {
#cut off CalliD: and insert it to DB as
correlation_id
sql_query("cb", "INSERT INTO
logs_capture(...,correlaton_id,....) VALUES (...., $avp(callid),...);";
}
t_reply("200","PUBLISH RECORDED");
exit(0);
}
Wbr,
Alexandr
On 11/21/2014 2:30 AM, A Acosta wrote:
>
> #ALL MESSAGES
> if($sht(a=>method::all) > 0) {
> sql_query("cb", "INSERT INTO stats_method (from_date, to_date,
> method, total) VALUES($var(f_date), $var(t_date), 'ALL',
> $sht(a=>method::all))");
> $sht(a=>method::all) = 0;
> }
>
> }
>
> I managed to get this working with Opensips with the help of the
> following
> link:http://wiki.sipfoundry.org/display/sipXecs/Setting+up+an+RTCP-XR+collector+for+Polycom+Productivity+Suite
>
> However, Kamailio's routing logic syntax is different and I'm having a
> hard time parsing through it. This is what the RTCP-XR collection
> logic looks like in the Opensips routing logic:
>
> # main request routing logic
>
> route{
> #For example, you can capture only needed methods...
> if (method =~ "^(INVITE|ACK|CANCEL|BYE|REFER|PRACK|UPDATE)") {
> sip_capture();
> }
>
> else if (method =~ "^PUBLISH" && !$ct =~ "x-sipX-nonat" && $rd
> = "domain.com <http://domain.com>" ) {
> #xlog("$rd=================================");
> perl_exec("messagedump");
> t_reply("200","PUBLISH RECORDED");
> }
>
> exit;
> }
>
> onreply_route {
>
> #And only needed reply or needed requests method
> if(status =~
> "^(1[0-9][0-9]|[3[0-9][0-9]|4[0-9]|[56][0-9][0-9])") {
> if($rm =~ "^(INVITE|ACK|CANCEL|BYE|REFER|PRACK|UPDATE)") {
> sip_capture();
> }
> exit;
> }
> }
>
> Any help would be appreciated.
> --
> *Ashlin Jones-Acosta*
> Telephony Systems Engineer
> Infrastructure Technology
> Direct: (805) 222-0934
> *PennyMac*
>
>
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20141121/38c816c2/attachment.html>
More information about the sr-dev
mailing list