summaryrefslogtreecommitdiff
path: root/main
AgeCommit message (Collapse)Author
2011-12-22Add Asterisk TestSuite event hooks to support ConfBridge testingMatthew Jordan
This patch adds initial testsuite event hooks so that ConfBridge tests can be executed in the Asterisk TestSuite. (issue ASTERISK-19059) ........ Merged revisions 348846 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348848 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-19Update documentation for MESSAGE_SEND_STATUS variable.Leif Madsen
(Closes issue ASTERISK-19056) Reported by: Yuri Patches: 348360.diff uploaded by Yuri (license #5242) ........ Merged revisions 348605 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-16Clean-up on isle five for __ast_request_and_dial() and ast_call_forward().Richard Mudgett
* Add locking when a channel inherits variables and datastores in __ast_request_and_dial() and ast_call_forward(). Note: The involved channels are not active so there was minimal potential for problems. * Remove calls to ast_set_callerid() in __ast_request_and_dial() and ast_call_forward() because the set information is for the wrong direction. * Don't use C++ keywords for variable names in ast_call_forward(). * Run the redirecting interception macro if defined when forwarding a call in ast_call_forward(). Note: Currently will never execute because the only callers that supply a calling channel supply a hungup or zombie channel. * Make feature_request_and_dial() put the transferee into autoservice when it calls ast_call_forward() in case a redirection interception macro is run. Note: Currently will never happen because the caller channel (Party B) is always hungup at this time. * Make feature_request_and_dial() ignore the AST_CONTROL_PROCEEDING frame to silence a log message. ........ Merged revisions 348464 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 348465 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-16Fix cut and past error in ast_call_forward().Richard Mudgett
(issue ASTERISK-18836) ........ Merged revisions 348401 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 348405 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-16Fix crash during CDR update.Richard Mudgett
The ast_cdr_setcid() and ast_cdr_update() were shown in ASTERISK-18836 to be called by different threads for the same channel. The channel driver thread and the PBX thread running dialplan. * Add lock protection around CDR API calls that access an ast_channel pointer. (closes issue ASTERISK-18836) Reported by: gpluser Review: https://reviewboard.asterisk.org/r/1628/ ........ Merged revisions 348362 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 348363 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-14Add and document PARKEDCALL variable set during timeoutJonathan Rose
PARKEDCALL variable tracks which parking lot the call was last parked in. This can be used afterwards for flow control when returntoorigin is set to off. I went ahead and documented both this and the existing variable set during timeout (PARKINGSLOT) in the sample features.conf since there was no prior mention of variables being set during timeout. (closes issue ASTERISK-16239) Reported By: Clod Patry Patches: M17503.diff uploaded by Clod Patry (license 5138) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-12Backed out core changes from r346391Matthew Jordan
During testing, it was discovered that there were a number of side effects introduced by r346391 and subsequent check-ins related to it (r346429, r346617, and r346655). This included the /main/stdtime/ test 'hanging', as well as the remote console option failing to receive the appropriate output after a period of time. I only backed out the changes to main/ and utils/, as this was adequate to reverse the behavior experienced. (issue ASTERISK-18974) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347997 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-09Fix some parsing issues in add_exten_to_pattern_tree().Richard Mudgett
* Simplify compare_char() and avoid potential sign extension issue. * Fix infinite loop in add_exten_to_pattern_tree() handling of character set escape handling. * Added buffer overflow checks in add_exten_to_pattern_tree() character set collection. * Made ignore empty character sets. * Added escape character handling to end-of-range character in character sets. This has a slight change in behavior if the end-of-range character is an escape character. You must now escape it. * Fix potential sign extension issue when expanding character set ranges. * Made remove duplicated characters from character sets. The duplicate characters lower extension matching priority and prevent duplicate extension detection. * Fix escape character handling when the escape character is trying to escape the end-of-string. We could have continued processing characters after the end of the exten string. We could have added the previous character to the pattern matching tree incorrectly. (closes issue ASTERISK-18909) Reported by: Luke-Jr ........ Merged revisions 347811 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 347812 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-08Mark channel running the h exten with the soft-hangup flag.Richard Mudgett
When a bridge is broken, ast_bridge_call() might execute the h exten on the calling channel. However, that channel may not have been the channel that broke the bridge by hanging up. The channel executing the h exten must be in a hung up state so things like AGI run in the correct mode. * Make sure ast_bridge_call() marks the channel it is executing the h exten on as hung up. (The AST_SOFTHANGUP_APPUNLOAD flag is used so as to match the pbx.c main dialplan execution loop when it executes the h exten.) (closes issue ASTERISK-18811) Reported by: David Hajek Patches: jira_asterisk_18811_v1.8.patch (license #5621) patch uploaded by rmudgett Tested by: David Hajek, rmudgett ........ Merged revisions 347595 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 347600 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347601 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-07Update AMI Getvar and Setvar documentation about supplying a channel name.Richard Mudgett
(closes issue ASTERISK-18958) Reported by: Red Patches: jira_asterisk_18958_v1.8.patch (license #5621) patch uploaded by rmudgett ........ Merged revisions 347438 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 347439 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-07Add ASTSBINDIR to the list of configurable pathsTerry Wilson
This patch also makes astdb2sqlite3 and astcanary use the configured directory instead of relying on $PATH. (closes issue ASTERISK-18959) Review: https://reviewboard.asterisk.org/r/1613/ ........ Merged revisions 347344 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-06Documents CHANNEL(musicclass) taking priority over m([x]) in waitExtenJonathan Rose
If waitExten specifies a music class to use with its music on hold option, it will use CHANNEL(musicclass) instead if that channel variable has been set on the initiating channel. This documents that behavior in the waitExten app so that this can be known without checking the documentation of the code in function local_ast_moh_start. (closes issue ASTERISK-18804) ........ Merged revisions 347239 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 347240 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-05Resolve duplicate label used in multiple priorities for the same extension.Jonathan Rose
Prior to this patch, if labels with the same name were used for different priorities in the same extension, the new label would be accepted, but it would be unusable since attempts to reach that label would just go to the first one. Now pbx.c detects this, generates a warning in logs, and culls the label before adding it to the dialplan. (closes issue ASTERISK-18807) Reported by: Kenneth Shumard Patches: pbx.c.patch uploaded by Kenneth Shumard (License 5077) ........ Merged revisions 346954 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 346955 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346956 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-01Re-resolve the STUN address if a STUN poll fails for res_stun_monitor.Richard Mudgett
The STUN socket must remain open between polls or the external address seen by the STUN server is likely to change. However, if the STUN request poll fails then the STUN server address needs to be re-resolved and the STUN socket needs to be closed and reopened. * Re-resolve the STUN server address and create a new socket if the STUN request poll fails. * Fix ast_stun_request() return value consistency. * Fix ast_stun_request() to check the received packet for expected message type and transaction ID. * Fix ast_stun_request() to read packets until timeout or an associated response packet is found. The stun_purge_socket() hack is no longer required. * Reduce ast_stun_request() error messages to debug output. * No longer pass in the destination address to ast_stun_request() if the socket is already bound or connected to the destination. (closes issue ASTERISK-18327) Reported by: Wolfram Joost Tested by: rmudgett Review: https://reviewboard.asterisk.org/r/1595/ ........ Merged revisions 346700 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 346701 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346709 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-30Remove the few places where we try to ast_verbose() without a newline.Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-30Fix edge case for overflow buffer.Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346617 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-30r346525 | jrose | 2011-11-30 15:10:38 -0600 (Wed, 30 Nov 2011) | 18 linesJonathan Rose
Cleaning up chan_sip/tcptls file descriptor closing. This patch attempts to eliminate various possible instances of undefined behavior caused by invoking close/fclose in situations where fclose may have already been issued on a tcptls_session_instance and/or closing file descriptors that don't have a valid index for fd (-1). Thanks for more than a little help from wdoekes. (closes issue ASTERISK-18700) Reported by: Erik Wallin (issue ASTERISK-18345) Reported by: Stephane Cazelas (issue ASTERISK-18342) Reported by: Stephane Chazelas Review: https://reviewboard.asterisk.org/r/1576/ ........ Merged revisions 346564 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 346565 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-30Reverting 346525 due to accidental patch against trunk instead of 1.8Jonathan Rose
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346563 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-30Cleaning up chan_sip/tcptls file descriptor closing.Jonathan Rose
This patch attempts to eliminate various possible instances of undefined behavior caused by invoking close/fclose in situations where fclose may have already been issued on a tcptls_session_instance and/or closing file descriptors that don't have a valid index for fd (-1). Thanks for more than a little help from wdoekes. (closes issue ASTERISK-18700) Reported by: Erik Wallin (issue ASTERISK-18345) Reported by: Stephane Cazelas (issue ASTERISK-18342) Reported by: Stephane Chazelas Review: https://reviewboard.asterisk.org/r/1576/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-29Allow each logging destination and console to have its own notion of the ↵Tilghman Lesher
verbosity level. Review: https://reviewboard.asterisk.org/r/1599 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-29Merged revisions 346349 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/10 ........ r346349 | dvossel | 2011-11-28 18:00:11 -0600 (Mon, 28 Nov 2011) | 10 lines Fixes memory leak in message API. The ast_msg_get_var function did not properly decrement the ref count of the var it retrieves. The way this is implemented is a bit tricky, as we must decrement the var and then return the var's value. As long as the documentation for the function is followed, this will not result in a dangling pointer as the ast_msg structure owns its own reference to the var while it exists in the var container. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-23Fix calls to ast_get_ip() not initializing the address family.Richard Mudgett
........ Merged revisions 346239 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 346240 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-22Fix dnsmgr entries to ask for the same address family each time.Richard Mudgett
The dnsmgr refresh would always get the first address found regardless of the original address family requested. So if you asked for only IPv4 addresses originally, you might get an IPv6 address on refresh. * Saved the original address family requested by ast_dnsmgr_lookup() to be used when the address is refreshed. ........ Merged revisions 345976 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 345977 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@345978 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-21Add #tryinclude statementPaul Belanger
This provides the same functionality as #include however an asterisk module will still load if the filename does not exist. Review: https://reviewboard.asterisk.org/r/1476/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@345735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-19Update the documentation to better clarify how the existing commands work.Tilghman Lesher
Review: https://reviewboard.asterisk.org/r/1593/ ........ Merged revisions 345682 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 345683 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@345684 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-18Fix a change in behavior in 'database show' from 1.8.Tilghman Lesher
In 1.8 and previous versions, one could use any fullword portion of the key name, including the full key, to obtain the record. Until this patch, this did not work for the full key. Closes issue ASTERISK-18886 Patch: by tilghman Review: by twilson (http://pastebin.com/7rtu6bpk) on #asterisk-dev ........ Merged revisions 345640 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@345643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-14Fix Progress spelling error in main/pbx.c.Richard Mudgett
(closes issue ASTERISK-18857) Reported by: David M Patches: mainpbx-trivial.patch (License #6326) patch uploaded by David M ........ Merged revisions 345219 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 345220 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@345221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-14Don't read past end of input when calling write()Terry Wilson
int blah = 1; ... write(chan->alertpipe[1], &blah, new_frames * sizeof(blah)) != (new_frames * sizeof(blah))) is only valid when new_frames == 1. Otherwise we start reading into adjacent variables declared on the stack. The read end discards what is read, so the values don't matter but it's not a good idea to read past where we want even though new_frames is almost always 1 and should never be large. This patch is basically taken out of kpfleming's eventfd branch, as he mentioned that he remembered fixing it there when I talked to him about this issue. Review: https://reviewboard.asterisk.org/r/1583/ ........ Merged revisions 345163 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 345164 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@345165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-11Use __alignof__ instead of sizeof for stringfield length storage.Walter Doekes
Kevin P Fleming suggested that r343157 should use __alignof__ instead of sizeof. For most systems this won't be an issue, but better fix it now while it's still fresh. Review: https://reviewboard.asterisk.org/r/1573 ........ Merged revisions 344843 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 344845 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-11Video format was treated as audio when removed from the file playback schedulerMatthew Jordan
This patch fixes the format type check in ast_closestream and filestream_destructor. Previously a comparison operator was used, but since audio formats are no longer contiguous (and AST_FORMAT_AUDIO_MASK includes formats that have a value greater than the video formats), a bitwise AND operation is used instead. Duplicated code was also moved to filestream_close. (closes issue ASTERISK-18682) Reported by: Aldo Bedrij Tested by: Matt Jordan Review: https://reviewboard.asterisk.org/r/1580/ ........ Merged revisions 344823 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 344842 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-11Fix bad quoting of multiline mxml opaque_data that caused invalid xml.Walter Doekes
The opaque_data was added and enclosed in single quotes, assuming it would be only a single line. The rest of the lines were appended after the closing quote. (closes issue ASTERISK-18852) Reported by: peep_ on IRC Review: https://reviewboard.asterisk.org/r/1577 ........ Merged revisions 344835 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 344836 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344838 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-11Make CLI "core show channel" not hold the channel lock during console output.Richard Mudgett
Holding the channel lock while the CLI "core show channel" command is executing can slow down the system. It could block the system if the console output is halted or paused. * Made capture the CLI "core show channel" output into a buffer to be output after the channel is unlocked. * Removed use of C++ keyword as a variable name. out renamed to obuf. * Checked allocation of obuf for failure so will not crash. (closes issue ASTERISK-18571) Reported by: Pavel Troller Tested by: rmudgett ........ Merged revisions 344661 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 344662 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-11Fix a segmentation fault when using an extension with CID matching and no CID.Jonathan Rose
Attempting to call an extension which used Caller ID matching with a channel that has an empty caller id string would result in a segmentation fault. (closes issue ASTERISK-18392 Reported By: Ales Zelenik ........ Merged revisions 344608 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 344609 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-10Merged revisions 344493 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/10 ........ r344493 | dvossel | 2011-11-10 15:54:42 -0600 (Thu, 10 Nov 2011) | 12 lines Fixes issue with ConfBridge participants hanging up during DTMF feature menu usage getting stuck in conference forever. When a conference user enters the DTMF menu they are suspended from the bridge while the channel is handed off to the DTMF feature code. If a user entered this state and hungup, there existed a race condition where the channel could not exit the conference because it was waiting on a signal that would never arrive. This patch fixes that, because it would stupid for me to talk about the problem and commit a patch for something else. (closes issue ASTERISK-18829) Reported by: zvision ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344494 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-08Fixed reference to incorrect variable if unknown host configured crash.Richard Mudgett
* Fixed a LOG_ERROR message referencing the config variable list v that had previously been processed and became NULL. * Added error return value set that was missing in an ast_append_ha() error return path. (closes issue ASTERISK-18743) Reported by: Michele Patches: issueA18743-fix_dynamic_exclude_static_bad_host_log.patch (license #5674) patch uploaded by Walter Doekes Tested by: Michele ........ Merged revisions 343851 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 343852 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343853 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-07Correct the default udptl port range.Walter Doekes
The udptl port range was defined as 4000-4999 in the udptl.conf.sample, as 4500-4599 if you didn't have a config and 4500-4999 if your config was broken. Default is now 4000-4999. (closes issue ASTERISK-16250) Reviewed by: Tilghman Lesher Review: https://reviewboard.asterisk.org/r/1565 ........ Merged revisions 343580 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-07list all of the codecs associated with a particular format id for CLI ↵Matthew Nicholson
command "core show codec" AST-699 ........ Merged revisions 343533 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343534 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-06Formatting and doxygen improvementsOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343492 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-02Ensure that string field lengths are properly alignedWalter Doekes
Integers should always be aligned. For some platforms (ARM, SPARC) this is more important than for others. This changeset ensures that the string field string lengths are aligned on *all* platforms, not just on the SPARC for which there was a workaround. It also fixes that the length integer can be resized to 32 bits without problems if needed. (closes issue ASTERISK-17310) Reported by: radael, S Adrian Reviewed by: Tzafrir Cohen, Terry Wilson Tested by: S Adrian Review: https://reviewboard.asterisk.org/r/1549 ........ Merged revisions 343157 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 343158 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-01Several fixes to the chan_sip dynamic realtime peer/user lookupWalter Doekes
There were several problems with the dynamic realtime peer/user lookup code. The lookup logic had become rather hard to read due to lots of incremental changes to the realtime_peer function. And, during the addition of the sipregs functionality, several possibilities for memory leaks had been introduced. The insecure=port matching has always been broken for anyone using the sipregs family. And, related, the broken implementation forced those using sipregs to *still* have an ipaddr column on their sippeers table. Thanks Terry Wilson for comprehensive testing and finding and fixing unexpected behaviour from the multientry realtime call which caused the realtime_peer to have a completely unused code path. This changeset fixes the leaks, the lookup inconsistenties and that you won't need an ipaddr column on your sippeers table anymore (when you're using sipregs). Beware that when you're using sipregs, peers with insecure=port will now start matching! (closes issue ASTERISK-17792) (closes issue ASTERISK-18356) Reported by: marcelloceschia, Walter Doekes Reviewed by: Terry Wilson Review: https://reviewboard.asterisk.org/r/1395 ........ Merged revisions 342927 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 342929 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-01Cleanup references to sipusers and sipfriends dynamic realtime familiesWalter Doekes
Somewhere between 1.4 and 1.8 the sipusers family has become completely unused. Before that, the sipfriends family had been obsoleted in favor of separate sipusers and sippeers families. Apparently, they have been merged back again into a single family which is now called "sippeers". Reviewed by: irroot, oej, pabelanger Review: https://reviewboard.asterisk.org/r/1523 ........ Merged revisions 342869 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 342870 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342871 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-31Misc format capability fixes.Richard Mudgett
* Fixed typo in format_cap.c:joint_copy_helper() using the wrong variable. * Fix potential race between checking if an interface exists and adding it to the container in format.c:ast_format_attr_reg_interface(). * Fixed double rwlock destroy in format.c:ast_format_attr_init() error exit path. * Simplified format.c:find_interface() and format.c:has_interface(). ........ Merged revisions 342824 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-31Fixed invalid memory access when adding extension to pattern match treeMatthew Jordan
When an extension is removed from a context, its entry in the pattern match tree is not deleted. Instead, the extension is marked as deleted. When an extension is removed and re-added, if that extension is also a prefix of another extension, several log messages would report an error and did not check whether or not the extension was deleted before accessing the memory. Additionally, if the extension was already in the tree but previously deleted, and the pattern was at the end of a match, the findonly flag was not honored and the extension would be erroneously undeleted. Additionaly, it was discovered that an IAX2 peer could be unregistered via the CLI, while at the same time it could be scheduled for unregistration by Asterisk. The unregistration method now checks to see if the peer was already unregistered before continuing with an unregistration. (closes issue ASTERISK-18135) Reported by: Jaco Kroon, Henry Fernandes, Kristijan Vrban Tested by: Matt Jordan Review: https://reviewboard.asterisk.org/r/1526 ........ Merged revisions 342769 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 342770 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-27tweak the v21 detector to detect an additional pattern of hits and missesMatthew Nicholson
........ Merged revisions 342605 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-25Check fopen return value for ao2 reference debug output.Richard Mudgett
Reported by: wdoekes Patched by: wdoekes Review: https://reviewboard.asterisk.org/r/1539/ ........ Merged revisions 342487 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 342488 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-25Return NULL when no results returned for realtime_multientryTerry Wilson
It was not documented what the return value should be when no entries were returned with the multientry realtime callback. This change forces consistent behavior even if the backends return an empty ast_config. Review: https://reviewboard.asterisk.org/r/1521/ ........ Merged revisions 342223 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 342224 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342225 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-24Fixes a segfault caused by referencing null frames introduced in r338623Jonathan Rose
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-20Fix AGI exec Park to honor the Park application parameters.Richard Mudgett
The fix for ASTERISK-12715 and ASTERISK-12685 added a check for the Park application because the channel needed to be masqueraded to prevent a crash. Since the Park application now always masquerades the channel into the parking lot, the special check is no longer needed. The fix also resulted in AGI exec Park attempting to double park the call and not honor the Park application parameters. * Removed no longer necessary call to ast_masq_park_call() by AGI exec for the Park application. (Reverts -r146923) * Fix Park application to only return 0 or -1. The AGI exec Park was causing broken pipe error messages because the Park application returned 1 on successful park. (closes issue ASTERISK-18737) ........ Merged revisions 341717 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 341718 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@341719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-18More parking issues.Richard Mudgett
* Fix potential deadlocks in SIP and IAX blind transfer to parking. * Fix SIP, IAX, DAHDI analog, and MGCP channel drivers to respect the parkext_exclusive option with transfers (Park(,,,,,exclusive_lot) parameter). Created ast_park_call_exten() and ast_masq_park_call_exten() to maintian API compatibility. * Made masq_park_call() handle a failed ast_channel_masquerade() setup. * Reduced excessive struct parkeduser.peername[] size. ........ Merged revisions 341254 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 341255 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@341256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-14Avoid unnecessary WARNING messageTerry Wilson
Add AST_CONTROL_UPDATE_RTP_PEER frame to be ignored here to avoid displaying a WARNING message. (closes issue ASTERISK-18610) Patch by: Kristijan_Vrban ........ Merged revisions 340878 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 340879 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340880 65c4cc65-6c06-0410-ace0-fbb531ad65f3