Hello,
On 14.02.25 19:13, Temilolu Fayomi via sr-users wrote:
Hello,
I am working with inbound calls on kamailio (specifically fax), and was wondering if there was a way to re-prioritize the codecs found in the sdp of an invite. I've looked at using the sdpops module, but haven't been able to re-arrange the priority of the codecs listed. I've tried removing codecs to help incoming faxes switch over to t38 per my upstream providers instructions (calls will do a t38 re-invite if the g729a is the highest priority). I am just looking for which direction to go from here or if I misunderstand the nature of faxing and kamailio.
the option I would consider right now is to use the sdp iterator from sdpops module. Most likely I would use an embedded scripting languge (e.g., javasapp_jsdtcript or lua via app_jsdt or app_lua) to reorder the codecs by getting the m= line, reorder codecs, remove old one and add the new variant. The embedded scripting languages can be used inline, all the kemi API being available. Some references:
- https://www.kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/module...
* inline execution inside kamailio.cfg can be done with:
- https://www.kamailio.org/docs/modules/stable/modules/app_lua.html#app_lua.f....
- https://www.kamailio.org/docs/modules/stable/modules/app_jsdt.html#app_jsdt....
There is also option to use python3.
Cheers, Daniel