summaryrefslogtreecommitdiff
path: root/channels
AgeCommit message (Collapse)Author
2009-03-31Improve performance of the code handling the frame queue in chan_iax2.Russell Bryant
In my tests that exercised full frame handling in chan_iax2, the version with these changes took 30% to 40% of the CPU time compared to the same test of Asterisk trunk before these modifications. While doing some profiling for <http://reviewboard.digium.com/r/205/>, one function that caught my eye was network_thread() in chan_iax2.c. After the things that I was working on there, it was the next target for analysis and optimization. I used oprofile's source annotation functionality and found that the loop traversing the frame queue in network_thread() was to blame for the excessive CPU cycle consumption. The frame_queue in chan_iax2 previously held all frames that either were pending transmission or had been transmitted and are still pending acknowledgment. In network_thread(), the previous code would go back through the main for loop after reading a single incoming frame or after being signaled because a frame had been queued up for initial transmission. In each iteration of the loop, it traverses the entire frame queue looking for frames that need to be transmitted. On a busy server, this could easily be quite a few entries. This patch is actually quite simple. The frame_queue has become only a list of frames pending acknowledgment. Frames that need to be transmitted are queued up to a dedicated transmit thread via the taskprocessor API. As a result, the code in network_thread() becomes much simpler, as its only job is to read incoming frames. In addition to the previously described changes, this patch includes some additional changes to the frame_queue. Instead of one big frame_queue, now there is a list per call number to further reduce wasted list traversals. The biggest impact of this change is in socket_process(). For additional details on testing and test results, see the review request. Review: http://reviewboard.digium.com/r/212/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-31Merged revisions 185362 via svnmerge from David Brooks
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r185362 | dbrooks | 2009-03-31 11:37:12 -0500 (Tue, 31 Mar 2009) | 35 lines Fix incorrect parsing in chan_gtalk when xmpp contains extra whitespaces To drill into the xmpp to find the capabilities between channels, chan_gtalk calls iks_child() and iks_next(). iks_child() and iks_next() are functions in the iksemel xml parsing library that traverse xml nodes. The bug here is that both iks_child() and iks_next() will return the next iks_struct node *regardless* of type. chan_gtalk expects the next node to be of type IKS_TAG, which in most cases, it is, but in this case (a call being made from the Empathy IM client), there exists iks_struct nodes which are not IKS_TAG data (they are extraneous whitespaces), and chan_gtalk doesn't handle that case, so capabilities don't match, and a call cannot be made. iks_first_tag() and iks_next_tag(), on the other hand, will not return the very next iks_struct, but will check to see if the next iks_struct is of type IKS_TAG. If it isn't, it will be skipped, and the next struct of type IKS_TAG it finds will be returned. This assures that chan_gtalk will find the iks_struct it is looking for. This fix simply changes all calls to iks_child() and iks_next() to become calls to iks_first_tag() and iks_next_tag(), which resolves the capability matching. The following is a payload listing from Empathy, which, due to the extraneous whitespace, will not be parsed correctly by iksemel: <iq from='dbrooksjab@235-22-24-10/Telepathy' to='astjab@235-22-24-10/asterisk' type='set' id='542757715704'> <session xmlns='http://www.google.com/session' initiator='dbrooksjab@235-22-24-10/Telepathy' type='initiate' id='1837267342'> <description xmlns='http://www.google.com/session/phone'> <payload-type clockrate='16000' name='speex' id='96'/> <payload-type clockrate='8000' name='PCMA' id='8'/> <payload-type clockrate='8000' name='PCMU' id='0'/> <payload-type clockrate='90000' name='MPA' id='97'/> <payload-type clockrate='16000' name='SIREN' id='98'/> <payload-type clockrate='8000' name='telephone-event' id='99'/> </description> </session> </iq> Review: http://reviewboard.digium.com/r/181/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-30Merged revisions 185121 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r185121 | rmudgett | 2009-03-30 15:40:11 -0500 (Mon, 30 Mar 2009) | 1 line Update the channel allocation method documentation. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185123 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-30Merged revisions 185120 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r185120 | rmudgett | 2009-03-30 15:38:11 -0500 (Mon, 30 Mar 2009) | 19 lines Make chan_misdn BRI TE side normally defer channel selection to the NT side. Channel allocation collisions are not handled by chan_misdn very well. This patch simply avoids the problem for BRI only. For PRI, allocation collisions are still possible but less likely since there are simply more channels available and each end could use a different allocation strategy. misdn.conf options available: te_choose_channel - Use to force the TE side to allocate channels. method - Specify the channel allocation strategy. (closes issue #13488) Reported by: Christian_Pinedo Patches: isdn_lib.patch.txt uploaded by crich Tested by: crich, siepkes, festr ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-30Merged revisions 184947 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r184947 | file | 2009-03-30 11:35:47 -0300 (Mon, 30 Mar 2009) | 14 lines Improve our handling of T38 in the initial INVITE from a device. We now answer with matching media streams to what is requested. If an INVITE is received with both a T38 and RTP media stream this means we answer with both. For any outgoing calls created as a result of this inbound one no T38 is requested in the initial INVITE. Instead if we start receiving udptl packets we trigger a reinvite on the outbound side. (closes issue #12437) Reported by: marsosa Tested by: pinga-fogo, okrief, file, afu Review: http://reviewboard.digium.com/r/208/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184948 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-30Fix build error when chan_h323 is not being built.Russell Bryant
(reported by cai1982 in #asterisk-dev) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184910 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-29Simplify chan_h323 build to not require a second run of "make".Russell Bryant
(closes issue #14715) Reported by: jthurman Patches: h323-makefile-1.6.2.0-beta1.patch uploaded by jthurman (license 614) Tested by: tzafrir, russell git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184838 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27Improve timing interface to remember which provider provided a timerKevin P. Fleming
The ability to load/unload timing interfaces is nice, but it means that when a timer is allocated, it may come from provider A, but later provider B becomes the 'preferred' provider. If this happens, all timer API calls on the timer that was provided by provider A will actually be handed to provider B, which will say WTF and return an error. This patch changes the timer API to include a pointer to the provider of the timer handle so that future operations on the timer will be forwarded to the proper provider. (closes issue #14697) Reported by: moy Review: http://reviewboard.digium.com/r/211/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27Merged revisions 184565 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r184565 | file | 2009-03-27 10:06:45 -0300 (Fri, 27 Mar 2009) | 9 lines Fix an issue where nat=yes would not always take effect for the RTP session on outgoing calls. If calls were placed using an IP address or hostname the global nat setting was copied over but was not set on the RTP session itself. This caused the RTP stack to not perform symmetric RTP actions. (closes issue #14546) Reported by: acunningham ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-25Improve performance of the ast_event cache functionality.Russell Bryant
This code comes from svn/asterisk/team/russell/event_performance/. Here is a summary of the changes that have been made, in order of both invasiveness and performance impact, from smallest to largest. 1) Asterisk 1.6.1 introduces some additional logic to be able to handle distributed device state. This functionality comes at a cost. One relatively minor change in this patch is that the extra processing required for distributed device state is now completely bypassed if it's not needed. 2) One of the things that I noticed when profiling this code was that a _lot_ of time was spent doing string comparisons. I changed the way strings are represented in an event to include a hash value at the front. So, before doing a string comparison, we do an integer comparison on the hash. 3) Finally, the code that handles the event cache has been re-written. I tried to do this in a such a way that it had minimal impact on the API. I did have to change one API call, though - ast_event_queue_and_cache(). However, the way it works now is nicer, IMO. Each type of event that can be cached (MWI, device state) has its own hash table and rules for hashing and comparing objects. This by far made the biggest impact on performance. For additional details regarding this code and how it was tested, please see the review request. (closes issue #14738) Reported by: russell Review: http://reviewboard.digium.com/r/205/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-25Fix issue with a T38 reinvite being sent even if not configured to do so.Joshua Colp
If we receive a T38 request negotiate control frame we should only attempt to do so if the option is enabled on the dialog. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184280 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-24Exclude slin16, siren7, and siren14 from bandwidth=low and =mediumRussell Bryant
The default codec configuration for chan_iax2 is bandwidth=low. I noticed slin16 being negotiated as the codec in some test calls, but that no longer happens after this change. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-24SIP preferred codec only featureDavid Vossel
Added an option to respond to a SIP invite with only the single most preferred joint codec. This limits the options of what codecs the other side can use. (closes issue #12485) Reported by: bamby Review: http://reviewboard.digium.com/r/206/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183995 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-23Removed trailing whitespace in chan_misdn files.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-23Fixes a documentation error introduced during the CLI cleanup at AstriDevCon ↵Leif Madsen
2008. (closes issue #14655) Reported by: ulogic Patches: chan_dahdi.patch uploaded by ulogic (license 728) Tested by: lmadsen git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-20Merged revisions 183559 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r183559 | russell | 2009-03-20 11:53:25 -0500 (Fri, 20 Mar 2009) | 2 lines Fix a crash in IAX2 registration handling found during load testing with dvossel. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-20Fix chan_sip so it builds.Mark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-20Remove duplicate <description> inside the xml documentation.Eliel C. Sardanons
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-19Merged revisions 183319 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r183319 | tilghman | 2009-03-19 14:15:33 -0500 (Thu, 19 Mar 2009) | 8 lines Delay signalling progress until a PRI channel really signals progress. (closes issue #13034) Reported by: klaus3000 Patches: 20090316__bug13034.diff.txt uploaded by tilghman (license 14) patch_trunk_183progress_klaus3000.txt uploaded by klaus3000 (license 65) Tested by: klaus3000 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183321 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-19Merged revisions 183115 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r183115 | mmichelson | 2009-03-19 11:04:02 -0500 (Thu, 19 Mar 2009) | 14 lines Fix an issue where cancelled outgoing SIP calls would erroneously report the device as "in use." A user was having an issue where if an outgoing SIP call was canceled, the SIP device would remain in use if we had not received any response to the initial INVITE we sent out. The SIP device would remain in use until the autocongestion timer was exhausted. I tracked down the cause of this to be the section of code I am removing here. I asked several people what the purpose of this code was meant to be, but no one could give me any sort of answer as to why this was here. The person who was having this issue has been using this patch for several months and it has stopped the problems they have had. AST-196 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183117 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-19Improve our triggering of a T38 switchover internally when triggered by a ↵Joshua Colp
received reinvite. Previously we reached across the channel bridge to get the other party's SIP dialog structure in order to trigger an outgoing reinvite. This is extremely dangerous to do and only works if bridged to another SIP channel. This patch changes this to use the T38 control frame method of requesting a switchover. This change also causes the SIP channel driver to propogate back whether the switchover worked or not instead of blindly accepting the incoming T38 reinvite. Review: http://reviewboard.digium.com/r/200/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-18Add some code removed by mistake from commit 182722 that works around a fileJeff Peeler
descriptor leak in versions of PWLib prior to 1.12.0. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-18Merged revisions 182882 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r182882 | kpfleming | 2009-03-18 06:31:41 -0500 (Wed, 18 Mar 2009) | 3 lines fix another symbol namespace issue (reported by Andrew on asterisk-dev) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-18Merged revisions 182810 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r182810 | russell | 2009-03-17 21:09:13 -0500 (Tue, 17 Mar 2009) | 44 lines Fix cases where the internal poll() was not being used when it needed to be. We have seen a number of problems caused by poll() not working properly on Mac OSX. If you search around, you'll find a number of references to using select() instead of poll() to work around these issues. In Asterisk, we've had poll.c which implements poll() using select() internally. However, we were still getting reports of problems. vadim investigated a bit and realized that at least on his system, even though we were compiling in poll.o, the system poll() was still being used. So, the primary purpose of this patch is to ensure that we're using the internal poll() when we want it to be used. The changes are: 1) Remove logic for when internal poll should be used from the Makefile. Instead, put it in the configure script. The logic in the configure script is the same as it was in the Makefile. Ideally, we would have a functionality test for the problem, but that's not actually possible, since we would have to be able to run an application on the _target_ system to test poll() behavior. 2) Always include poll.o in the build, but it will be empty if AST_POLL_COMPAT is not defined. 3) Change uses of poll() throughout the source tree to ast_poll(). I feel that it is good practice to give the API call a new name when we are changing its behavior and not using the system version directly in all cases. So, normally, ast_poll() is just redefined to poll(). On systems where AST_POLL_COMPAT is defined, ast_poll() is redefined to ast_internal_poll(). 4) Change poll() in main/poll.c to be ast_internal_poll(). It's worth noting that any code that still uses poll() directly will work fine (if they worked fine before). So, for example, out of tree modules that are using poll() will not stop working or anything. However, for modules to work properly on Mac OSX, ast_poll() needs to be used. (closes issue #13404) Reported by: agalbraith Tested by: russell, vadim http://reviewboard.digium.com/r/198/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-17Allow H.323 Plus library to be used in addition to the OpenH323 libraryJeff Peeler
Chan_h323 can now be compiled against both the previously supported versions of OpenH323 as well as the current H.323 Plus (version 1.20.2). The configure script has been modified to look in the default install location of h323 to hopefully help avoid using the environment variables OPENH323DIR and PWLIBDIR. Also, the CLI command "h323 show version" has been added which indicates which version of h323 is in use. (closes issue #11261) Reported by: vhatz Patches: asterisk-1.6.0.6-h323plus.patch uploaded by jthurman (license 614) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-17OPENR2 uses an incorrect string value if the extension delimiter is not present.Richard Mudgett
* Fixed OPENR2 using an incorrect string value if the extension delimiter is not present in the Dial() function. This was fixed for SS7 and PRI in trunk -r172400. * Made OPENR2 stripmsd behavior the same as the SS7, PRI, and others. * Removed trailing whitespace that appeared with OPENR2. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-16Add MFC/R2 support for chan_dahdi.Russell Bryant
This commit introduces official support for R2 signaling in chan_dahdi. The modifications to chan_dahdi, and the supporting library, LibOpenR2, were both written by Moises Silva. Many users are using this code, or a variant of it, in Asterisk 1.2, 1.4 and 1.6 in Brazil, México and Argentina. An unknown number of users (but at least 1) are using it in each of the following countries: Colombia, Nepal, Thailand, Venezuela, Perú, and probably others. To use this code, LibOpenR2 must be installed from http://www.libopenr2.org/. Information about configuration can be found in configs/chan_dahdi.conf.sample. The code committed is the most up to date version, which was being maintained in svn/asterisk/team/moy/mfcr2/. I would also like to include a Thank You to the many others that tested this code beyond those listed in this commit message. These are the names that I could find in the mantis issue. (closes issue #12509) Reported by: moy Patches: chan_zap-mfr2.patch uploaded by moy (license 222) Tested by: moy, korihor, viniciusfontes, Skarmeth, loloski, asbestoshead, titogarrido, heliocoelhojr, konsultex, ncorrare, ecarruda, rtorresduque, PTorres, ychen Review: http://reviewboard.digium.com/r/40/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-16Merged revisions 182281 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r182281 | dvossel | 2009-03-16 12:47:42 -0500 (Mon, 16 Mar 2009) | 7 lines Randomize IAX2 encryption padding The 16-32 byte random padding at the beginning of an encrypted IAX2 frame turns out to not be all that random at all. This patch calls ast_random to fill the padding buffer with random data. The padding is randomized at the beginning of every encrypted call and for every encrypted retransmit frame. Review: http://reviewboard.digium.com/r/193/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-16Merged revisions 182208 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r182208 | tilghman | 2009-03-16 10:39:15 -0500 (Mon, 16 Mar 2009) | 7 lines Fixup glare detection, to fix a memory leak of a local pvt structure. (closes issue #14656) Reported by: caspy Patches: 20090313__bug14656__2.diff.txt uploaded by tilghman (license 14) Tested by: caspy ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-13Fix an issue with requesting a T38 reinvite before the call is answered.Joshua Colp
The code responsible for sending the T38 reinvite did not check if an INVITE was already being handled. This caused things to get confused and the call to fail. The code now defers sending the T38 reinvite until the current INVITE is done being handled. (issue AST-191) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-13improve a bit of suboptimal codeKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@181985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-12Merged revisions 181768 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r181768 | mmichelson | 2009-03-12 13:29:48 -0500 (Thu, 12 Mar 2009) | 22 lines Properly send a 487 on an INVITE we have not responded to if we receive a BYE. If we receive an INVITE from an endpoint and then later receive a BYE from that same endpoint before we have sent a final response for the INVITE, then we need to respond to the INVITE with a 487. There was logic in the code prior to this commit which seemed to exist solely to handle this situation, but there was one condition in an if statement which was incorrect. The only way we would send a 487 was if the sip_pvt had no owner channel. This made no sense since we created the owner channel when we received the INVITE, meaning that the majority of the time we would never send the 487. The 487 being sent should not rely on whether we have created a channel. Its delivery should be dependent on the current state of the initial INVITE transaction. With this commit, that logic is now correctly in place. (closes issue #14149) Reported by: legranjl Patches: 14149.patch uploaded by mmichelson (license 60) Tested by: legranjl ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@181769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-11Merged revisions 181340 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r181340 | dvossel | 2009-03-11 12:25:31 -0500 (Wed, 11 Mar 2009) | 11 lines encrypted IAX2 during packet loss causes decryption to fail on retransmitted frames If an iax channel is encrypted, and a retransmit frame is sent, that packet's iseqno is updated while it is encrypted. This causes the entire frame to be corrupted. When the corrupted frame is sent, the other side decrypts it and sends a VNAK back because the decrypted frame doesn't make any sense. When we get the VNAK, we look through the sent queue and send the same corrupted frame causing a loop. To fix this, encrypted frames requiring retransmission are decrypted, updated, then re-encrypted. Since key-rotation may change the key held by the pvt struct, the keys used for encryption/decryption are held within the iax_frame to guarantee they remain correct. (closes issue #14607) Reported by: stevenla Tested by: dvossel Review: http://reviewboard.digium.com/r/192/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@181371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-11Merged revisions 181328 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r181328 | file | 2009-03-11 14:22:52 -0300 (Wed, 11 Mar 2009) | 14 lines Fix issue where an attended transfer could not be completed under a rare scenario. When completing an attended transfer chan_sip does a check to make sure the extension in the URI portion of the Refer-To header is a local valid extension. We don't actually need to check this since we know for sure the other channel is already up and talking to the extension. Some devices do not put the extension in the Refer-To header either, which can cause the extension check to fail. We now no longer do this check if it is an attended transfer. (closes issue #14628) Reported by: sverre Patches: 14628.diff uploaded by file (license 11) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@181345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-11Merged revisions 181295 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r181295 | file | 2009-03-11 13:36:50 -0300 (Wed, 11 Mar 2009) | 9 lines Fix a problem with inband DTMF detection on outgoing SIP calls when dtmfmode=auto. When dtmfmode was set to auto the inband DTMF detector was not setup on outgoing SIP calls. This caused inband DTMF detection to fail. The inband DTMF detector is now setup for both dtmfmode inband and auto. (closes issue #13713) Reported by: makoto ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@181296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-11Fix malloc debug macros to work properly with h323.Jeff Peeler
The main problem here was that cstdlib was undefining free thereby causing the proper debug macros to not be used. ast_h323.cxx has been changed to call ast_free instead to avoid the issue. A few other issues were addressed: - There were a few instances of functions improperly passing ast_free instead of ast_free_ptr. - Some clean up was done to avoid the debug macros intentionally being redefined. (copied below from Kevin's commit, appreciate the help) - disable astmm.h from doing anything when STANDALONE is defined, which is used by the tools in the utils/ directory that use parts of Asterisk header files in hackish ways; also ensure that utils/extconf.c and utils/conf2ael.c are compiled with STANDALONE defined. (closes issue #13593) Reported by: pj git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@181135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-11Add missing comment that quotes RFC 3891Mark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@181033 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-11Merged revisions 181029,181031 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r181029 | mmichelson | 2009-03-10 19:30:26 -0500 (Tue, 10 Mar 2009) | 9 lines Fix incorrect tag checking on transfers when pedantic=yes is enabled. (closes issue #14611) Reported by: klaus3000 Patches: patch_chan_sip_attended_transfer_1.4.23.txt uploaded by klaus3000 (license 65) Tested by: klaus3000 ........ r181031 | mmichelson | 2009-03-10 19:32:40 -0500 (Tue, 10 Mar 2009) | 3 lines Remove unused variables. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@181032 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-05Merge phase 1 support for the new bridging architecture.Joshua Colp
This commit brings in the bridging core, bridging technologies, and the ConfBridge application. For usage information on the ConfBridge application please see the output of "core show application ConfBridge" from the CLI. For API documentation please see the doxygen page describing the architecture and the documentation for each API call. Review: http://reviewboard.digium.com/r/93/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@180369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-04Resolve object matching issues related to the removal of the sip_user object.Russell Bryant
Previously, chan_sip had both sip_peer and sip_user objects in memory. A patch went in to remove sip_user to simplify the code, since everything could be done with just sip_peer. This patch resolves some regressions found that were introduced by those changes. This code comes from svn/asterisk/team/group/sip-object-matching/. Here is a list of the changes that have been made: 1) When doing a match by name with the find_peer() function, make it much easier to specify which objects should be matched by having a parameter that specifies exactly which object types should be considered. Also, update find_by_name() to handle this parameter. Finally, update all code to use the new option values. 2) When looking up an object for an outbound request by name, consider peers only. (create_addr()) 3) Only match peers on an incoming registration request. 4) When doing authentication (except for SUBSCRIBE), look up users by name, instead of all objects by name. 5) When doing authentication (except for SUBSCRIBE), after looking for a user by name, look for a peer by IP address, instead of all objects by IP address. 6) When handling the SIP qualify CLI command or manager action, look for a peer by name, instead of any object by name. 7) When handling the SIP unregister CLI command, look for a peer by name, instead of any object by name. 9) In sip_do_debug_peer(), search for a peer by name, instead of any object by name. 9) When handling the SIPPEER() dialplan function, search for a peer by name, instead of any object by name. 10) In the following session timer related functions, st_get_se(), st_get_refresher(), and st_get_mode(), when looking for an object for a given sip_pvt using pvt->peername, look for a peer by name, instead of any object by name. 11) Fix build_peer() to properly handle the case where separate type=peer and type=user entries were specified in sip.conf. (closes issue #14505) Reported by: lmadsen Review: http://reviewboard.digium.com/r/172/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@180261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-04Allow for "magic" pickups to work when we wish to ignore the contextMark Michelson
When the subscription context for a call pickup subscription differs from the context of the call pickup target, there's not an easy way to divine what context should be used for the pickup. The way to work around this is to use PICKUPMARK as the context for the pickup. This has been documented in the sip.conf.sample file (ABE-1708) closes issue #14567 submitted by: alecdavis git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@180155 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-03Please prefix default values with DEFAULTOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@179675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-02Do not try to remove a registration scheduled item if the scheduler context ↵Joshua Colp
has already been destroyed. (closes issue #14580) Reported by: alecdavis git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@179323 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-01Properly free memory and remove scheduler entries when a transmission ↵Mark Michelson
failure occurs. Previously, only the "data" field of the sip_pkt created during __sip_reliable_xmit was freed when XMIT_ERROR was returned by __sip_xmit. When retrans_pkt was called, this inevitably resulted in the reading and writing of freed memory. XMIT_ERROR is a condition meaning that we don't want to attempt resending the packet at all. The proper action to take is to remove the scheduler entry we just created, free the packet's data as well as the packet itself, and unlink it from the list of packets on the sip_pvt structure. (closes issue #14455) Reported by: Nick_Lewis Patches: 14455.patch uploaded by mmichelson (license 60) Tested by: Nick_Lewis git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@179219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-27Add reload support to chan_skinny.Michiel van Baak
Special thanks goes to DEA who had to redo this patch twice because we first put unload/load support in and later redid the way we configure devices and lines. (closes issue #10297) Reported by: DEA Patches: skinny-reload-trunkv2.diff uploaded by wedhorn (license 30) skinny-reload-trunk-v4.txt uploaded by DEA (license 3) With mods by me based on feedback from wedhorn and Russell and seanbright Tested by: DEA, mvanbaak, pj Review: http://reviewboard.digium.com/r/130/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@179122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-26IAX2 prune realtime, minor tweak to last fixDavid Vossel
A return statement was missing which caused unexpected cli output. issue #14479 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@178871 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-26IAX2 prune realtime fixDavid Vossel
Iax2 prune realtime had issues. If "iax2 prune realtime all" was called, it would appear like the command was successful, but in reality nothing happened. This is because the reload that was supposed to take place checks the config files, sees no changes, and does nothing. If there had been a change in the the config file, the realtime users would have been marked for deletion and everything would have been fine. Now prune_users() and prune_peers() are called instead of reload_config() to prune all users/peers that are realtime. These functions remove all users/peers with the rtfriend and delme flags set. iax2_prune_realtime() also lacked the code to properly delete a single friend. For example. if iax2 prune realtime <friend> was called, only the peer instance would be removed. The user would still remain. (closes issue #14479) Reported by: mousepad99 Review: http://reviewboard.digium.com/r/176/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@178767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-24Allows manager command to see if IAX link is trunked and encrypted. Displays ↵David Vossel
what kind of encryption is enabled as well. Manager command "iaxpeers" now shows if a link is trunked and encrypted. Instead of encryption saying simply "yes" or "no", it now displays what type of encryption is enabled and if keyrotation is on or not. (closes issue #14427) Reported by: snuffy Patches: iax_show_trunks.diff uploaded by snuffy (license 35) 2009022200_iax2_show_trunkencryption.diff.txt uploaded by mvanbaak (license 7) Tested by: mvanbaak, dvossel, snuffy Review: http://reviewboard.digium.com/r/173/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@178300 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-24Merged revisions 178205 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r178205 | file | 2009-02-24 11:16:07 -0400 (Tue, 24 Feb 2009) | 9 lines Skip check for extension when subscribing for MWI. Since the remote side is not actually subscribing to a specific extension when subscribing for MWI just skip the check to see if the extension exists. They can't use it to specify the mailbox either since we require configuration of that in sip.conf (closes issue #14531) Reported by: festr ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@178213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-23update the new manager commands in chan_skinny to matchMichiel van Baak
chan_sip's headers. requested by oej. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@178061 65c4cc65-6c06-0410-ace0-fbb531ad65f3