[sr-dev] RFC: deprecating add_contact_alias()

Ovidiu Sas osas at voipembedded.com
Tue Oct 14 16:35:26 CEST 2014


Hello all,

For NATed clients, we have the following functions to handle them:
 - fix_nated_contact()
 - add_contact_alias()
 - set_contact_alias()

Both add_contact_alias() and set_contact_alias() are adding the
following new param ";alias=ip~port~transport" to the Contact header.
There are some subtle differences between the two: set_contact_alias()
makes the contact URI is immediately visible to other modules.
Recently, Daniel made a fix for set_contact_alias() to work with
presence modules (just like fix_nated_contact() does).

Since both add_contact_alias() and set_contact_alias() are doing
similar things, but add_contact_alias() has some limitations, I would
propose to deprecate add_contact_alias() in favour of
set_contact_alias().

If required, we can enhance set_contact_alias() to take extra params
just like add_contact_alias() does.

This will make things cleaner and less ambiguity about how to handle
NATed clients (especially for newcomers to kamailio).  And maybe, we
should have a similar discussion about fix_nated_contact().


Regards,
Ovidiu Sas

-- 
VoIP Embedded, Inc.
http://www.voipembedded.com



More information about the sr-dev mailing list