mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-26 15:48:09 +00:00
SalCallOp::decline_with_error_info() is now taking a SalAddress as parameter instead of an uri.
This commit is contained in:
parent
bb5d418afd
commit
2e94f78c5a
3 changed files with 8 additions and 8 deletions
|
|
@ -122,8 +122,10 @@ static void call_received(SalCallOp *h) {
|
|||
SalErrorInfo sei;
|
||||
memset(&sei, 0, sizeof(sei));
|
||||
sal_error_info_set(&sei, SalReasonRedirect, "SIP", 0, nullptr, nullptr);
|
||||
h->decline_with_error_info(&sei, altContact);
|
||||
SalAddress *altAddr = sal_address_new(altContact);
|
||||
h->decline_with_error_info(&sei, altAddr);
|
||||
ms_free(altContact);
|
||||
sal_address_unref(altAddr);
|
||||
LinphoneErrorInfo *ei = linphone_error_info_new();
|
||||
linphone_error_info_set(ei, nullptr, LinphoneReasonMovedPermanently, 302, "Moved permanently", nullptr);
|
||||
linphone_core_report_early_failed_call(lc, LinphoneCallIncoming, fromAddr, toAddr, ei);
|
||||
|
|
|
|||
|
|
@ -972,18 +972,16 @@ belle_sip_header_reason_t *SalCallOp::make_reason_header( const SalErrorInfo *in
|
|||
return NULL;
|
||||
}
|
||||
|
||||
int SalCallOp::decline_with_error_info(const SalErrorInfo *info, const char *redirection /*optional*/){
|
||||
int SalCallOp::decline_with_error_info(const SalErrorInfo *info, const SalAddress *redirectionAddr /*optional*/){
|
||||
belle_sip_response_t* response;
|
||||
belle_sip_header_contact_t* contact=NULL;
|
||||
int status = info->protocol_code;
|
||||
belle_sip_transaction_t *trans;
|
||||
|
||||
if (info->reason==SalReasonRedirect){
|
||||
if (redirection!=NULL) {
|
||||
if (strstr(redirection,"sip:")!=0) status=302;
|
||||
else status=380;
|
||||
contact= belle_sip_header_contact_new();
|
||||
belle_sip_header_address_set_uri(BELLE_SIP_HEADER_ADDRESS(contact),belle_sip_uri_parse(redirection));
|
||||
if (redirectionAddr) {
|
||||
status = 302;
|
||||
contact = belle_sip_header_contact_create(BELLE_SIP_HEADER_ADDRESS(redirectionAddr));
|
||||
} else {
|
||||
ms_error("Cannot redirect to null");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public:
|
|||
int notify_ringing(bool_t early_media);
|
||||
int accept();
|
||||
int decline(SalReason reason, const char *redirection /*optional*/);
|
||||
int decline_with_error_info(const SalErrorInfo *info, const char *redirection /*optional*/);
|
||||
int decline_with_error_info(const SalErrorInfo *info, const SalAddress *redirectionAddr /*optional*/);
|
||||
int update(const char *subject, bool_t no_user_consent);
|
||||
void cancel_invite() {cancel_invite_with_info(NULL);}
|
||||
void cancel_invite_with_info(const SalErrorInfo *info);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue