summaryrefslogtreecommitdiff
path: root/addons/chan_mobile.c
AgeCommit message (Collapse)Author
2013-07-17Change ast_hangup() to return void and be NULL safe.Richard Mudgett
Since ast_hangup() is effectively a channel destructor, it should be a void function. * Make the few silly callers checking the return value no longer do so. Only the CDR and CEL unit tests checked the return value. * Make all callers take advantage of the NULL safe change and remove the NULL check before the call. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-17Fix issue where chan_mobile fails to bind to first available portMatthew Jordan
Per the bluez API, in order to bind to the first available port, the rc_channel field of the socket addressing structure used to bind the socket should be set to 0. Previously, Asterisk had set the rc_channel field set to 1, causing it to connect to whatever happens to be on port 1. We could probably not explicitly set rc_channel to 0 since we memset the struct earlier, but explicitly setting it will hopefully prevent someone from coming in and setting it to some explicit port in the future. (closes issue ASTERISK-16357) Reported by: challado Tested by: Alexander Heinz, Nikolay Ilduganov, benjamin, eliafino, David van Geyn patches: ASTERISK-16357.diff uploaded by Nikolay Ilduganov (license 6253) ........ Merged revisions 379342 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 379343 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-16Fix parsing SMSSRC for SMS messagesMatthew Jordan
The parser for SMS messages would incorrectly parse out the from number. The parsing would incorrectly start scanning for the from number at the same index as the first double quote ("); this would inadvertently cause it to treat the first double quote as the terminating double quote for the from number as well. The SMSSRC should now populate correctly. (closes issue ASTERISK-16822) Reported by: menschentier Tested by: Jonas Falck patches: fixSMSSRC.patch uploaded by jonax (license 6320) (closes issue ASTERISK-19153) Reported by: Panos Gkikakis patches: sms-sender-fix.diff uploaded by roeften (license 5884) ........ Merged revisions 379178 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 379179 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-15Add busy detection to chan_mobileMatthew Jordan
From the patch author: "First this patch adds general support for busy detection. It also adds support for the ECAM command at Sony Ericsson phones and also signals busy when only early media was received but the call got not answered." Review: https://reviewboard.asterisk.org/r/323 (closes issue ASTERISK-14527) Reported by: Artem Makhutov Tested by: Artem Makhutov patches: busy-full5.patch uploaded by artem (license 5757) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379144 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-14Doxygen UpdatesAndrew Latham
Update and extend the configuration_file group and enable linking. (issue ASTERISK-20259) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-22Doxygen Updates Janitor WorkAndrew Latham
* Whitespace, doc-blocks, spelling, case, missing and incorrect tags. * Add cleanup to Makefile for the Doxygen configuration update * Start updating Doxygen configuration for cleaner output * Enable inclusion of configuration files into documentation * remove mantisworkflow... * update documentation README * Add markup to Tilghman's email and talk with him about updating his email, he knows... * no code changes on this commit other than the mentioned Makefile change (issue ASTERISK-20259) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-31Clean up and ensure proper usage of alloca()Kinsey Moore
This replaces all calls to alloca() with ast_alloca() which calls gcc's __builtin_alloca() to avoid BSD semantics and removes all NULL checks on memory allocated via ast_alloca() and ast_strdupa(). (closes issue ASTERISK-20125) Review: https://reviewboard.asterisk.org/r/2032/ Patch-by: Walter Doekes (wdoekes) ........ Merged revisions 370642 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370643 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-19Fix a variety of potential buffer overflowsMatthew Jordan
* chan_mobile: Fixed an overrun where the cind_state buffer (an integer array of size 16) would be overrun due to improper bounds checking. At worst, the buffer can be overrun by a total of 48 bytes (assuming 4-byte integers), which would still leave it within the allocated memory of struct hfp. This would corrupt other elements in that struct but not necessarily cause any further issues. * app_sms: The array imsg is of size 250, while the array (ud) that the data is copied into is of size 160. If the size of the inbound message is greater then 160, up to 90 bytes could be overrun in ud. This would corrupt the user data header (array udh) adjacent to ud. * chan_unistim: A number of invalid memmoves are corrected. These would move data (which may or may not be valid) into the ends of these buffers. * asterisk: ast_console_toggle_loglevel does not check that the console log level being set is less then or equal to the allowed log levels of 32. * format_pref: In ast_codec_pref_prepend, if any occurrence of the specified codec is not found, the value used to index into the array pref->order would be one greater then the maximum size of the array. * jitterbuf: If the element being placed into the jitter buffer lands in the last available slot in the jitter history buffer, the insertion sort attempts to move the last entry in the buffer into one slot past the maximum length of the buffer. Note that this occurred for both the min and max jitter history buffers. * tdd: If a read from fsk_serial returns a character that is greater then 32, an attempt to read past one of the statically defined arrays containing the values that character maps to would occur. * localtime: struct ast_time and tm are not the same size - ast_time is larger, although it contains the elements of tm within it in the same layout. Hence, when using memcpy to copy the contents of tm into ast_time, the size of tm should be used, as opposed to the size of ast_time. * extconf: this treats ast_timing's minmask array as if it had a length of 48, when it has defined the size of the array as 24. pbx.h defines minmask as having a size of 48. (issue ASTERISK-19668) Reported by: Matt Jordan ........ Merged revisions 362485 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 362496 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362497 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-06Add missing newlines to CLI loggingKinsey Moore
........ Merged revisions 361471 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 361472 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@361476 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-24Opaquification for ast_format structs in struct ast_channelTerry Wilson
Review: https://reviewboard.asterisk.org/r/1770/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-20ast_channel opaquification of pointers and integral typesTerry Wilson
Review: https://reviewboard.asterisk.org/r/1753/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-13Opaquify char * and char[] in ast_channelTerry Wilson
Review: https://reviewboard.asterisk.org/r/1733/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-08Avoid cppcheck warnings; removing unused vars and a bit of cleanup.Walter Doekes
Patch by: Clod Patry Review: https://reviewboard.asterisk.org/r/1651 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-01Constify some more channel driver technology callback parameters.Richard Mudgett
Review: https://reviewboard.asterisk.org/r/1707/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-24Opaquify channel stringfieldsTerry Wilson
Continue channel opaque-ification by wrapping all of the stringfields. Eventually, we will restrict what can actually set these variables, but the purpose for now is to hide the implementation and keep people from adding code that directly accesses the channel structure. Semantic changes will follow afterward. Review: https://reviewboard.asterisk.org/r/1661/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-14Multiple revisions 350788-350789Kevin P. Fleming
........ r350788 | kpfleming | 2012-01-14 09:22:33 -0600 (Sat, 14 Jan 2012) | 8 lines Ensure that two prerequisites are properly installed on Debian-style distributions. * Don't specify a specific version of libgmime; newer versions are available now and acceptable. * Install libsrtp so that res_srtp can be built. ........ r350789 | kpfleming | 2012-01-14 09:23:32 -0600 (Sat, 14 Jan 2012) | 3 lines Correct some 'set-but-not-used' variable warnings. ........ Merged revisions 350788-350789 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 350790 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-09Replace direct access to channel name with accessor functionsTerry Wilson
There are many benefits to making the ast_channel an opaque handle, from increasing maintainability to presenting ways to kill masquerades. This patch kicks things off by taking things a field at a time, renaming the field to '__do_not_use_${fieldname}' and then writing setters/getters and converting the existing code to using them. When all fields are done, we can move ast_channel to a C file from channel.h and lop off the '__do_not_use_'. This patch sets up main/channel_interal_api.c to be the only file that actually accesses the ast_channel's fields directly. The intent would be for any API functions in channel.c to use the accessor functions. No more monkeying around with channel internals. We should use our own APIs. The interesting changes in this patch are the addition of channel_internal_api.c, the moving of the AST_DATA stuff from channel.c to channel_internal_api.c (note: the AST_DATA stuff will have to be reworked to use accessor functions when ast_channel is really opaque), and some re-working of the way channel iterators/callbacks are handled so as to avoid creating fake ast_channels on the stack to pass in matching data by directly accessing fields (since "name" is a stringfield and the fake channel doesn't init the stringfields, you can't use the ast_channel_name_set() function). I went with ast_channel_name(chan) for a getter, and ast_channel_name_set(chan, name) for a setter. The majority of the grunt-work for this change was done by writing a semantic patch using Coccinelle ( http://coccinelle.lip6.fr/ ). Review: https://reviewboard.asterisk.org/r/1655/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-29Merged revisions 333786 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r333786 | rmudgett | 2011-08-29 16:12:29 -0500 (Mon, 29 Aug 2011) | 13 lines Merged revisions 333784-333785 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r333784 | rmudgett | 2011-08-29 16:05:43 -0500 (Mon, 29 Aug 2011) | 2 lines Fix deadlock potential of chan_mobile.c:mbl_ast_hangup(). ........ r333785 | rmudgett | 2011-08-29 16:06:16 -0500 (Mon, 29 Aug 2011) | 1 line Add some do not hold locks notes to channel.h ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@333789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14Merged revisions 328247 via svnmerge from Leif Madsen
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: https://origsvn.digium.com/svn/asterisk/trunk@328259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-25Merged revisions 320716 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r320716 | twilson | 2011-05-24 17:49:10 -0700 (Tue, 24 May 2011) | 4 lines Cast data as char * before using S_OR This is required for compiling successfully under dev mode ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-03Asterisk media architecture conversion - no more format bitfieldsDavid Vossel
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: https://origsvn.digium.com/svn/asterisk/trunk@306010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-20Fix some build errors in addons due to sched API changes.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@299133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-18Merged revisions 292122 via svnmerge from Matthew Nicholson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r292122 | mnicholson | 2010-10-18 12:15:24 -0500 (Mon, 18 Oct 2010) | 5 lines Fix the cmgr parser. (closes issue 0018152) Reported by: menschentier ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@292124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-20Add load priority order, such that preload becomes unnecessary in most casesTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-02Fix various typos reported by LintianTzafrir Cohen
(Also fix the typos in the comments) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@273641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-01Don't free written frames in chan_mobile's mbl_write() function.Matthew Nicholson
(closes issue #16430) Reported by: azbest Tested by: azbest git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@273312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-02Fix support for multiline SMS messages in chan_mobile.Matthew Nicholson
(closes issue #16278) Reported by: Artem Patches:       multiline-sms-fix2.diff uploaded by mnicholson (license 96) Tested by: Artem git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@232580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-02Do something with the service indicator so that asterisk does not attempt to ↵Matthew Nicholson
use a chan_mobile endpoint that does not have service. (closes issue #16132) Reported by: nikkk Patches:       service-indicator2.diff uploaded by mnicholson (license 96) Tested by: nikkk git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@232544 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-06Missed these two channel drivers on the codec_bits mergeTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@228616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-03Add an 'sms' option to mobile.conf to manually enable or disable SMS support.Matthew Nicholson
(closes issue #15071) Reported by: ughnz Patches: optional-sms1.diff uploaded by mnicholson (license 96) Tested by: ughnz, mnicholson git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@209993 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-29This patch adds the ability to send a CUSD command to a bluetooth device.Matthew Nicholson
(closes issue #15278) Reported by: Artem Patches: cusd5.patch uploaded by Artem (license 800) Tested by: mnicholson, Artem Review: https://reviewboard.asterisk.org/r/274/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@209484 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-29Fixed a comment for hfp_parse_clipMatthew Nicholson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@209453 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-27Fixing typos. Replaces "recieved" with "received" and "initilize" with ↵David Brooks
"initialize" (closes issue #15571) Reported by: alecdavis git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@209098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-09Fix mbl_fixup() in chan_mobile to update newchan->tech_pvt instead of oldchan.Matthew Nicholson
(closes issue #15299) Reported by: nikkk git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@205700 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-30Rename mobile.conf to chan_mobile.conf, make module support old name, tooRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@204423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-30Move Asterisk-addons modules into the main Asterisk source tree.Russell Bryant
Someone asked yesterday, "is there a good reason why we can't just put these modules in Asterisk?". After a brief discussion, as long as the modules are clearly set aside in their own directory and not enabled by default, it is perfectly fine. For more information about why a module goes in addons, see README-addons.txt. chan_ooh323 does not currently compile as it is behind some trunk API updates. However, it will not build by default, so it should be okay for now. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@204413 65c4cc65-6c06-0410-ace0-fbb531ad65f3