Hello
i try to fix one endpoint, it does neet do have a
a=rtpmap:116 telephone-event/8000 a=fmtp:116 0-15
sometimes i got: a=rtpmap:115 telephone-event/8000
and sometimes: a=rtpmap:114 telephone-event/8000 a=fmtp:114 0-15
so - should i use txtops and search for fmtp, and use
search_append_body ? ifsearch_body(re) does not find 'a=fmtp:95' (95..127 - dynamic payload here), or am I reinventing the wheel again ? Any hints?
Hello,
already tried this one?
https://kamailio.org/docs/modules/5.5.x/modules/sdpops.html#sdpops.f.remove_...
Cheers,
Henning
czw., 10 mar 2022 o 17:05 Henning Westerholt hw@gilawa.com napisał(a):
Hello,
already tried this one?
https://kamailio.org/docs/modules/5.5.x/modules/sdpops.html#sdpops.f.remove_...
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
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@gilawa.com napisał(a):
Hello,
already tried this one?
https://kamailio.org/docs/modules/5.5.x/modules/sdpops.html#sdpops.f.remove_...
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@cludo.pl | www.cludo.pl
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: