summaryrefslogtreecommitdiff
path: root/channels
AgeCommit message (Collapse)Author
2012-12-10Handle Session-Expires less than local Min-SE in 200 OKKinsey Moore
Ensure that a call is immediately torn down if a Session-Expires value received in a 200 OK is less than the local Min-SE. This also prevents Asterisk from allowing calls with Session-Expires below the RFC4028-mandated minimum (90s). (closes issue ASTERISK-20653) Review: https://reviewboard.asterisk.org/r/2237/ Patch-by: Kinsey Moore ........ Merged revisions 377623 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 377624 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 377625 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-10Add firmware information to CLI devices listingIgor Goncharovskiy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-10Fix codec mismatchIgor Goncharovskiy
Fix code to send in both rx and tx open stream messages correct codecs. Found that on phase 0/1 phones wrong codecs cause to no audio in some situations. (issue ASTERISK-20183) ........ Merged revisions 377591 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 377592 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 377593 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377594 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-10Remove trailing whitespaces in number from incoming redial list. Igor Goncharovskiy
Reported by: Igor Olhovskiy ........ Merged revisions 377577 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-09Add missing support for "who hung up" to chan_motif.Joshua Colp
(closes issue ASTERISK-20671) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2208/ ........ Merged revisions 377462 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-05Fix a SIP request memory leak with TLS connections.Joshua Colp
During the TLS re-work in chan_sip some TLS specific code was moved into a separate function. This function operates on a copy of the incoming SIP request. This copy was never deinitialized causing a memory leak for each request processed. This function is now given a SIP request structure which it can use to copy the incoming request into. This reduces the amount of memory allocations done since the internal allocated components are reused between packets and also ensures the SIP request structure is deinitialized when the TLS connection is torn down. (closes issue ASTERISK-20763) Reported by: deti ........ Merged revisions 377257 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 377258 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 377259 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-03Fix an RTP instance reference count leak in chan_motif.Joshua Colp
When setting up an RTP instance the RTCP portion of the instance keeps a reference to the instance itself. In order to release this reference and stop RTCP the stop API call must be called before destroying the instance. (closes issue ASTERISK-20751) Reported by: joshoa ........ Merged revisions 377021 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-03Move functions to AFTER the block of forward declarations of functions. Olle Johansson
It was a mess. The first part of chan_sip.c is constants, declarations, structures and stuff, then forward declarations and then actual code. It's still a mess, but a bit less messy ;-) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377018 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-03Formatting changesOlle Johansson
Found a large amount of missing {} in the code before patching in another branch git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376998 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-01Tweak extension used for incoming calls received on Motif.Joshua Colp
Based on feedback from numerous individuals this patch tweaks incoming calls to first look for an extension with the name of the endpoint. If no such extension exists the call will silently fall back to the "s" extension as it previously did. ........ Merged revisions 376983 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376984 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-30chan_misdn: Fix sending RELEASE_COMPLETE in response to SETUP.Richard Mudgett
Fix sending a RELEASE_COMPLETE in response to a SETUP if chan_misdn does not have a B channel available to assign to the call. (closes issue ABE-2869) Reported by: Guenther Kelleter Patches: setup-reject_2.diff (license #6372) patch uploaded by Guenther Kelleter Modified ........ Merged revision 376949 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier ........ Merged revisions 376950 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 376951 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 376952 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-30Fix potential crashes during SIP attended transfers.Mark Michelson
The principal behind this patch is simple. During a transfer, we manipulate channels that are owned by a separate thread than the one we currently are running in, so it makes sense that we need to grab a reference to the channels so that they cannot disappear out from under us. In the wild, crashes were sometimes seen when the transferring party would hang up the call before the transfer target answered the call. The most common place to see the crash occur was when attempting to send a connected line update to the transferer channel. (closes issue ASTERISK-20226) Reported by Jared Smith Patches: ASTERISK-20226.patch uploaded by Mark Michelson (License #5049) Tested by: Jared Smith ........ Merged revisions 376901 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 376916 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 376917 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376918 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-29chan_local: Fix local_pvt ref leak in local_devicestate().Richard Mudgett
Regression introduced by ASTERISK-20390 fix. (closes issue ASTERISK-20769) Reported by: rmudgett Tested by: rmudgett ........ Merged revisions 376868 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 376869 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 376870 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376871 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-29Fix compile error.Richard Mudgett
(issue ASTERISK-20724) ........ Merged revisions 376864 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 376865 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 376866 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-29Improve Code Readability And Fix Setting natdetected FlagMichael L. Young
For 1.8, 10, 11 and trunk we are are improving the code readability. For 11 and trunk, auto nat detection was added. The natdetected flag was being set to 1 when the host address in the VIA header did not specifiy a port. This patch fixes this by setting the port on the temporary sock address used to SIP_STANDARD_PORT in order for the sock address comparison to work properly. (closes issue ASTERISK-20724) Reported by: Michael L. Young Patches: asterisk-20724-set-port-v2.diff uploaded by Michael L. Young (license 5026) Review: https://reviewboard.asterisk.org/r/2206/ ........ Merged revisions 376834 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 376835 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 376836 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376837 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-29Fix chan_sip websocket payload handlingPedro Kiefer
Websocket by default doesn't return an ast_str for the payload received. When converting it to an ast_str on chan_sip the last character was being omitted, because ast_str functions expects that the given length includes the trailing 0x00. payload_len only has the actual string length without counting the trailing zero. For most cases this passed unnoticed as most of SIP messages ends with \r\n. (closes issue ASTERISK-20745) Reported by: Iñaki Baz Castillo Review: https://reviewboard.asterisk.org/r/2219/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-21Add red-black tree container type to astobj2.Richard Mudgett
* Add red-black tree container type. * Add CLI command "astobj2 container dump <name>" * Added ao2_container_dump() so the container could be dumped by other modules for debugging purposes. * Changed ao2_container_stats() so it can be used by other modules like ao2_container_check() for debugging purposes. * Updated the unit tests to check red-black tree containers. (closes issue ASTERISK-19970) Reported by: rmudgett Tested by: rmudgett Review: https://reviewboard.asterisk.org/r/2110/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376575 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-20Add "Require: timer" to 200 OK responses when appropriate.Mark Michelson
The method by which the Require header is added to 200 responses is inspired by the method that Olle Johansson uses in his darjeeling-prack branch. (closes issue ASTERISK-20570) Reported by Matt Jordan, at the behest of Olle Johansson Review: https://reviewboard.asterisk.org/r/2172 ........ Merged revisions 376521 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 376522 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 376550 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-20Reduce CLI spam of "Extension Changed" device state messages.Alec L Davis
Asterisk 11 follows RFC3265 that states that after every subscribe or resubscribe a notify should be sent. Thus the console if filled continuously with the following after every subscribe; == Extension Changed 8512[phones] new state IDLE for Notify User cisco1 In Asterisk 1.8 only changes would be sent. Thus only when a device state changed was anything emitted to the console. fix: Only print to console when device state isn't forced. (closes issue ASTERISK-20706) Reported by: alecdavis Tested by: alecdavis alecdavis (license 585) ........ Merged revisions 376540 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-19Fix most leftover non-opaque ast_str uses.Walter Doekes
Instead of calling str->str, one should use ast_str_buffer(str). Same goes for str->used as ast_str_strlen(str) and str->len as ast_str_size(str). Review: https://reviewboard.asterisk.org/r/2198 ........ Merged revisions 376469 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 376470 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 376471 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376472 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-13chan_sip: Add SubscribeContext field to SIPshowpeer AMI responseJonathan Rose
The new field is will show up within the response if the requested peer has a subscribe context set. (closes issue ASTERISK-20626) Reported by: Jaco Kroon Patches: asterisk-sip-ami-SubscrContext.patch uploaded by jkroon (license 5671) -with modifications by jrose to conform to style guidelines Review: https://reviewboard.asterisk.org/r/2195/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-11Remove a fixed size limitation for producing SDP and change how ICE support ↵Joshua Colp
is disabled by default. With ICE support enabled in chan_sip and a large number of interfaces on the system it was possible for the produced SDP to be truncated due to some fixed size buffers. These buffers have now been changed so they will dynamically grow as needed. ICE support is now also enabled by default in res_rtp_asterisk to provide a smoother experience for chan_motif users where it is required. To maintain the previous behavior in chan_sip it is no longer enabled by default there. (closes issue ASTERISK-20643) Reported by: coopvr ........ Merged revisions 376130 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-08chan_dahdi/SS7: Made reject incoming call for an in-alarm or blocked channel.Richard Mudgett
If a SS7 call comes in requesting a CIC that is in-alarm, the call is accepted and connects if the extension exists in the dialplan. The call does not have any audio. * Made release the call immediately with circuit congestion cause. (closes issue ASTERISK-20204) Reported by: Tuan Le Patches: jira_asterisk_20204_v1.8.patch (license #5621) patch uploaded by rmudgett ........ Merged revisions 376058 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 376059 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 376060 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376061 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-07Multiple revisions 375993-375994Mark Michelson
........ r375993 | mmichelson | 2012-11-07 11:01:13 -0600 (Wed, 07 Nov 2012) | 30 lines Fix misuses of timeouts throughout the code. Prior to this change, a common method for determining if a timeout was reached was to call a function such as ast_waitfor_n() and inspect the out parameter that told how many milliseconds were left, then use that as the input to ast_waitfor_n() on the next go-around. The problem with this is that in some cases, submillisecond timeouts can occur, resulting in the out parameter not decreasing any. When this happens thousands of times, the result is that the timeout takes much longer than intended to be reached. As an example, I had a situation where a 3 second timeout took multiple days to finally end since most wakeups from ast_waitfor_n() were under a millisecond. This patch seeks to fix this pattern throughout the code. Now we log the time when an operation began and find the difference in wall clock time between now and when the event started. This means that sub-millisecond timeouts now cannot play havoc when trying to determine if something has timed out. Part of this fix also includes changing the function ast_waitfor() so that it is possible for it to return less than zero when a negative timeout is given to it. This makes it actually possible to detect errors in ast_waitfor() when there is no timeout. (closes issue ASTERISK-20414) reported by David M. Lee Review: https://reviewboard.asterisk.org/r/2135/ ........ r375994 | mmichelson | 2012-11-07 11:08:44 -0600 (Wed, 07 Nov 2012) | 3 lines Remove some debugging that accidentally made it in the last commit. ........ Merged revisions 375993-375994 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 375995 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 376014 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376015 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-06Fix a bug where our Motif ICE candidates were not quite proper, and make us ↵Joshua Colp
more forgiving. An issue was reported on the mailing list where calling would result in an "Incomplete ICE-UDP candidate received on session" error message. This is the result of the ICE-UDP candidate code not placing a "network" attribute within the candidates. This is now done. To increase compatibility though I have removed the requirement for the "network" attribute to exist within ICE-UDP candidates that are received since we don't actually require the value. Reported on the mailing list by Jean-Denis Girard. ........ Merged revisions 375925 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375926 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-05Refactor ast_timer_ack to return an error and handle the error in timer usersMatthew Jordan
Currently, if an acknowledgement of a timer fails Asterisk will not realize that a serious error occurred and will continue attempting to use the timer's file descriptor. This can lead to situations where errors stream to the CLI/log file. This consumes significant resources, masks the actual problem that occurred (whatever caused the timer to fail in the first place), and can leave channels in odd states. This patch propagates the errors in the timing resource modules up through the timer core, and makes users of these timers handle acknowledgement failures. It also adds some defensive coding around the use of timers to prevent using bad file descriptors in off nominal code paths. Note that the patch created by the issue reporter was modified slightly for this commit and backported to 1.8, as it was originally written for Asterisk 10. Review: https://reviewboard.asterisk.org/r/2178/ (issue ASTERISK-20032) Reported by: Jeremiah Gowdy patches: jgowdy-timerfd-6-22-2012.diff uploaded by Jeremiah Gowdy (license 6358) ........ Merged revisions 375893 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 375894 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 375895 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-02Fix for chan_skinny leaving RTP ports openDamien Wedhorn
Skinny wasn't closing RTP sockets. This patch includes ast_rtp_instance_stop before ast_rtp_instance_destroy which fixes the problem. Also add destroy for VRTP (which I believe is unused, but exists). Review: https://reviewboard.asterisk.org/r/2176/ ........ Merged revisions 375660 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-02Things don't need to be that const.Richard Mudgett
........ Merged revisions 375658 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 375659 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 375661 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375662 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-02Multiple revisions 375519-375524Richard Mudgett
........ r375519 | rmudgett | 2012-10-30 16:06:15 -0500 (Tue, 30 Oct 2012) | 11 lines chan_misdn: Timer primitives must be handled first. The frm->addr is a different "address space" than the stack/instance address of other Lx primitives. The test for B channel instance address could fail. Patches: patch01_timers.diff (license #6372) patch uploaded by Guenther Kelleter JIRA ABE-2888 ........ r375520 | rmudgett | 2012-10-30 16:14:58 -0500 (Tue, 30 Oct 2012) | 10 lines chan_misdn: Free memory in error paths and other memory leaks. The one line commented with BUG is not easily fixable because there is no de-init function one can call. Patches: patch02_memory.diff (license #6372) patch uploaded by Guenther Kelleter JIRA ABE-2888 ........ r375521 | rmudgett | 2012-10-30 16:38:41 -0500 (Tue, 30 Oct 2012) | 14 lines chan_misdn: ISDN NT L2 de-establish/establish * An NT-PTMP cannot de/establish L2 since it doesn't know the TEIs. * On NT-PTP L2 is started when L1 is finally active in handle_l1. * L2 deactivation logging cleanup. * L2 aggregate link status is unknown for NT-PTMP, show as "UNKN". * Removed unused functions and code for L2 handling. Patches: patch03_L2estab.diff (license #6372) patch uploaded by Guenther Kelleter Modified JIRA ABE-2888 ........ r375522 | rmudgett | 2012-10-30 16:56:14 -0500 (Tue, 30 Oct 2012) | 22 lines chan_misdn: Fix broken upper_id/lower_id usage. Sending PH prim via lower_id layer (3 or 1) simply does not work. For TE (3) it returns an error (len=-6) which is not evaluated by handle_l1(), so the L1 layer status ends up wrong. Instead PH must be sent via L4, only then does it reach L1 without an error message. And NT PH prims only reach L1 when they are sent to layer 2 id. --> use upper_id to send PH primitives. * Check for errors in PH_(DE)ACTIVATE | CONFIRM. * Debug messages are improved. * The lower_id is now not used for anything, except: Why is lower_id layer deleted when it wasn't created? I removed this code since it looks very wrong. Patches: patch04_l1activation.diff (license #6372) patch uploaded by Guenther Kelleter JIRA ABE-2888 ........ r375523 | rmudgett | 2012-10-30 17:29:15 -0500 (Tue, 30 Oct 2012) | 31 lines chan_misdn: Fix loss of B channels if L1 is down. If you make 2 calls out an NT PTMP port which is not connected to any phone, the B channel associated with that call becomes unusable until Asterisk is restarted. The problem is the EVENT_SETUP is queued when L1 is not up in misdn_lib_send_event(). If L1 cannot be activated the event won't be dequeued. It gets even worse when the call is hung up. The queued EVENT_SETUP will be overwritten by an EVENT_DISCONNECT. The reserved B channel then will never be freed. If later someone connects a phone to the port, L1 will eventually activate and the queued EVENT_DISCONNECT is sent down the stack. However, it is ignored because it is the wrong call state. The real fix would be that activation and queueing for a new SETUP is done by the NT stack. But since it doesn't, the workaround must be removed because it doesn't always work. Fix: The event is no longer queued but immediately sent to the stack. If L1 cannot be activated, the L3 state machine that was started by the EVENT_SETUP will do its work, i.e. a timeout will release the B channel properly. The SETUP possibly cannot be sent the first time but is resent by T303 in case L1 could be activated. Patches: patch05_bchan-loss.diff (license #6372) patch uploaded by Guenther Kelleter Modified JIRA ABE-2888 ........ r375524 | rmudgett | 2012-10-30 18:26:05 -0500 (Tue, 30 Oct 2012) | 13 lines chan_misdn: Remove some calls to exit(). Try proper cleanup when something goes wrong in misdn_lib_init(). Especially do not call exit()! * Fix memory leak because stack_destroy() does not free the stack struct. Patches: patch06_cleanup-init.diff (license #6372) patch uploaded by Guenther Kelleter Modified JIRA ABE-2888 ........ Merged revisions 375519-375524 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier ........ Merged revisions 375625 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 375626 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 375627 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-02Fix Wrong Result In Debug Message For SDP Origin ProcessingMichael L. Young
While looking at some debug logs, I noticed that it was being reported that the SDP origin line was unsupported or failed. Upon looking into this on my local machine, I found that I too was getting this debug message yet everything seemed to be getting processed properly. What was discovered is, that, the variable to determine what is displayed in the debug message for the SDP line that was processed, was not being set for the origin line when the result was successful. This patch fixes this and was tested on local machine. ........ Merged revisions 375594 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 375601 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 375613 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375614 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-01chan_sip: Fix a bug causing SIP reloads to remove all entries from the registryJonathan Rose
A regression was introduced in chan_sip by changes to sip reload introduced by r349097. That patch moved peer purging from the beginning of the reload to after the general configuration was finished. This patch fixes that by undoing the repositioning of the original peer purging code and using a similar function after performing general configuration that purges only autocreated peers that were created when persist mode isn't enabled. (closes issue ASTERISK-20611) Reported by: Alisher Review: https://reviewboard.asterisk.org/r/2171/ ........ Merged revisions 375575 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-29Prevent resetting of NATted realtime peer address on reload.Mark Michelson
If a "sip reload" is issued for a SIP peer, then his IP address will be cleared, thus resulting in forgetting the public IP address. Asterisk will then attempt to route SIP traffic to the private IP address. The fix here is to make "sip reload" ignore realtime peers when "host = dynamic" is spotted. Realtime peers can now only have their IP address reset if they have gone from being not dynamic to being dynamic. (closes issue ASTERISK-18203) reported by daren ferreira (closes issue ASTERISK-20572) reported by JoshE Patches: fix_nat_realtime.diff uploaded by JoshE (license #6075) ........ Merged revisions 375415 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 375417 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 375437 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375443 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-29Make evaluation of channel variables consistently case-sensitive.Mark Michelson
Due to inconsistencies in how variable names were evaluated, the decision was made to make all evaluations case-sensitive. See the UPGRADE.txt file or https://wiki.asterisk.org/wiki/display/AST/Case+Sensitivity for more details. (closes issue ASTERISK-20163) reported by Matt Jordan Review: https://reviewboard.asterisk.org/r/2160 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-29chan_dahdi: Fix segfault dereferencing a NULL tech_pvt.Richard Mudgett
The tech support customer was using the AMI Redirect action shortly after a call was placed. While the channel tried to do an ast_read(), the masquerade resulting from the channel redirect took place. The masquerade in the middle of the ast_read() resulted in the segfault. (closes issue AST-1025) Reported by: Trey Blancher Patches: jira_ast_1025_v1.8_v2.patch (license #5621) patch uploaded by rmudgett ........ Merged revisions 375361 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 375362 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 375363 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-17Change a few warnings to debug and the inverse.Walter Doekes
Remove the "RTP Read too short" warning for RTP keepalives. Remove the the warning about the application delimiter switch from pipe to comma. (You should've done this by now.) Make cdr_odbc report more when an insert fails. Make chan_sip warn less when the peer wants SRTP (and we don't) or sends a zero port to disable a media type. Review: https://reviewboard.asterisk.org/r/2167 (closes issue ASTERISK-20538) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-16Fixes to the fd-oriented SIP TCP reads.Walter Doekes
Don't crash on large user input. Allow SIP headers without space. Optimize code a bit. Review: https://reviewboard.asterisk.org/r/2162 ........ Merged revisions 375111 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 375112 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 375113 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375114 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-16Don't do SIP contact/route DNS if we're not using the result.Walter Doekes
In many cases (for peers behind NAT or for TCP sockets) we do not need to look up any hostname in the Contact (or Route) when sending an in-dialog request. This should reduce netsock2.c: getaddrinfo errors in certain scenarios. Review: https://reviewboard.asterisk.org/r/2156 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-16Update sip_request_call SIP dial string documentation.Walter Doekes
This was missed when merging review r1859. ........ Merged revisions 375074 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 375078 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 375079 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375080 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-16Remove a log message that was left in accidentally from call-id logging ↵Joshua Colp
development. ........ Merged revisions 375051 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-15Fix some potential misuses of ast_str in the code.Mark Michelson
Passing an ast_str pointer by value that then calls ast_str_set(), ast_str_set_va(), ast_str_append(), or ast_str_append_va() can result in the pointer originally passed by value being invalidated if the ast_str had to be reallocated. This fixes places in the code that do this. Only the example in ccss.c could result in pointer invalidation though since the other cases use a stack-allocated ast_str and cannot be reallocated. I've also updated the doxygen in strings.h to include notes about potential misuse of the functions mentioned previously. Review: https://reviewboard.asterisk.org/r/2161 ........ Merged revisions 375025 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 375026 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 375027 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-15Fix underscreen buttons warnings apeared while transfer processIgor Goncharovskiy
........ Merged revisions 375016 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-14Doxygen Updates - Title updateAndrew Latham
Update and extend the configuration_file group and enable linking. Update title that was left behind many years ago. (issue ASTERISK-20259) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-12Do not use a FILE handle when doing SIP TCP reads.Mark Michelson
This is used to solve an issue where a poll on a file descriptor does not necessarily correspond to the readiness of a FILE handle to be read. This change makes it so that for TCP connections, we do a recv() on the file descriptor instead. Because TCP does not guarantee that an entire message or even just one single message will arrive during a read, a loop has been introduced to ensure that we only attempt to handle a single message at a time. The tcptls_session_instance structure has also had an overflow buffer added to it so that if more than one TCP message arrives in one go, there is a place to throw the excess. Huge thanks goes out to Walter Doekes for doing extensive review on this change and finding edge cases where code could fail. (closes issue ASTERISK-20212) reported by Phil Ciccone Review: https://reviewboard.asterisk.org/r/2123 ........ Merged revisions 374905 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 374906 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 374914 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374924 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-11Fix a bug where audio on Google Voice would not work due to ignoring candidates.Joshua Colp
Instead of ignoring parts of the message that are not known just ignore the ones we know may be present and that would cause a problem. ........ Merged revisions 374877 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374878 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-11Fix an issue where outgoing calls would fail to establish audio due to ICE ↵Joshua Colp
negotiation failures. This change removes the requirement for ufrag and pwd in the transport stanza and also makes us the controlling agent. (closes issue ASTERISK-20554) Reported by: mmichelson ........ Merged revisions 374850 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374852 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-11Don't make chan_sip export global symbols.Mark Michelson
During testing, it was discovered that having chan_sip export global symbols was problematic. The biggest problem was that load order was affected. Trying to use realtime could be problematic since in all likelihood the necessary realtime driver(s) would not be loaded before chan_sip. In addition, it was found that it was impossible to use the Digium Phone Module for Asterisk since it must be loaded before chan_sip since it must hook into chan_sip's configuration parsing. The solution is to use a virtual table in the same manner that other modules in Asterisk do, like app_voicemail. (closes issue ASTERISK-20545) Reported by: kmoore ........ Merged revisions 374842 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-11Consider the Google Talk content stanza name (jin:content) valid.Joshua Colp
........ Merged revisions 374833 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374834 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-09Improve logging for DTLS-SRTP failure situations.Joshua Colp
(closes issue ASTERISK-20487) Reported by: mjordan ........ Merged revisions 374756 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374757 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-05Merged revisions 374515-374535 fromRichard Mudgett
https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier ................ r374515 | rmudgett | 2012-10-04 17:52:36 -0500 (Thu, 04 Oct 2012) | 10 lines chan_misdn: Remove some deadcode * Made setup_bc() static. Patches: patch1_unused-code.diff (license #6372) patch uploaded by Guenther Kelleter Modified JIRA ABE-2882 ................ r374516 | rmudgett | 2012-10-04 18:01:01 -0500 (Thu, 04 Oct 2012) | 7 lines chan_misdn: Remove unused bchan states Patches: patch2_unused-states.diff (license #6372) patch uploaded by Guenther Kelleter JIRA ABE-2882 ................ r374517 | rmudgett | 2012-10-04 18:17:51 -0500 (Thu, 04 Oct 2012) | 16 lines chan_misdn: Remove unnecessary null pointer checks and checks for stack->nt * cleanup_bc() is always called with valid bc (or it would've crashed before). * Value of stack->nt is known in advance at some places. * Rename handle_event() to handle_event_te(), handle_frm() to handle_frm_te(). Patches: patch3_checks.diff (license #6372) patch uploaded by Guenther Kelleter Modified JIRA ABE-2882 ................ r374518 | rmudgett | 2012-10-04 18:21:59 -0500 (Thu, 04 Oct 2012) | 7 lines chan_misdn: Fix spelling in log messages Patches: patch4_spelling.diff (license #6372) patch uploaded by Guenther Kelleter JIRA ABE-2882 ................ r374519 | rmudgett | 2012-10-04 18:31:59 -0500 (Thu, 04 Oct 2012) | 15 lines chan_misdn: Don't cleanup a bc twice. In handle_frm_te() after calling misdn_lib_send_event(bc, EVENT_RELEASE_COMPLETE) bc is emptied, cleaned and set not in use, although misdn_lib_send_event() already did the same. This is bad. When it's not in use we are not allowed to touch it. * Moved log message in front of the resulting actions and fixed it to match the case. Patches: patch5_bccleanup.diff (license #6372) patch uploaded by Guenther Kelleter JIRA ABE-2882 ................ r374520 | rmudgett | 2012-10-04 18:43:56 -0500 (Thu, 04 Oct 2012) | 12 lines chan_misdn: Fix memory leaks, bc, chan not cleaned up etc., really bad stuff. * Fix return codes of cb_events() for EVENT_SETUP to use caller's cleanup mechanisms. * Move cl_queue_chan() call after bearer check. Patches: patch6_leaks.diff (license #6372) patch uploaded by Guenther Kelleter JIRA ABE-2882 ................ r374521 | rmudgett | 2012-10-04 18:48:38 -0500 (Thu, 04 Oct 2012) | 11 lines chan_misdn: We must initialize cause on sending a DISCONNECT. We must initialize cause on sending a DISCONNECT, so it is later correctly indicated to ast_channel in case the answer (RELEASE/RELEASE_COMPLETE) does not include one. Patches: patch7_hangupcause.diff (license #6372) patch uploaded by Guenther Kelleter JIRA ABE-2882 ................ r374522 | rmudgett | 2012-10-04 19:03:56 -0500 (Thu, 04 Oct 2012) | 7 lines chan_misdn: Remove unused code for upqueue Patches: patch8_unused-upqueue.diff (license #6372) patch uploaded by Guenther Kelleter JIRA ABE-2882 ................ r374523 | rmudgett | 2012-10-04 19:11:50 -0500 (Thu, 04 Oct 2012) | 7 lines chan_misdn: Improve debugging (port number, messages fixed, dups removed) Patches: patch9_debug.diff (license #6372) patch uploaded by Guenther Kelleter JIRA ABE-2882 ................ r374533 | rmudgett | 2012-10-05 12:17:18 -0500 (Fri, 05 Oct 2012) | 8 lines chan_misdn: Better debug: we can print_bc_info even if there's no ast leg. Patches: patch10_debug-bc-2.diff (license #6372) patch uploaded by Guenther Kelleter Modified. JIRA ABE-2882 ................ r374534 | rmudgett | 2012-10-05 12:34:10 -0500 (Fri, 05 Oct 2012) | 16 lines chan_misdn: setup_bc() is called too early for an incoming SETUP on TE. This prevents the B channel from being setup for HDLC mode when requested by the bearer capability and config option hdlc=yes. It violates ETS300102 Ch.5.2.3.2: "The user, in any case, must not connect to the channel until a CONNECT ACKNOWLEDGE message has been received." * Call setup_bc() on receipt of CONNECT_ACKNOWLEGDE for PTMP, and on first response to SETUP for PTP. Patches: abe-2881-2.diff (license #6372) patch uploaded by Guenther Kelleter Modified. JIRA ABE-2881 ................ r374535 | rmudgett | 2012-10-05 12:41:05 -0500 (Fri, 05 Oct 2012) | 2 lines chan_misdn: Remove some more deadcode. ................ ........ Merged revisions 374536 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 374537 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 374538 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-04Add support for applying direct media ACLs between differing channel ↵Joshua Colp
technologies. Review: https://reviewboard.asterisk.org/r/2122/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374414 65c4cc65-6c06-0410-ace0-fbb531ad65f3