Commit Graph

12263 Commits

Author SHA1 Message Date
Joshua Colp
451ee5b1d4 Bump up the buffer by 2.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 17:41:40 +00:00
Russell Bryant
750067bd1a Fix a problem in ChanSpy where it could get stuck in an infinite loop without
being able to detect that the calling channel hung up.
(closes issue #12076, reported by junky, patched by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104625 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 17:33:04 +00:00
Jason Parker
841283adfe Inherit language from the transfering channel on a blind transfer.
(closes issue #11682)
Reported by: caio1982
Patches:
      local_atxfer_lang3-1.4.diff uploaded by caio1982 (license 22)
Tested by: caio1982, victoryure


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104598 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 17:26:55 +00:00
Joshua Colp
97869f4771 Use the lock (which already existed, it just wasn't used) on the updaters list to protect the contents instead of the overall module list lock.
(closes issue #12080)
Reported by: ChaseVenters


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 17:07:33 +00:00
Kevin P. Fleming
8a9e7e213b fallback to standard English prompts properly when using new prompt directory layout
(closes issue #11831)
Reported by: IgorG
Patches:
      fallbacken.v1.diff uploaded by IgorG (license 20) (modified by me to improve code and conform rest of function to coding guidelines)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 16:53:06 +00:00
Russell Bryant
54eaddd028 When we receive a known alarm, make sure that the unknown alarm flag is not still
set to make sure that when we come back out of alarm, it gets reported in the log
and manager interface (after discussion with tzafrir on the -dev list)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104591 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 16:45:00 +00:00
Joshua Colp
bb7aa0e4bc Only stop the MWI monitor thread if it was actually started.
(closes issue #12086)
Reported by: francesco_r


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 15:52:02 +00:00
Russell Bryant
c882e6da6f Avoid some recursion in the cleanup code for the chanspy datastore
(closes issue #12076, reported by junky, patched by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104334 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 01:15:02 +00:00
Russell Bryant
37f0ad57a7 Zaptel 1.4 now exposes FXO battery state as an alarm. However, Asterisk 1.4
does not know what to do with these alarms.  Only Asterisk 1.6 cares about it.
So, if we get an unknown alarm in chan_zap, don't generate confusing log messages
about it.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 00:54:29 +00:00
Jason Parker
5996d4e4bb Add badshell to .PHONY target (thanks Kevin)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104141 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 18:26:12 +00:00
Jason Parker
3d6b98b1ca Since all shells aren't as awesome as bash, we have to fail if somebody tries to use a literal "~" in DESTDIR.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 18:09:13 +00:00
Jason Parker
c20a11eb43 Revert previous abspath change.
...abspath is new in GNU make 3.81.  I feel so...defeated.

Must find new fix!


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 16:35:06 +00:00
Jason Parker
be77a16d2d Fix a very bizarre issue we were seeing with our buildbot when using a DESTDIR that
wasn't an absolute path (such as DESTDIR=~/asterisk-1.4).

Apparently what was happening, was that some of the targets were being expanded to
 the full path, so $@ ended up being /root/asterisk-1.4/[...]/ rather than ~/asterisk-1.4/[...]/

It appears that this may be a new "feature" in GNU make.
(*cough* http://en.wikipedia.org/wiki/Principle_of_least_surprise *cough*)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 16:08:44 +00:00
Russell Bryant
bc56a84c58 Merge changes from team/russell/smdi-1.4
This commit brings in a significant set of changes to the SMDI support in Asterisk.
There were a number of bugs in the current implementation, most notably being that
it was very likely on busy systems to pop off the wrong message from the SMDI message
queue.  So, this set of changes fixes the issues discovered as well as introducing
some new ways to use the SMDI support which are required to avoid the bugs with
grabbing the wrong message off of the queue.

This code introduces a new interface to SMDI, with two dialplan functions.  First,
you get an SMDI message in the dialplan using SMDI_MSG_RETRIEVE() and then you access
details in the message using the SMDI_MSG() function.  A side benefit of this is that
it now supports more than just chan_zap.

For example, with this implementation, you can have some FXO lines being terminated 
on a SIP gateway, but the SMDI link in Asterisk.

Another issue with the current implementation is that it is quite common that the
station ID that comes in on the SMDI link is not necessarily the same as the Asterisk
voicemail box.  There are now additional directives in the smdi.conf configuration
file which let you map SMDI station IDs to Asterisk voicemail boxes.

Yet another issue with the current SMDI support was related to MWI reporting over
the SMDI link.  The current code could only report a MWI change when the change
was made by someone calling into voicemail.  If the change was made by some other
entity (such as with IMAP storage, or with a web interface of some kind), then the
MWI change would never be sent.  The SMDI module can now poll for MWI changes if
configured to do so.

This work was inspired by and primarily done for the University of Pennsylvania.

(also related to issue #9260)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104119 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 00:25:29 +00:00
Jason Parker
aba8d8d763 IPTOS_MINCOST is not defined on Solaris.
(closes issue #12050)
Reported by: asgaroth
Patches:
      12050.patch uploaded by putnopvut (license 60)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 00:03:30 +00:00
Russell Bryant
f64df49235 This patch fixes some pretty significant problems with how app_chanspy handles
pointers to channels that are being spied upon.  It was very likely that a
crash would occur if the channel being spied upon hung up.  This was because
the current ast_channel handling _requires_ that the object is locked or else
it could disappear at any time (except in the owning channel thread).  So, this
patch uses some channel datastore magic on the spied upon channel to be able to
detect if and when the channel goes away.
(closes issue #11877)
(patch written by me, but thanks to kpfleming for the idea, and to file for review)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-25 23:42:42 +00:00
Russell Bryant
ac15754e9a Improve the lock tracking code a bit so that a bunch of old locks that threads
failed to lock don't sit around in the history.  When a lock is first locked,
this checks to see if the last lock in the list was one that was failed to be
locked.  If it is, then that was a lock that we're no longer sitting in a trylock
loop trying to lock, so just remove it.
(inspired by issue #11712)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104102 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-25 23:19:05 +00:00
Joshua Colp
e6652d0a13 Make it so a users.conf user creates both a SIP peer and a SIP user. The user will be used for inbound authentication for the device, and peer will be used for placing calls to the device.
(closes issue #9044)
Reported by: queuetue
Patches:
      sip-gui-friend.diff uploaded by qwell (license 4)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104095 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-25 21:37:20 +00:00
Tilghman Lesher
5184be27ed If the destination folder is full, don't delete a message when exiting.
(closes issue #12065)
 Reported by: selsky
 Patch by: (myself)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104094 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-25 21:31:47 +00:00
Jason Parker
e1fb43d32a Allow the use of #include and #exec in situations where the max include depth was only 1.
Specifically, this fixes using #include and #exec in extconfig.conf.

This was basically caused because the config file itself raises the include level to 1.

I opted not to raise the include limit, because recursion here could cause very bizarre behavior.

Pointed out, and tested by jmls

(closes issue #12064)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104092 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-25 20:49:42 +00:00
Russell Bryant
c27732c38c Ensure that the channel doesn't disappear in agent_logoff(). If it does, it
could cause a crash.
(fixes the crash reported in BE-396)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-25 18:38:10 +00:00
Joshua Colp
9b32204204 If a resubscription comes in for a dialog we no longer know about tell the remote side that the dialog does not exist so they subscribe again using a new dialog.
(closes issue #10727)
Reported by: s0l4rb03
Patches:
      10727-2.diff uploaded by file (license 11)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104084 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-25 16:16:13 +00:00
Joshua Colp
2395b1a6f5 Due to recent changes tag will no longer be NULL if not present so we have to use ast_strlen_zero to see if it's actually blank.
(closes issue #12061)
Reported by: flefoll
Patches:
      chan_sip.c.br14.patch_pedantic_no_totag uploaded by flefoll (license 244)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-25 15:17:18 +00:00
Tilghman Lesher
638ca62698 Backwards debug message.
(closes issue #12052)
 Reported by: flefoll
 Patches: 
       chan_sip.c.br14.patch_found-notfound uploaded by flefoll (license 244)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-22 22:45:14 +00:00
Mark Michelson
2d8f502132 And as a followup to revision 104026, completely remove event-related
calls from a section of code where we know there was no event to handle or get.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104027 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-21 21:05:42 +00:00
Mark Michelson
b3dd064bcb Remove an incorrect debug message. It reported that it had received a specific event and tried to report
which event was received. What actually was happening was that it was reporting the number of bytes returned
from a call to read().

Thanks to Jared Smith for bringing the issue up on IRC



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104026 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-21 20:12:38 +00:00
Kevin P. Fleming
d105ba22fa reduce the likelihood that HTTP Manager session ids will consist of primarily '1' bits
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104015 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-21 14:33:51 +00:00
Mark Michelson
70b222e46f Clear up confusion when viewing the QUEUE_WAITING_COUNT of a
"dead" realtime queue. Since from the user's perspective, the queue
does exist, we shouldn't tell them we couldn't find the queue. Instead
since it is a dead queue, report a 0 waiting count

This issue was brought up on IRC by jmls



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103956 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-20 22:32:22 +00:00
Joshua Colp
11edc2ab8d Don't wait for additional digits when overlap dialing is enabled if the setup message contains the sending_complete information element.
(closes issue #11785)
Reported by: klaus3000
Patches:
      sending_complete_overlap_asterisk-1.4.17.patch.txt uploaded by klaus3000 (license 65)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-20 22:06:59 +00:00
Mark Michelson
6835ca7d03 Fix a crash if the channel becomes NULL while attempting to lock it.
(closes issue #12039)
Reported by: danpwi



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-20 21:40:08 +00:00
Tilghman Lesher
494aeb94ac Compat fix for Solaris
(closes issue #12022)
 Reported by: asgaroth
 Patches: 
       20080219__bug12022.diff.txt uploaded by Corydon76 (license 14)
 Tested by: asgaroth


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103845 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-20 17:53:00 +00:00
Joshua Colp
749f1e1963 Send CallerID Name in setup message.
(closes issue #11241)
Reported by: tusar
Patches:
      h323id_as_callerid_name.patch uploaded by tusar (license 344)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103823 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-19 20:28:08 +00:00
Russell Bryant
8c9a6024d9 Account for the fact that the "other" channel can disappear while the local pvt
is not locked.

(fixes a problem introduced in rev 100581)
(closes issue #12012)
Reported by: stevedavies
Patch by me


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-19 20:02:49 +00:00
Joshua Colp
4671e11a5c Don't look for launchd when cross compiling.
(closes issue #12029)
Reported by: ovi


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-19 17:31:32 +00:00
Joshua Colp
7b6d391b76 Fix building of chan_sip.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-19 15:01:42 +00:00
Olle Johansson
7b72c89fb9 Make sure we send error replies correctly by checking the via header.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-19 10:27:15 +00:00
Joshua Colp
0433ee65ae Ensure that emulated DTMFs do not get interrupted by another begin frame.
(closes issue #11740)
Reported by: gserra
Patches:
      v1-11740.patch uploaded by dimas (license 88)
(closes issue #11955)
Reported by: tsearle
(closes issue #10530)
Reported by: xmarksthespot


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 23:56:48 +00:00
Jason Parker
add30e2666 Fix previous commit so that we actually disable echocanbridged if echocancel is off.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103795 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 22:28:56 +00:00
Jason Parker
4ce44f1c28 Correct a message when echocancelwhenbridged is on, but echocancel is not.
Issue #12019


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 21:23:32 +00:00
Mark Michelson
1726d5ef4e There was an invalid assumption when calculating the duration of a file that the filestream in question
was created properly. Unfortunately this led to a segfault in the situation where an unknown format was
specified in voicemail.conf and a voicemail was recorded. Now, we first check to be sure that the stream
was written correctly or else assume a zero duration.

(closes issue #12021)
Reported by: jakep
Tested by: putnopvut



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 20:52:09 +00:00
Tilghman Lesher
4306df31b1 When a SIP channel is being auto-destroyed, it's possible for it to still be
in bridge code.  When that happens, we crash.  Delay the RTP destruction until
the bridge is ended.
(closes issue #11960)
 Reported by: norman
 Patches: 
       20080215__bug11960__2.diff.txt uploaded by Corydon76 (license 14)
 Tested by: norman


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 17:31:52 +00:00
Mark Michelson
a300034b08 Fix a linked list corruption that under the right circumstances
could lead to a looped list, meaning it will traverse forever.

(closes issue #11818)
Reported by: michael-fig
Patches:
      11818.patch uploaded by putnopvut (license 60)
	  Tested by: michael-fig



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 16:37:31 +00:00
Joshua Colp
ba72af8c11 Backport fix from issue #9325.
(closes issue #11980)
Reported by: rbrunka


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 16:11:51 +00:00
Joshua Colp
c8d5a65d35 Don't care if the extension given doesn't exist for subscription based MWI.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103763 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 15:33:14 +00:00
Russell Bryant
6bf909cd2e Fix a crash in chan_iax2 due to a race condition
(closes issue #11780)
Reported by: guillecabeza
Patches: 
      bug_iax2_jb_1.4.patch uploaded by guillecabeza (license 380)
      bug_iax2_jb_trunk.patch uploaded by guillecabeza (license 380)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103741 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-15 23:31:39 +00:00
Russell Bryant
468e53a6de In the case that you try to directly reload a module has returned
AST_MODULE_LOAD_DECLINE, log a message indicating that the module is not fully
initialized and must be initialized using "module load".


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103728 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-15 19:50:11 +00:00
Russell Bryant
97bf3c5ace Don't attempt to execute the reload callback for a module that returned
AST_MODULE_LOAD_DECLINE.  This fixes a crash that was reported against
chan_console in trunk.

(closes issue #11953, reported by junky, fixed by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-15 18:33:29 +00:00
Mark Michelson
5de5636aa9 Final round of changes for configure script logic for IMAP
Now if a directory is specified, then we will search that directory for
a source installation of the IMAP toolkit. If none is found, then we will
use that directory as the basis for detecting a package installation of
the IMAP c-client. If that check fails, then configure will fail.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-15 17:26:37 +00:00
Mark Michelson
dbc1aa9de2 Fix a bit of wrong logic in the configure script that caused problems when trying to configure
without IMAP. Patch suggestion from phsultan, but I modified it slightly.

(closes issue #12003)
Reported by: pj
Tested by: putnopvut



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103713 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-15 15:05:49 +00:00
Mark Michelson
2ee7626928 I apparently misunderstood one of the requirements of this configure change.
Now, if a source directory is specified with the --with-imap option, and a valid
source installation is not detected there, then configure will fail and will not
check for a package installation.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103709 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-15 00:50:49 +00:00