[OpenSIPS-Users] [NEW] SDP codec manipulation feature
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Tue Jul 28 17:43:45 CEST 2009
Hi Brett,
as you probably already found out, you cannot (as proxy) say what codec
is used in a call. You (as a proxy) see just the offerings (what codecs
are available on each side) - after that, each side is free to select
and use one of the offered codecs - so, only inspecting the RTP stream
will provide you with the information regarding the used codec.
Regards,
Bogdan
Brett Nemeroff wrote:
> 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.
>
> 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.
> -Brett
>
>
> On Tue, Jul 28, 2009 at 2:54 AM, Bogdan-Andrei Iancu
> <bogdan at voice-system.ro <mailto:bogdan at voice-system.ro>> wrote:
>
> Hi Brett,
>
> You mean an PV returning the list with all the available codecs ?
>
> Regards,
> Bogdan
>
> Brett Nemeroff wrote:
>
> 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?
>
> On Thu, Jul 23, 2009 at 4:46 AM, andrei dragus
> <andreidragus at yahoo.com <mailto:andreidragus at yahoo.com>
> <mailto:andreidragus at yahoo.com
> <mailto:andreidragus at yahoo.com>>> wrote:
>
>
> Hello,
>
> Methods have been added for SDP codec manipulation in the
> textops
> module.
> Please update your module if you wish to use them.
>
> There are 4 methods:
> codec_exists(name[,clock]); //test if a codec exists
> codec_delete(name[,clock]); //delete a codec
> codec_move_up(name[,clock]); //move a codec to the front
> of the list
> codec_move_down(name[,clock]);//move a codec to the back
> of the list
>
> Each of them can take a codec name and an optional clock
> parameter. If the clock is unspecified all of the codecs
> with that
> name will match.
>
> All of the methods will act on all streams from all sessions
> inside the SDP.
>
> You can use these methods one after another to get a
> desired effect.
> E.g. To make GSM the least prefered codec but GSM/8000 the most
> prefered of all GSM codecs use:
>
> codec_move_up("GSM","8000");
> codec_move_down("GSM");
>
> Once a codec was deleted it will not be detected by
> codec_exists().
>
> Feel free to test these methods and please report any bugs
> you may
> find.
>
> Thanks,
> Andrei.
>
>
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org <mailto:Users at lists.opensips.org>
> <mailto:Users at lists.opensips.org
> <mailto:Users at lists.opensips.org>>
>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> ------------------------------------------------------------------------
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org <mailto:Users at lists.opensips.org>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
More information about the Users
mailing list