Asterisk - The Open Source Telephony Project  21.4.1
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
app_sms.c File Reference

SMS application - ETSI ES 201 912 protocol 1 implementation. More...

#include "asterisk.h"
#include <dirent.h>
#include <ctype.h>
#include <sys/stat.h>
#include "asterisk/paths.h"
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/alaw.h"
#include "asterisk/callerid.h"
#include "asterisk/utils.h"
#include "asterisk/app.h"
#include "asterisk/format_cache.h"

Go to the source code of this file.

Data Structures

struct  sms_s
 

Macros

#define __OUT_FMT   ast_format_slin
 
#define DIR_RX   1
 
#define DIR_TX   2
 
#define DLL2_ACK(h)   ((h->framenumber & 1) ? DLL2_SMS_ACK1: DLL2_SMS_ACK1)
 
#define is16bit(dcs)   ( ((dcs) & 0xC0) ? 0 : (((dcs) & 0xc) == 8) )
 
#define is7bit(dcs)   ( ((dcs) & 0xC0) ? (!((dcs) & 4) ) : (((dcs) & 0xc) == 0) )
 
#define is8bit(dcs)   ( ((dcs) & 0xC0) ? ( ((dcs) & 4) ) : (((dcs) & 0xc) == 4) )
 
#define MAX_DEBUG_LEN   300
 
#define MAXSAMPLES   (800)
 
#define OSYNC_BITS   80 /* initial sync bits */
 
#define SMSLEN   160
 
#define SMSLEN_8   140
 

Typedefs

typedef signed short output_t
 
typedef struct sms_s sms_t
 

Enumerations

enum  message_types {
  DLL_SMS_MASK = 0x7f, DLL1_SMS_DATA = 0x11, DLL1_SMS_ERROR = 0x12, DLL1_SMS_EST = 0x13,
  DLL1_SMS_REL = 0x14, DLL1_SMS_ACK = 0x15, DLL1_SMS_NACK = 0x16, DLL1_SMS_COMPLETE = 0x80,
  DLL1_SMS_MORE = 0x00, DLL2_SMS_EST = 0x7f, DLL2_SMS_INFO_MO = 0x10, DLL2_SMS_INFO_MT = 0x11,
  DLL2_SMS_INFO_STA = 0x12, DLL2_SMS_NACK = 0x13, DLL2_SMS_ACK0 = 0x14, DLL2_SMS_ACK1 = 0x15,
  DLL2_SMS_ENQ = 0x16, DLL2_SMS_REL = 0x17, DLL2_SMS_COMPLETE = 0x00, DLL2_SMS_MORE = 0x80
}
 
enum  sms_flags {
  OPTION_BE_SMSC = (1 << 0), OPTION_ANSWER = (1 << 1), OPTION_TWO = (1 << 2), OPTION_PAUSE = (1 << 3),
  OPTION_SRR = (1 << 4), OPTION_DCS = (1 << 5), OPTIONS_NO_LOG = (1 << 6)
}
 
enum  sms_opt_args { OPTION_ARG_PAUSE = 0, OPTION_ARG_ARRAY_SIZE }
 

Functions

static void adddata_proto2 (sms_t *h, unsigned char msg, char *data, int size)
 
 AST_MODULE_INFO_STANDARD_EXTENDED (ASTERISK_GPL_KEY,"SMS/PSTN handler")
 
static char * isodate (time_t t, char *buf, int len)
 static, return a date/time in ISO format
 
static int load_module (void)
 
static void numcpy (char *d, char *s)
 copy number, skipping non digits apart from leading +
 
static unsigned char packaddress (unsigned char *o, char *i)
 store an address at o, and return number of bytes used
 
static void packdate (unsigned char *o, time_t w)
 pack a date and return
 
static int packsms (unsigned char dcs, unsigned char *base, unsigned int udhl, unsigned char *udh, int udl, unsigned short *ud)
 general pack, with length and data, returns number of bytes of target used
 
static int packsms16 (unsigned char *o, int udhl, unsigned char *udh, int udl, unsigned short *ud)
 takes a binary header (udhl bytes at udh) and UCS-2 message (udl characters at ud) and packs in to o using 16 bit UCS-2 character codes The return value is the number of bytes packed in to o, which is internally limited to 140 o can be null, in which case this is used to validate or count only if the input contains invalid characters then the return value is -1
 
