[OpenSIPS-Users] Mediaproxy customization

Faheem faheem_imt at yahoo.com
Thu Sep 13 13:31:57 CEST 2012


Thanks for quick reply,

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.
 

Muhammad Faheem
 



________________________________
 From: Saúl Ibarra Corretgé <saul at ag-projects.com>
To: OpenSIPS users mailling list <users at lists.opensips.org> 
Sent: Thursday, September 13, 2012 3:47 PM
Subject: Re: [OpenSIPS-Users] Mediaproxy customization
 

On Sep 13, 2012, at 12:37 PM, Faheem wrote:

> 
> Hi, 
> I'm trying to develop a QoS tool with the help of mediaproxy module and RTCP Packets.
> I did a hook in the mediaproxy code in mediacontrol.py file. 
> When I try to print the "RTCP" packets, I am getting exceptions.
> 
> #mediacontrol.py 
>     def got_data(self, host, port, data):  # standard function of mediaproxy ..
>         if ((port % 2) == 1):
>             log.debug("Got RTCP from %s:%d" % (host, port))
>             try:
>         log.debug("RTCP Stream") 
>         log.debug("RTCP Stream Length %i" % len(data))
>          log.debug("RTCP Data %s" % data )   #exception come here....
>             except TypeError:
>                 log.debug("Exception in accesing rtcp data variable")
>                 pass
> 
> The above red line code throws exception.
> Can any one please help me over it?
> 

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).

You will not get the RTCP packets in your hook as they will be handled by the kernel.


Regards,

--
Saúl Ibarra Corretgé
AG Projects




_______________________________________________
Users mailing list
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120913/7be9c062/attachment-0001.htm>


More information about the Users mailing list