Hi Aki,

Even if not documented, the s flag is supported in the subst_* functions...Is the m flag mandatory in your case?

regards,
bogdan

Aki Rehn wrote:
Hi,

I need some help.

Here's my input in onreply_route:

--- 8< ---
U 2007/10/05 12:26:58.832161 xxx.18.234.14:5060 -> xxx.18.238.2:5060
SIP/2.0 180 Ringing.
From: "aki"<sip:[EMAIL PROTECTED]>;tag=as508b1a29.
To: <sip:[EMAIL PROTECTED]>;tag=eea1259-13c4-47060394-b296ee66-575d.
Call-ID: [EMAIL PROTECTED]
CSeq: 102 INVITE.
Via: SIP/2.0/UDP xxx.18.238.2;branch=z9hG4bK570f.7ca86953.0.
Via: SIP/2.0/UDP xxx.18.238.15:5060;branch=z9hG4bK68f201e6.
Contact: <sip:[EMAIL PROTECTED]>.
Record-Route: <sip:xxx.18.238.2;lr;ftag=as508b1a29>.
Content-Type: multipart/mixed ;boundary="Boundary47060397_b296f9ef_3ecc_bc780ec".
Content-Length: 397.
.
--Boundary47060397_b296f9ef_3ecc_bc780ec.
Content-Type: application/SDP.
.
v=0.
o=xxx.18.234.23 1191575887 1191575887 IN IP4 xxx.18.234.23.
s=Session SDP.
c=IN IP4 xxx.18.234.23.
t=0 0.
m=audio 11130 RTP/AVP 0.
a=rtpmap:0 PCMU/8000.
a=ptime:20.
.
--Boundary47060397_b296f9ef_3ecc_bc780ec.
Content-Type: application/ISUP ;version=itu-t.
.
,.....4)..9.7.7....
--Boundary47060397_b296f9ef_3ecc_bc780ec--
--- >8 ---

These extra Conten-Type (application/ISUP and multipart/mixed) are messing up some older PBX's of ours, so I need to strip them out.

With perl I could do it like this:
s/^Content-Type: application\/ISUP ;version=itu-t.*--Boundary/--Boundary/sm;
s/--Boundary.*$//mg;

However the subst_body() doesnt seem to support /sm flags.

Discussing this on #openser @ freenode we tried solutions with transformations (thanks NormB!) like:
$(hdr(Content-Type)) = $(hdr(Content-Type){s.substr,0,0})

.. or like the same with replace* functions.

However I didnt find a suitable solutions.

Anyone maybe got any ideas?


Br,
Aki



_______________________________________________
Users mailing list
Users@openser.org
http://openser.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
Users@openser.org
http://openser.org/cgi-bin/mailman/listinfo/users

Reply via email to