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.
Thank you in advance, Temilolu Fayomi
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
Honestly, for faxing and t38, you should use g711 a/uLaw only or a high bit rate/high quality codec! Fax is a 9.6kbps (or 14.4kbps) codec and g729a is 8kbps, a low bit rate codec. How do you expect to have it working using g729a which will compress fax data even more?
Check this article https://www.voip-info.org/asterisk-fax/ ... it is 20 years old, already, but still very accurate.
Atenciosamente / Kind Regards / Cordialement / Un saludo,
*Sérgio Charrua*
On Fri, Feb 14, 2025 at 6:48 PM Temilolu Fayomi via sr-users < sr-users@lists.kamailio.org> 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.
Thank you in advance, Temilolu Fayomi __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
Sergio,
I apologize, I re-read my upstream's documentation again and they said prioritizing g711ulaw will allow incoming faxes to do a t38 re-invite.
Daniel,
Thank you for the information, I will check out those references.
On Fri, Feb 14, 2025 at 2:54 PM Sergio Charrua sergio.charrua@voip.pt wrote:
Honestly, for faxing and t38, you should use g711 a/uLaw only or a high bit rate/high quality codec! Fax is a 9.6kbps (or 14.4kbps) codec and g729a is 8kbps, a low bit rate codec. How do you expect to have it working using g729a which will compress fax data even more?
Check this article https://www.voip-info.org/asterisk-fax/ ... it is 20 years old, already, but still very accurate.
Atenciosamente / Kind Regards / Cordialement / Un saludo,
*Sérgio Charrua*
On Fri, Feb 14, 2025 at 6:48 PM Temilolu Fayomi via sr-users < sr-users@lists.kamailio.org> 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.
Thank you in advance, Temilolu Fayomi __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!