<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div><span><div><span>Thanks for quick reply,</span></div><div style="background-color: transparent; "><br></div><div style="background-color: transparent; ">Can you please suggest me, if there are any alternatives to get rtp/rtcp stream for each call. I actually need to parse the RTCPs passing from media-proxy and just implement my custom logic to store them in DB.</div><div> </div><div><br></div><div>Muhammad Faheem</div></span></div><div> </div><div><div><br></div></div><div><br></div> <div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; "> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Saúl Ibarra Corretgé <saul@ag-projects.com><br> <b><span
style="font-weight: bold;">To:</span></b> OpenSIPS users mailling list <users@lists.opensips.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, September 13, 2012 3:47 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [OpenSIPS-Users] Mediaproxy customization<br> </font> </div> <br>
<br>On Sep 13, 2012, at 12:37 PM, Faheem wrote:<br><br>> <br>> Hi, <br>> I'm trying to develop a QoS tool with the help of mediaproxy module and RTCP Packets.<br>> I did a hook in the mediaproxy code in <a target="_blank" href="http://mediacontrol.py/">mediacontrol.py</a> file. <br>> When I try to print the "RTCP" packets, I am getting exceptions.<br>> <br>> #mediacontrol.py <br>> def got_data(self, host, port, data): # standard function of mediaproxy ..<br>> if ((port % 2) == 1):<br>> log.debug("Got RTCP from %s:%d" % (host, port))<br>> try:<br>> log.debug("RTCP Stream") <br>> log.debug("RTCP Stream Length %i" % len(data))<br>> log.debug("RTCP Data %s" % data
) #exception come here....<br>> except TypeError:<br>> log.debug("Exception in accesing rtcp data variable")<br>> pass<br>> <br>> The above red line code throws exception.<br>> Can any one please help me over it?<br>> <br><br>MediaProxy will insert a conntrack rule as soon as it receives a single RTP packet from each side, so the got_data function will be called a couple of times and never again (unless there are changes in the stream that require destroying the conntrack rule).<br><br>You will not get the RTCP packets in your hook as they will be handled by the kernel.<br><br><br>Regards,<br><br>--<br>Saúl Ibarra Corretgé<br>AG Projects<br><br><br><br><br>_______________________________________________<br>Users mailing list<br><a ymailto="mailto:Users@lists.opensips.org"
href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>http://lists.opensips.org/cgi-bin/mailman/listinfo/users<br><br><br> </div> </div> </div></body></html>