<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head><!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]--></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">I figured its json data encoded in hex, so it appears DB_BLOB in <a href="https://github.com/OpenSIPS/opensips/blob/master/modules/sipcapture/sipcapture.c#L5074" rel="nofollow" target="_blank" class="enhancr_card_1433811969">OpenSIPS/opensips</a><div></div>
<div><br></div><div><br></div>
</div><div><br></div><div id="ydpa8dc3380enhancr_card_1433811969" class="ydpa8dc3380yahoo-link-enhancr-card ydpa8dc3380ymail-preserve-class ydpa8dc3380ymail-preserve-style" style="max-width:400px;font-family:"Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif;" data-url="https://github.com/OpenSIPS/opensips/blob/master/modules/sipcapture/sipcapture.c#L5074" data-type="YENHANCER" data-size="MEDIUM" contenteditable="false"><a href="https://github.com/OpenSIPS/opensips/blob/master/modules/sipcapture/sipcapture.c#L5074" style="text-decoration:none !important;color:#000 !important;" class="ydpa8dc3380yahoo-enhancr-cardlink" rel="nofollow" target="_blank"><table class="ydpa8dc3380card-wrapper ydpa8dc3380yahoo-ignore-table" style="max-width:400px;" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td width="400"><table class="ydpa8dc3380card ydpa8dc3380yahoo-ignore-table" style="max-width:400px;border-width:1px;border-style:solid;border-color:rgb(224, 228, 233);border-radius:2px;" cellspacing="0" cellpadding="0" width="100%" border="0"><tbody><tr><td class="ydpa8dc3380card-primary-image-cell" style="background-color: rgb(0, 0, 0); background-repeat: no-repeat; background-size: cover; position: relative; border-radius: 2px 2px 0px 0px; min-height: 175px;" valign="top" bgcolor="#000000" background="https://s.yimg.com/lo/api/res/1.2/HCshfSVdcCEPGGOEhWqjJA--~A/Zmk9ZmlsbDt3PTQwMDtoPTIwMDthcHBpZD1pZXh0cmFjdA--/https://avatars3.githubusercontent.com/u/3853758?s=400&v=4.cf.jpg" height="175"><!--[if gte mso 9]><v:rect fill="true" stroke="false" style="width:396px;height:175px;position:absolute;top:0;left:0;"><v:fill type="frame" color="#000000" src="https://s.yimg.com/lo/api/res/1.2/HCshfSVdcCEPGGOEhWqjJA--~A/Zmk9ZmlsbDt3PTQwMDtoPTIwMDthcHBpZD1pZXh0cmFjdA--/https://avatars3.githubusercontent.com/u/3853758?s=400&v=4.cf.jpg"/></v:rect><![endif]--><table class="ydpa8dc3380card-overlay-container-table ydpa8dc3380yahoo-ignore-table" style="width:100%;" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td class="ydpa8dc3380card-overlay-cell" style="background-color: transparent; border-radius: 2px 2px 0px 0px; min-height: 175px;" valign="top" bgcolor="transparent" background="https://s.yimg.com/cv/ae/nq/storm/assets/enhancrV21/1/enhancr_gradient-400x175.png"><!--[if gte mso 9]><v:rect fill="true" stroke="false" style="width:396px;height:175px;position:absolute;top:-18px;left:0;"><v:fill type="pattern" color="#000000" src="https://s.yimg.com/cv/ae/nq/storm/assets/enhancrV21/1/enhancr_gradient-400x175.png"/><v:textbox inset="0,0,20px,0"><![endif]--><table class="ydpa8dc3380yahoo-ignore-table" style="width: 100%; min-height: 175px;" border="0" height="175"><tbody><tr><td class="ydpa8dc3380card-richInfo2" style="text-align:left;padding:15px 0 0 15px;vertical-align:top;"></td><td class="ydpa8dc3380card-actions" style="text-align:right;padding:15px 15px 0 0;vertical-align:top;"><div class="ydpa8dc3380card-share-container"></div></td></tr></tbody></table><!--[if gte mso 9]></v:textbox></v:rect><![endif]--></td></tr></tbody></table></td></tr><tr><td><table class="ydpa8dc3380card-info ydpa8dc3380yahoo-ignore-table" style="background-color: rgb(255, 255, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-size: auto auto; position: relative; z-index: 2; width: 100%; max-width: 400px; border-radius: 0px 0px 2px 2px; border-top: 1px solid rgb(224, 228, 233);" cellspacing="0" cellpadding="0" align="center" border="0"><tbody><tr><td style="background-color:#ffffff;padding:16px 0 16px 12px;vertical-align:top;border-radius:0 0 0 2px;"><img class="ydpa8dc3380card-object-1 ydpa8dc3380yahoo-ignore-inline-image ydpa8dc3380ymail-preserve-class" src="https://s.yimg.com/nq/storm/assets/enhancrV2/23/logos/github.png" style="min-width:36px;margin-top:3px;" height="36"></td><td style="vertical-align:middle;padding:12px 24px 16px 12px;width:99%;font-family:"Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif;border-radius:0 0 2px 0;"><h2 class="ydpa8dc3380card-title" style="font-size:14px;line-height:19px;margin:0 0 6px 0;font-family:"Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif;word-break:break-word;color:#26282a;">OpenSIPS/opensips</h2><p class="ydpa8dc3380card-description" style="font-size:12px;line-height:16px;margin:0px;color:#979ba7;word-break:break-word;">opensips - OpenSIPS is a GPL implementation of a multi-functionality SIP Server that targets to deliver a high-l...</p></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></a></div><div><br></div><div><br></div><div id="yahoo_quoted_0673043864" class="yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Monday, 2 July 2018, 1:20:31 PM GMT+5:30, Pasan Meemaduma via Users <users@lists.opensips.org> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div id="yiv4003227156"><div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">Hi Guys,<br><div><br><div>I'm dumping my rtcp data which collect over hep interface of my opensips in to postgres and it doesn't store the json string in the database instead it pushes an encoded string which blows homer api when querying rtcp data. Same setup with mysql DB works perfectly fine, and data is saved as json string. It appears it stores the hep encoded msg into db without decoding. :/ Appreciate if you can look in to this. Let me know if you need any more info<br><div><br><div>OS: debian stretch<br><div>opensips : <span>2.3.3<br></span><span></span><div><br><div><div><div><br><div><span>/etc/opensips/opensips.cfg<br></span><span></span><div><br><div><span>listen=hep_udp:10.3.1.150:9060<br><span>loadmodule "db_postgres.so"<br><span>loadmodule "sipcapture.so"<br>loadmodule "proto_hep.so"<br><br></span><br></span><br></span></div></div></div></div><span>modparam("sipcapture", "db_url", "postgres://sipcapture:Apo31f24vna@127.0.0.1/homer_data")<br>modparam("sipcapture", "capture_on", 1)<br>modparam("sipcapture", "hep_capture_on", 1)<br>modparam("sipcapture", "hep_route", "my_hep_route")<br>modparam("sipcapture", "rtcp_table_name", "rtcp_capture")<br><br></span><div><br><br></div></div><div><br><span>route[my_hep_route] {<br><br> ### hep_get([data type,] chunk_id, vendor_id_pvar, chunk_data_pvar)<br> ### data type is optional for most of the generic chunks<br> ### Full list here: http://www.opensips.org/html/docs/modules/2.2.x/sipcapture#hep_set_id<br><br> #Protocol ID<br> hep_get("11", "$var(vid)", "$var(data)");<br><br> $var(proto) = $(var(data){s.int});<br><br> #xlog("L_INFO", "Dumping $var(data) pkts via HEP");<br> #Logs Or Stats<br> if($var(proto) == 100 || $var(proto) == 99) {<br> #hep_set("uint8", "2", , "1");<br> hep_get("utf8-string", "0x11", "$var(vid)", "$var(correlation_id)");<br> report_capture("logs_capture", "$var(correlation_id)", "1");<br> exit;<br> } else if ( $var(data) == "RTCP") {<br> hep_get("utf8-string", "0x11", "$var(vid)", "$var(correlation_id)");<br> report_capture("rtcp_capture", "$var(correlation_id)", "5");<br> exit;<br> }<br><br><br> if($var(data) == "SIP") {<br> hep_resume_sip();<br> } else {<br> exit;<br> }<br><br>}<br></span><span></span><div><br><div><br><div>debug log<br><div><br><span>Jul 2 17:42:39 voip2-homer /usr/sbin/opensips[17258]: DBG:sipcapture:db_sync_store: storing info...<br>Jul 2 17:42:39 voip2-homer /usr/sbin/opensips[17258]: DBG:db_postgres:db_postgres_val2str: PQescapeStringConn: in: 121 chars, out: 121 chars<br>Jul 2 17:42:39 voip2-homer /usr/sbin/opensips[17258]: DBG:db_postgres:db_postgres_val2str: PQescapeStringConn: in: 12 chars, out: 12 chars<br>Jul 2 17:42:39 voip2-homer /usr/sbin/opensips[17258]: DBG:db_postgres:db_postgres_val2str: PQescapeStringConn: in: 13 chars, out: 13 chars<br>Jul 2 17:42:39 voip2-homer /usr/sbin/opensips[17258]: DBG:db_postgres:db_postgres_val2str: PQescapeStringConn: in: 9 chars, out: 9 chars<br>Jul 2 17:42:39 voip2-homer /usr/sbin/opensips[17258]: DBG:db_postgres:db_postgres_submit_query: 0x7fcc64b62a98 PQsendQuery(insert into rtcp_capture (date,micro_ts,correlation_id,source_ip,source_port,destination_ip,destination_port,proto,family,type,node,msg ) values ('2018-07-02 17:42:39',1530517359466892,'0gQAAC8WAAACBAAALxYAALesqTJJyH2xO7MoiUXzBE8wM7k5guQDJr3dDDdK19yGM3EIud2vT1YL3QYtviLXYUkO7n48a2Qtwkv2C38+rns-@210.87.44.32','210.87.44.32',58871,'10.239.238.68',15997,1,2,5,'homer01:2','\x7b2273737263223a313630353339313435302c2274797065223a3230302c227265706f72745f636f756e74223a312c2273656e6465725f696e666f726d6174696f6e223a7b226e74705f74696d657374616d705f736563223a2232303835393739303632222c226e74705f74696d657374616d705f75736563223a22363334343939222c227274705f74696d657374616d70223a2d36323238383439332c227061636b657473223a31383231362c226f6374657473223a323931343536307d2c227265706f72745f626c6f636b73223a5b7b22736f757263655f73737263223a3937353539343236322c226672616374696f6e5f6c6f7374223a302c227061636b6574735f6c6f7374223a312c22686967686573745f7365715f6e6f223a34373337312c2269615f6a6974746572223a302c226c7372223a2231343431363437323835222c22646c7372223a3130383932307d5d7d'))<br><br></span><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>_______________________________________________<br>Users mailing list<br><a ymailto="mailto:Users@lists.opensips.org" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br></div>
</div>
</div></div></body></html>