my $0.02 here.. I'm not sure if this is what you guys had in mind.. but I've had situations where this would be handy.. It'd need to have some way of identifing the codec (by number?). I'm not sure if the core really has anything that parses the SDP by RFC spec, so I'm not sure how you'd do things like "removing g729 codec including the annex=b annotation". But imaging that anything is possible:<div>
<div><br></div><div>I imagine functions:</div><div>reject_codec: reject a call if a codec matches</div><div>remove_codec: remove an offered codec</div><div>codec_present: returns true if codec specified is offered</div><div>
<br></div><div>if (reject_codec('ulaw')) {</div><div> sl_send_reply("488","ULAW Calls not allowed");</div><div> exit;</div><div>}</div><div><br></div><div><br></div><div>if ((codec_present('ULAW')) && codec_present('G729a')) {</div>
<div> remove_codec('ULAW');</div><div> xlog("L_INFO","Removing bad codec: ULAW");</div><div>}</div><div><br></div><div>if (!codec_present('G729a')){</div><div> sl_send_reply("488","Please send G729a calls");</div>
<div>}</div><div><br></div><div><br><div class="gmail_quote">On Mon, Jun 15, 2009 at 3:02 PM, Jeff Pyle <span dir="ltr"><<a href="mailto:jpyle@fidelityvoice.com">jpyle@fidelityvoice.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>
<font face="Tahoma, Verdana, Helvetica, Arial"><span style="font-size:10pt">Hi Bogdan,<br>
<br>
It’s been a little while since we talked about this. I was wondering if there was anything in the works to detect and/or manipulate the codecs present in an SDP.<br><font color="#888888">
<br>
<br>
<br>
- Jeff</font><div><div></div><div class="h5"><br>
<br>
<br>
<br>
On 2/1/09 4:08 AM, "Steve Kurzeja" <<a href="http://steve.kurzeja@gmail.com" target="_blank">steve.kurzeja@gmail.com</a>> wrote:<br>
<br>
</div></div></span></font><div><div></div><div class="h5"><blockquote><font face="Tahoma, Verdana, Helvetica, Arial"><span style="font-size:10pt">This idea is quite standard in SBCs, typically called codec profiles, where you permit only certain codecs to be passed through the SBC in an INVITE and all the rest are stripped out.<br>
<br>
We use it to get around interop issues with certain codecs. E.g. we have some end devices/customers that have issues using g729a so we choose to remove this codec for these specific endpoints.<br>
<br>
The poor man's method to implementing this is just doing header manipulations in the SDP but it would be nice to be standardized.<br>
<br>
Regards,<br>
Steve<br>
<br>
<br>
On Fri, Jan 30, 2009 at 2:20 AM, Jeff Pyle <<a href="http://jpyle@fidelityvoice.com" target="_blank">jpyle@fidelityvoice.com</a>> wrote:<br>
</span></font><blockquote><font face="Tahoma, Verdana, Helvetica, Arial"><span style="font-size:10pt">Hi Bogdan,<br>
<br>
I'm looking for the ability to selectively remove codec advertisements from<br>
the SDP. For example, if my customer sends a call to me for PSTN<br>
termination he may advertise G711 and G729, with G711 preferred. By looking<br>
at the number of existing dialogs I may know that he's running low on<br>
bandwidth, so I would like to suppress the G711 advertisement ultimately<br>
causing a 200 OK from the carrier with G729.<br>
<br>
Generically, in this application we're looking only to suppress G711 at<br>
certain times.<br>
<br>
I understand normally codec selection is done completely by the gateway<br>
device. However, my gateway devices aren't smart enough to take bandwidth<br>
utilization into consideration when choosing which codecs to advertise. I'm<br>
hoping my proxy might be. :)<br>
<br>
Does that make sense?<br>
<font color="#888888"><br>
<br>
<br>
- Jeff<br>
</font><br>
<br>
<br>
On 1/29/09 5:04 AM, "Bogdan-Andrei Iancu" <<a href="http://bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>> wrote:<br>
<br>
> Hi Jeff,<br>
><br>
> right now there is only available some functionality to check the codecs<br>
> (to see what codecs are advertised in the SDP)... What exactly are you<br>
> looking for (like codec ops) ?<br>
><br>
> Regards,<br>
> Bogdan<br>
><br>
> Jeff Pyle wrote:<br>
>> Bogdan,<br>
>><br>
>> Some months back you mentioned an upcoming feature that would allow<br>
>> Opensips to manipulate the codecs present in the SDP. Just wondering<br>
>> if there is anything available to test yet. This feature, in<br>
>> combination with dialog contexts, will be of great use to us to allow<br>
>> us to take a guess at the bandwidth consumption for a particular<br>
>> customer and force the use of a compressed codec if necessary.<br>
>><br>
>><br>
>> Thanks,<br>
>> Jeff<br>
><br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="http://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>
</span></font></blockquote><font face="Tahoma, Verdana, Helvetica, Arial"><span style="font-size:10pt"><br>
<br>
</span></font></blockquote>
</div></div></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">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></blockquote></div><br></div></div>