-
Notifications
You must be signed in to change notification settings - Fork 931
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
res_pjsip_path.c: Fix path when dialing using PJSIP_DIAL_CONTACTS() #732
base: master
Are you sure you want to change the base?
Conversation
REMINDER: If this PR applies to other branches, please add a comment with the appropriate "cherry-pick-to" headers as per the Create a Pull Request process. If you don't want it cherry-picked, please add a comment with If, after adding "cherry-pick-to" comments, you change your mind, please edit the comment to DELETE the header lines and add The currently active branches are now 18, 20, 21 and master. |
cherry-pick-to: 21 |
Links to original issues if you're interested... |
res/res_pjsip_path.c
Outdated
char *username; | ||
RAII_VAR(struct ao2_container *, contacts, NULL, ao2_cleanup); | ||
|
||
uri_hostname = ast_sip_pjsip_uri_get_hostname(uri); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the uri is getting passed in and used to build these names, was that to compare against the contact when iterating?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing this, I have figured out yesterday that some old patch uploaded. I'll update patch, correct way is to compare exact URI, without host/username extraction.
b2d2e52
to
c1bf442
Compare
When using the PJSIP_DIAL_CONTACTS() function for use in the Dial() command, the contacts are returned in text form, so the input to the path_outgoing_request() function is a contact value of NULL. The issue was reported in ASTERISK-28211, but was not actually fixed in ASTERISK-30100. This fix brings back the code that was previously removed and adds code to search for a contact to extract the path value from it.
c1bf442
to
251e079
Compare
When using the PJSIP_DIAL_CONTACTS() function for use in the Dial()
command, the contacts are returned in text form, so the input to
the path_outgoing_request() function is a contact value of NULL.
The issue was reported in ASTERISK-28211, but was not actually fixed
in ASTERISK-30100. This fix brings back the code that was previously
removed and adds code to search for a contact to extract the path
value from it.