summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2007-07-23Merge the dialplan_aesthetics branch. Most of this patch simply converts ↵Tilghman Lesher
applications using old methods of parsing arguments to using the standard macros. However, the big change is that the really old way of specifying application and arguments separated by a comma will no longer work (e.g. NoOp,foo|bar). Instead, the way that has been recommended since long before 1.0 will become the only method available (e.g. NoOp(foo,bar). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23Merged revisions 76656 via svnmerge from Jason Parker
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r76656 | qwell | 2007-07-23 13:59:28 -0500 (Mon, 23 Jul 2007) | 3 lines Fix some incorrect softkey labels in messages. Don't try to play dialtone in some unimplemented features. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76657 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23Merged revisions 76654 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r76654 | file | 2007-07-23 15:29:48 -0300 (Mon, 23 Jul 2007) | 12 lines Merged revisions 76653 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r76653 | file | 2007-07-23 15:28:13 -0300 (Mon, 23 Jul 2007) | 4 lines (closes issue #5866) Reported by: tyler Do not force channel format changes when a generator is present. The generator may have changed the formats itself and changing them back would cause issues. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23Merged revisions 76620 via svnmerge from Jason Parker
https://origsvn.digium.com/svn/asterisk/branches/1.4 (closes issue #10276) ........ r76620 | qwell | 2007-07-23 12:57:53 -0500 (Mon, 23 Jul 2007) | 4 lines Don't try to queue up hold/unhold frames on a non-existent channel. Issue 10276. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76621 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23Merged revisions 76618 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r76618 | file | 2007-07-23 14:48:51 -0300 (Mon, 23 Jul 2007) | 2 lines Allow app_morsecode to build on PPC Linux by putting the value of the digit char in an int. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76619 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23add two missing entries in the replica of the sip_tech thatLuigi Rizzo
does not use DTMF BEGIN frames. 1.4 seems correct (it does not have the two fields). However, as this bug shows, the current way of creating the sip_tech replica is too error-prone, one can easily forget to update one of the two entries. Perhaps it would be better to create sip_tech_info expliclty at module load, by doing sip_tech_info = sip_tech; sip_tech_info.send_digit_begin = NULL (in this case, this is something applicable to 1.4 as well). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23Merged revisions 76561 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r76561 | file | 2007-07-23 11:34:21 -0300 (Mon, 23 Jul 2007) | 14 lines Merged revisions 76560 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r76560 | file | 2007-07-23 11:32:07 -0300 (Mon, 23 Jul 2007) | 6 lines (closes issue #10236) Reported by: homesick Patches: rpid_1.4_75840.patch uploaded by homesick (license 91) Accept Remote Party ID on guest calls. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76563 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23Mark str2dtmfmode() as currently unused to resolve a compiler warning andRussell Bryant
allow building under dev mode git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76562 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23(closes issue #10271)Russell Bryant
Reported by: snuffy Patches: doxygen-updates.diff uploaded by snuffy (license 35) Another big batch of doxygen documentation updates git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23note the debug and verbose changes in CHANGESRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23(closes issue #10192)Russell Bryant
Reported by: bbryant Patches: 20070720__core_debug_by_file.patch uploaded by bbryant (license 36) (with some modifications by me) Tested by: russell, bbryant This set of changes introduces the ability to set the core debug or verbose levels on a per-file basis. Interestingly enough, in 1.4, you have the ability to set core debug for a single file, but that functionality was accidentally lost in the conversion of the CLI commands to the new format. This patch improves upon what was in 1.4 by letting you set it for more than 1 file, and by also supporting verbose. *** Janitor Project *** This patch also introduces a new macro, ast_verb(), which is similar to ast_debug(). Setting the per file verbose value only works for messages that use this macro. Converting existing uses of ast_verbose() can be done like: if (option_debug > 2) ast_verbose(VERBOSE_PREFIX_3 "Something useful\n"); ... ast_verb(3, "Something useful\n"); git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23introduce two functions, map_x_s() and map_s_x(), to mapLuigi Rizzo
between integers and strings using a single translation table, and use them in a few places instead of ad-hoc routines that duplicate the table. On passing, note that REFER_CONFIRMED is never used, and add a few comments. Nothing to backport here. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23Remove an unused function to resolve a compiler warningRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76524 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23Use autoconf logic to determine byte swapping macro presence. This should ↵Joshua Colp
now also use other macros if present. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23move "sip prunte realtime ..." and "sip set debug ... " to NEW_CLI style.Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23Merged revisions 76519 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r76519 | file | 2007-07-23 10:23:09 -0300 (Mon, 23 Jul 2007) | 6 lines (closes issue #10268) Reported by: mvanbaak Patches: chan_skinny_openbsd.diff uploaded by mvanbaak (license 7) Add another OS that has to use the Macros for byte ordering. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23Merged revisions 76485 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r76485 | russell | 2007-07-23 07:25:01 -0500 (Mon, 23 Jul 2007) | 6 lines Use a signed integer for storing the number of bytes in the packet read from the network. Using an unsigned value here made it impossible to handle an error returned from recvfrom(). Furthermore, in the case that recvfrom() did return an error, this would cause a crash due to a heap overflow. (closes issue #10265, reported by and fix suggested by timrobbins) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76486 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23Add some documentation on the sipregistry states and theLuigi Rizzo
handling of the sip_register structures. This commit only changes comments and whitespace. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76467 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23add a bit of comments on internal functions.Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-22rewrite "sip show {channels|subscriptions}" CLI handlerLuigi Rizzo
using the new-style cli format. No functional changes, nothing to backport. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-22Make sip_destroy() return NULL so the caller can do things likeLuigi Rizzo
foo = sip_destroy(foo); and reduce the chance of bugs due to dangling pointers. Also remove a duplicate prototype for the function. nothing to backport. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-22add two comment blocks, one on reusing nonces, and one on the handlingLuigi Rizzo
of an 'authpeer' local variable. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-22comment and slightly restructure handle_request() in the part that handlesLuigi Rizzo
responses, so that there is a common exit point. Mark two places where probably we could return -1 instead of 0 to report an error to the caller. (change triggered by investigations on how the 'SIP_PKT_IGNORE' field was used). nothing to backport from this commit git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-22remove unused argument from handle_invite_replaces(), and also leftoverLuigi Rizzo
SIP_PKT_* stuff from the previous commit. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76366 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-22Cleanup of flags used in struct sip_request, moving them toLuigi Rizzo
individual variables. Apart from SIP_PKT_IGNORE which was used a zillion times, the other two are used seldom. On passing: - move the arrays to the end of struct sip_request, so a (small) buffer overflow is less likely to overwrite the other fields; - note that the 'ignore' argument to handle_invite_replaces() is not used and should be removed (will be done in a separate commit). Nothing to backport in this change. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-22move two per-packet flags to proper variables.Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-22minor clarification on the usage of SIP_* flags.Luigi Rizzo
Also correct some items that were misclassified. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-22document the way sipdebug works, and implement it throughLuigi Rizzo
variables and not flags. NOTE: The old behaviour (preserved in this commit) is that if sipdebug is set in the config file, it can only be disabled by reloading the config. I am not sure if this is accidental or voluntary, but it is really unconvenient and I think it should be handled in the same way as other options i.e. consider requests from the config file or the cli (or the command line) to be fully equivalent and act on the same status variable. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-21move the SIP_REALTIME flag to a field in the user/peer structure.Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-21Add a note to document how the temporary 'pvt' should be initializedLuigi Rizzo
before using it. I am unclear on the details right now so i hope someone can comment more. The obvious (and lazy) approach would be to bzero() all of it (except for the string pool), but isn't that too much work ? Feedback wanted here... git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76313 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-21Add support for using /dev/urandom to get random numbers on systems that ↵Joshua Colp
support it. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-21whoops... was setting needdestroy on the wrong dialog.Luigi Rizzo
(spotted by a diff with my own branch) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-21more two more flags to proper variables: ALREADYGONE and NEEDDESTROY.Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-21use explicit variables for things that don't need toLuigi Rizzo
be stored in ast_flags. First victim is 'SIP_NO_HISTORY' replaced by a 'do_history' field in the sip_pvt structure. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76231 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-21Use ast_str_append() instead of ast_build_string() to constructLuigi Rizzo
the sdp messages. Overall the code is slightly more readable (because the string is fully described by a single pointer), and more efficient (because the length is stored explicitly so you don't need to do strlen()). (I have been using this code for almost a year now.) I wish we had infix string operators to do this sort of things! Nothing to backport from this change. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-21Blocked revisions 76227 via svnmergeRussell Bryant
................ r76227 | russell | 2007-07-20 21:02:54 -0500 (Fri, 20 Jul 2007) | 12 lines Merged revisions 76226 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r76226 | russell | 2007-07-20 21:01:46 -0500 (Fri, 20 Jul 2007) | 4 lines Backport a fix for a memory leak that was fixed in trunk in reivision 76221 by rizzo. The memory used for the localaddr list was not freed during a configuration reload. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76228 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-21We have two 'technology' descriptors for a SIP channel, soLuigi Rizzo
define and use a macro to determine whether we are pointing to one of them, so when one goes away (or a new one appears) we don't have to touch all the code. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-21One small documentation update made to accompany 10154, the upgrading of the ↵Steve Murphy
queue ringing to allow periodic announcments git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76222 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-21Enhance NAT support as discussed on the -dev list, i.e.:Luigi Rizzo
+ extensive documentation changes both in sip.conf.sample and in the source; + allow "externip" and "externhost" to include a port number as well; + allow "bindaddr" to have a port number (making bindport unnecessary, even though it is still present for backward compatibility); + introduce the new "stunaddr" parameter to specify an STUN server to be used from the main SIP socket; + extend the "sip show settings" output to show all the above. Internally: + change related data structures from struct in_addr to struct sockaddr_in to store the port numbers as well; + reorganize ast_sip_ouraddrfor() (should also be renamed to sip_ouraddrfor() because it is not a generic API, though it might become so if called with a socket as an additional argument, in which case it can be moved elsewhere). As mentioned in the documentation, media sessions still do not use STUN so the port numbers may still be incorrect when Asterisk is behind a NAT On passing, some of the debugging messages printing media addresses are probably using the wrong values, but this will be checked/fixed in a subsequent commit if needed. Part of the following chunk in the function that handles a "sip reload" is probably needed on previous versions as well, to avoid leaking the memory used for the "localaddr" list: @@ -17244,13 +17274,17 @@ /* Reset IP addresses */ memset(&bindaddr, 0, sizeof(bindaddr)); + memset(&stunaddr, 0, sizeof(stunaddr)); + memset(&internip, 0, sizeof(internip)); + /* Free memory for local network address mask */ + ---> ast_free_ha(localaddr); <----- memset(&localaddr, 0, sizeof(localaddr)); memset(&externip, 0, sizeof(externip)); memset(&default_prefs, 0 , sizeof(default_prefs)); git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-21This update was supplied in 10154; to allow announcemnts if the 'r' option ↵Steve Murphy
(ringing) is provided. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76220 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-20Add support for default "say mode" (whether to use the "old" method or "new" ↵Jason Parker
method. "new" method being config file) Add support for autocomplete of "say load" CLI command. Patch by IgorG (closes issue #10243) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-20Merged revisions 76211 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r76211 | murf | 2007-07-20 15:36:05 -0600 (Fri, 20 Jul 2007) | 1 line This patch from 10249 is worth applying! It prevents downloading sound files if they are already downloaded. Darn Practical, if you ask me ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-20Blocked revisions 76178 via svnmergeJason Parker
........ r76178 | qwell | 2007-07-20 16:03:57 -0500 (Fri, 20 Jul 2007) | 7 lines Allow getting a call from an existing "sub" channel. Cancel ringing if endpoint hangs up before answering. Fixes were backported from trunk (there was apparently a bit of confusion during merge of a previous patch). (closes issue #10241) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76179 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-20Blocked revisions 76176 via svnmergeJason Parker
........ r76176 | qwell | 2007-07-20 15:54:10 -0500 (Fri, 20 Jul 2007) | 2 lines Eliminate a compiler warning with gcc 4.2 by constifying a char * ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76177 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-20Merged revisions 76174 via svnmerge from Jason Parker
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r76174 | qwell | 2007-07-20 15:32:55 -0500 (Fri, 20 Jul 2007) | 2 lines It's possible for sub->owner to be NULL here if you cancel the call immediately after/during sending a digit. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-20Merged revisions 76139 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r76139 | mmichelson | 2007-07-20 13:42:27 -0500 (Fri, 20 Jul 2007) | 6 lines When using users.conf for the entries in the directory, if multiple users had the same last name, only the first user listed would be available in the directory. (closes issue #10200, reported by mrskippy, patched by me) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-20Merged revisions 76132 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r76132 | russell | 2007-07-20 13:22:24 -0500 (Fri, 20 Jul 2007) | 6 lines Use the define that specifies the default length of an artificially created DTMF digit in the ast_senddigit() function. The define is set to 100ms by default, which is the same thing that this function was using. But, using the define lets changes take effect in this case, as well as the others where it was already used. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-20Merged revisions 76087 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r76087 | file | 2007-07-20 14:20:09 -0300 (Fri, 20 Jul 2007) | 14 lines Merged revisions 76080 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r76080 | file | 2007-07-20 14:16:48 -0300 (Fri, 20 Jul 2007) | 6 lines (closes issue #10247) Reported by: fkasumovic Patches: chan_sip.patch uploaded by fkasumovic (license #101) Drop any peer realm authentication entries when reloading so multiple entries do not get added to the peer. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-20Merged revisions 76067 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r76067 | file | 2007-07-20 14:10:17 -0300 (Fri, 20 Jul 2007) | 6 lines (closes issue #10246) Reported by: fkasumovic Patches: res_conver.patch uploaded by fkasumovic (license #101) Use the last occurance of . to find the extension, not the first occurance. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-20It is impossible for the externhost variable to not exist, it is however ↵Joshua Colp
possible for it to be empty. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76056 65c4cc65-6c06-0410-ace0-fbb531ad65f3