comparison sip-in/sip_ack.c @ 83:3e3fbf44f9d7

sip-in: disconnect and call clearing implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 20 Sep 2022 22:06:37 -0800
parents 8cf85edca543
children 9e9034ef476c
comparison
equal deleted inserted replaced
82:ff4b76a107a1 83:3e3fbf44f9d7
32 /* weed out wrong CSeq */ 32 /* weed out wrong CSeq */
33 if (ess->cseq_num != call->invite_cseq) 33 if (ess->cseq_num != call->invite_cseq)
34 return; 34 return;
35 switch (call->sip_state) { 35 switch (call->sip_state) {
36 case SIP_STATE_INVITE_200: 36 case SIP_STATE_INVITE_200:
37 call->sip_state = SIP_STATE_CONNECTED; 37 switch (call->overall_state) {
38 case OVERALL_STATE_ANSWERED:
39 call->sip_state = SIP_STATE_CONNECTED;
40 break;
41 case OVERALL_STATE_TEARDOWN:
42 initiate_bye(call);
43 break;
44 default:
45 syslog(LOG_CRIT,
46 "FATAL: invalid overall state 0x%x on SIP ACK",
47 call->overall_state);
48 exit(1);
49 }
38 break; 50 break;
39 case SIP_STATE_INVITE_ERR: 51 case SIP_STATE_INVITE_ERR:
40 call->sip_state = SIP_STATE_ENDED; 52 call->sip_state = SIP_STATE_ENDED;
41 break; 53 break;
42 } 54 }