Create more accurate Contact headers for dialogs when we are the UAS.

(closes issue AST-1207)
reported by John Bigelow

Review: https://reviewboard.asterisk.org/r/2842
........

Merged revisions 399083 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399084 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Michelson
2013-09-13 14:50:38 +00:00
parent bbf5fbbd8c
commit 9deb416397
5 changed files with 50 additions and 8 deletions

View File

@@ -282,7 +282,7 @@ struct ast_sip_subscription *ast_sip_create_subscription(const struct ast_sip_su
}
sub->role = role;
if (role == AST_SIP_NOTIFIER) {
pjsip_dlg_create_uas(pjsip_ua_instance(), rdata, NULL, &dlg);
dlg = ast_sip_create_dialog_uas(endpoint, rdata);
} else {
RAII_VAR(struct ast_sip_contact *, contact, NULL, ao2_cleanup);
@@ -293,7 +293,7 @@ struct ast_sip_subscription *ast_sip_create_subscription(const struct ast_sip_su
ao2_ref(sub, -1);
return NULL;
}
dlg = ast_sip_create_dialog(endpoint, contact->uri, NULL);
dlg = ast_sip_create_dialog_uac(endpoint, contact->uri, NULL);
}
if (!dlg) {
ast_log(LOG_WARNING, "Unable to create dialog for SIP subscription\n");