summaryrefslogtreecommitdiff
path: root/channels
AgeCommit message (Collapse)Author
2012-03-15Remove some dead code found in _sip_show_peers()Paul Belanger
Review: https://reviewboard.asterisk.org/r/1696/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@359607 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-15chan_iax2: Fix use of uninitialized sockaddr_in in try_transfer().Russell Bryant
Initialize a struct sockaddr_in in try_transfer() so that the code isn't (potentially) trying to read from it while uninitialized. ........ Merged revisions 359558 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 359559 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@359560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-15chan_gtalk: Fix potential use of uninitialized variable.Russell Bryant
Avoid potential use of idroster in gtalk_alloc() before it has been initialized. ........ Merged revisions 359508 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 359509 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@359510 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-14Fix deadlock potential with some ast_indicate/ast_indicate_data calls.Richard Mudgett
Calling ast_indicate()/ast_indicate_data() with the channel lock held can result in a deadlock with a local channel because of how local channels need to avoid deadlock. ........ Merged revisions 359451 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 359453 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@359455 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-14Fix invalid reads/writes due to incorrect sizeof().Russell Bryant
These few places in the code used sizeof() on h_addr in struct hostent. This is sizeof(char *). The correct way to get the size of this address is to use h_length. This error would result in reads/writes of 8 bytes instead of 4 on 64-bit machines. ........ Merged revisions 359211 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 359212 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@359213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-13Remove chan_usbradio and app_rpt.Russell Bryant
These modules are being maintained outside of the tree and have been for a long time now, so it doesn't make sense to keep them here. Review: https://reviewboard.asterisk.org/r/1764/ ........ Merged revisions 359050 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 359051 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@359052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-13Add ability for chan_dahdi ISDN to block connected line updates per span.Richard Mudgett
Added new chan_dahdi.conf colp_send option parameter to block connected line updates per span. (closes issue ASTERISK-17025) Reported by: Michael Smith git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358997 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-13Make hints for invalid SIP devices return Unavail, not idleTerry Wilson
This patch drastically simplifies the device state aggegation code. The old method was not only overly complex, but also made it impossible to return AST_DEVICE_INVALID from the aggregation code. The unit test update is as a result of fixing that bug. The SIP change stems from a bug introduced by removing a DNS lookup for hostname-based SIP channels. (closes issue ASTERISK-16702) Review: https://reviewboard.asterisk.org/r/1808/ ........ Merged revisions 358943 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 358944 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-13Finalize ast_channel opaquificationTerry Wilson
Review: https://reviewboard.asterisk.org/r/1786/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358907 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-12Massive changes in chan_unistim channel driver. Include many fixes in ↵Igor Goncharovskiy
channel driver operation and add additional functionality: * Added ability to use multiple lines on phone, so for one device in configuration multiple lines can be defined, it allows to have multiple calls on one phone, callwaiting and switching between calls. * Added ability for translation on-screen menu to multiple languages. Tested on Russian languages. Supported encodings: ISO 8859-1, ISO 8859-2, ISO 8859-4, ISO 8859-5, ISO 2022-JP. Language controlled by 'language' and on-screen menu of phone * Other described in CHANGES file Testing done by issue tracker users: ibercom, scsiborg, idarwin, TeknoJuce, c0rnoTa. Tested on production system by Jonn Taylor (jonnt) using phone models: Nortel i2004, 1120E and 1140E. (closes issue ASTERISK-16890) Review: https://reviewboard.asterisk.org/r/1243/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358766 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-08Eliminate a bunch of shadow warnings.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-08Make transfer not ignore port information with SIP.Jonathan Rose
Attempting to transfer with SIP to an address like 1XXXXX@ip.ad.re.ss:5061 would fail because port would be cut from the host string and ignored. This simply keeps chan_sip from cutting off the port number during these kinds of transfers. (closes issue ASTERISK-19321) Reported by: Federico Alves Review: https://reviewboard.asterisk.org/r/1790/diff/#index_header ........ Merged revisions 358643 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 358644 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358645 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-07Change directly setting _softhangup in sig_ss7.c to use ast_softhangup_nolock().Richard Mudgett
Update to: (issue ASTERISK-19372) ........ Merged revisions 358530 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 358531 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358532 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-06Fix ring cadance setup for outgoing calls on FXS ports.Richard Mudgett
* Fix referencing the wrong variable in chan_dahdi.c:my_set_cadence(). Thanks to Sean Bright for compiling with -Wshadow and finding this bug. ........ Merged revisions 358377 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 358378 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-06Add dialtone_detect option for analog incoming calls.Richard Mudgett
For analog lines, enables Asterisk to use dialtone detection per channel if an incoming call was hung up before it was answered. If dialtone is detected, the call is hung up. no: Disabled. (Default) yes: Look for dialtone for 10000 ms after answer. <number>: Look for dialtone for the specified number of ms after answer. always: Look for dialtone for the entire call. Dialtone may return if the far end hangs up first. dialtone_detect=yes dialtone_detect=5000 dialtone_detect=always (closes issue ASTERISK-19316) Reported by: Jeremy Pepper Patch by: Jeremy Pepper Tested by: rmudgett,Jeremy Pepper Review: https://reviewboard.asterisk.org/r/1737/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-05Drop SS7 call if not connected yet when INCOMPLETE/BUSY/CONGESTION.Richard Mudgett
SS7 is a trunk protocol and should clear a failed call as soon as possible. * Made SS7 hangup a call immediately if it has not connected yet for INCOMPLETE/BUSY/CONGESTION causes. Otherwise, play an appropriate inband tone. (closes issue ASTERISK-19372) Reported by: Igor Nikolaev ........ Merged revisions 358278 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 358284 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-05Setup DSP when SS7 call is connected or early media is available.Richard Mudgett
Outgoing SS7 calls fail to detect incoming DTMF so any bridged channel that requires out-of-band DTMF will not work. * Added sig_ss7_open_media() calls at appropriate places in sig_ss7.c. The new call converts conditionaled out unconverted code and shows that the code really did something useful. * Improved some chan_dahdi DTMF debug messages to help track DTMF handling. (closes issue ASTERISK-19312) Reported by: Igor Nikolaev ........ Merged revisions 358260 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 358261 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-05Defer sending the connected line reinvite if a reinvite is already in progress.Joshua Colp
(issue ASTERISK-19355) Reported by: tomaso (closes issue AST-825) ........ Merged revisions 358162 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 358163 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-05Ensure Asterisk acknowledges ACKs to 4xx on Replaces errorsKinsey Moore
Asterisk was not setting pendinginvite in the upper half of handle_request_invite such that the 4xx was retransmitted repeatedly even though an ack was received for every retransmission. (closes issue ASTERISK-19303) Reported by: Jon Tsiros Patches: fix-19303.patch uploaded by Jeremiah Gowdy (license 6358) ........ Merged revisions 358115 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 358116 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358117 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-02Fix unused-but-set-variable warningsTerry Wilson
All of these were pretty obviously unused. Some were unused because the code that used them was #if 0'd. In those cases, I just commented out the unused-but-set variables. ........ Merged revisions 358029 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 358033 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358038 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-02Make chan_usbradio compile under dev modeTerry Wilson
x=++x and x=x=1? Really? ........ Merged revisions 357986 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 357987 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357999 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-02Remove ISDN hold restriction for non-bridged calls.Richard Mudgett
The check if an ISDN call is bridged before it could be placed on hold is not necessary and is overly restrictive. The check was originally done to prevent problems with call transfers in case a user tried to transfer a call connected to an application to another call connected to an application. The ISDN transfer code has not required this restriction for quite some time because ECT could transfer any two active calls to each other. * Remove ISDN hold restriction for calls connected to applications. * Made ast_waitfordigit_full() ignore AST_CONTROL_HOLD and AST_CONTROL_UNHOLD instead of generating a warning message. (closes issue ASTERISK-19388) Reported by: Birger Harzenetter Tested by: rmudgett ........ Merged revisions 357894 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 357895 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-02Fix compile error from latest channel opaquification change.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357814 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-02The default value for mohinterpret is the empty string, so when resetting toSean Bright
default values don't explicitly set the value to "default." ........ Merged revisions 357811 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 357812 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-02Fix compilation error due to typo during channel opaquification.Mark Michelson
s/ast_channel_fd_set/ast_channel_internal_fd_set/g git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357774 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-01Opaquify ast_channel typedefs, fd arrays, and softhangup flagTerry Wilson
Review: https://reviewboard.asterisk.org/r/1784/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-29Opaquify ast_channel structs and listsTerry Wilson
Review: https://reviewboard.asterisk.org/r/1773/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357542 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-28Use more reasonable cause code when rejecting incoming call waiting calls.Richard Mudgett
(closes issue ASTERISK-19397) Reported by: Birger Harzenetter Patches: nochannel-cause.patch (license #5870) patch uploaded by Birger Harzenetter ........ Merged revisions 357407 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 357408 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-28Add a security event for the case where fake authentication challenge is sent.Mark Michelson
........ Merged revisions 357318 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-28Convert struct ast_tcptls_session_instance to finally use the ao2 object lock.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-28Changes transport option in sip.conf so that using multiple instances ↵Jonathan Rose
doesn't stack. Prior to this patch, Using "transport=" multiple times would cause them to add to one another like allow/deny. This patch changes that behavior to simply use the transport option specified last. Also, if no transport option is applied now, the default will automatically be UDP. (closes ASTERISK-19352) Reported by: jamicque Patches: asterisk-19352-transport-warning-message-v1.patch uploaded by Michael L. Young (license 5026) issueA19352_no_transport_is_udp.patch uploaded by Walter Doekes (license 5674) Review: https://reviewboard.asterisk.org/r/1745/diff/#index_header ........ Merged revisions 357266 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 357271 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27Address comments from Mark MichelsonSean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357014 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27Convert netsock.h over to use ast_sockaddrs rather than sockaddr_in and updateSean Bright
chan_iax2 to pass in the correct types. chan_iax2 is the only consumer for the various ast_netsock_* functions in trunk at this point, so this feels like a safe change to make. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357005 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27Adds an option to sip.conf that prevents diversion headers from being added.Jonathan Rose
send_diversion=no will prevent Diversion headers from being added to SIP requests. This doesn't prevent Diversion from being added with dialplan such as with SIPAddHeader. (closes issue ASTERISK-16862) Reported by: rsw686 Review: https://reviewboard.asterisk.org/r/1769/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27There isn't much point in saving off and restoring a value that we never use ↵Sean Bright
again. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356966 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27Prefer ast_set_qos() over ast_netsock_set_qos()Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356882 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-24Fix worker thread resource leak in SIP TCP/TLS.Richard Mudgett
The SIP TCP/TLS worker threads were created joinable but noone could join them if they died on their own. * Fix the SIP TCP/TLS worker threads to not be created joinable. * _sip_tcp_helper_thread() only needs one parameter since the pvt parameter is only passed in as NULL and never used. (closes issue ASTERISK-19203) Reported by: Steve Davies Review: https://reviewboard.asterisk.org/r/1714/ ........ Merged revisions 356677 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 356690 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-24Allow SRTP policies to be reloadedMatthew Jordan
Currently, when using res_srtp, once the SRTP policy has been added to the current session the policy is locked into place. Any attempt to replace an existing policy, which would be needed if the remote endpoint negotiated a new cryptographic key, is instead rejected in res_srtp. This happens in particular in transfer scenarios, where the endpoint that Asterisk is communicating with changes but uses the same RTP session. This patch modifies res_srtp to allow remote and local policies to be reloaded in the underlying SRTP library. From the perspective of users of the SRTP API, the only change is that the adding of remote and local policies are now added in a single method call, whereas they previously were added separately. This was changed to account for the differences in handling remote and local policies in libsrtp. Review: https://reviewboard.asterisk.org/r/1741/ (closes issue ASTERISK-19253) Reported by: Thomas Arimont Tested by: Thomas Arimont Patches: srtp_renew_keys_2012_02_22.diff uploaded by Matt Jordan (license 6283) (with some small modifications for this check-in) ........ Merged revisions 356604 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 356605 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-24Opaquification for ast_format structs in struct ast_channelTerry Wilson
Review: https://reviewboard.asterisk.org/r/1770/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-23Fix blind transfer parking issues if the dialed extension is not recognized ↵Richard Mudgett
as a parking extension. Custom parking extensions may not be coded such that the first and only extension priority is the Park application. These custom parking extensions will not be recognized as parking extensions. When a call is blind transferred to an extension that is not recognized as a parking extension, the normal blind transfer code causes the transferred channel to start executing dialplan. Calls that get parked in this manner do not know the original channel name that parked the call so the original parker could never be called back if the parked call is not retrieved before the timeout time. The parking space is also announced to the call being parked as a side effect of not knowing the original parking channel. * Fix handling of BLINDTRANSFER channel variable for call parking. * Fixed SIP blind transfer using the wrong dialplan context variable to check for the parking extension. (closes issue ASTERISK-19322) Reported by: aragon Tested by: rmudgett, jparker Review: https://reviewboard.asterisk.org/r/1730/ JIRA AST-766 ........ Merged revisions 356521 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 356522 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-23Fix ACK routing for non-2xx responses.Mark Michelson
When we send an ACK for a 2xx response to an INVITE, we are supposed to use the learned route set. However, when we receive a non-2xx final response to an INVITE, we are supposed to send the ACK to the same place we initially sent the INVITE. We had been doing this up until the changes went in that would build a route set from provisional responses. That introduced a regression where we would use the learned route set under all circumstances. With this change, we now will set the destination of our ACK based on the invitestate. If it is INV_COMPLETED then that means that we have received a non-2xx final response (INV_TERMINATED indicates a 2xx response was received). If it is INV_CANCELLED, then that means the call is being canceled, which means that we should be ACKing a 487 response. The other change introduced here is setting the invitestate to INV_CONFIRMED when we send an ACK *after* the reqprep instead of before. This way, we can tell in reqprep more easily what the invitestate is prior to sending the ACK. (closes issue ASTERISK-19389) reported by Karsten Wemheuer patches: ASTERISK-19389v2.patch uploaded by Mark Michelson (license #5049) (with some slight modifications prior to commit) ........ Merged revisions 356475 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 356476 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-22Correct some set-but-unused variable warnings in the mISDN library.Kevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356292 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-22Fix chan_misdn after the lastest opaquification changesTerry Wilson
It now compiles, but there are some unrelated warnings for set but unused variables. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-22Merged revisions 356215 via svnmerge from Matthew Jordan
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r356215 | mjordan | 2012-02-22 08:53:53 -0600 (Wed, 22 Feb 2012) | 32 lines Merged revisions 356214 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r356214 | mjordan | 2012-02-22 08:50:20 -0600 (Wed, 22 Feb 2012) | 27 lines Fix potential buffer overrun and memory leak when executing "sip show peers" The "sip show peers" command uses a fix sized array to sort the current peers in the peers ao2_container. The size of the array is based on the current number of peers in the container. However, once the size of the array is determined, the number of peers in the container can change, as the peers container is not locked. This could cause a buffer overrun when populating the array, if peers were added to the container after the array was created. Additionally, a memory leak of the allocated array would occur if a user caused the _show_peers method to return CLI_SHOWUSAGE. We now create a snapshot of the current peers using an ao2_callback with the OBJ_MULTIPLE flag. This size of the array is set to the number of peers that the iterator will iterate over; hence, if peers are added or removed from the peers container it will not affect the execution of the "sip show peers" command. Review: https://reviewboard.asterisk.org/r/1738/ (closes issue ASTERISK-19231) (closes issue ASTERISK-19361) Reported by: Thomas Arimont, Jamuel Starkey Tested by: Thomas Arimont, Jamuel Starkey Patches: sip_show_peers_2012_02_16.diff uploaded by mjordan (license 6283) ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-21Make 'iax2 show callnumber usage' output make sense when an IP is passed in.Sean Bright
........ Merged revisions 356107 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 356108 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-20ast_channel opaquification of pointers and integral typesTerry Wilson
Review: https://reviewboard.asterisk.org/r/1753/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-20Remove spurious warning when 'qualifyfreqnotok' is set successfully.Sean Bright
(closes issue ASTERISK-17176) Reported by: John Covert Tested by: Sean Bright Patches: chan_iax2.c.qualifyfreqnotok.patch uploaded by John Covert (license 5512) ........ Merged revisions 355997 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 355998 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355999 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-20This was a LOG_NOTICE, so roll it back.Sean Bright
........ Merged revisions 355952 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 355953 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-20Change some debug messages from LOG_DEBUG to ast_debug.Sean Bright
........ Merged revisions 355949 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 355950 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-19Add some boilerplate documentation for IAXVAR and IAXPEER.Sean Bright
........ Merged revisions 355904 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 355905 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355906 65c4cc65-6c06-0410-ace0-fbb531ad65f3