Kannel: Open Source WAP and SMS gateway
svn-r5336
|
#include "msg.h"
Go to the source code of this file.
Macros | |
#define | SMS_PARAM_UNDEFINED MSG_PARAM_UNDEFINED |
#define | MC_UNDEF SMS_PARAM_UNDEFINED |
#define | MC_CLASS0 0 |
#define | MC_CLASS1 1 |
#define | MC_CLASS2 2 |
#define | MC_CLASS3 3 |
#define | MWI_UNDEF SMS_PARAM_UNDEFINED |
#define | MWI_VOICE_ON 0 |
#define | MWI_FAX_ON 1 |
#define | MWI_EMAIL_ON 2 |
#define | MWI_OTHER_ON 3 |
#define | MWI_VOICE_OFF 4 |
#define | MWI_FAX_OFF 5 |
#define | MWI_EMAIL_OFF 6 |
#define | MWI_OTHER_OFF 7 |
#define | DC_UNDEF SMS_PARAM_UNDEFINED |
#define | DC_7BIT 0 |
#define | DC_8BIT 1 |
#define | DC_UCS2 2 |
#define | COMPRESS_UNDEF SMS_PARAM_UNDEFINED |
#define | COMPRESS_OFF 0 |
#define | COMPRESS_ON 1 |
#define | RPI_UNDEF SMS_PARAM_UNDEFINED |
#define | RPI_OFF 0 |
#define | RPI_ON 1 |
#define | SMS_7BIT_MAX_LEN 160 |
#define | SMS_8BIT_MAX_LEN 140 |
#define | SMS_UCS2_MAX_LEN 70 |
#define | MAX_SMS_OCTETS 140 |
Functions | |
int | fields_to_dcs (Msg *msg, int mode) |
int | dcs_to_fields (Msg **msg, int mode) |
int | sms_msgdata_len (Msg *msg) |
int | sms_swap (Msg *msg) |
List * | sms_split (Msg *orig, Octstr *header, Octstr *footer, Octstr *nonlast_suffix, Octstr *split_chars, int catenate, unsigned long msg_sequence, int max_messages, int max_octets) |
void | prepend_catenation_udh (Msg *sms, int part_no, int num_messages, int msg_sequence) |
int | sms_priority_compare (const void *a, const void *b) |
int | sms_charset_processing (Octstr *charset, Octstr *body, int coding) |
#define COMPRESS_ON 1 |
Definition at line 116 of file sms.h.
Referenced by fields_to_dcs().
#define COMPRESS_UNDEF SMS_PARAM_UNDEFINED |
#define DC_7BIT 0 |
Definition at line 110 of file sms.h.
Referenced by at2_pdu_decode_deliver_sm(), bearerbox_to_smpp(), brunet_send_sms(), charset_processing(), convert_charset(), data_sm_to_msg(), dcs_to_fields(), fields_to_dcs(), fill_message(), handle_mo_dcs(), httpsmsc_send(), init_batch(), kannel_send_sms(), msg_to_bb(), msg_to_pdu(), obey_request_thread(), ois_adjust_sm_text(), ois_append_sm_text(), oisd_accept_message(), packet_encode_message(), parse_msg_to_rawmessage(), pdu_to_msg(), sms_charset_processing(), sms_msgdata_len(), smsbox_req_handle(), smsbox_sendsms_post(), soap_msgdata_attribute(), soap_msgtype_deps(), soap_o2o_msgdata_attribute(), url_result_thread(), and urltrans_fill_escape_codes().
#define DC_8BIT 1 |
Definition at line 111 of file sms.h.
Referenced by at2_pdu_decode_deliver_sm(), at2_pdu_encode(), bb_alog_sms(), brunet_send_sms(), clickatell_send_sms(), convert_charset(), data_sm_to_msg(), dcs_to_fields(), extract_msgdata_part_by_coding(), fields_to_dcs(), fill_message(), get_pattern(), handle_mo_dcs(), init_batch(), msg_to_bb(), msg_to_emimsg(), msg_to_pdu(), obey_request(), ois_adjust_sm_text(), ois_append_data_coding_scheme(), ois_append_submission_options(), ota_pack_message(), ota_tokenize_bookmarks(), ota_tokenize_settings(), pack_sms_datagram(), packet_encode_message(), pdu_to_msg(), sema_receive_msg(), sms_split(), sms_to_client(), smsbox_req_handle(), smsbox_sendsms_post(), soap_bouyg_content_attribute(), soap_mobitai_content_attribute(), soap_msgdata_attribute(), soap_msgtype_deps(), soap_o2o_msgdata_attribute(), url_result_thread(), and urltrans_fill_escape_codes().
#define DC_UCS2 2 |
Definition at line 112 of file sms.h.
Referenced by at2_pdu_decode_deliver_sm(), at2_pdu_encode(), bb_alog_sms(), bearerbox_to_smpp(), charset_processing(), clickatell_send_sms(), convert_charset(), data_sm_to_msg(), dcs_to_fields(), extract_msgdata_part_by_coding(), fields_to_dcs(), get_pattern(), handle_mo_dcs(), httpsmsc_send(), init_batch(), kannel_send_sms(), msg_to_bb(), msg_to_emimsg(), msg_to_pdu(), obey_request(), obey_request_thread(), packet_encode_message(), pdu_to_msg(), sms_charset_processing(), sms_split(), sms_to_client(), soap_msgdata_attribute(), soap_msgtype_deps(), soap_o2o_msgdata_attribute(), and urltrans_fill_escape_codes().
#define DC_UNDEF SMS_PARAM_UNDEFINED |
Definition at line 109 of file sms.h.
Referenced by brunet_send_sms(), data_sm_to_msg(), fields_to_dcs(), fill_message(), handle_mo_dcs(), httpsmsc_send(), kannel_send_sms(), msg_to_bb(), msg_to_pdu(), ois_append_sm_text(), packet_encode_message(), parse_msg_to_rawmessage(), pdu_to_msg(), smsbox_req_handle(), smsbox_sendsms_post(), soap_msgdata_attribute(), soap_o2o_msgdata_attribute(), and urltrans_fill_escape_codes().
#define MAX_SMS_OCTETS 140 |
Definition at line 129 of file sms.h.
Referenced by dispatch_datagram(), generic_receive_sms(), kannel_receive_sms(), run_batch(), smsbox_req_handle(), and smscconn_create().
#define MC_UNDEF SMS_PARAM_UNDEFINED |
Definition at line 93 of file sms.h.
Referenced by dcs_to_fields(), fields_to_dcs(), kannel_send_sms(), msg_to_pdu(), ois_adjust_sm_text(), pack_sms_datagram(), and pdu_to_msg().
#define MWI_UNDEF SMS_PARAM_UNDEFINED |
Definition at line 99 of file sms.h.
Referenced by fields_to_dcs(), kannel_send_sms(), msg_to_pdu(), and pack_sms_datagram().
#define RPI_UNDEF SMS_PARAM_UNDEFINED |
#define SMS_7BIT_MAX_LEN 160 |
Definition at line 122 of file sms.h.
Referenced by at2_pdu_encode().
#define SMS_8BIT_MAX_LEN 140 |
Definition at line 123 of file sms.h.
Referenced by at2_pdu_encode().
#define SMS_PARAM_UNDEFINED MSG_PARAM_UNDEFINED |
Definition at line 91 of file sms.h.
Referenced by at2_pdu_encode(), brunet_send_sms(), clickatell_send_sms(), create_onetrans(), fields_to_dcs(), fill_message(), generic_receive_sms(), kannel_receive_sms(), kannel_send_sms(), msg_to_emimsg(), msg_to_pdu(), obey_request(), pack_sms_datagram(), packet_encode_message(), pdu_to_msg(), smsbox_req_handle(), smsbox_req_sendsms(), smsbox_sendsms_post(), smsbox_to_bearerbox(), smsc2_rout(), smsc_oisd_create(), smsc_smpp_create(), soap_o2o_validity30_attribute(), sql_list(), sql_single(), and url_result_thread().
int dcs_to_fields | ( | Msg ** | msg, |
int | mode | ||
) |
Definition at line 139 of file sms.c.
References DC_7BIT, DC_8BIT, DC_UCS2, and MC_UNDEF.
Referenced by at2_pdu_decode_deliver_sm(), cimd2_accept_message(), data_sm_to_msg(), handle_operation(), oisd_accept_message(), and pdu_to_msg().
int fields_to_dcs | ( | Msg * | msg, |
int | mode | ||
) |
Definition at line 73 of file sms.c.
References COMPRESS_ON, DC_7BIT, DC_8BIT, DC_UCS2, DC_UNDEF, MC_UNDEF, msg, MWI_UNDEF, octstr_len(), and SMS_PARAM_UNDEFINED.
Referenced by at2_pdu_encode(), brunet_send_sms(), msg_to_emimsg(), msg_to_pdu(), packet_encode_message(), urltrans_fill_escape_codes(), and xidris_send_sms().
void prepend_catenation_udh | ( | Msg * | sms, |
int | part_no, | ||
int | num_messages, | ||
int | msg_sequence | ||
) |
Create multipart UDH
Definition at line 224 of file sms.c.
References CATENATE_UDH_LEN, num_messages, octstr_append_char(), octstr_create, octstr_format_append(), octstr_len(), and octstr_set_char().
Referenced by data_sm_to_msg(), pdu_to_msg(), and sms_split().
Definition at line 419 of file sms.c.
References charset, charset_convert(), coding, DC_7BIT, DC_UCS2, error(), octstr_get_cstr, and octstr_len().
Referenced by generic_receive_sms(), kannel_receive_sms(), smsbox_req_handle(), and url_result_thread().
int sms_msgdata_len | ( | Msg * | msg | ) |
Definition at line 180 of file sms.c.
References charset_utf8_to_gsm(), DC_7BIT, msg, octstr_destroy(), octstr_duplicate, and octstr_len().
Referenced by at2_pdu_encode(), and sms_split().
int sms_priority_compare | ( | const void * | a, |
const void * | b | ||
) |
Compare priority and time of two sms's.
Definition at line 395 of file sms.c.
References gw_assert().
Referenced by smpp_create(), smsc_at2_create(), and smsc_emi2_create().
List* sms_split | ( | Msg * | orig, |
Octstr * | header, | ||
Octstr * | footer, | ||
Octstr * | nonlast_suffix, | ||
Octstr * | split_chars, | ||
int | catenate, | ||
unsigned long | msg_sequence, | ||
int | max_messages, | ||
int | max_octets | ||
) |
Definition at line 309 of file sms.c.
References CATENATE_UDH_LEN, DC_8BIT, DC_UCS2, DLR_IS_ENABLED, extract_msgdata_part_by_coding(), gwlist_append(), gwlist_create, gwlist_get(), max_messages, msg_destroy(), msg_duplicate(), octstr_append(), octstr_destroy(), octstr_insert(), octstr_len(), prepend_catenation_udh(), sms_msgdata_len(), and uuid_generate().
Referenced by dispatch_datagram(), msg_to_pdu(), run_batch(), send_message(), and smscconn_send().
int sms_swap | ( | Msg * | msg | ) |
Definition at line 201 of file sms.c.
References msg.
Referenced by obey_request_thread().