Codecs Order

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Codecs Order

alain BIEUZENT

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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Codecs Order

aqsyounas
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 <[hidden email]> 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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Codecs Order

alain BIEUZENT

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 <[hidden email]> au nom de Aqs Younas <[hidden email]>
Répondre à : OpenSIPS users mailling list <[hidden email]>
Date : jeudi 5 janvier 2017 à 11:35
À : OpenSIPS users mailling list <[hidden email]>
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 <[hidden email]> 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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 

_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Codecs Order

Razvan Crainea-3
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 [hidden email] au nom de Aqs Younas [hidden email]
Répondre à : OpenSIPS users mailling list [hidden email]
Date : jeudi 5 janvier 2017 à 11:35
À : OpenSIPS users mailling list [hidden email]
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 <[hidden email]> 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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 

_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users