Commit Graph

441 Commits

Author SHA1 Message Date
Russell Bryant
defd4eb3e2 Backport changes that make chan_iax2 not start the PBX on an incoming channel
until the three-way call setup is completed.  These changes are already in 1.4
and trunk.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@72629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-29 16:30:56 +00:00
Kevin P. Fleming
9edd1e094c if we are going to set variables on a newly created channel, it should be done *before* we start the PBX on it
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@65676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-23 20:06:13 +00:00
Jason Parker
074cc21291 Fix an issue with trying to kill a thread before it gets created.
Issue 9709, patch by nic_bellamy.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@63828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-10 23:14:55 +00:00
Tilghman Lesher
9b71a5799b Issue 9638 - if a text frame is sent with no terminating NULL through a bridged
IAX connection, the remote end will receive garbage characters tacked onto the
end.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@62691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-02 17:38:16 +00:00
Joshua Colp
babe9cbbef Revert previous fix for when the IAX2 channel goes funky (that's the technical term). This is causing legit calls to be prematurely hung up. (issue #9600 reported by justdave)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@62037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-26 16:30:57 +00:00
Russell Bryant
bc604c9e9a If the callerid= option is specified, but empty, clear any previous data.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-25 21:55:23 +00:00
Russell Bryant
85cff883ee Ensure that callerid settings are reset on a reload.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61862 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-25 21:06:22 +00:00
Russell Bryant
b87695d824 Backport the change to chan_iax2 to return NULL instead of a "null frame"
from its read callback.  See revision 59341 to the 1.4 branch for more info.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-29 17:10:28 +00:00
Russell Bryant
ec9fb9a970 Fix the use of the "sourceaddress" option when "bindaddr" is set to 0.0.0.0
instead of having each interface explicitly listed.
(issue #7874, patch by stevens)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-27 18:04:02 +00:00
Russell Bryant
c072213569 Fix a problem where the Asterisk channel name could be that of the wrong IAX2
user for a call.  This is because the first step of choosing this name is to
look for an IAX2 peer that happens to have the same IP/port number that this
call is coming from and assuming that is it.  However, this is not always
correct.  So, I have made it change this name after authentication happens
since at that point, we have an exact match.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@58242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-07 18:17:07 +00:00
Russell Bryant
4fb7eb1b7b Don't destroy mutexes before unregistering all of the entry points from the core.
Also, fix a potential memory leak from not destroying the locks for all of the
possible call numbers (about 32k of them).


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@56406 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-23 20:17:56 +00:00
Joshua Colp
d2261a98af Fix a few potential memory leaks with realtime users and peers. (issue #8999 reported by bsmithurst)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@53357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-07 15:38:48 +00:00
Russell Bryant
f9db7779f0 Fix a bunch of places where pthread_attr_init() was called, but
pthread_attr_destroy() was not.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@53045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-31 21:25:11 +00:00
Russell Bryant
3d12e45f06 Fix the extraction of the timestamp from video frames. It was using the
mapping for a mini-frame instead of a video-frame, which caused it to
get invalid data.
(issue #8795, mihai)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@52762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-30 00:15:06 +00:00
Joshua Colp
5e9fdf2aa7 Make the last context entry read in the dominant one. (issue #8918 reported by pj)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@52360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-27 00:03:23 +00:00
Joshua Colp
8ca9fedc42 Ensure we use the default refresh value of 60 if the remote server does not send one. (issue #8746 reported by maethor)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@49889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-08 05:10:07 +00:00
Kevin P. Fleming
2194a0b079 ensure that threads which are supposed to be detached (because we aren't going to wait on them) are created properly
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@49635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-05 16:56:40 +00:00
Russell Bryant
847ddc1e2c Check for the proper return value on an error in a call to mmap().
This was reported by Andy Wang on the asterisk-dev list.  Thanks!


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48943 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-24 07:23:07 +00:00
Russell Bryant
f2df4138cb Use locking when accessing the registrations list. This list is not actually
used very often, so the likelihood of there being a problem is pretty small,
but still possible.  For example, if the CLI command to list the registrations
was called at the same time that a reload was occurring and the registrations
list was getting destroyed and rebuilt, a crash could occur.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-09 15:45:37 +00:00
Joshua Colp
1b287f7406 Only print out debug message if bridged channel is not NULL. (issue #8412 reported by jubilex)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-30 20:06:43 +00:00
Russell Bryant
18f4324baf Only do the check to determine whether the channel calling this function is an
IAX2 channel when getting the IP address using the special argument, 
CURRENTCHANNEL.  (issue #8341, jcovert)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47496 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-12 06:09:03 +00:00
Kevin P. Fleming
170abc16b0 when sending a call to a peer, use the proper socket if we have multiple bindings (reported on asterisk-dev)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@45048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-13 16:18:08 +00:00
Russell Bryant
00ca92aeee Check to see if the channel that is activating the IAXPEER function is actually
an IAX2 channel before proceeding to process it to avoid crashing.
(issue #8017, reported by admott, fixed by myself)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-24 13:50:30 +00:00
Tilghman Lesher
a729fb97e4 When a realtime peer expires, reset the ipaddress in the realtime database back to 0 (Issue 6656)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-16 07:57:04 +00:00
Joshua Colp
e627ecb8a7 Make realtime regseconds work as people expected (0 on registration expiration or release, and actual on normal state) (issue #7684 reported by kshumard)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@42086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-06 15:55:20 +00:00
Russell Bryant
e174a3c762 Restore original functionality of 1.2 in places where ANI was not set, but was
changed to be set.  The original change was done to ensure that the behavior of
the "callerid" option in each channel driver was consistent, but it caused an
unexpected behavior change of CDR records for users, so this change is being
reverted in 1.2.  (issue #7695)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@41411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 18:59:44 +00:00
Russell Bryant
66b15a3461 Fix an issue that would cause a NewCallerID manager event to be generated
before the channel's NewChannel event.  This was due to a somewhat recent
change that included using ast_set_callerid() where it wasn't before.  This
function should not be used in the channel driver "new" functions.
(issue #7654, fixed by me)

Also, fix a couple minor bugs in usecount handling.  chan_iax2 could have
increased the usecount but then returned an error.  The place where chan_sip
increased the usecount did not call ast_update_usecount()


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-05 05:08:50 +00:00
Russell Bryant
228c35198c Fix crash when using the "regexten" option with MALLOC_DEBUG enabled. This was
not reported in the bug tracker but the same bug has been demonstrated in other
places in the code.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27 04:25:41 +00:00
Kevin P. Fleming
1cd1b27779 ensure that global 'maxauthreq' is reset to zero during 'reload'
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 17:10:10 +00:00
Joshua Colp
ff29ba6296 Add support to have maxauthreq as a global option
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37439 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 15:23:59 +00:00
Kevin P. Fleming
648bc1828d remove some more bad examples of using printf
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 13:54:10 +00:00
Joshua Colp
3d8ef8de96 Add configuration option for IAX2 users that will limit the amount of outstanding AUTHREQs we are waiting for replies on.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-11 19:00:50 +00:00
Russell Bryant
99b3637d6a use ast_set_callerid to be more consistent and to make sure that the
"callerid" option in the conf files is always handled the same way and sets ANI
(issue #7285, gkloepfer)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@36725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03 04:19:09 +00:00
Russell Bryant
4893f1917f don't store multiple secrets delimited with semicolons for peers because this
is only valid for users. Instead, only keep the last specified secret for a
peer entry. Also, document how multiple secrets are handled in the sample
config. (Reported by PCadach on #asterisk-bugs)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@34627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-18 20:15:15 +00:00
Joshua Colp
7807373222 Zero out a declared structure so as to not crash if it contains invalid data (reported by Qwell on #asterisk-dev)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@34400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-16 03:37:05 +00:00
Kevin P. Fleming
b9e587a361 use existing dial string parser for strings supplied to iax2_devicestate, because they can be complete dial strings, not just device names
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@34159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-14 22:17:37 +00:00
Joshua Colp
c38c7a1f46 Remove an unneeded double lock (issue #7310 reported by arkadia)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 18:26:42 +00:00
Russell Bryant
8daadb91c1 fix some broken code with BRIDGE_OPTIMIZATION defined (issue #7292)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@32818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 17:53:21 +00:00
Kevin P. Fleming
f0d3be1740 clean up yesterday's security fix to not cause breakage when video mini frames are received
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@32566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 15:48:00 +00:00
Kevin P. Fleming
c515ef705c ensure that the received number of bytes is included in all IAX2 incoming frame analysis checks (fixes a known vulnerability)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@32373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-05 19:53:16 +00:00
Russell Bryant
6d3d5e1649 fix the sourceaddress option (issue #7213, alphaque)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 21:44:52 +00:00
Kevin P. Fleming
4eef3ef785 don't try to predict where the compiler will place things on the stack... put them in the right place explicitly (issues #7029 and #7100, maybe others)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-20 00:55:31 +00:00
Joshua Colp
3361be7b6e Fix codec priority stuff during authentication (issue #6194 reported by jkoopmann)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@27973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 22:34:08 +00:00
Kevin P. Fleming
37e9f9a15c remove a pointless comparison, since the buffer is smaller than the length being checked for
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@23705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 15:46:22 +00:00
Russell Bryant
9a729f7aff move a NULL check to before the first time the pointer is dereferenced (issue #6832)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@16771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 19:11:26 +00:00
Russell Bryant
d125a1a278 fix the situation where bindport is specified but bindaddr is not (issue #6616)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@16744 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 18:42:09 +00:00
Russell Bryant
8c63eaec22 fix Bus Error on sparc (issue #6354)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@15703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 19:47:03 +00:00
Olle Johansson
108275cf6c Do not overwrite ANI if it's set by IE (sendany=yes in the peer)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13634 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-20 17:36:45 +00:00
Russell Bryant
b26f150b75 fix the output that indicates whether qualify smoothing is on or not (issue #6608)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-28 19:46:04 +00:00
Mark Spencer
4e884dbd28 Fix numerous places in jitter buffer where freed memory is referenced
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-20 05:54:10 +00:00