static int packsms7 (unsigned char *o, int udhl, unsigned char *udh, int udl, unsigned short *ud)
 takes a binary header (udhl bytes at udh) and UCS-2 message (udl characters at ud) and packs in to o using SMS 7 bit character codes
 
static int packsms8 (unsigned char *o, int udhl, unsigned char *udh, int udl, unsigned short *ud)
 takes a binary header (udhl bytes at udh) and UCS-2 message (udl characters at ud) and packs in to o using 8 bit character codes. The return value is the number of bytes packed in to o, which is internally limited to 140. o can be null, in which case this is used to validate or count only. if the input contains invalid characters then the return value is -1
 
static void putdummydata_proto2 (sms_t *h)
 
static struct dirent * readdirqueue (DIR *d, char *queue)
 read dir skipping dot files...
 
static void * sms_alloc (struct ast_channel *chan, void *sms_t_ptr)
 
static void sms_compose1 (sms_t *h, int more)
 compose a message for protocol 1
 
static void sms_compose2 (sms_t *h, int more)
 
static void sms_debug (int dir, sms_t *h)
 
static int sms_exec (struct ast_channel *chan, const char *data)
 
static int sms_generate (struct ast_channel *chan, void *data, int len, int samples)
 
static unsigned char sms_handleincoming (sms_t *h)
 handle the incoming message
 
static int sms_handleincoming_proto2 (sms_t *h)
 sms_handleincoming_proto2: handle the incoming message
 
static char * sms_hexdump (unsigned char buf[], int size, char *s)
 
static void sms_log (sms_t *h, char status)
 Log the output, and remove file.
 
static void sms_messagerx (sms_t *h)
 
static void sms_messagerx2 (sms_t *h)
 
static void sms_messagetx (sms_t *h)
 
static void sms_nextoutgoing (sms_t *h)
 find and fill in next message, or send a REL if none waiting
 
static void sms_process (sms_t *h, int samples, signed short *data)
 
static void sms_readfile (sms_t *h, char *fn)
 parse and delete a file
 
static void sms_release (struct ast_channel *chan, void *data)
 
static void sms_writefile (sms_t *h)
 white a received text message to a file
 
static int unload_module (void)
 
static unsigned char unpackaddress (char *o, unsigned char *i)
 unpack an address from i, return byte length, unpack to o
 
static struct timeval unpackdate (unsigned char *i)
 unpack a date and return
 
static int unpacksms (unsigned char dcs, unsigned char *i, unsigned char *udh, int *udhl, unsigned short *ud, int *udl, char udhi)
 general unpack - starts with length byte (octet or septet) and returns number of bytes used, inc length
 
static void unpacksms16 (unsigned char *i, unsigned char l, unsigned char *udh, int *udhl, unsigned short *ud, int *udl, char udhi)
 unpacks bytes (16 bit encoding) at i, len l septets, and places in udh and ud setting udhl and udl. udh not used if udhi not set
 
static void unpacksms7 (unsigned char *i, unsigned char l, unsigned char *udh, int *udhl, unsigned short *ud, int *udl, char udhi)
 unpacks bytes (7 bit encoding) at i, len l septets, and places in udh and ud setting udhl and udl. udh not used if udhi not set
 
static void unpacksms8 (unsigned char *i, unsigned char l, unsigned char *udh, int *udhl, unsigned short *ud, int *udl, char udhi)
 unpacks bytes (8 bit encoding) at i, len l septets, and places in udh and ud setting udhl and udl. udh not used if udhi not set.
 
static long utf8decode (unsigned char **pp)
 Reads next UCS character from NUL terminated UTF-8 string and advance pointer.
 

Variables

static char * app = "SMS"
 
static const unsigned short defaultalphabet []
 
static const unsigned short escapes []
 
static char log_file [255]
 
static volatile unsigned char message_ref
 
static volatile unsigned int seq
 
static const struct ast_app_option sms_options [128] = { [ 's' ] = { .flag = OPTION_BE_SMSC }, [ 'a' ] = { .flag = OPTION_ANSWER }, [ 't' ] = { .flag = OPTION_TWO }, [ 'r' ] = { .flag = OPTION_SRR }, [ 'o' ] = { .flag = OPTION_DCS }, [ 'n' ] = { .flag = OPTIONS_NO_LOG }, [ 'p' ] = { .flag = OPTION_PAUSE , .arg_index = OPTION_ARG_PAUSE + 1 }, }
 
static struct ast_generator smsgen
 
static const signed short wave []
 
static const output_t * wave_out = wave
 

Detailed Description

