sms_funcs.c File Reference

#include <unistd.h>
#include <errno.h>
#include <stdlib.h>
#include "../../dprint.h"
#include "../../ut.h"
#include "../../config.h"
#include "../../globals.h"
#include "../../mem/mem.h"
#include "../../mem/shm_mem.h"
#include "../../parser/parse_uri.h"
#include "../../parser/parse_content.h"
#include "../../parser/parse_from.h"
#include "../../data_lump_rpl.h"
#include "../tm/t_hooks.h"
#include "../tm/uac.h"
#include "sms_funcs.h"
#include "sms_report.h"
#include "libsms_modem.h"
#include "libsms_sms.h"

Include dependency graph for sms_funcs.c:

Go to the source code of this file.

Defines

#define CONTENT_TYPE_HDR   "Content-Type: text/plain"
#define CONTENT_TYPE_HDR_LEN   (sizeof(CONTENT_TYPE_HDR)-1)
#define ERR_MODEM_TEXT
#define ERR_MODEM_TEXT_LEN   (sizeof(ERR_MODEM_TEXT)-1)
#define ERR_NUMBER_TEXT
#define ERR_NUMBER_TEXT_LEN   (sizeof(ERR_NUMBER_TEXT)-1)
#define ERR_TRUNCATE_TEXT
#define ERR_TRUNCATE_TEXT_LEN   (sizeof(ERR_TRUNCATE_TEXT)-1)
#define is_in_sip_addr(_p)
#define no_sip_addr_begin(_p)
#define OK_MSG
#define OK_MSG_LEN   (sizeof(OK_MSG)-1)
#define STORED_NOTE
#define STORED_NOTE_LEN   (sizeof(STORED_NOTE)-1)

Functions

int check_cds_report (struct modem *mdm, char *cds, int cds_len)
int check_sms_report (struct incame_sms *sms)
void modem_process (struct modem *mdm)
int push_on_network (struct sip_msg *msg, int net)
int send_as_sms (struct sms_msg *sms_messg, struct modem *mdm)
int send_error (struct sms_msg *sms_messg, char *msg1_s, int msg1_len, char *msg2_s, int msg2_len)
int send_sip_msg_request (str *to, str *from_user, str *body)
int send_sms_as_sip (struct incame_sms *sms)
unsigned int split_text (str *text, unsigned char *lens, int nice)

Variables

int max_sms_parts
struct modem modems [MAX_MODEMS]
int net_pipes_in [MAX_NETWORKS]
struct network networks [MAX_NETWORKS]
int nr_of_modems
int nr_of_networks
int * queued_msgs
int sms_report_type
struct tm_binds tmb
int use_contact


Define Documentation

#define CONTENT_TYPE_HDR   "Content-Type: text/plain"

Definition at line 91 of file sms_funcs.c.

#define CONTENT_TYPE_HDR_LEN   (sizeof(CONTENT_TYPE_HDR)-1)

Definition at line 92 of file sms_funcs.c.

#define ERR_MODEM_TEXT

Value:

"Due to our modem temporary indisponibility, "\
   "the following message couldn't be sent : "

Definition at line 77 of file sms_funcs.c.

Referenced by send_as_sms().

#define ERR_MODEM_TEXT_LEN   (sizeof(ERR_MODEM_TEXT)-1)

Definition at line 79 of file sms_funcs.c.

Referenced by send_as_sms().

#define ERR_NUMBER_TEXT

Value:

" is an invalid number! Please resend your SMS "\
   "using a number in +(country code)(area code)(local number) format. Thanks"\
   " for using our service!"

Definition at line 67 of file sms_funcs.c.

Referenced by send_as_sms().

#define ERR_NUMBER_TEXT_LEN   (sizeof(ERR_NUMBER_TEXT)-1)

Definition at line 70 of file sms_funcs.c.

Referenced by send_as_sms().

#define ERR_TRUNCATE_TEXT

Value:

"We are sorry, but your message exceeded our "\
   "maximum allowed length. The following part of the message wasn't sent"\
   " : "

