On 13.03.25 11:16, James Browne via sr-users wrote:
This add_contact_alias() function changes only the first Contact address in a REGISTER request, even though it's normal (RFC3261, 10.2) for a REGISTER to have multiple Contact addresses.
This seems to me to be a kamailio bug. For example, a user might remove one binding while adding a second, in a REGISTER request. If kamailio relays this while adding an alias to only the expires=0 binding, then the new binding may be stored incorrectly in the registrar.
The functions for contact alias were designed for INVITEs/calls, where only one contact is expected.
Normally, for REGISTER, the fix_nated_register() should be used if that instance is the registrar server, or, in case of an intermediary proxy, the Path headers (see path module) should be added.
On the other hand, it would be fine for me if someone wants to extend the contact alias functions to handle more than one header.
Cheers, Daniel