mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-23 06:08:07 +00:00
Makes Linphone ignore REFER requests with BYE method set
This commit is contained in:
parent
18b93b09d6
commit
fe6d7528f4
2 changed files with 25 additions and 8 deletions
|
|
@ -1065,7 +1065,15 @@ static void dtmf_received(SalOp *op, char dtmf){
|
|||
static void refer_received(Sal *sal, SalOp *op, const char *referto){
|
||||
LinphoneCore *lc=(LinphoneCore *)sal_get_user_pointer(sal);
|
||||
LinphoneCall *call=(LinphoneCall*)sal_op_get_user_pointer(op);
|
||||
if (call){
|
||||
LinphoneAddress *refer_to_addr = linphone_address_new(referto);
|
||||
char method[20] = "";
|
||||
|
||||
if(refer_to_addr) {
|
||||
const char *tmp = linphone_address_get_method_param(refer_to_addr);
|
||||
if(tmp) strncpy(method, tmp, sizeof(method));
|
||||
linphone_address_destroy(refer_to_addr);
|
||||
}
|
||||
if (call && (strlen(method) == 0 || strcmp(method, "INVITE") == 0)) {
|
||||
if (call->refer_to!=NULL){
|
||||
ms_free(call->refer_to);
|
||||
}
|
||||
|
|
|
|||
23
gtk/main.c
23
gtk/main.c
|
|
@ -1958,13 +1958,22 @@ void linphone_gtk_log_handler(OrtpLogLevel lev, const char *fmt, va_list args){
|
|||
|
||||
|
||||
void linphone_gtk_refer_received(LinphoneCore *lc, const char *refer_to){
|
||||
GtkEntry * uri_bar =GTK_ENTRY(linphone_gtk_get_widget(
|
||||
linphone_gtk_get_main_window(), "uribar"));
|
||||
char *text;
|
||||
linphone_gtk_notify(NULL,NULL,(text=ms_strdup_printf(_("We are transferred to %s"),refer_to)));
|
||||
g_free(text);
|
||||
gtk_entry_set_text(uri_bar, refer_to);
|
||||
linphone_gtk_start_call(linphone_gtk_get_main_window());
|
||||
char method[20] = "";
|
||||
LinphoneAddress *addr = linphone_address_new(refer_to);
|
||||
if(addr) {
|
||||
const char *tmp = linphone_address_get_method_param(addr);
|
||||
strncpy(method, tmp, sizeof(20));
|
||||
linphone_address_destroy(addr);
|
||||
}
|
||||
if(strlen(method) == 0 || strcmp(method, "INVITE") == 0) {
|
||||
GtkEntry * uri_bar =GTK_ENTRY(linphone_gtk_get_widget(
|
||||
linphone_gtk_get_main_window(), "uribar"));
|
||||
char *text;
|
||||
linphone_gtk_notify(NULL,NULL,(text=ms_strdup_printf(_("We are transferred to %s"),refer_to)));
|
||||
g_free(text);
|
||||
gtk_entry_set_text(uri_bar, refer_to);
|
||||
linphone_gtk_start_call(linphone_gtk_get_main_window());
|
||||
}
|
||||
}
|
||||
|
||||
static void linphone_gtk_check_soundcards(void){
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue