<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; "><span><br></span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; ">Hi,&nbsp;</div><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; ">I'm trying to develop a QoS tool with the help of mediaproxy module and RTCP Packets.</div><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; ">I did a hook in the mediaproxy code in mediacontrol.py file.&nbsp;</div><div><span style="font-size: 12pt;">When I try to print the "RTCP" packets, I am getting&nbsp;</span>exceptions<span style="font-size: 12pt;">.</span></div><div><div><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal; "><span style="background-color:
 transparent; ">#mediacontrol.py</span><span style="background-color: transparent; ">&nbsp;</span><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal; ">&nbsp; &nbsp; def got_data(self, host, port, data): &nbsp;# standard function of mediaproxy ..</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if ((port % 2) == 1):</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log.debug("Got RTCP from %s:%d" % (host, port))<br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try:</div><div><span class="Apple-tab-span" style="font-family: arial, helvetica, sans-serif; font-size: 12pt; white-space: pre; ">                </span>log.debug("RTCP Stream")&nbsp;</div><div style="color: rgb(0, 0, 0); font-size: 12pt; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal; "><span class="Apple-tab-span" style="white-space:pre">                </span>log.debug("RTCP
 Stream Length %i" % len(data))</div><span style="color: rgb(255, 0, 0);">&nbsp;<span class="Apple-tab-span" style="white-space:pre">                </span>log.debug("RTCP Data %s" % data ) &nbsp; #exception come here....</span><br></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; except TypeError:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log.debug("Exception in accesing rtcp data variable")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pass</div><div><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal; ">The above red line code throws exception.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal; "><span style="background-color: transparent; ">Can any one please help me over it?</span></div></div><div style="font-family:
 arial, helvetica, sans-serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; "><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; ">Thank you!</div><div style="font-family: arial, helvetica, sans-serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; "><span style="font-size: 12pt; ">Muhammad Faheem</span><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; ">  <div><br><br></div></div></div></body></html>