[OpenSIPS-Devel] [ opensips-Feature Requests-2893576 ] Inverse Codec Match

SourceForge.net noreply at sourceforge.net
Sun Nov 15 19:39:33 CET 2009


Feature Requests item #2893576, was opened at 2009-11-06 23:44
Message generated for change (Settings changed) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086413&aid=2893576&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
>Category: modules
>Group: trunk
Status: Open
Priority: 5
Private: No
Submitted By: Ryan Bullock (rrb3942)
>Assigned to: Andrei Dragus (andreidragus)
Summary: Inverse Codec Match

Initial Comment:
The new codec functions in textops are awesome. However there is one feature I would like to see.

Currently there is codec_delete_re() and codec_exists_re that lets you delete and check for any codecs that match a regular expression.

If would be nice if there was the ability to also delete codecs that do NOT match an expression, perhaps through a option. This would allow you to enforce a list of supported codecs only. Right now to remove all other codecs would need an exhaustive list of what to remove (or some really awful inverse regex that would be confusing to write/read, if it is even possible to write)

For example, if you only want to permit G711 and G729 you could do something like the following to remove any other codecs:

codec_delete_re("[gG]711|[gG]729", v) 

And the only codecs left would be G711 and G729 in the message. Or if it had only g711 and say speex, you would be left with only g711.

One would of course have to be careful to not remove telephony-events as well, but that should be up to the script writer.

I think this would be useful only for the codec_exists_re and codec_delete_re, so you could check for, and remove any foreign codecs.

codec_move_up_re and codec_move_down_re are already their inverses (for the most part).

Also a case insensitive option for the regex might be nice. But that would just be more icing on the cake.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086413&aid=2893576&group_id=232389



More information about the Devel mailing list