SMS application - ETSI ES 201 912 protocol 1 implementation.

Development notes
Note
The ETSI standards are available free of charge from ETSI at http://pda.etsi.org/pda/queryform.asp Among the relevant documents here we have:

ES 201 912 SMS for PSTN/ISDN TS 123 040 Technical realization of SMS

Author
Adrian Kennard (for the original protocol 1 code)
Filippo Grassilli (Hyppo) - protocol 2 support Not fully tested, under development

Definition in file app_sms.c.

Macro Definition Documentation

#define SMSLEN   160

max SMS length

Definition at line 215 of file app_sms.c.

Referenced by packsms7(), and sms_readfile().

#define SMSLEN_8   140

max SMS length for 8-bit char

Definition at line 216 of file app_sms.c.

Referenced by packsms16(), and packsms8().

Enumeration Type Documentation

The SMS spec ETSI ES 201 912 defines two protocols with different message types. Also note that the high bit is used to indicate whether the message is complete or not, but in two opposite ways: for Protocol 1, 0x80 means that the message is complete; for Protocol 2, 0x00 means that the message is complete;

Definition at line 161 of file app_sms.c.

161  {
162  DLL_SMS_MASK = 0x7f, /* mask for the valid bits */
163 
164  /* Protocol 1 values */
165  DLL1_SMS_DATA = 0x11, /* data packet */
166  DLL1_SMS_ERROR = 0x12,
167  DLL1_SMS_EST = 0x13, /* start the connection */
168  DLL1_SMS_REL = 0x14, /* end the connection */
169  DLL1_SMS_ACK = 0x15,
170  DLL1_SMS_NACK = 0x16,
171 
172  DLL1_SMS_COMPLETE = 0x80, /* packet is complete */
173  DLL1_SMS_MORE = 0x00, /* more data to follow */
174 
175  /* Protocol 2 values */
176  DLL2_SMS_EST = 0x7f, /* magic number. No message body */
177  DLL2_SMS_INFO_MO = 0x10,
178  DLL2_SMS_INFO_MT = 0x11,
179  DLL2_SMS_INFO_STA = 0x12,
180  DLL2_SMS_NACK = 0x13,
181  DLL2_SMS_ACK0 = 0x14, /* ack even-numbered frame */
182  DLL2_SMS_ACK1 = 0x15, /* ack odd-numbered frame */
183  DLL2_SMS_ENQ = 0x16,
184  DLL2_SMS_REL = 0x17, /* end the connection */
185 
186  DLL2_SMS_COMPLETE = 0x00, /* packet is complete */
187  DLL2_SMS_MORE = 0x80, /* more data to follow */
188 };

Function Documentation

static void adddata_proto2 ( sms_t h,
unsigned char  msg,
char *  data,
int  size 
)
static

Add data to a protocol 2 message. Use the length field (h->omsg[1]) as a pointer to the next free position.

Definition at line 1188 of file app_sms.c.

References sms_s::omsg.

1189 {
1190  int x = h->omsg[1] + 2; /* Get current position */
1191  if (x == 2) {
1192  x += 2; /* First: skip Payload length (set later) */
1193  }
1194  h->omsg[x++] = msg; /* Message code */
1195  h->omsg[x++] = (unsigned char)size; /* Data size Low */
1196  h->omsg[x++] = 0; /* Data size Hi */
1197  for (; size > 0 ; size--) {
1198  h->omsg[x++] = *data++;
1199  }
1200  h->omsg[1] = x - 2; /* Frame size */
1201  h->omsg[2] = x - 4; /* Payload length (Lo) */
1202  h->omsg[3] = 0; /* Payload length (Hi) */
1203 }
unsigned char omsg[256]
Definition: app_sms.c:249
static void* sms_alloc ( struct ast_channel chan,
void *  sms_t_ptr 
)
static

Just return the pointer to the descriptor that we received.

Definition at line 1684 of file app_sms.c.

1685 {
1686  return sms_t_ptr;
1687 }
static int sms_generate ( struct ast_channel chan,
void *  data,
int  len,
int  samples 
)
static

outgoing data are produced by this generator function, that reads from the descriptor whether it has data to send and which ones.

Definition at line 1604 of file app_sms.c.

