Hi Gang
Next question.
I have some broken CPE which do not set a=ptime despite using 20ms which then causes the call to get rejected in certain destinations, because ptime header is missing.
So I would like to match the user-agents in question and add back a=ptime:20
Google searches found an user with the exact same problem almost 10 years ago and Daniel replying that indeed a function to add a body line would be handy.
https://www.kamailio.org/docs/modules/devel/modules/textops.html
How could this be accomplished? I don't see a add_body_line or other function which does not 'replace' a body line.
You could do ``` set_body($rb+"\r\na=prime:20", $cT); ``` Not sure how to do it of you want to add the line in the middle of the body though.
On 24 June 2022 9:58:49 am UTC, "Benoît Panizzon" benoit.panizzon@imp.ch wrote:
Hi Gang
Next question.
I have some broken CPE which do not set a=ptime despite using 20ms which then causes the call to get rejected in certain destinations, because ptime header is missing.
So I would like to match the user-agents in question and add back a=ptime:20
Google searches found an user with the exact same problem almost 10 years ago and Daniel replying that indeed a function to add a body line would be handy.
https://www.kamailio.org/docs/modules/devel/modules/textops.html
How could this be accomplished? I don't see a add_body_line or other function which does not 'replace' a body line.
-- Mit freundlichen Grüssen
-Benoît Panizzon- @ HomeOffice und normal erreichbar
I m p r o W a r e A G - Leiter Commerce Kunden ______________________________________________________
Zurlindenstrasse 29 Tel +41 61 826 93 00 CH-4133 Pratteln Fax +41 61 826 93 01 Schweiz Web http://www.imp.ch ______________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
- sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
Hello,
5.6.x brings in more flexibility here with the body line iterator, see the textopsx module.
Cheers, Daniel
On 24.06.22 12:29, Tim Anderson wrote:
You could do
set_body($rb+"\r\na=prime:20", $cT);
Not sure how to do it of you want to add the line in the middle of the body though.
On 24 June 2022 9:58:49 am UTC, "Benoît Panizzon" benoit.panizzon@imp.ch wrote:
Hi Gang Next question. I have some broken CPE which do not set a=ptime despite using 20ms which then causes the call to get rejected in certain destinations, because ptime header is missing. So I would like to match the user-agents in question and add back a=ptime:20 Google searches found an user with the exact same problem almost 10 years ago and Daniel replying that indeed a function to add a body line would be handy. https://www.kamailio.org/docs/modules/devel/modules/textops.html How could this be accomplished? I don't see a add_body_line or other function which does not 'replace' a body line. -- Mit freundlichen Grüssen -Benoît Panizzon- @ HomeOffice und normal erreichbar
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Kamailio - Users Mailing List - Non Commercial Discussions
- sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
Hi Tim
set_body($rb+"\r\na=prime:20", $cT);
set_body($rb+"a=prime:20\r\n", $cT);
works fine! Thanks a lot!