[OpenSIPS-Users] Codecs Order

Răzvan Crainea razvan at opensips.org
Thu Jan 5 10:57:17 EST 2017


Hi, Alain!

You could use the SDP transformations combine with regular expresions. I 
am thinking at something like:

if ($(rb{sdp.line,m}) =~ "AVP\s*8")
     xlog("PCMA is first codec!\n");

Hope this is useful :)

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 01/05/2017 12:42 PM, Alain Bieuzent wrote:
>
> Ok, but how can i extract the value of first codec,
>
> Actually i’m using codec_exist function, but this one only retrun TRUE 
> or FALSE, but in case of true, i want know if it’s the first codec or no.
>
> Regards
>
> *De : *Users <users-bounces at lists.opensips.org> au nom de Aqs Younas 
> <aqsyounas at gmail.com>
> *Répondre à : *OpenSIPS users mailling list <users at lists.opensips.org>
> *Date : *jeudi 5 janvier 2017 à 11:35
> *À : *OpenSIPS users mailling list <users at lists.opensips.org>
> *Objet : *Re: [OpenSIPS-Users] Codecs Order
>
> media line(m) shows codec preference in order.
>
> m=audio 13406 RTP/AVP 8 0 101
>
> 8 for PCMA
>
> 0 for PCMU
>
> On 5 January 2017 at 15:19, Alain Bieuzent <alain.bieuzent at free.fr 
> <mailto:alain.bieuzent at free.fr>> wrote:
>
>     Hi all,
>
>     Is there a way to know the order of the codecs?
>
>     For exemple in this SDP :
>
>     m=audio 13406 RTP/AVP 8 0 101
>
>     a=rtpmap:8 PCMA/8000
>
>     a=rtpmap:0 PCMU/8000
>
>     a=rtpmap:101 telephone-event/8000
>
>     How i know that the prefered codec is PCMA ?
>
>     Regards,
>
>     Alain
>
>
>     _______________________________________________
>     Users mailing list
>     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 
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170105/b944b60e/attachment.html>


More information about the Users mailing list