Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
fe6d7528
Commit
fe6d7528
authored
Jan 06, 2016
by
François Grisez
Browse files
Makes Linphone ignore REFER requests with BYE method set
parent
18b93b09
Changes
2
Hide whitespace changes
Inline
Side-by-side
coreapi/callbacks.c
View file @
fe6d7528
...
...
@@ -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
);
}
...
...
gtk/main.c
View file @
fe6d7528
...
...
@@ -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
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment