FreeCalypso > hg > themwi-system-sw
view liboutrt/route_special.c @ 152:7176dc850d7a
sip-in hold/retr error handling: simply send BYE
Because we know that the SIP state is CONNECTED at the time of any
such error event, we can call initiate_bye() instead of disconnect_sip(),
and thereby get rid of struct gsm_mncc_cause which will never be used
in this scenario anyway.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 11 Oct 2022 16:11:21 -0800 |
parents | ce02fd05fd9e |
children |
line wrap: on
line source
/* * In this module we implement routing of calls to special numbers * such as N11. */ #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <stdio.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include <strings.h> #include "../include/out_routes.h" extern struct out_routes_header outrt_hdr; extern struct sip_out_dest *outrt_dest_array; extern struct special_num_route *outrt_spec_array; route_special_number(target_num, destp, specp) char *target_num; struct sip_out_dest **destp; struct special_num_route **specp; { unsigned rt_index; struct special_num_route *spec; struct sip_out_dest *dest; for (rt_index = 0; rt_index < outrt_hdr.num_special; rt_index++) { spec = outrt_spec_array + rt_index; if (strcmp(spec->special_num, target_num)) continue; dest = outrt_dest_array + spec->sip_dest_id; *destp = dest; *specp = spec; return 1; } return 0; }