Hey All,
I always have issues with substituting out header values. I’ve tried subst and subst_hf.
Here is the value that I want to change out:
Contact: <sip:52.41.52.34:5060;line=sr-h06Cy7RYRFkYacM0a7epa7sVa7sVRcNCW7IbaGZ9RGlC sip:52.41.52.34:5060;line=sr-h06Cy7RYRFkYacM0a7epa7sVa7sVRcNCW7IbaGZ9RGlC>
And this is what I want it to be
Contact: <sip:1313717555@jump.dsiprouter.net sip:1313717555@jump.dsiprouter.net;line=sr-h06Cy7RYRFkYacM0a7epa7sVa7sVRcNCW7IbaGZ9RGlC>
I’m using this
subst('/^Contact: sip:(.*);(.*)$/Contact: <sip:1313717555@jump.dsiprouter.net;\2 sip:1313717555@jump.dsiprouter.net;\2>\r/ig’);
And it doesn’t work, but putting into a online regular expression tester it looks good as shown below. Any ideas?
Hello,
I don’t think you can put a host name in the contact header. I have already tried and I didn’t receive the reinvites.
________________________________ De : sr-users sr-users-bounces@lists.kamailio.org de la part de Mack Hendricks mack@goflyball.com Envoyé : mardi, avril 7, 2020 8:29 AM À : Kamailio (SER) - Users Mailing List Objet : [SR-Users] Substitution of Contact Header
Hey All,
I always have issues with substituting out header values. I’ve tried subst and subst_hf.
Here is the value that I want to change out:
Contact: sip:52.41.52.34:5060;line=sr-h06Cy7RYRFkYacM0a7epa7sVa7sVRcNCW7IbaGZ9RGlC
And this is what I want it to be
Contact: sip:1313717555@jump.dsiprouter.net;line=sr-h06Cy7RYRFkYacM0a7epa7sVa7sVRcNCW7IbaGZ9RGlC
I’m using this
subst('/^Contact: sip:(.*);(.*)$/Contact: sip:1313717555@jump.dsiprouter.net;\2\r/ig’);
And it doesn’t work, but putting into a online regular expression tester it looks good as shown below. Any ideas?
[cid:71DF5B41-831E-48A2-9F06-D3D3F84F1CEF]