FreeCalypso > hg > themwi-system-sw
comparison sip-in/invite.c @ 107:372209628038
sip-in: handle themwi-mgw shutdown without terminating
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 27 Sep 2022 23:45:40 -0800 |
parents | ce3b1db7d1d7 |
children | 0d6435808bcd |
comparison
equal
deleted
inserted
replaced
106:245dc4837b56 | 107:372209628038 |
---|---|
241 return; | 241 return; |
242 } | 242 } |
243 /* SIP INVITE validation done - check if GSM service is up */ | 243 /* SIP INVITE validation done - check if GSM service is up */ |
244 rc = connect_gsm_mtcall(); | 244 rc = connect_gsm_mtcall(); |
245 if (rc < 0) { | 245 if (rc < 0) { |
246 start_response_out_msg(&resp, "480 GSM service is offline"); | 246 gsm_offline: start_response_out_msg(&resp, "480 GSM service is offline"); |
247 goto error_resp; | 247 goto error_resp; |
248 } | 248 } |
249 rc = connect_tmgw_socket(); | |
250 if (rc < 0) | |
251 goto gsm_offline; | |
249 /* stateful processing begins */ | 252 /* stateful processing begins */ |
250 call = malloc(sizeof(struct call) + strlen(ess->call_id) + | 253 call = malloc(sizeof(struct call) + strlen(ess->call_id) + |
251 strlen(ess->from) + req_uri_len + strlen(ess->via) + 19); | 254 strlen(ess->from) + req_uri_len + strlen(ess->via) + 19); |
252 if (!call) { | 255 if (!call) { |
253 syslog(LOG_CRIT, "failed malloc for incoming call!"); | 256 syslog(LOG_CRIT, "failed malloc for incoming call!"); |