Definition at line 72 of file sms_funcs.c.

Referenced by send_as_sms().

#define ERR_TRUNCATE_TEXT_LEN   (sizeof(ERR_TRUNCATE_TEXT)-1)

Definition at line 75 of file sms_funcs.c.

Referenced by send_as_sms().

#define is_in_sip_addr ( _p   ) 

Value:

((_p)!=' ' && (_p)!='\t' && (_p)!='(' && (_p)!='[' && (_p)!='<' \
   && (_p)!='>' && (_p)!=']' && (_p)!=')' && (_p)!='?' && (_p)!='!' \
   && (_p)!=';' && (_p)!=',' && (_p)!='\n' && (_p)!='\r' && (_p)!='=')

Definition at line 94 of file sms_funcs.c.

Referenced by send_sms_as_sip().

#define no_sip_addr_begin ( _p   ) 

Value:

( (_p)!=' ' && (_p)!='\t' && (_p)!='-' && (_p)!='=' && (_p)!='\r'\
   && (_p)!='\n' && (_p)!=';' && (_p)!=',' && (_p)!='.' && (_p)!=':')

Definition at line 99 of file sms_funcs.c.

Referenced by send_sms_as_sip().

#define OK_MSG

Value:

"Your SMS was finally successfully delivered!"\
   " Your message was: "

Definition at line 87 of file sms_funcs.c.

Referenced by check_sms_report().

#define OK_MSG_LEN   (sizeof(OK_MSG)-1)

Definition at line 89 of file sms_funcs.c.

Referenced by check_sms_report().

#define STORED_NOTE

Value:

"NOTE: Your SMS received provisional confirmation"\
   " 48 \"Delivery is not yet possible\". The SMS was store on the "\
   "SMSCenter for further delivery. Our gateway cannot guarantee "\
   "further information regarding your SMS delivery! Your message was: "

Definition at line 81 of file sms_funcs.c.

Referenced by check_sms_report().

#define STORED_NOTE_LEN   (sizeof(STORED_NOTE)-1)

Definition at line 85 of file sms_funcs.c.

Referenced by check_sms_report().


Function Documentation

int check_cds_report ( struct modem mdm,
char *  cds,
int  cds_len 
)

Definition at line 659 of file sms_funcs.c.

References cds2sms(), and check_sms_report().

Referenced by modem_process().

int check_sms_report ( struct incame_sms sms  ) 

void modem_process ( struct modem mdm  ) 

int push_on_network ( struct sip_msg msg,
int  net 
)

int send_as_sms ( struct sms_msg sms_messg,
struct modem mdm 
)

int send_error ( struct sms_msg sms_messg,
char *  msg1_s,
int  msg1_len,
char *  msg2_s,
int  msg2_len 
) [inline]

int send_sip_msg_request ( str to,
str from_user,
str body 
)

int send_sms_as_sip ( struct incame_sms sms  ) 

unsigned int split_text ( str text,
unsigned char *  lens,
int  nice 
) [inline]

Definition at line 339 of file sms_funcs.c.

References _str::len, len, MAX_SMS_LENGTH, _str::s, SMS_EDGE_PART_LEN, and SMS_FOOTER_LEN.

Referenced by send_as_sms().


Variable Documentation

Definition at line 60 of file sms_funcs.c.

struct modem modems[MAX_MODEMS]

Definition at line 55 of file sms_funcs.c.

Referenced by parse_config_lines(), and sms_process().

int net_pipes_in[MAX_NETWORKS]

Definition at line 57 of file sms_funcs.c.

Referenced by global_init(), and push_on_network().

struct network networks[MAX_NETWORKS]

Definition at line 59 of file sms_funcs.c.

Referenced by parse_config_lines(), and sms_init().

Definition at line 61 of file sms_funcs.c.

Definition at line 63 of file sms_funcs.c.

struct tm_binds tmb

TM bind

Definition at line 64 of file sms_funcs.c.

Definition at line 62 of file sms_funcs.c.


Generated on Thu May 24 12:00:42 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6