You can always add a new function to do what you need, if the current
variant with config scripting seems complex for you. It is open source
after all. You can look at the sdopops module, you should find functions
that have already useful code for this new function.
And what may look for you like a possible frequent issue with broken
end-points, actually might not be true for the others -- I do not recall
anything similar during the past years ...
In the development branch I added the body line iterator that should
facilitate walking through and add/remove/change content, but I am not
sure that is going to help much here.
Cheers,
Daniel
On 10.03.22 22:26, Krzysztof Drewicz wrote:
czw., 10 mar 2022 o 17:05 Henning Westerholt
<hw(a)gilawa.com> napisał(a):
Hi - i need to _add_ :) so more like: (it works, but it looks like a
13 year old me - programming in BASIC on 8 bit Atari)
if (is_method("INVITE") && search_body('a=rtpmap:[0-9]+
telephone-event/8000')) {
xlog("L_INFO","DD BlahFIX: found CID:$ci\n");
if (! search_body('a=fmtp:[0-9]+ 0-15')) {
xlog("L_INFO","DD BLAH2 FIX: not found fmtp:
CID:$ci\n");
subst('/a=rtpmap:([0-9]+)
telephone-event\/8000/a=rtpmap:\1 telephone-event\/8000\r\na=fmtp:\1
0-15/i');
rewritehostport("172.23.133.4:5062");
## loose_route();
}
}
but - maybe someone already has this issue, rtpengine and remove
codecs and rewrite them and do RTP anchoring - too much, overkill for
this simple task,
as -> 'a=fmtp:XXX 0-15'
is not a mandatory in SDP, and XXX is dynamic, so 1st i search for
telephone-event, use ( ) and \1 group in RE, and then - add static
text, but it looks like i'm reinventing something that is common with
some broken scenarios / end-points that insist on having rtpmap ant
fmtp for well-defined codecs / payloads.
BR
--
Krzysztof Drewicz
Senior Infrastructure Administrator
CLUDO | ul. Grochowska 306/308, 03-840 Warszawa
t+48221223977
kdrewicz(a)cludo.pl |
www.cludo.pl
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
* sr-users(a)lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
*
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
Kamailio Advanced Training - Online
March 28-31, 2022 (Europe Timezone)
*
https://www.asipto.com/sw/kamailio-advanced-training-online/