mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-20 13:43:12 +00:00
Send ANSWERED message even if we never see RINGING
This commit is contained in:
parent
cfa2b0e4cd
commit
e0557be6e9
9
vomp.c
9
vomp.c
@ -64,7 +64,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||||||
// inform client about the call request
|
// inform client about the call request
|
||||||
$ CALLFROM [token] [mySid] [myDid] [TheirSid] [TheirDid]
|
$ CALLFROM [token] [mySid] [myDid] [TheirSid] [TheirDid]
|
||||||
// Note that we may need to wait for other external processes
|
// Note that we may need to wait for other external processes
|
||||||
// before a phone is actually ringing
|
// before a phone is actually ringing and we may jump straight to answering the call
|
||||||
# RING [token]
|
# RING [token]
|
||||||
< RINGIN
|
< RINGIN
|
||||||
// All good, there's a phone out there ringing, you can indicate that to the user
|
// All good, there's a phone out there ringing, you can indicate that to the user
|
||||||
@ -671,9 +671,8 @@ static int vomp_update_remote_state(struct vomp_call_state *call, int new_state)
|
|||||||
monitor_tell_formatted(MONITOR_VOMP, "\nRINGING:%06x\n", call->local.session);
|
monitor_tell_formatted(MONITOR_VOMP, "\nRINGING:%06x\n", call->local.session);
|
||||||
break;
|
break;
|
||||||
case VOMP_STATE_INCALL:
|
case VOMP_STATE_INCALL:
|
||||||
if (call->remote.state==VOMP_STATE_RINGINGIN){
|
if (call->initiated_call)
|
||||||
monitor_tell_formatted(MONITOR_VOMP, "\nANSWERED:%06x\n", call->local.session);
|
monitor_tell_formatted(MONITOR_VOMP, "\nANSWERED:%06x\n", call->local.session);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -994,6 +993,8 @@ int vomp_mdp_received(struct internal_mdp_header *header, struct overlay_buffer
|
|||||||
|
|
||||||
if (call->initiated_call){
|
if (call->initiated_call){
|
||||||
// hey, quit it, we were trying to call you.
|
// hey, quit it, we were trying to call you.
|
||||||
|
if (config.debug.vomp)
|
||||||
|
DEBUGF("Rejecting call, invalid state transition");
|
||||||
call->rejection_reason=VOMP_REJECT_BUSY;
|
call->rejection_reason=VOMP_REJECT_BUSY;
|
||||||
recvr_state=VOMP_STATE_CALLENDED;
|
recvr_state=VOMP_STATE_CALLENDED;
|
||||||
}else{
|
}else{
|
||||||
@ -1012,6 +1013,8 @@ int vomp_mdp_received(struct internal_mdp_header *header, struct overlay_buffer
|
|||||||
if (call->initiated_call){
|
if (call->initiated_call){
|
||||||
recvr_state=VOMP_STATE_RINGINGOUT;
|
recvr_state=VOMP_STATE_RINGINGOUT;
|
||||||
}else{
|
}else{
|
||||||
|
if (config.debug.vomp)
|
||||||
|
DEBUGF("Rejecting call, invalid state transition");
|
||||||
recvr_state=VOMP_STATE_CALLENDED;
|
recvr_state=VOMP_STATE_CALLENDED;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user