[OpenSIPS-Users] Mediaproxy customization

Saúl Ibarra Corretgé saul at ag-projects.com
Thu Sep 13 12:47:46 CEST 2012


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






More information about the Users mailing list