I don't really need codec manipulation so much as just knowing what codec was used (yes in a PV). Not a list of available codecs, but which codec was negotiated and used. I don't know SDP very well so I'm not sure if that's immediately discernible. This example was given earlier. Lets say I want to limit to 50 g729a dialogs to a particular IP.<div>
<br></div><div>That's what I really want to use it for. I'd also really like to log the codec on a per call basis in ACC.</div><div>-Brett</div><div><br><br><div class="gmail_quote">On Tue, Jul 28, 2009 at 2:54 AM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Brett,<br>
<br>
You mean an PV returning the list with all the available codecs ?<br>
<br>
Regards,<br>
Bogdan<br>
<br>
Brett Nemeroff wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Is there anyway to write to an AVP the negotiated codec? That'd be good for CDR purposes. Would I need a bunch of codec_exists in the on_reply route checking for 200 OK?<br>
<br></div><div><div></div><div class="h5">
On Thu, Jul 23, 2009 at 4:46 AM, andrei dragus <<a href="mailto:andreidragus@yahoo.com" target="_blank">andreidragus@yahoo.com</a> <mailto:<a href="mailto:andreidragus@yahoo.com" target="_blank">andreidragus@yahoo.com</a>>> wrote:<br>
<br>
<br>
Hello,<br>
<br>
Methods have been added for SDP codec manipulation in the textops<br>
module.<br>
Please update your module if you wish to use them.<br>
<br>
There are 4 methods:<br>
codec_exists(name[,clock]); //test if a codec exists<br>
codec_delete(name[,clock]); //delete a codec<br>
codec_move_up(name[,clock]); //move a codec to the front of the list<br>
codec_move_down(name[,clock]);//move a codec to the back of the list<br>
<br>
Each of them can take a codec name and an optional clock<br>
parameter. If the clock is unspecified all of the codecs with that<br>
name will match.<br>
<br>
All of the methods will act on all streams from all sessions<br>
inside the SDP.<br>
<br>
You can use these methods one after another to get a desired effect.<br>
E.g. To make GSM the least prefered codec but GSM/8000 the most<br>
prefered of all GSM codecs use:<br>
<br>
codec_move_up("GSM","8000");<br>
codec_move_down("GSM");<br>
<br>
Once a codec was deleted it will not be detected by codec_exists().<br>
<br>
Feel free to test these methods and please report any bugs you may<br>
find.<br>
<br>
Thanks,<br>
Andrei.<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br></div></div>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a> <mailto:<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>><div class="im"><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
<br></div>
------------------------------------------------------------------------<div class="im"><br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
</div></blockquote>
<br>
</blockquote></div><br></div>