[OpenSIPS-Users] Mediaproxy customization
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.
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:
> 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.
> def got_data(self, host, port, data): # standard function of mediaproxy ..
> if ((port % 2) == 1):
> log.debug("Got RTCP from %s:%d" % (host, port))
> 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")
> 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.
Saúl Ibarra Corretgé
Users mailing list
Users at lists.opensips.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users