References ast_alloca, AST_FRAME_VOICE, AST_FRIENDLY_OFFSET, ast_write(), ast_frame::data, ast_frame::datalen, ast_frame_subclass::format, ast_frame::frametype, ast_frame::mallocd, sms_s::obitp, sms_s::obyte, sms_s::obyten, sms_s::obytep, ast_frame::offset, sms_s::omsg, sms_s::opause, sms_s::ophase, sms_s::ophasep, sms_s::oseizure, sms_s::osync, sms_s::protocol, ast_frame::samples, ast_frame::src, and ast_frame::subclass.

1605 {
1606  struct ast_frame f = { 0 };
1607 #define MAXSAMPLES (800)
1608  output_t *buf;
1609  sms_t *h = data;
1610  int i, res;
1611 
1612  if (samples > MAXSAMPLES) {
1613  ast_log(LOG_WARNING, "Only doing %d samples (%d requested)\n",
1614  MAXSAMPLES, samples);
1615  samples = MAXSAMPLES;
1616  }
1617  len = samples * sizeof(*buf) + AST_FRIENDLY_OFFSET;
1618  buf = ast_alloca(len);
1619 
1621  f.subclass.format = __OUT_FMT;
1622  f.datalen = samples * sizeof(*buf);
1624  f.mallocd = 0;
1625  f.data.ptr = buf;
1626  f.samples = samples;
1627  f.src = "app_sms";
1628  /* create a buffer containing the digital sms pattern */
1629  for (i = 0; i < samples; i++) {
1630  buf[i] = wave_out[0]; /* default is silence */
1631 
1632  if (h->opause) {
1633  h->opause--;
1634  } else if (h->obyten || h->osync) { /* sending data */
1635  buf[i] = wave_out[h->ophase];
1636  h->ophase += (h->obyte & 1) ? 13 : 21; /* compute next phase */
1637  if (h->ophase >= 80)
1638  h->ophase -= 80;
1639  if ((h->ophasep += 12) >= 80) { /* time to send the next bit */
1640  h->ophasep -= 80;
1641  if (h->oseizure > 0) { /* sending channel seizure (proto 2) */
1642  h->oseizure--;
1643  h->obyte ^= 1; /* toggle low bit */
1644  } else if (h->osync) {
1645  h->obyte = 1; /* send mark as sync bit */
1646  h->osync--; /* sending sync bits */
1647  if (h->osync == 0 && h->protocol == 2 && h->omsg[0] == DLL2_SMS_EST) {
1648  h->obytep = h->obyten = 0; /* we are done */
1649  }
1650  } else {
1651  h->obitp++;
1652  if (h->obitp == 1) {
1653  h->obyte = 0; /* start bit; */
1654  } else if (h->obitp == 2) {
1655  h->obyte = h->omsg[h->obytep];
1656  } else if (h->obitp == 10) {
1657  h->obyte = 1; /* stop bit */
1658  h->obitp = 0;
1659  h->obytep++;
1660  if (h->obytep == h->obyten) {
1661  h->obytep = h->obyten = 0; /* sent */
1662  h->osync = 10; /* trailing marks */
1663  }
1664  } else {
1665  h->obyte >>= 1;
1666  }
1667  }
1668  }
1669  }
1670  }
1671  res = ast_write(chan, &f);
1672  ast_frfree(&f);
1673  if (res < 0) {
1674  ast_log(LOG_WARNING, "Failed to write frame to '%s': %s\n", ast_channel_name(chan), strerror(errno));
1675  return -1;
1676  }
1677  return 0;
1678 #undef MAXSAMPLES
1679 }
unsigned char obyten
Definition: app_sms.c:248
unsigned char ophase
Definition: app_sms.c:241
unsigned char obitp
Definition: app_sms.c:245
unsigned char osync
Definition: app_sms.c:246
Definition: app_sms.c:218
struct ast_frame_subclass subclass
unsigned char omsg[256]
Definition: app_sms.c:249
#define AST_FRIENDLY_OFFSET
Offset into a frame's data buffer.
const char * src
unsigned char obyte
Definition: app_sms.c:243
#define ast_alloca(size)
call __builtin_alloca to ensure we get gcc builtin semantics
Definition: astmm.h:288
unsigned char ophasep
Definition: app_sms.c:242
unsigned char obytep
Definition: app_sms.c:247
int oseizure
Definition: app_sms.c:275
union ast_frame::@224 data
int ast_write(struct ast_channel *chan, struct ast_frame *frame)
Write a frame to a channel This function writes the given frame to the indicated channel.
Definition: channel.c:5144
unsigned int opause
Definition: app_sms.c:244
Data structure associated with a single frame of data.
enum ast_frame_type frametype
struct ast_format * format
int protocol
Definition: app_sms.c:274
static void sms_process ( sms_t h,
int  samples,
signed short *  data 
)
static

