aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_iax2.c
AgeCommit message (Collapse)AuthorFilesLines
2010-03-03Merged revisions 250395 via svnmerge from dvossel1-3/+8
https://origsvn.digium.com/svn/asterisk/trunk ................ r250395 | dvossel | 2010-03-03 12:03:19 -0600 (Wed, 03 Mar 2010) | 22 lines Merged revisions 250394 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r250394 | dvossel | 2010-03-03 12:02:27 -0600 (Wed, 03 Mar 2010) | 16 lines fixes problem with duplicate TXREQ packets When Asterisk receives an IAX2 TXREQ packet, try_transfer() will call store_by_transfercallno() to link the chan_iax2_pvt struct into iax_transfercallno_pvts. If a duplicate TXREQ packet is received for the same call, the pvt struct will be linked into iax_transfercallno_pvts multiple times. This patch fixes this. Thanks rain for debugging this and providing a patch! (closes issue #16904) Reported by: rain Patches: iax2-double-txreq-fix.diff uploaded by rain (license 327) Tested by: rain, dvossel ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@250396 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-27Merged revisions 249235 via svnmerge from kpfleming1-0/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r249235 | kpfleming | 2010-02-27 09:08:35 -0500 (Sat, 27 Feb 2010) | 9 lines Merged revisions 249234 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r249234 | kpfleming | 2010-02-27 09:07:59 -0500 (Sat, 27 Feb 2010) | 1 line add a reference to the now-published IAX2 RFC ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@249238 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-09Merged revisions 245793 via svnmerge from dvossel1-2/+2
https://origsvn.digium.com/svn/asterisk/trunk ................ r245793 | dvossel | 2010-02-09 17:07:17 -0600 (Tue, 09 Feb 2010) | 18 lines Merged revisions 245792 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r245792 | dvossel | 2010-02-09 16:55:38 -0600 (Tue, 09 Feb 2010) | 12 lines Fixes iaxs and iaxsl size off by one issue. 2^15 = 32768 which is the maximum allowed iax2 callnumber. Creating the iaxs and iaxsl array of size 32768 means the maximum callnumber is actually out of bounds. This causes a nasty crash. (closes issue #15997) Reported by: exarv Patches: iax_fix.diff uploaded by dvossel (license 671) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@245794 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-27Merged revisions 243482 via svnmerge from russell1-32/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r243482 | russell | 2010-01-27 11:32:07 -0600 (Wed, 27 Jan 2010) | 13 lines Fix the ability to specify an OSP token for an outbound IAX2 call. When this patch was originally submitted, the code allowed for the token to be set via a channel variable. I decided that a cleaner approach would be to integrate it into the CHANNEL() function. Unfortunately, that is not a suitable approach. It's not possible to get the value set on the channel soon enough using that method. So, go back to the simple channel variable method. (closes issue #16711) Reported by: homesick Patches: iax-svn.diff uploaded by homesick (license 91) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@243485 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-07Merged revisions 238412 via svnmerge from dvossel1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r238412 | dvossel | 2010-01-07 14:15:27 -0600 (Thu, 07 Jan 2010) | 16 lines Merged revisions 238411 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r238411 | dvossel | 2010-01-07 14:14:25 -0600 (Thu, 07 Jan 2010) | 10 lines fixes crash in "scheduled_destroy" in chan_iax A signed short was used to represent a callnumber. This is makes it possible to attempt to access the iaxs array with a negative index. (closes issue #16565) Reported by: jensvb ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@238416 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-20Merged revisions 230726 via svnmerge from dvossel1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r230726 | dvossel | 2009-11-20 16:35:54 -0600 (Fri, 20 Nov 2009) | 7 lines fixes iax2 show cache locking error, thanks alecdavis! (closes issue #16094) Reported by: alecdavis Patches: bug16094.diff.txt uploaded by alecdavis (license 585) Tested by: alecdavis, dvossel ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@230727 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-15Merged revisions 230247 via svnmerge from kpfleming1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r230247 | kpfleming | 2009-11-15 11:23:02 -0600 (Sun, 15 Nov 2009) | 12 lines Merged revisions 230246 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r230246 | kpfleming | 2009-11-15 11:19:06 -0600 (Sun, 15 Nov 2009) | 6 lines Correct mistaken option name in error message. The configuration option for allowing hosts to make non-token-based calls is 'calltokenoptional', not 'calltokenignore'. (reported on asterisk-users) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@230250 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-10Merged revisions 229168 via svnmerge from dvossel1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r229168 | dvossel | 2009-11-10 11:16:49 -0600 (Tue, 10 Nov 2009) | 15 lines Merged revisions 229167 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r229167 | dvossel | 2009-11-10 11:15:57 -0600 (Tue, 10 Nov 2009) | 9 lines don't crash on log message in solaris AST-2009-006 (closes issue #16206) Reported by: bklang Tested by: bklang ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@229232 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-21Merged revisions 225307 via svnmerge from dvossel1-9/+78
https://origsvn.digium.com/svn/asterisk/trunk ................ r225307 | dvossel | 2009-10-21 16:58:46 -0500 (Wed, 21 Oct 2009) | 20 lines Merged revisions 225243 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r225243 | dvossel | 2009-10-21 15:58:08 -0500 (Wed, 21 Oct 2009) | 13 lines IAX2: VNAK loop caused by signaling frames with no destination call number It is possible for the PBX thread to queue up signaling frames before a destination call number is received. This can result in signaling frames being sent out with no destination call number. Since recent versions of Asterisk require accurate destination callnumbers for all Full Frames, this can cause a VNAK loop to occur. To resolve this no signaling frames are sent until a destination callnumber is received, and destination call numbers are now only required for iax_pvt matching when the frame is an ACK. Review: https://reviewboard.asterisk.org/r/413/ ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@225308 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-21Merged revisions 225033 via svnmerge from dvossel1-3/+15
https://origsvn.digium.com/svn/asterisk/trunk ................ r225033 | dvossel | 2009-10-21 09:39:10 -0500 (Wed, 21 Oct 2009) | 27 lines Merged revisions 225032 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r225032 | dvossel | 2009-10-21 09:37:04 -0500 (Wed, 21 Oct 2009) | 20 lines IAX/SIP shrinkcallerid option The shrinking of caller id removes '(', ' ', ')', non-trailing '.', and '-' from the string. This means values such as 555.5555 and test-test result in 555555 and testtest. There are instances, such as Skype integration, where a specific value is passed via caller id that must be preserved unmodified. This patch makes the shrinking of caller id optional in chan_sip and chan_iax in order to support such cases. By default this option is on to preserve previous expected behavior. (closes issue #15940) Reported by: dimas Patches: v2-15940.patch uploaded by dimas (license 88) 15940_shrinkcallerid_trunk.c uploaded by dvossel (license 671) Tested by: dvossel Review: https://reviewboard.asterisk.org/r/408/ ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@225035 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-06Merged revisions 222176 via svnmerge from kpfleming1-0/+13
https://origsvn.digium.com/svn/asterisk/trunk ................ r222176 | kpfleming | 2009-10-05 20:24:24 -0500 (Mon, 05 Oct 2009) | 27 lines Recorded merge of revisions 222152 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r222152 | kpfleming | 2009-10-05 20:16:36 -0500 (Mon, 05 Oct 2009) | 20 lines Fix ao2_iterator API to hold references to containers being iterated. See Mantis issue for details of what prompted this change. Additional notes: This patch changes the ao2_iterator API in two ways: F_AO2I_DONTLOCK has become an enum instead of a macro, with a name that fits our naming policy; also, it is now necessary to call ao2_iterator_destroy() on any iterator that has been created. Currently this only releases the reference to the container being iterated, but in the future this could also release other resources used by the iterator, if the iterator implementation changes to use additional resources. (closes issue #15987) Reported by: kpfleming Review: https://reviewboard.asterisk.org/r/383/ ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@222187 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-02Merged revisions 222030 via svnmerge from dvossel1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r222030 | dvossel | 2009-10-02 12:34:07 -0500 (Fri, 02 Oct 2009) | 9 lines Merged revisions 222026 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r222026 | dvossel | 2009-10-02 12:32:13 -0500 (Fri, 02 Oct 2009) | 3 lines Removes unnecessary unlock, clarifies a memcpy. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@222032 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-21Merged revisions 219721 via svnmerge from dvossel1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r219721 | dvossel | 2009-09-21 11:59:05 -0500 (Mon, 21 Sep 2009) | 9 lines Merged revisions 219720 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r219720 | dvossel | 2009-09-21 11:55:53 -0500 (Mon, 21 Sep 2009) | 3 lines Reverting merge 219520. This change was not necessary. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@219722 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-19Merged revisions 219587 via svnmerge from russell1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r219587 | russell | 2009-09-18 21:59:52 -0500 (Fri, 18 Sep 2009) | 13 lines Merged revisions 219586 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r219586 | russell | 2009-09-18 21:51:13 -0500 (Fri, 18 Sep 2009) | 6 lines Make sure the iax_pvt exists before dereferencing it. This fixes the latest crash posted on issue 15609. (issue #15609) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@219590 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-18Merged revisions 219520 via svnmerge from dvossel1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r219520 | dvossel | 2009-09-18 18:20:58 -0500 (Fri, 18 Sep 2009) | 15 lines Merged revisions 219519 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r219519 | dvossel | 2009-09-18 18:19:50 -0500 (Fri, 18 Sep 2009) | 9 lines iax2 frame double free The iax frame's retrans sched id was written over right before iax2_frame_free was called. In iax2_frame_free that retrans id is used to delete the sched item. By writing over the retrans field before the sched item could be deleted, it was possible for a retransmit to occur on a freed frame. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@219521 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-10Merged revisions 217916 via svnmerge from tilghman1-3/+8
https://origsvn.digium.com/svn/asterisk/trunk ........ r217916 | tilghman | 2009-09-10 18:12:16 -0500 (Thu, 10 Sep 2009) | 2 lines Make calltoken support work with realtime users and peers. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@217926 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-10Merged revisions 217807 via svnmerge from dvossel1-4/+26
https://origsvn.digium.com/svn/asterisk/trunk ................ r217807 | dvossel | 2009-09-10 16:07:47 -0500 (Thu, 10 Sep 2009) | 28 lines Merged revisions 217806 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r217806 | dvossel | 2009-09-10 16:06:07 -0500 (Thu, 10 Sep 2009) | 22 lines IAX2 encryption regression The IAX2 Call Token security patch inadvertently broke the use of encryption due to the reorganization of code in the socket_process() function. When encryption is used, an incoming full frame must first be decrypted before the information elements can be parsed. The security release mistakenly moved IE parsing before decryption in order to process the new Call Token IE. To resolve this, decryption of full frames is once again done before looking into the frame. This involves searching for an existing callno, checking the pvt to see if encryption is turned on, and decrypting the packet before the internal fields of the full frame are accessed. (closes issue #15834) Reported by: karesmakro Patches: iax2_encryption_fix_1.4.diff uploaded by dvossel (license 671) Tested by: dvossel, karesmakro Review: https://reviewboard.asterisk.org/r/355/ ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@217821 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-03Merged revisions 215955 via svnmerge from dvossel1-145/+1213
https://origsvn.digium.com/svn/asterisk/trunk ........ r215955 | dvossel | 2009-09-03 11:31:54 -0500 (Thu, 03 Sep 2009) | 6 lines Merge code associated with AST-2009-006 (closes issue #12912) Reported by: rathaus Tested by: tilghman, russell, dvossel, dbrooks ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@216007 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-10AST-2009-005tilghman1-4/+4
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@211580 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-27Merged revisions 208924 via svnmerge from jpeeler1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r208924 | jpeeler | 2009-07-26 20:20:37 -0500 (Sun, 26 Jul 2009) | 9 lines Merged revisions 208923 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r208923 | jpeeler | 2009-07-26 20:18:31 -0500 (Sun, 26 Jul 2009) | 2 lines Fix logic errors from 208746 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@208927 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-25Merged revisions 208749 via svnmerge from jpeeler1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r208749 | jpeeler | 2009-07-25 01:23:18 -0500 (Sat, 25 Jul 2009) | 13 lines Merged revisions 208746 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r208746 | jpeeler | 2009-07-25 01:19:50 -0500 (Sat, 25 Jul 2009) | 7 lines Fix compiling under dev-mode with gcc 4.4.0. Mostly trivial changes, but I did not know of any other way to fix the "dereferencing type-punned pointer will break strict-aliasing rules" error without creating a tmp variable in chan_skinny. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@208755 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-14Merged revisions 206386 via svnmerge from russell1-3/+5
https://origsvn.digium.com/svn/asterisk/trunk ................ r206386 | russell | 2009-07-14 09:51:44 -0500 (Tue, 14 Jul 2009) | 20 lines Merged revisions 206385 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r206385 | russell | 2009-07-14 09:48:00 -0500 (Tue, 14 Jul 2009) | 13 lines Merged revisions 206384 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r206384 | russell | 2009-07-14 09:45:47 -0500 (Tue, 14 Jul 2009) | 6 lines Ensure apathetic replies are sent out on the proper socket. chan_iax2 supports multiple address bindings. The send_apathetic_reply() function did not attempt to send its response on the same socket that the incoming message came in on. ........ ................ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@206389 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-09Merged revisions 205479 via svnmerge from dvossel1-7/+8
https://origsvn.digium.com/svn/asterisk/trunk ................ r205479 | dvossel | 2009-07-08 18:19:09 -0500 (Wed, 08 Jul 2009) | 16 lines Merged revisions 205471 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r205471 | dvossel | 2009-07-08 18:15:54 -0500 (Wed, 08 Jul 2009) | 10 lines Fixes 8khz assumptions Many calculations assume 8khz is the codec rate. This is not always the case. This patch only addresses chan_iax.c and res_rtp_asterisk.c, but I am sure there are other areas that make this assumption as well. Review: https://reviewboard.asterisk.org/r/306/ ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@205595 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-26Merged revisions 203710 via svnmerge from dvossel1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r203710 | dvossel | 2009-06-26 14:47:11 -0500 (Fri, 26 Jun 2009) | 7 lines moving debug message from level 0 to 1. (closes issue #15404) Reported by: leobrown Patches: iax_codec_debug.patch uploaded by leobrown (license 541) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@203712 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-19Merged revisions 201994 via svnmerge from dvossel1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r201994 | dvossel | 2009-06-19 15:24:37 -0500 (Fri, 19 Jun 2009) | 14 lines Merged revisions 201993 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r201993 | dvossel | 2009-06-19 15:22:02 -0500 (Fri, 19 Jun 2009) | 8 lines timestamp was being converted to host order as a short rather than a long (closes issue #15361) Reported by: ffloimair Patches: ts_issue.diff uploaded by dvossel (license 671) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@201995 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-04Merged revisions 199139 via svnmerge from dvossel1-1/+17
https://origsvn.digium.com/svn/asterisk/trunk ................ r199139 | dvossel | 2009-06-04 14:10:16 -0500 (Thu, 04 Jun 2009) | 9 lines Merged revisions 199138 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r199138 | dvossel | 2009-06-04 14:00:15 -0500 (Thu, 04 Jun 2009) | 3 lines Additional updates to AST-2009-001 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@199140 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-02Merged revisions 198824 via svnmerge from dvossel1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r198824 | dvossel | 2009-06-02 12:55:35 -0500 (Tue, 02 Jun 2009) | 8 lines fixes issue with channels not going down after transfer Iax2 currently does not support native bridging if the timeoutms value is set. We check for that in iax2_bridge, but then set timeoutms to 0 by default. If the timeoutms is not provided it is set to -1. By setting timeoutms to 0 it is processed causing a bridging retry loop. (closes issue #15216) Reported by: oxymoron Tested by: dvossel ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@198827 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-28Merged revisions 197697 via svnmerge from file1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r197697 | file | 2009-05-28 15:45:11 -0300 (Thu, 28 May 2009) | 2 lines Fix a bug where the trunkmtu setting was not set to the default value of 1240 on load but was on reload. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@197703 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-21Merged revisions 195995 via svnmerge from dvossel1-0/+3
https://origsvn.digium.com/svn/asterisk/trunk ................ r195995 | dvossel | 2009-05-21 14:11:49 -0500 (Thu, 21 May 2009) | 20 lines Merged revisions 195991 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r195991 | dvossel | 2009-05-21 14:04:56 -0500 (Thu, 21 May 2009) | 14 lines Sign problem calculating timestamp for iax frame leads to no audio on the receiving peer. There are rare cases in which a frame's delivery timestamp is slightly less than the iax2_pvt's offset. This causes the pvt's timestamp to be a small negative number, but since the timestamp value is unsigned it looks like a huge positive number. This patch checks for this negative case and sets the ms to zero. A similar check is already done right below this one in the 'else' statement. (closes issue #15032) Reported by: guillecabeza Patches: chan_iax2.c.patch_timestamp uploaded by guillecabeza (license 380) Tested by: guillecabeza (closes issue #14216) Reported by: Andrey Sofronov ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@196000 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-15Merged revisions 194874 via svnmerge from dvossel1-21/+33
https://origsvn.digium.com/svn/asterisk/trunk ................ r194874 | dvossel | 2009-05-15 17:44:44 -0500 (Fri, 15 May 2009) | 23 lines Merged revisions 194873 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r194873 | dvossel | 2009-05-15 17:43:13 -0500 (Fri, 15 May 2009) | 17 lines IAX2 REGAUTH loop IAX was not sending REGREJ to terminate invalid registrations. Instead it sent another REGAUTH if the authentication challenge failed. This caused a loop of REGREQ and REGAUTH frames. (Related to Security fix AST-2009-001) (closes issue #14867) Reported by: aragon Tested by: dvossel (closes issue #14717) Reported by: mobeck Patches: regauth_loop_update_patch.diff uploaded by dvossel (license 671) Tested by: dvossel ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@194877 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-15Merged revisions 194833 via svnmerge from dvossel1-35/+68
https://origsvn.digium.com/svn/asterisk/trunk ................ r194833 | dvossel | 2009-05-15 15:52:12 -0500 (Fri, 15 May 2009) | 24 lines Merged revisions 194557,194685 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r194557 | dvossel | 2009-05-14 17:59:43 -0500 (Thu, 14 May 2009) | 10 lines IAX2 "Ghost" Channels There is a bug tracker issue where people are reporting "Ghost" channels in their 'iax2 show channels' output. The confusion is caused by channels being listed as "(NONE)" with format "unknown". These are not channels of coarse. They are usually just pending registration or poke requests, but it is confusing output. To help make sense of this I have added two columns to 'iax2 show channels'. One shows the first message which started the transaction, and the second shows the last message sent by either side of the call. This helps diagnose why the entry exists and why it may not go away. (closes issue #14207) Reported by: clive18 Review: https://reviewboard.asterisk.org/r/246/ ........ r194685 | dvossel | 2009-05-15 10:40:37 -0500 (Fri, 15 May 2009) | 6 lines Update to previous IAX2 "Ghost" Channels patch. Fixed some comments made on reviewboard for the previous patch. (issue #14207) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@194836 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-06Merged revisions 192808 via svnmerge from file1-0/+3
https://origsvn.digium.com/svn/asterisk/trunk ........ r192808 | file | 2009-05-06 14:38:51 -0300 (Wed, 06 May 2009) | 10 lines Fix a bug where a timer would be created but not acknowledged. This scenario crept up if chan_iax2 was loaded with no configuration file present. It would create a timer and tell it to go at an interval but the thread that normally acknowledges it would not be created because no configuration file was present. The timer will now be closed if no configuration file is present. (closes issue #15014) Reported by: madkins ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@192810 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-04Merged revisions 192214 via svnmerge from dvossel1-0/+5
https://origsvn.digium.com/svn/asterisk/trunk ................ r192214 | dvossel | 2009-05-04 17:44:51 -0500 (Mon, 04 May 2009) | 17 lines Merged revisions 192213 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r192213 | dvossel | 2009-05-04 17:37:31 -0500 (Mon, 04 May 2009) | 11 lines global mohinterpret setting is ignored mohinterpret and mohsuggest global variables were not copied over during build_users and build_peers. (closes issue #14728) Reported by: dimas Patches: v1-14728.patch uploaded by dimas (license 88) Tested by: dimas, dvossel ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@192217 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-01Merged revisions 191494 via svnmerge from tilghman1-3/+3
https://origsvn.digium.com/svn/asterisk/trunk ........ r191494 | tilghman | 2009-05-01 13:18:00 -0500 (Fri, 01 May 2009) | 4 lines Set debug message back to DEBUG level. (closes issue #15007) Reported by: hulber ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@191554 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-27Merged revisions 184762 via svnmerge from kpfleming1-12/+11
https://origsvn.digium.com/svn/asterisk/trunk ........ r184762 | kpfleming | 2009-03-27 14:10:32 -0500 (Fri, 27 Mar 2009) | 12 lines Improve timing interface to remember which provider provided a timer 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: http://svn.digium.com/svn/asterisk/branches/1.6.2@184779 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-25Merged revisions 184339 via svnmerge from russell1-2/+0
https://origsvn.digium.com/svn/asterisk/trunk ........ r184339 | russell | 2009-03-25 16:57:19 -0500 (Wed, 25 Mar 2009) | 35 lines Improve performance of the ast_event cache functionality. 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: http://svn.digium.com/svn/asterisk/branches/1.6.2@184343 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-24Merged revisions 184037 via svnmerge from russell1-0/+3
https://origsvn.digium.com/svn/asterisk/trunk ........ r184037 | russell | 2009-03-24 16:40:44 -0500 (Tue, 24 Mar 2009) | 6 lines Exclude slin16, siren7, and siren14 from bandwidth=low and =medium 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: http://svn.digium.com/svn/asterisk/branches/1.6.2@184041 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-20Merged revisions 183560 via svnmerge from russell1-5/+10
https://origsvn.digium.com/svn/asterisk/trunk ................ r183560 | russell | 2009-03-20 12:00:58 -0500 (Fri, 20 Mar 2009) | 10 lines Merged revisions 183559 via svnmerge from 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: http://svn.digium.com/svn/asterisk/branches/1.6.2@183564 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-16Merged revisions 182281 via svnmerge from dvossel1-1/+18
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: http://svn.digium.com/svn/asterisk/trunk@182282 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-11Merged revisions 181340 via svnmerge from dvossel1-14/+45
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: http://svn.digium.com/svn/asterisk/trunk@181371 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-02Do not try to remove a registration scheduled item if the scheduler context ↵file1-1/+3
has already been destroyed. (closes issue #14580) Reported by: alecdavis git-svn-id: http://svn.digium.com/svn/asterisk/trunk@179323 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-26IAX2 prune realtime, minor tweak to last fixdvossel1-0/+1
A return statement was missing which caused unexpected cli output. issue #14479 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@178871 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-26IAX2 prune realtime fixdvossel1-16/+43
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: http://svn.digium.com/svn/asterisk/trunk@178767 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-24Allows manager command to see if IAX link is trunked and encrypted. Displays ↵dvossel1-18/+42
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: http://svn.digium.com/svn/asterisk/trunk@178300 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-23Changes the way keyrotation is enabled by defaultdvossel1-5/+3
Key rotation was enabled by default by setting the global encryption method to IAX_ENCRYPT_KEYROTATE. the problem with this is that if encryption is not enabled, and the encryption method is set to anything except 0, the peer appears to have encryption enabled when issuing a "iax2 show peers". Rather than have the key rotation bit always set by default, it is now only set when an encryption method is enabled. (closes issue #14523) Reported by: mvanbaak git-svn-id: http://svn.digium.com/svn/asterisk/trunk@178030 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-16Merged revisions 176354 via svnmerge from dvossel1-4/+5
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r176354 | dvossel | 2009-02-16 17:30:52 -0600 (Mon, 16 Feb 2009) | 8 lines Fixes issue with AST_CONTROL_SRCUPDATE not being relayed correctly during bridging This should have been committed with rev176247, but I missed it. srcupdate frames no longer break out of the native bridge, but are not being sent to the other call leg either. This fixs that. issue #13749 ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176355 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-16Merged revisions 175597 via svnmerge from dvossel1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r175597 | dvossel | 2009-02-13 14:11:55 -0600 (Fri, 13 Feb 2009) | 4 lines Fixed iax2 key rotation backwards compatibility Turns key rotation back on by default. Added bit into encryption IE to indicate whether or not key rotation is supported or not. If it is not supported then it is not enabled, which insures backwards compatibility. This eliminates the need for the keyrotate option in iax.conf, so it has been removed. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176248 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-13Fixed iax2 key rotation backwards compatibilitydvossel1-42/+22
Turns key rotation back on by default. Added bit into encryption IE to indicate whether or not key rotation is supported or not. If it is not supported then it is not enabled, which insures backwards compatibility. This eliminates the need for the keyrotate option in iax.conf, so it has been removed. Review: http://reviewboard.digium.com/r/159/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@175597 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-12Adds force encryption option to iax.confdvossel1-19/+65
This patch adds forceencryption=yes as an iax.conf option. When force encryption is enabled, no unencrypted connections are allowed. This insures all connections are encrypted. This is a new feature, so CHANGES and iax.conf.sample are updated as well. (closes issue #13285) Reported by: sgofferj Tested by: russell Review: http://reviewboard.digium.com/r/150/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@175344 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-12correct warning message to not refer specifically to DAHDIkpfleming1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@175250 f38db490-d61c-443f-a65b-d21fe96a405b