mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-27 21:36:21 +00:00
merge patch to report asked auto-answer for incoming calls.
This commit is contained in:
parent
2ba960db06
commit
46965b6c62
5 changed files with 25 additions and 3 deletions
|
|
@ -91,7 +91,8 @@ static void call_received(SalOp *h){
|
|||
tmp=linphone_address_as_string(from_parsed);
|
||||
linphone_address_destroy(from_parsed);
|
||||
gstate_new_state(lc, GSTATE_CALL_IN_INVITE, tmp);
|
||||
barmesg=ortp_strdup_printf(_("%s is contacting you"),tmp);
|
||||
barmesg=ortp_strdup_printf("%s %s%s",tmp,_("is contacting you"),
|
||||
(sal_call_autoanswer_asked(h)) ?_(" and asked autoanswer."):_("."));
|
||||
if (lc->vtable.show) lc->vtable.show(lc);
|
||||
if (lc->vtable.display_status)
|
||||
lc->vtable.display_status(lc,barmesg);
|
||||
|
|
|
|||
|
|
@ -258,6 +258,7 @@ SalMediaDescription * sal_call_get_final_media_description(SalOp *h);
|
|||
int sal_refer(SalOp *h, const char *refer_to);
|
||||
int sal_call_send_dtmf(SalOp *h, char dtmf);
|
||||
int sal_call_terminate(SalOp *h);
|
||||
bool_t sal_call_autoanswer_asked(SalOp *op);
|
||||
|
||||
/*Registration*/
|
||||
int sal_register(SalOp *op, const char *proxy, const char *from, int expires);
|
||||
|
|
|
|||
|
|
@ -143,9 +143,15 @@ SalOp * sal_op_new(Sal *sal){
|
|||
op->reinvite=FALSE;
|
||||
op->call_id=NULL;
|
||||
op->masquerade_via=FALSE;
|
||||
op->auto_answer_asked=FALSE;
|
||||
return op;
|
||||
}
|
||||
|
||||
bool_t sal_call_autoanswer_asked(SalOp *op)
|
||||
{
|
||||
return op->auto_answer_asked;
|
||||
}
|
||||
|
||||
void sal_op_release(SalOp *op){
|
||||
if (op->sdp_answer)
|
||||
sdp_message_free(op->sdp_answer);
|
||||
|
|
@ -616,6 +622,7 @@ static SalOp *find_op(Sal *sal, eXosip_event_t *ev){
|
|||
static void inc_new_call(Sal *sal, eXosip_event_t *ev){
|
||||
SalOp *op=sal_op_new(sal);
|
||||
osip_from_t *from,*to;
|
||||
osip_call_info_t *call_info;
|
||||
char *tmp;
|
||||
sdp_message_t *sdp=eXosip_get_sdp_info(ev->request);
|
||||
|
||||
|
|
@ -636,7 +643,19 @@ static void inc_new_call(Sal *sal, eXosip_event_t *ev){
|
|||
osip_from_to_str(to,&tmp);
|
||||
sal_op_set_to(op,tmp);
|
||||
osip_free(tmp);
|
||||
|
||||
|
||||
osip_message_get_call_info(ev->request,0,&call_info);
|
||||
if(call_info)
|
||||
{
|
||||
osip_call_info_to_str(call_info,&tmp);
|
||||
if( strstr(tmp,"answer-after=") != NULL)
|
||||
{
|
||||
op->auto_answer_asked=TRUE;
|
||||
ms_message("The caller asked to automatically answer the call(Emergency?)\n");
|
||||
}
|
||||
osip_free(tmp);
|
||||
}
|
||||
|
||||
op->tid=ev->tid;
|
||||
op->cid=ev->cid;
|
||||
op->did=ev->did;
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ struct SalOp{
|
|||
bool_t sdp_offering;
|
||||
bool_t reinvite;
|
||||
bool_t masquerade_via;
|
||||
bool_t auto_answer_asked;
|
||||
};
|
||||
|
||||
void sal_remove_out_subscribe(Sal *sal, SalOp *op);
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit af7bfe348919a44cec3f10cc3a3b5ade3483784f
|
||||
Subproject commit 2d8f269f26a6e945ed1b7bfe7d880877b93875a7
|
||||
Loading…
Add table
Reference in a new issue