[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
Sat Nov 22 08:58:01 CET 2014


Sorry. Should be has_body ;-)

With mobile regards,
Alexandr
On Nov 22, 2014 12:59 AM, "A Acosta" <ashlin.jonesacosta at pnmac.com> wrote:

> Alex, thanks for the reply.
>
> I'm getting the following errors while trying to use hash_body
>
> "kamailio: ERROR: <core> [cfg.y:3301]: yyparse(): cfg. parser: failed to
> find command hash_body (params 1)"
> "kamailio: : <core> [cfg.y:3441]: yyerror_at(): parse error in config file
> /usr/local/etc/kamailio//kamailio.cfg, line 98, column 53: unknown command,
> missing loadmodule?#012"
>
> On Thu, Nov 20, 2014 at 11:52 PM, Alexandr Dubovikov <
> alexandr.dubovikov at gmail.com> wrote:
>
>>  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" ) {
>>                 #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 listsr-dev at lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>>
>>
>>
>> _______________________________________________
>> sr-dev mailing list
>> sr-dev at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>>
>>
>
>
> --
> *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/20141122/6577de0c/attachment-0001.html>


More information about the sr-dev mailing list