[SR-Users] Kamailio PCSCF route logic

Weiqi Yao wyao at omniprophis.com
Tue Mar 29 20:09:48 CEST 2022

Hello community,

We made some modifications to Kamailio PCSCF sample cfg file, so when PCSCF receiving an tcp SUBSCRIBE message it add ;transport=tcp to the end of Contact URI. Below is what we added the route block right after if (is_method("INVITE|SUBSCRIBE")) logic

         if (is_method("SUBSCRIBE") && proto=='tcp') {
            $var(original_contact_header) = $ct;
            $var(new_contact_header) = $(var(original_contact_header){re.subst,/(.*:.*)(>);/\1;transport=tcp>/g});
            append_hf("Contact: $var(new_contact_header)\r\n");

We did see the ;transport=tcp been added but we also seeing a bad line ;alias=[...] is added before the To: line
[cid:image001.png at 01D84375.8D109B20]

Does anyone know what function might cause this ;alias been added before To: line?



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220329/da0c8d7f/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 6922 bytes
Desc: image001.png
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220329/da0c8d7f/attachment.png>

More information about the sr-users mailing list