Hello,

iirc, set_contact_alias() is not checking the source IP and contact address.

Cheers,
Daniel


On 29.06.17 02:24, David Villasmil wrote:
Hello guys,

Nevermind, i changed 

add_contact_alias()

for

add_rcv_param()

And kamailio seems happy now, still testing, though.


thanks!

Regards,

David Villasmil
phone: +34669448337

On Thu, Jun 29, 2017 at 2:06 AM, David Villasmil <david.villasmil.work@gmail.com> wrote:
Hello guys,

So i've setup kamailio 5 with wss. Registration goes ok, but when trying to call, SIPML as well as jsSIP send garbage as Contact header, something like:

Contact: <sip:0ku6du26@7j65fcf53i2k.invalid;transport=ws>;reg-id=1;+sip.instance="<urn:uuid:8b49ac42-2039-4122-9f5b-6f4e9f471f52>";expires=600

so when it passes through:

if (is_method("REGISTER")) {
fix_nated_register();
} else {
if (!add_contact_alias()) {
xlog("L_ERR", "Error aliasing contact <$ct>\n");
sl_send_reply("400", "Bad Request");
exit;
}
}

(taken from several examples i've found around)

add_contact_alias() fails because it tries to find whether the ip address in the contact header is different from the received ip, and if not, it adds the received ip as a parameter... so the call doesn't work...

I assume there's a way around this, can anyone help?


Regards,

David Villasmil



_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - www.kamailioworld.com