Process an incoming frame, trying to detect the carrier and decode the message. The two frequencies are 1300 and 2100 Hz. The decoder detects the amplitude of the signal over the last few samples, filtering the absolute values with a lowpass filter. If the magnitude (h->imag) is large enough, multiply the signal by the two carriers, and compute the amplitudes m0 and m1. Record the current sample as '0' or '1' depending on which one is greater. The last 3 bits are stored in h->ibith, with the count of '1' bits in h->ibitt. XXX the rest is to be determined.

Definition at line 1712 of file app_sms.c.

References sms_s::err, sms_s::framenumber, sms_s::hangup, sms_s::ibitc, sms_s::ibith, sms_s::ibitl, sms_s::ibitn, sms_s::ibitt, sms_s::ibytec, sms_s::ibytep, sms_s::ibytev, sms_s::ierr, sms_s::imag, sms_s::imc1, sms_s::imsg, sms_s::ipc0, sms_s::ipc1, sms_s::iphasep, sms_s::ips0, sms_s::ips1, sms_s::obyten, sms_s::omsg, sms_s::osync, sms_s::protocol, and sms_s::sent_rel.

1713 {
1714  int bit;
1715 
1716  /*
1717  * Ignore incoming audio while a packet is being transmitted,
1718  * the protocol is half-duplex.
1719  * Unfortunately this means that if the outbound and incoming
1720  * transmission overlap (which is an error condition anyways),
1721  * we may miss some data and this makes debugging harder.
1722  */
1723  if (h->obyten || h->osync) {
1724  return;
1725  }
1726  for ( ; samples-- ; data++) {
1727  unsigned long long m0, m1;
1728  if (abs(*data) > h->imag) {
1729  h->imag = abs(*data);
1730  } else {
1731  h->imag = h->imag * 7 / 8;
1732  }
1733  if (h->imag <= 500) { /* below [arbitrary] threahold: lost carrier */
1734  if (h->idle++ == 80000) { /* nothing happening */
1735  ast_log(LOG_NOTICE, "No data, hanging up\n");
1736  h->hangup = 1;
1737  h->err = 1;
1738  }
1739  if (h->ierr) { /* error */
1740  ast_log(LOG_NOTICE, "Error %d, hanging up\n", h->ierr);
1741  /* Protocol 1 */
1742  h->err = 1;
1743  h->omsg[0] = 0x92; /* error */
1744  h->omsg[1] = 1;
1745  h->omsg[2] = h->ierr;
1746  sms_messagetx(h); /* send error */
1747  }
1748  h->ierr = h->ibitn = h->ibytep = h->ibytec = 0;
1749  continue;
1750  }
1751  h->idle = 0;
1752 
1753  /* multiply signal by the two carriers. */
1754  h->ims0 = (h->ims0 * 6 + *data * wave[h->ips0]) / 7;
1755  h->imc0 = (h->imc0 * 6 + *data * wave[h->ipc0]) / 7;
1756  h->ims1 = (h->ims1 * 6 + *data * wave[h->ips1]) / 7;
1757  h->imc1 = (h->imc1 * 6 + *data * wave[h->ipc1]) / 7;
1758  /* compute the amplitudes */
1759  m0 = h->ims0 * h->ims0 + h->imc0 * h->imc0;
1760  m1 = h->ims1 * h->ims1 + h->imc1 * h->imc1;
1761 
1762  /* advance the sin/cos pointers */
1763  if ((h->ips0 += 21) >= 80) {
1764  h->ips0 -= 80;
1765  }
1766  if ((h->ipc0 += 21) >= 80) {
1767  h->ipc0 -= 80;
1768  }
1769  if ((h->ips1 += 13) >= 80) {
1770  h->ips1 -= 80;
1771  }
1772  if ((h->ipc1 += 13) >= 80) {
1773  h->ipc1 -= 80;
1774  }
1775 
1776  /* set new bit to 1 or 0 depending on which value is stronger */
1777  h->ibith <<= 1;
1778  if (m1 > m0) {
1779  h->ibith |= 1;
1780  }
1781  if (h->ibith & 8) {
1782  h->ibitt--;
1783  }
1784  if (h->ibith & 1) {
1785  h->ibitt++;
1786  }
1787  bit = ((h->ibitt > 1) ? 1 : 0);
1788  if (bit != h->ibitl) {
1789  h->ibitc = 1;
1790  } else {
1791  h->ibitc++;
1792  }
1793  h->ibitl = bit;
1794  if (!h->ibitn && h->ibitc == 4 && !bit) {
1795  h->ibitn = 1;
1796  h->iphasep = 0;
1797  }
1798  if (bit && h->ibitc == 200) { /* sync, restart message */
1799  /* Protocol 2: empty connection ready (I am master) */
1800  if (h->framenumber < 0 && h->ibytec >= 160 && !memcmp(h->imsg, "UUUUUUUUUUUUUUUUUUUU", 20)) {
1801  h->framenumber = 1;
1802  ast_verb(3, "SMS protocol 2 detected\n");
1803  h->protocol = 2;
1804  h->imsg[0] = 0xff; /* special message (fake) */
1805  h->imsg[1] = h->imsg[2] = 0x00;
1806  h->ierr = h->ibitn = h->ibytep = h->ibytec = 0;
1807  sms_messagerx(h);
1808  }
1809  h->ierr = h->ibitn = h->ibytep = h->ibytec = 0;
1810  }
1811  if (h->ibitn) {
1812  h->iphasep += 12;
1813  if (h->iphasep >= 80) { /* next bit */
1814  h->iphasep -= 80;
1815  if (h->ibitn++ == 9) { /* end of byte */
1816  if (!bit) { /* bad stop bit */
1817  if (h->sent_rel) {
1818  h->hangup = 1;
1819  } else {
1820  ast_log(LOG_NOTICE, "Bad stop bit\n");
1821  h->ierr = 0xFF; /* unknown error */
1822  }
1823  } else {
1824  if (h->ibytep < sizeof(h->imsg)) {
1825  h->imsg[h->ibytep] = h->ibytev;
1826  h->ibytec += h->ibytev;
1827  h->ibytep++;
1828  } else if (h->ibytep == sizeof(h->imsg)) {
1829  ast_log(LOG_NOTICE, "msg too large\n");
1830  h->ierr = 2; /* bad message length */
1831  }
1832  if (h->ibytep > 1 && h->ibytep == 3 + h->imsg[1] && !h->ierr) {
1833  if (!h->ibytec) {
1834  sms_messagerx(h);
1835  } else {
1836  ast_log(LOG_NOTICE, "bad checksum\n");
1837  h->ierr = 1; /* bad checksum */
1838  }
1839  }
1840  }
1841  h->ibitn = 0;
1842  }
1843  h->ibytev = (h->ibytev >> 1) + (bit ? 0x80 : 0);
1844  }
1845  }
1846  }
1847 }
unsigned char hangup
Definition: app_sms.c:219
unsigned char ipc1
Definition: app_sms.c:260
unsigned char obyten
Definition: app_sms.c:248
unsigned char ipc0
Definition: app_sms.c:259
unsigned char ibitl
Definition: app_sms.c:261
unsigned char ibytep
Definition: app_sms.c:266
unsigned char osync
Definition: app_sms.c:246
unsigned char imsg[250]
Definition: app_sms.c:250
unsigned char omsg[256]
Definition: app_sms.c:249
unsigned char ibytev
Definition: app_sms.c:265
unsigned char ibitt
Definition: app_sms.c:270
unsigned char ips0
Definition: app_sms.c:257
signed long long imc1
Definition: app_sms.c:251
unsigned short imag
Definition: app_sms.c:256
int framenumber
Definition: app_sms.c:276
unsigned char ierr
Definition: app_sms.c:268
unsigned char ibitc
Definition: app_sms.c:262
union ast_frame::@224 data
unsigned char err
Definition: app_sms.c:220
unsigned char ibytec
Definition: app_sms.c:267
unsigned char ibith
Definition: app_sms.c:269
unsigned char ips1
Definition: app_sms.c:258
unsigned char sent_rel
Definition: app_sms.c:221
unsigned char iphasep
Definition: app_sms.c:263
int protocol
Definition: app_sms.c:274
unsigned char ibitn
Definition: app_sms.c:264

Variable Documentation

struct ast_generator smsgen
static
Initial value:
= {
.alloc = sms_alloc,
.release = sms_release,
.generate = sms_generate,
}
static int sms_generate(struct ast_channel *chan, void *data, int len, int samples)
Definition: app_sms.c:1604
static void * sms_alloc(struct ast_channel *chan, void *sms_t_ptr)
Definition: app_sms.c:1684

Definition at line 1694 of file app_sms.c.