Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set_contact_alias() doesn't work as promised #3201

Closed
gaaf opened this issue Jul 26, 2022 · 2 comments
Closed

set_contact_alias() doesn't work as promised #3201

gaaf opened this issue Jul 26, 2022 · 2 comments

Comments

@gaaf
Copy link
Contributor

gaaf commented Jul 26, 2022

Description

The docs for set_contact_alias() says:

The new contact URI is immediately visible to other modules in the way the fix_nated_contact() does it.

I don't know exactly what is meant by the last part of that sentence as that isn't documented, but the first part certainly doesn't hold:

The following snippet:

xlog("L_INFO", "  Received Contact: $ct");
if (set_contact_alias()) {
    xlog("L_INFO", "  Aliassed Contact: $ct");
}

Causes these log entries:

2022-07-26T15:41:57.351148+02:00 proxydev001 prx1[12116]: INFO:   Received Contact: sip:sipp@unknowndomain;transport=udp
2022-07-26T15:41:57.351148+02:00 proxydev001 prx1[12116]: INFO:   Aliassed Contact: sip:sipp@unknowndomain;transport=udp

Which clearly shows that the changed uri is not visible to the pv module (which exports $ct).

@patrickarton
Copy link

both set_contact_alias() and fix_nated_contact() use lumps to insert new contact uri so its not immediatly visible unless you call msg_apply_changes() juste immediatly after those functions

@miconda
Copy link
Member

miconda commented Jul 27, 2022

Indeed is not changing the buffer, but internally signals that contact header was updated. I pushed a commit to docs to clarify.

@miconda miconda closed this as completed Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants