[SR-Users] SDPOPs questions

Daniel-Constantin Mierla miconda at gmail.com
Tue Mar 23 12:16:40 CET 2021


Hello,

not sure if anyone tested all the cases you asked for you, and if did
it, still has the results fresh in memory. So, if nobody answers soon,
you should try to test yourself (and then share the results with the
community).

Here I can provide some guidelines of how you could setup testing:

  - craft the invite with the sdp you want in a file

  - use sipsak (or protoshoot from misc/tools/) to send the content of
the file

  - use the sdpops functions in kamailio.cfg to do the operations, then
do msg_apply_changes() and log the message buffer $mb and check the result

No need to make real calls or use proper phones, you can reply a 404 to
stop sipsak retransmissions.

As a bonus contribution back to the project, you can turn these
scenarios into tests of existing testing framework:

  * https://github.com/kamailio/kamailio-tests

Cheers,
Daniel

On 22.03.21 15:21, Gerry | Rigatta wrote:
> Hi,
>
> The behaviour of the sdpops module is not fully clear to me. 
>
> Lets say in the INVITE contains in the m= line the payloads 0 99 but has no a= line for codec 0 / PCMU, Would the sdp_keep_codecs_by_name(“PCMU”) keep PCMU ?
>
> What about the case that the INVITE contains in the m=line only the payload 99 but shows an additional a=line for codec 0 / PCMU. Would the sdp_keep_codecs_by_name(“PCMU”) keep PCMU ? If yes, would the extra mtype parameter prevent that? e.g. sdp_keep_codecs_by_name(“PCMU”, mtype) 
>
> What happens when several m= lines are present? Does sdp_keep_codecs_by_name consider all m=lines ? Are the treated separately?
>
> What happens to payloads which are not in the hard-coded list in sdpops_data.c ? Can they be used with the sdpops functions?
>
> Thanks for your hints.
>
> Best Gerry
>
>
> codecsmap_t sdpops_codecsmap_table[] = {
> 	{ {"PCMU",  4},  {"0",         1} },
> 	{ {"GSM",   3},  {"3",         1} },
> 	{ {"G723",  4},  {"4",         1} },
> 	{ {"DVI4",  4},  {"5,6,16,17", 9} },
> 	{ {"LPC",   3},  {"7",         1} },
> 	{ {"PCMA",  4},  {"8",         1} },
> 	{ {"G722",  4},  {"9",         1} },
> 	{ {"L16",   3},  {"10,11",     5} },
> 	{ {"QCELP", 5},  {"12",        2} },
> 	{ {"CN",    2},  {"13",        5} },
> 	{ {"MPA",   3},  {"14",        2} },
> 	{ {"G728",  4},  {"15",        2} },
> 	{ {"G729",  4},  {"18",        2} },
> 	{ {0, 0}, {0, 0} }
> };
>
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Funding: https://www.paypal.me/dcmierla




More information about the sr-users mailing list