FreeCalypso > hg > themwi-system-sw
comparison sip-out/call_setup.c @ 259:9f96e5b14755
sip-out: implement E911 special handling
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 15 Aug 2023 11:28:30 -0800 |
parents | 63252528a56c |
children | e4a93ad611f3 |
comparison
equal
deleted
inserted
replaced
258:aab047d9efcb | 259:9f96e5b14755 |
---|---|
115 GSM48_CC_CAUSE_NO_ROUTE); | 115 GSM48_CC_CAUSE_NO_ROUTE); |
116 return; | 116 return; |
117 } | 117 } |
118 to_sip_user[0] = '+'; | 118 to_sip_user[0] = '+'; |
119 strcpy(to_sip_user+1, msg->called.number); | 119 strcpy(to_sip_user+1, msg->called.number); |
120 special_rt = 0; | |
120 } else { | 121 } else { |
121 rc = route_special_number(msg->called.number, &dest, | 122 rc = route_special_number(msg->called.number, &dest, |
122 &special_rt); | 123 &special_rt); |
123 if (!rc) | 124 if (!rc) |
124 goto no_route_to_dest; | 125 goto no_route_to_dest; |
138 syslog(LOG_ERR, "rejecting MO call 0x%x: bad bearer cap", | 139 syslog(LOG_ERR, "rejecting MO call 0x%x: bad bearer cap", |
139 msg->callref); | 140 msg->callref); |
140 reject_mo_call(mncc, msg->callref, GSM48_CAUSE_LOC_PRN_S_LU, | 141 reject_mo_call(mncc, msg->callref, GSM48_CAUSE_LOC_PRN_S_LU, |
141 GSM48_CC_CAUSE_BEARER_CA_UNAVAIL); | 142 GSM48_CC_CAUSE_BEARER_CA_UNAVAIL); |
142 return; | 143 return; |
144 } | |
145 /* E911 special handling */ | |
146 if (special_rt && special_rt->flags & SPECIAL_NUM_FLAG_E911) { | |
147 rc = e911_call_preen(msg); | |
148 if (!rc) | |
149 goto call_barred; | |
143 } | 150 } |
144 /* TMGW must be up and running */ | 151 /* TMGW must be up and running */ |
145 rc = connect_tmgw_socket(); | 152 rc = connect_tmgw_socket(); |
146 if (rc < 0) { | 153 if (rc < 0) { |
147 reject_mo_call(mncc, msg->callref, GSM48_CAUSE_LOC_PRN_S_LU, | 154 reject_mo_call(mncc, msg->callref, GSM48_CAUSE_LOC_PRN_S_LU, |