#include <stdio.h>#include <string.h>#include <stdlib.h>#include <unistd.h>#include <fcntl.h>#include "../../sr_module.h"#include "../../error.h"#include "../../dprint.h"#include "../../ut.h"#include "../../globals.h"#include "../../mem/mem.h"#include "../../mem/shm_mem.h"#include "../../socket_info.h"#include "../tm/tm_load.h"#include "sms_funcs.h"#include "sms_report.h"#include "libsms_modem.h"

Go to the source code of this file.
Defines | |
| #define | eat_spaces(_p) |
Functions | |
| static int | fixup_sms_send_msg_to_net (void **param, int param_no) |
| int | global_init (void) |
| int | parse_config_lines (void) |
| int | set_modem_arg (struct modem *mdm, char *arg, char *arg_end) |
| int | set_network_arg (struct network *net, char *arg, char *arg_end) |
| static int | sms_exit (void) |
| static MODULE_VERSION int | sms_init (void) |
| static void | sms_process (int) |
| static int | w_sms_send_msg (struct sip_msg *, char *, char *) |
| static int | w_sms_send_msg_to_net (struct sip_msg *, char *, char *) |
Variables | |
| static cmd_export_t | cmds [] |
| int | default_net = 0 |
| char * | default_net_str = 0 |
| str | domain |
| char * | domain_str = 0 |
| struct module_exports | exports |
| char * | links_config = 0 |
| int | max_sms_parts = MAX_SMS_PARTS |
| char * | modems_config = 0 |
| char * | networks_config = 0 |
| static param_export_t | params [] |
| int * | queued_msgs = 0 |
| static proc_export_t | sms_procs [] |
| int | sms_report_type = NO_REPORT |
| struct tm_binds | tmb |
| int | use_contact = 0 |
| #define eat_spaces | ( | _p | ) |
| static int fixup_sms_send_msg_to_net | ( | void ** | param, | |
| int | param_no | |||
| ) | [static] |
Definition at line 128 of file sms.c.
References E_UNSPEC, LM_ERR, module_exports::name, networks, nr_of_networks, and pkg_free.
| int global_init | ( | void | ) |
Definition at line 512 of file sms.c.
References domain_str, get_first_socket(), init_report_queue(), _str::len, LM_CRIT, LM_ERR, load_tm_api(), socket_info::name, net_pipes_in, networks, NO_REPORT, nr_of_networks, network::pipe_out, pkg_malloc, socket_info::port_no, socket_info::port_no_str, queued_msgs, _str::s, shm_malloc(), sms_report_type, and tmb.
Referenced by sms_init().
| int parse_config_lines | ( | void | ) |
Definition at line 280 of file sms.c.
References modem::baudrate, default_net, default_net_str, modem::device, eat_spaces, links_config, LM_DBG, LM_ERR, LM_WARN, modem::looping_interval, network::max_sms_per_call, modem::mode, MODE_NEW, modems, modems_config, network::name, modem::name, module_exports::name, modem::net_list, networks, networks_config, nr_of_modems, nr_of_networks, modem::pin, modem::retry, set_modem_arg(), set_network_arg(), and modem::smsc.
Referenced by sms_init().
| int set_modem_arg | ( | struct modem * | mdm, | |
| char * | arg, | |||
| char * | arg_end | |||
| ) |
Definition at line 159 of file sms.c.
References modem::baudrate, modem::device, LM_ERR, modem::looping_interval, modem::mode, MODE_ASCII, MODE_DIGICOM, MODE_NEW, MODE_OLD, modem::pin, modem::retry, modem::smsc, and str2s().
Referenced by parse_config_lines().
| int set_network_arg | ( | struct network * | net, | |
| char * | arg, | |||
| char * | arg_end | |||
| ) |
Definition at line 249 of file sms.c.
References LM_ERR, network::max_sms_per_call, and str2s().
Referenced by parse_config_lines().
| static int sms_exit | ( | void | ) | [static] |
Definition at line 618 of file sms.c.
References destroy_report_queue(), domain_str, NO_REPORT, pkg_free, queued_msgs, _str::s, shm_free, and sms_report_type.
| static int sms_init | ( | void | ) | [static] |
Definition at line 604 of file sms.c.
References global_init(), nr_of_modems, and parse_config_lines().
| void sms_process | ( | int | rank | ) | [static] |
| static int w_sms_send_msg | ( | struct sip_msg * | msg, | |
| char * | foo, | |||
| char * | bar | |||
| ) | [static] |
| static int w_sms_send_msg_to_net | ( | struct sip_msg * | msg, | |
| char * | net_nr, | |||
| char * | foo | |||
| ) | [static] |
cmd_export_t cmds[] [static] |
| int default_net = 0 |
| char* default_net_str = 0 |
Definition at line 75 of file sms.c.
Referenced by add_from_db(), authorize(), check_user_blacklist(), cpl_invoke_script(), cr_load_user_carrier(), diameter_is_user_in(), do_script_action(), do_script_download(), do_send_message_server(), dp_apply_policy(), dp_can_connect(), get_domain(), get_rule_node(), get_user_group(), load_config(), msg_presentity_clean(), pdt_check_pd_node(), pdt_free_node(), pdt_get_domain(), pdt_print_mi_node(), pdt_print_node(), pres_htable_restore(), pv_authorize(), query_xcap_update(), refresh_watcher(), and send_sip_msg_request().
| char* domain_str = 0 |
| struct module_exports exports |
| char* links_config = 0 |
| int max_sms_parts = MAX_SMS_PARTS |
| char* modems_config = 0 |
| char* networks_config = 0 |
param_export_t params[] [static] |
| int* queued_msgs = 0 |
Definition at line 76 of file sms.c.
Referenced by global_init(), push_on_network(), and sms_exit().
proc_export_t sms_procs[] [static] |
Initial value:
{
{"SMS receiver", 0, 0, sms_process, 0 },
{0,0,0,0,0}
}
| int sms_report_type = NO_REPORT |
| int use_contact = 0 |
1.5.6