summaryrefslogtreecommitdiff
path: root/channels
AgeCommit message (Collapse)Author
2012-07-03More improvements to re-INVITEs timing out after a provisional responseTerry Wilson
There is no need to call check_pendings() on a final response to an INVITE when destroying the scheduler entry as it will be done later during normal processing. (issue ASTERISK-19992) ........ Merged revisions 369579 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369580 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-03Better handle re-INVITEs with provisional but no final repsonsesTerry Wilson
A previous attempt at fixing this issue had negative side effects related to attended transfers which this patch should resolve. Many thanks to Steve Davies for all of the good suggestions and testing. (closes issue ASTERISK-19992) Reported by: Steve Davies Tested by: Steve Davies, Terry Wilson Review: https://reviewboard.asterisk.org/r/2009/ ........ Merged revisions 369557 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369558 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-01Add support for ICE/STUN/TURN in res_rtp_asterisk and chan_sip.Joshua Colp
Review: https://reviewboard.asterisk.org/r/1891/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369517 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-29Hangup handlers - Dialplan subroutines that run when the channel hangs up.Richard Mudgett
Hangup handlers are an alternative to the h extension. They can be used in addition to the h extension. The idea is to attach a Gosub routine to a channel that will execute when the call hangs up. Whereas which h extension gets executed depends on the location of dialplan execution when the call hangs up, hangup handlers are attached to the call channel. You can attach multiple handlers that will execute in the order of most recently added first. (closes issue ASTERISK-19549) Reported by: Mark Murawski Tested by: rmudgett Review: https://reviewboard.asterisk.org/r/2002/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-29With some configurations a transport is not actually specified so assume UDP ↵Joshua Colp
in these cases. ........ Merged revisions 369490 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369491 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369492 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-29Make the address family filter specific to the transport.Joshua Colp
(closes issue ASTERISK-16618) Reported by: Leif Madsen Review: https://reviewboard.asterisk.org/r/1667/ ........ Merged revisions 369471 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369472 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-27AST-2012-010: Clean up after a reinvite that never gets a final responseTerry Wilson
The basic problem is that if a re-INVITE is sent by Asterisk and it receives a provisional response, but no final response, then the dialog is never torn down. In addition to leaking memory, this also leaks file descriptors and will eventually lead to Asterisk no longer being able to process calls. This patch just keeps track of whether there is an outstanding re-INVITE, and if there is goes ahead and cleans up everything as though there was no outstanding reinvite. Review: https://reviewboard.asterisk.org/r/2009/ (closes issue ASTERISK-19992) Reported by: Steve Davies Tested by: Steve Davies, Terry Wilson ........ Merged revisions 369436 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369437 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-26Unique Call ID logging Phases III and IVJonathan Rose
Adds call ID logging changes to specific channel drivers that weren't handled handled in phase II of Call ID Logging. Also covers logging for threads for threads created by systems that may be involved with many different calls. Extra special thanks to Richard for rigorous review of chan_dahdi and its various signalling modules. review: https://reviewboard.asterisk.org/r/1927/ review: https://reviewboard.asterisk.org/r/1950/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-25Re-fix how local tag is generated when sending a 481 to an INVITE.Mark Michelson
Match our local tag to whatever to-tag was sent in the initial INVITE. Because the size of the to-tag may not fit in the buffer in the sip_pvt, it has been changed to a string field. (closes issue ASTERISK-19892) reported by Walter Doekes Review: https://reviewboard.asterisk.org/r/1977 ........ Merged revisions 369352 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369353 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369367 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-25Be more consistent with the return code for requests received from invalid ↵Mark Michelson
domain. When Asterisk receives an INVITE from an external domain when allowexternaldomains=no send a 403 instead of a 404. This is consistent with Asterisk's behavior when receiving a REGISTER in this situation. (Closes issue ASTERISK-19601) Reported by Matthew Jordan Patches: ASTERISK-19601-no401.patch uploaded by Mark Michelson (License #5049) ........ Merged revisions 369302 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369303 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-22Change incorrect chan_sip zombie hangup debug message. They are all zombies ↵Richard Mudgett
now. ........ Merged revisions 369235 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369236 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-22Don't crash on a guest directmedia callTerry Wilson
A sip_pvt may not have relatedpeer set if a call doesn't match up with a peer. If there is no relatedpeer, there is no direct media ACL to apply, so just return that it is allowed. (closes issue ASTERISK-20040) Reported by: Terry Wilson ........ Merged revisions 369214 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369215 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369217 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-22Fix wrong variable name in the R2 disconnect callbackKinsey Moore
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-22Don't parse media stream state for SIP video streamsKinsey Moore
The sendonly/recvonly/sendrecv/inactive media stream attributes were parsed for video, but nothing was ever done with them. With this code removed, an UNSUPPORTED message is produced when these attributes are used in conjunction with a video stream which is the better behavior since they were never really supported in the first place. ........ Merged revisions 369195 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369206 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-22Add HANGUPCAUSE hash implementation for DAHDI MFC/R2 subtechKinsey Moore
This adds a minimal implementation of the "Who Hung Up?" Asterisk 11 work to chan_dahdi.c for the MFC/R2 DAHDI subtech. Given the way that OpenR2 interfaces with chan_dahdi, it is much harder to expose the type of protocol information that is available in PRI, SS7, or other channel technologies. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-22Add HANGUPCAUSE hash support for analog and PRI DAHDI subtechsKinsey Moore
This is part of the DAHDI support for the Asterisk 11 "Who Hung Up?" project and covers the implementation for the technologies implemented in sig_analog.c and sig_pri.c. Tested on a local machine to verify protocol and cause information is available. Review: https://reviewboard.asterisk.org/r/1953/ (issue SWP-4222) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-22Add "Who Hung Up?" implementation for DAHDI SS7 subtechnologyKinsey Moore
Testing was done on a local machine to verify that protocol and cause information was being sent properly. Review: https://reviewboard.asterisk.org/r/1955/ (issue SWP-4222) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-20Fix chan_misdn compile error.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-19Ensure that pvt cause information does not break native bridgingKinsey Moore
Channel drivers that allow native bridging need to handle AST_CONTROL_PVT_CAUSE_CODE frames and previously did not handle them properly, usually breaking out of the native bridge. This change corrects that behavior and exposes the available cause code information to the dialplan while native bridges are in place. This required exposing the HANGUPCAUSE hash setter outside of channel.c, so additional documentation has been added. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-19Fix request routing issue when outboundproxy is used.Mark Michelson
Asterisk was incorrectly setting the destination of CANCELs and ACKs for error responses to the URI of the initial INVITE. This resulted in further requests, such as INVITEs with authentication credentials, to be routed incorrectly. Instead, when these CANCEL or ACKs are to be sent, we should simply keep the destination the same as what it previously was. There is no need to alter it any. (closes issue ASTERISK-20008) Reported by Marcus Hunger Patches: ASTERISK-20008.patch uploaded by Mark Michelson (license #5049) ........ Merged revisions 369066 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369067 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369068 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-15Various small chan_skinny fixes and cleanupDamien Wedhorn
Added test to skinny_register to only allow device to register against a device that is not already registered. Addback l->device test for skinny_show_lines. Fixes segfault if a line is configured but not configured to a device. Reverses part of r368680. Removed redundant l->device tests in subsubstate and dumpsub. l->device will always be valid if these routines are called. Reverses 368948 - discussed with mjordan on irc. Some indentation cleanup. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-15Allow chan_sip to decline unwanted media streamsKinsey Moore
This change replaces the static array of four representable media streams with an AST_LIST so that chan_sip can keep track of offered media streams. This allows chan_sip to deal with offers containing multiple same-type streams and many other situations without rejecting the SDP offer in its entirety, yet still generating a valid response. This also covers cases where Asterisk can not comprehend the offer if it is in the correct format. Previously, chan_sip would reject SDP offers or entirely ignore individual stream offers in an effort to be more compatible which would often result in invalid SDP responses. Review: https://reviewboard.asterisk.org/r/1988/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-15Multiple revisions 369001-369002Kevin P. Fleming
........ r369001 | kpfleming | 2012-06-15 10:56:08 -0500 (Fri, 15 Jun 2012) | 11 lines Add support-level indications to many more source files. Since we now have tools that scan through the source tree looking for files with specific support levels, we need to ensure that every file that is a component of a 'core' or 'extended' module (or the main Asterisk binary) is explicitly marked with its support level. This patch adds support-level indications to many more source files in tree, but avoids adding them to third-party libraries that are included in the tree and to source files that don't end up involved in Asterisk itself. ........ r369002 | kpfleming | 2012-06-15 10:57:14 -0500 (Fri, 15 Jun 2012) | 3 lines Add a script to enable finding source files without support-levels defined. ........ Merged revisions 369001-369002 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369005 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-15Add HANGUPCAUSE hash support to IAX2Kinsey Moore
Continuing with the Who Hung Up? project for Asterisk 11, this adds support to IAX2 for the HANGUPCAUSE hash. Additionally, this breaks out some functionality in frame.c for getting information about frame types and subclasses. Review: https://reviewboard.asterisk.org/r/1941/ (issue SWP-4222) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-14AST-2012-009: Fix crash in chan_skinny due to Key Pad Button Message handlingMatthew Jordan
AST-2012-008 (r367844) fixed a denial of service attack exploitable in the Skinny channel driver that occurred when certain messages are sent after a previously registered station sends an Off Hook message. Unresolved in that patch is an issue in the Asterisk 10 releases, wherein, if a Station Key Pad Button Message is processed after an Off Hook message, the channel driver will inappropriately dereference a NULL pointer. This patch fixes those places where the message handling or the channel callback functions would attempt to dereference the line's pointer to the device. (issue ASTERISK-19905) Reported by: Christoph Hebeisen Tested by: mjordan, Christoph Hebeisen Patches: AST-2012-009-10.diff uploaded by mjordan (license 6283) ........ Merged revisions 368947 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368948 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-12Set the Caller ID "tag" on peers even if remote party information is present.Mark Michelson
On incoming calls, we were setting the cid_tag on the dialog only if there was no remote party information (Remote-Party-ID or P-Asserted-Identity) present. The Caller ID tag is an invented parameter, though, and should be set no matter the circumstance. (closes issue ASTERISK-19859) Reported by Thomas Arimont (closes issue AST-884) Reported by Trey Blancher ........ Merged revisions 368807 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 368808 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-12Fix deadlock in SIP transfers that involve a REFER requestMatthew Jordan
In r367163, "send to voicemail" functionality was added to the SIP channel driver. This required updating the party redirecting information for the channel based on the headers provided in the REFER request. When the redirecting party information is updated on the channel, a call to ast_indicate_data occurs. Because handle_request_refer still had the sip_pvt locked, a deadlock could occur between the pbx_thread and the do_monitor thread servicing the REFER request. This patch preserves the proper locking order between the channel and the sip_pvt by ensuring that the sip_pvt is unlocked prior to updating the party redirecting information on the channel. (closes issue AST-903) Reported by: Matt Jordan patches: jira_ast_903_trunk.patch by rmudgett (license 5621) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-12Parse ANI2 information from SIP From header parametersKinsey Moore
ANI2 information is now parsed out of SIP From headers when present in the oli, isup-oli, and ss7-oli parameters and is available via the CALLERID(ani2) dialplan function. (closes issue ASTERISK-19912) Patch-by: Rob Gagnon Review: https://reviewboard.asterisk.org/r/1947/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-11Fix deadlock potential with ast_set_hangupsource() calls.Richard Mudgett
Calling ast_set_hangupsource() with the channel lock held can result in a deadlock because the function also locks the bridged channel. (issue ASTERISK-19537) (closes issue AST-891) Reported by: Guenther Kelleter Tested by: Guenther Kelleter (closes issue ASTERISK-19801) Reported by: Alec Davis ........ Merged revisions 368759 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 368760 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-11Fix coverity UNUSED_VALUE findings in core support level filesKinsey Moore
Most of these were just saving returned values without using them and in some cases the variable being saved to could be removed as well. (issue ASTERISK-19672) ........ Merged revisions 368738 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 368739 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-08Fix MWI update so LED display correct voicemail state after phone usage. ↵Igor Goncharovskiy
Also fixes few warnings. (closes issue #19675) Reported by: dbohling Patches: fixmwi.patch uploaded by dbohling (license 6378) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-07Skinny cleanup (mwi_event_cb).Damien Wedhorn
Original was testing for d->session, setting and testing again (all nested). Removed duplicate testing and restructured function to test/return and then the main code. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368681 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-07Skinny cleanup.Damien Wedhorn
Removed d->registered which was mirroring d->session. Changed relevant references to use d->session instead. Moved setting and unsetting of l->device from session register to device configuration. As such, l->device will always be valid unless it is has not been configured to a device. Revised various test where checking if a device is registered to use l->device->session. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-06Fix POTS flash hook to orignate a second call deadlock.Richard Mudgett
A deadlock can occur when a POTS phone tries to flash hook to originate a second call for 3-way or transfer. If another process is scanning the channels container when the POTS line flash hooks then a deadlock will occur. * Release the channel and private locks when creating a new channel as a result of a flash hook. (closes issue ASTERISK-19842) Reported by: rmudgett Tested by: rmudgett ........ Merged revisions 368644 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 368645 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368646 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-06Fix a specific scenario where ACKs are not matched.Mark Michelson
If a dialog-starting INVITE contains a to-tag, then Asterisk will respond with a 481. In this case, the resulting incoming ACK would not be matched, so Asterisk would continue retransmitting the 481 until the transaction times out. There were two issues. Asterisk, upon creating a sip_pvt would generate a local tag. However, when the time came to transmit the 481, since there was a to-tag in the INVITE, Asterisk would place this original to-tag in the 481 response. When the ACK came in, Asterisk would attempt to match the to-tag in the ACK to the generated local tag. Unfortunately, Asterisk never actually transmitted a response with the generated local tag, so the to-tag in the ACK would not match. The other problem was that when the 481 was sent, nothing was set on the sip_pvt to indicate what CSeq is expected in the ACK. To fix the first problem, we zero out the to-tag seen in the incoming INVITE. This way, Asterisk, when time to send a response, will send its generated local tag instead. To fix the second problem, we set the sip_pvt's pendinginvite to the CSeq of the INVITE when we send a 481. (closes issue ASTERISK-19892) Reported by Mark Michelson ........ Merged revisions 368625 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 368629 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-06Ensure overlapping hold flags do not conflictKinsey Moore
When changing between different modes of hold, the flags were not being cleared out properly causing a failure to change hold states. (closes issue ASTERISK-19919) Patch-by: Morten Tryfoss Reported-by: Morten Tryfoss ........ Merged revisions 368586 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 368587 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-05Convert AST_FLAG_ANSWERED_ELSEWHERE usage to AST_CAUSE_ANSWERED_ELSEWHEREKinsey Moore
This was essentially duplicated functionality where normal channels used AST_CAUSE_ANSWERED_ELSEWHERE while local channels and queues used AST_FLAG_ANSWERED_ELSEWHERE. This removes the flag and converts that usage into AST_CAUSE_ANSWERED_ELSEWHER usage. Review: https://reviewboard.asterisk.org/r/1944 (closes issue ASTERISK-19865) Patch-by: Birger Harzenetter git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-04Relay proper SIP responses on calling side.Mark Michelson
Revision 351130 broke corect HANGUPCAUSE setting for the 404 case in chan_sip. Other cases were also potentially broken. This patch fixes the relaying of causes to be what they used to be. (closes issue ASTERISK-19914) Reported by Pavel Troller Tested by Walter Doekes (via a reviewboard test to be committed later) Patches: chan_sip.diff uploaded by Pavel Troller (license #6302) ........ Merged revisions 368498 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 368499 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368500 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-04Merge changes dealing with support for Digium phones.Mark Michelson
Presence support has been added. This is accomplished by allowing for presence hints in addition to device state hints. A dialplan function called PRESENCE_STATE has been added to allow for setting and reading presence. Presence can be transmitted to Digium phones using custom XML elements in a PIDF presence document. Voicemail has new APIs that allow for moving, removing, forwarding, and playing messages. Messages have had a new unique message ID added to them so that the APIs will work reliably. The state of a voicemail mailbox can be obtained using an API that allows one to get a snapshot of the mailbox. A voicemail Dialplan App called VoiceMailPlayMsg has been added to be able to play back a specific message. Configuration hooks have been added. Configuration hooks allow for a piece of code to be executed when a specific configuration file is loaded by a specific module. This is useful for modules that are dependent on the configuration of other modules. chan_sip now has a public method that allows for a custom SIP INFO request to be sent mid-dialog. Digium phones use this in order to display progress bars when files are played. Messaging support has been expanded a bit. The main visible difference is the addition of an AMI action MessageSend. Finally, a ParkingLots manager action has been added in order to get a list of parking lots. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-01Improve SDP offer/answer RFC complianceKevin P. Fleming
Asterisk should not accept SDP offers that contain unknown RTP profiles (for audio/video streams) or unknown top-level media types. When it does, it answers with an SDP that does not match the offer properly, and this will nearly always result in a broken call. This patch causes such offers to be rejected. Review: https://reviewboard.asterisk.org/r/1811/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-01Improve SDP parsing warning messagesKevin P. Fleming
* 'Unsupported media type' is only reported when that is in fact the case, not when a supported media type is included in an 'm' line that has an invalid format. * All warning messages related to parsing 'm' lines now include the 'm' line contents. * (minor bugfix) newline added to port-number-zero warning messages. * Warning messages improved to use RFC-specified terminology for various items. * Warnings for offers that include more than one port for a single media type now include the media type. Review: https://reviewboard.asterisk.org/r/1811/ ........ Merged revisions 368218 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 368267 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-01Help mitigate potential reinvite glare scenarios.Mark Michelson
When Asterisk servers are set up back-to-back, and direct media is to be used betweeen endpoints, it is fairly common for the two Asterisk servers to send direct media reinvites to each other simultaneously. This results in 491s and ACKs being exchanged between the servers. While the media eventually gets set up properly, the problem is that there can be a noticeable delay for the streams to stabilize. This patch adds a new directmedia option called "outgoing". With this set, an immediate direct media reinvite will only be sent if the call direction is outgoing. For incoming dialogs, an immediate direct media reinvite will not be sent, but further "reactionary" direct media reinvites may be sent. Review: https://reviewboard.asterisk.org/r/1954 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-31Coverity Report: Fix issues for error type REVERSE_INULL (core modules)Richard Mudgett
* Fixes findings: 0-2,5,7-15,24-26,28-31 (issue ASTERISK-19648) Reported by: Matt Jordan ........ Merged revisions 368039 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 368042 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-30Fix deadlock when executing CLI "pri show channels" and "ss7 show channels" ↵Richard Mudgett
commands. * Fix sig_pri_lock_owner() to avoid deadlock properly. * Code pri_grab() better. * Fix sig_ss7_lock_owner() to avoid deadlock properly. * Code ss7_grab() better. (closes issue ASTERISK-19854) Reported by: Jaxon Patches: jira_asterisk_19854_v1.8.6.patch (license #5621) patch uploaded by rmudgett (Modified to do the same thing to sig_ss7) Tested by: Jaxon ........ Merged revisions 367976 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 367978 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@367979 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-29AST-2012-008: Fix remote crash vulnerability in chan_skinnyMatthew Jordan
When a skinny session is unregistered, the corresponding device pointer is set to NULL in the channel private data. If the client was not in the on-hook state at the time the connection was closed, the device pointer can later be dereferened if a message or channel event attempts to use a line's pointer to said device. The patches prevent this from occurring by checking the line's pointer in message handlers and channel callbacks that can fire after an unregistration attempt. (closes issue ASTERISK-19905) Reported by: Christoph Hebeisen Tested by: mjordan, Damien Wedhorn Patches: AST-2012-008-1.8.diff uploaded by mjordan (license 6283) AST-2012-008-10.diff uploaded by mjordan (licesen 6283) ........ Merged revisions 367844 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@367845 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-25AST-2012-007: Fix IAX receiving HOLD without suggested MOH class crash.Richard Mudgett
* Made schedule_delivery() set the received frame f->data.ptr to NULL if the datalen is zero. * Fix queue_signalling() memcpy() size error. * Made queue_signalling() not use C++ keyword variable names. (closes issue ASTERISK-19597) Reported by: mgrobecker Patches: jira_asterisk_19597_v1.8.patch (license #5621) patch uploaded by rmudgett Tested by: rmudgett, Michael L. Young ........ Merged revisions 367781 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 367782 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@367783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-25Fix pvt_sip for inbound call to use peer's allowtransfer settingMichael L. Young
The pvt_sip allowtransfer was not being set to that of the peer's setting. Therefore, the global allowtransfer setting was being used instead which would lead to calls not being transfered if the global setting was set to 'no' despite the setting on the peer being 'yes' and vice versa, calls would be allowed to transfer even if the peer's setting was 'no' but the global setting was 'yes'. (Closes issue ASTERISK-19856) Reported by: Jacek Tested by: Michael L. Young, Jacek Patches: issue-asterisk-19856-branch10-v3.diff uploaded by Michael L. Young (license 5026) Review: https://reviewboard.asterisk.org/r/1923/ ........ Merged revisions 367730 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 367731 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@367732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-24chan_sip: fix problem directmediapermit/deny uses the wrong addressJonathan Rose
When remotely bridging calls with directmedia, Asterisk would check the address of the peers/users holding directmedia ACLs (set via directmediapermit/directmediadeny) instead of the bridged peer. This is similar to r366547, but trunk specific and involves changes to the rtpengine instead of just chan_sip. (closes issue AST-876) review: https://reviewboard.asterisk.org/r/1924/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@367640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-24Made use IAX frame cache only for cacheable frame types.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@367520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-23Re-add LastMsgsSent value for SIP peersMatthew Jordan
Previously, MWI logic utilized a counter called 'lastmsgssent' to know whether or not MWI NOTIFY requests had been sent to a specific peer. When MWI notifications were changed to use the internal event framework, this value was no longer needed for its original purpose. Hence, it was no longer updated with the new/old message counts for a peer. The value was previously removed for Asterisk 10; however, since it was still present in Asterisk 1.8 and still useful for reporting purposes, it was decided to re-add the value. This patch re-adds the 'LastMsgsSent' field in the response to an AMI/CLI 'sip show peer [peer]' command, and makes it so that the value of lastmsgssent is updated appropriately. The value should now display the new/old message counts for a particular peer. (closes issue ASTERISK-17866) Reported by: Steve Davies patches by: ast-17866-rb1272.patch (License #5041 by irroot) Modified slightly for this commit Review: https://reviewboard.asterisk.org/r/1939 ........ Merged revisions 367362 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 367369 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@367376 65c4cc65-6c06-0410-ace0-fbb531ad65f3