aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_sms.c
AgeCommit message (Collapse)AuthorFilesLines
2011-07-14Merged revisions 328247 via svnmerge from lmadsen1-0/+4
https://origsvn.digium.com/svn/asterisk/branches/1.10 ................ r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines Merged revisions 328209 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines Introduce <support_level> tags in MODULEINFO. This change introduces MODULEINFO into many modules in Asterisk in order to show the community support level for those modules. This is used by changes committed to menuselect by Russell Bryant recently (r917 in menuselect). More information about the support level types and what they mean is available on the wiki at https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@328259 f38db490-d61c-443f-a65b-d21fe96a405b
2011-02-03Asterisk media architecture conversion - no more format bitfieldsdvossel1-3/+3
This patch is the foundation of an entire new way of looking at media in Asterisk. The code present in this patch is everything required to complete phase1 of my Media Architecture proposal. For more information about this project visit the link below. https://wiki.asterisk.org/wiki/display/AST/Media+Architecture+Proposal The primary function of this patch is to convert all the usages of format bitfields in Asterisk to use the new format and format_cap APIs. Functionally no change in behavior should be present in this patch. Thanks to twilson and russell for all the time they spent reviewing these changes. Review: https://reviewboard.asterisk.org/r/1083/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@306010 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-30Merged revisions 289426 via svnmerge from russell1-0/+6
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r289426 | russell | 2010-09-30 10:39:45 -0500 (Thu, 30 Sep 2010) | 22 lines Merged revisions 289425 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r289425 | russell | 2010-09-30 10:37:29 -0500 (Thu, 30 Sep 2010) | 15 lines Merged revisions 289424 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r289424 | russell | 2010-09-30 10:34:29 -0500 (Thu, 30 Sep 2010) | 8 lines Fix a crash in app_sms. Since the data being passed to the generator callback is on the stack of the SMS() application, we must ensure that the generator is stopped before the application exits. ABE-2587 ........ ................ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@289427 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-14ast_callerid restructuringrmudgett1-2/+3
The purpose of this patch is to eliminate struct ast_callerid since it has turned into a miscellaneous collection of various party information. Eliminate struct ast_callerid and replace it with the following struct organization: struct ast_party_name { char *str; int char_set; int presentation; unsigned char valid; }; struct ast_party_number { char *str; int plan; int presentation; unsigned char valid; }; struct ast_party_subaddress { char *str; int type; unsigned char odd_even_indicator; unsigned char valid; }; struct ast_party_id { struct ast_party_name name; struct ast_party_number number; struct ast_party_subaddress subaddress; char *tag; }; struct ast_party_dialed { struct { char *str; int plan; } number; struct ast_party_subaddress subaddress; int transit_network_select; }; struct ast_party_caller { struct ast_party_id id; char *ani; int ani2; }; The new organization adds some new information as well. * The party name and number now have their own presentation value that can be manipulated independently. ISDN supplies the presentation value for the name and number at different times with the possibility that they could be different. * The party name and number now have a valid flag. Before this change the name or number string could be empty if the presentation were restricted. Most channel drivers assume that the name or number is then simply not available instead of indicating that the name or number was restricted. * The party name now has a character set value. SIP and Q.SIG have the ability to indicate what character set a name string is using so it could be presented properly. * The dialed party now has a numbering plan value that could be useful to have available. The various channel drivers will need to be updated to support the new core features as needed. They have simply been converted to supply current functionality at this time. The following items of note were either corrected or enhanced: * The CONNECTEDLINE() and REDIRECTING() dialplan functions were consolidated into func_callerid.c to share party id handling code. * CALLERPRES() is now deprecated because the name and number have their own presentation values. * Fixed app_alarmreceiver.c write_metadata(). The workstring[] could contain garbage. It also can only contain the caller id number so using ast_callerid_parse() on it is silly. There was also a typo in the CALLERNAME if test. * Fixed app_rpt.c using ast_callerid_parse() on the channel's caller id number string. ast_callerid_parse() alters the given buffer which in this case is the channel's caller id number string. Then using ast_shrink_phone_number() could alter it even more. * Fixed caller ID name and number memory leak in chan_usbradio.c. * Fixed uninitialized char arrays cid_num[] and cid_name[] in sig_analog.c. * Protected access to a caller channel with lock in chan_sip.c. * Clarified intent of code in app_meetme.c sla_ring_station() and dial_trunk(). Also made save all caller ID data instead of just the name and number strings. * Simplified cdr.c set_one_cid(). It hand coded the ast_callerid_merge() function. * Corrected some weirdness with app_privacy.c's use of caller presentation. Review: https://reviewboard.asterisk.org/r/702/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276347 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-04Expand codec bitfield from 32 bits to 64 bits.tilghman1-1/+1
Reviewboard: https://reviewboard.asterisk.org/r/416/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@227580 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-10AST-2009-005tilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@211539 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-30Fixes numerous spelling errors. Patch submitted by alecdavis.dbrooks1-1/+1
(closes issue #15595) Reported by: alecdavis git-svn-id: http://svn.digium.com/svn/asterisk/trunk@209554 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-15Last batch of 'static' qualifiers for module-level global variables.kpfleming1-4/+4
Fix up modules in the 'apps' directory, and also correct the bad example of enum definitions in include/asterisk/app.h, which many developers followed (thanks for reading the documentation!). In addition, add some basic usage examples of the 'pahole' and 'pglobal' tools to the coding guidelines. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@200656 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-21Const-ify the world (or at least a good part of it)kpfleming1-2/+2
This patch adds 'const' tags to a number of Asterisk APIs where they are appropriate (where the API already demanded that the function argument not be modified, but the compiler was not informed of that fact). The list includes: - CLI command handlers - CLI command handler arguments - AGI command handlers - AGI command handler arguments - Dialplan application handler arguments - Speech engine API function arguments In addition, various file-scope and function-scope constant arrays got 'const' and/or 'static' qualifiers where they were missing. Review: https://reviewboard.asterisk.org/r/251/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@196072 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-02Remove rarely-used event_log/LOG_EVENT supportkpfleming1-2/+2
In discussions today at the Europe Asterisk Developer Meet-Up, we determined that the event_log was used in only 9 places in the entire tree, and really was not needed at all. The users have been converted to use LOG_NOTICE, or the messages have been removed since other messages were already in place that provided the same information. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@191785 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-07Introduce SMS() application XML documentation.eliel1-28/+50
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@161571 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-02bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 ↵kpfleming1-1/+3
branch, and add the ones needed for all the new code here too git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153616 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-16Answer the channel prior to checking for the 'a'mmichelson1-4/+4
option in app_sms. (closes issue #13675) Reported by: alecdavis Patches: app_sms.bug13675.148985.diff.txt uploaded by alecdavis (license 585) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@150257 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-14App is ignoring 'p' parameter -- initial pause.tilghman1-394/+495
(closes issue #13617) Reported by: alecdavis Patches: app_sms.13oct.diff.txt uploaded by alecdavis (license 585) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@148985 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-08Correct a typo in the help; also, ensure that the date and time are correctlytilghman1-1/+4
set, if not specified in the message. (Closes issue #13594, closes issue #13595) Reported by: alecdavis Patches: 20081001__bug13595.diff.txt uploaded by Corydon76 (license 14) Tested by: alecdavis git-svn-id: http://svn.digium.com/svn/asterisk/trunk@147592 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-01Initializing buffer prevents a segfault when arguments are incomplete.tilghman1-1/+1
(closes issue #13471) Reported by: alecdavis Patches: 20080916__bug13471.diff.txt uploaded by Corydon76 (license 14) Tested by: alecdavis git-svn-id: http://svn.digium.com/svn/asterisk/trunk@145428 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-10More RSW merges. Everything from apps/ except for the big offendersseanbright1-19/+19
app_voicemail and app_queue. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@137055 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-22- revert change to ast_queue_hangup and create ast_queue_hangup_with_causemvanbaak1-2/+2
- make data member of the ast_frame struct a named union instead of a void Recently the ast_queue_hangup function got a new parameter, the hangupcause Feedback came in that this is no good and that instead a new function should be created. This I did. The hangupcause was stored in the seqno member of the ast_frame struct. This is not very elegant, and since there's already a data member that one should be used. Problem is, this member was a void *. Now it's a named union so it can hold a pointer, an uint32 and there's a padding in case someone wants to store another type in there in the future. This commit is so massive, because all ast_frame.data uses have to be altered to ast_frame.data.data Thanks russellb and kpfleming for the feedback. (closes issue #12674) Reported by: mvanbaak git-svn-id: http://svn.digium.com/svn/asterisk/trunk@117802 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-25Whitespace changes onlytilghman1-4/+6
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114667 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-11Merged revisions 107464 via svnmerge from kpfleming1-3/+5
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r107464 | kpfleming | 2008-03-11 09:53:03 -0500 (Tue, 11 Mar 2008) | 2 lines fix various other problems found by gcc 4.3 ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@107466 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-11Merged revisions 107461 via svnmerge from kpfleming1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r107461 | kpfleming | 2008-03-11 09:33:45 -0500 (Tue, 11 Mar 2008) | 2 lines stop checking for mktime() in the configure script... we don't use it, and the test is buggy under gcc 4.3 ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@107462 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21remove another set of redundant #include "asterisk/options.h"rizzo1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89512 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20move asterisk/paths.h outside asterisk.h and into those filesrizzo1-0/+1
who really need it. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89466 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19include "logger.h" and errno.h from asterisk.h - usage shows that theyrizzo1-2/+0
were included almost everywhere. Remove some of the instances. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89424 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17another cygwin compatibility fix.rizzo1-1/+1
This one must be handled in a better way in configure, also for other architectures git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89374 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16Start untangling header inclusion in a way that does not affectrizzo1-5/+0
build times - tested, there is no measureable difference before and after this commit. In this change: use asterisk/compat.h to include a small set of system headers: inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h, stdlib.h, alloca.h, stdio.h Where available, the inclusion is conditional on HAVE_FOO_H as determined by autoconf. Normally, source files should not include any of the above system headers, and instead use either "asterisk.h" or "asterisk/compat.h" which does it better. For the time being I have left alone second-level directories (main/db1-ast, etc.). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06"show application <foo>" changes for clarity.mmichelson1-7/+7
(closes issue #11171, reported and patched by blitzrage) Many thanks! git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89044 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-12Merged revisions 82285 via svnmerge from tilghman1-15/+15
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r82285 | tilghman | 2007-09-12 15:12:06 -0500 (Wed, 12 Sep 2007) | 4 lines Working on issue #10531 exposed a rather nasty 64-bit issue on ast_mktime, so we updated the localtime.c file from source. Next we'll have to write ast_strptime to match. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@82290 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-31Mostly cleanup of documentation to substitute the pipe with the comma, but a ↵tilghman1-1/+1
few other formatting cleanups, too. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77808 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-26Do a massive conversion for using the ast_verb() macrorussell1-19/+11
(closes issue #10277, patches by mvanbaak) Basically, this changes ... if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3, "Something\n"); to ... ast_verb(3, "Something\n"); git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77299 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-18Merge in ast_strftime branch, which changes timestamps to be accurate to the ↵tilghman1-12/+16
microsecond, instead of only to the second git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75706 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-16Applications no longer need to call ast_module_user_add and ↵file1-3/+0
ast_module_user_remove. This is now taken care of in the pbx_exec function outside of the application. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75200 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-16It is no longer required for each module that deals with a channel to call ↵file1-7/+1
ast_module_user_hangup_all in it's unload function. The loader will automatically perform this action for it. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75183 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-28move variable declarations to the beginning of a block.rizzo1-2/+4
Not applicable to previous branches. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@72457 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-22Code cleanupstilghman1-344/+345
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@71190 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-22Issue 9990 - New API ast_mkdir, which creates parent directories as ↵tilghman1-8/+4
necessary (and is faster than an outcall to mkdir -p) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@71040 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-27From coding guidelines:oej1-4/+2
Comments should explain what the code does, not when something was changed or who changed it. If you have done a larger contribution, make sure that you are added to the CREDITS file. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48984 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-22improve readability of a few macros.rizzo1-3/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48857 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-21make sms_hexdump() thread safe;rizzo1-212/+224
restructure and reduce indentation on some blocks. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48844 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-21make isodate thread-saferizzo1-15/+18
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48832 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-21- use the standard option parsing routines;rizzo1-70/+123
- document existing but undocumented parameters to send a message (untested but unchanged; - ad a new option p(N) to set the initial message delay to N ms so this can be adapted from the dialplan to various countries; git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48825 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-21put generator functions next to each other.rizzo1-16/+23
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48768 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-21a quick fix to app_sms.c to get rid of cursed compiler warnings so I can ↵murf1-4/+4
compile under --enable-dev-mode git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48767 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-21reduce indentationrizzo1-100/+97
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48752 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-21restructure a block to reduce nestingrizzo1-99/+98
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48750 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-21Add a bit of documentation on this code, including pointersrizzo1-36/+376
to relevant documents and comment on timing issues. Initial merge of the code in http://bugs.digium.com/view.php?id=8586 by Filippo Grassilli (Hyppo) to support the SMS Protocol 2. In this commit i have tried to minimize the diffs, so further code cleanup will come in subsequent commits. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48736 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-20more formatting cleanup.rizzo1-39/+45
Move some code into a function sms_compose1() in preparation for supporting protocol 2 as well. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48599 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-19formatting and code cleanup.rizzo1-100/+85
Still a lot of copy&pasted code here... git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48598 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-19start documenting this code.rizzo1-11/+28
On passing, fix the bogus datalen on outgoing frames just fixed in 1.4 rev.48583 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48588 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-02Doxygenificationoej1-43/+43
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48206 f38db490-d61c-443f-a65b-d21fe96a405b