Compare commits

...

498 Commits

Author SHA1 Message Date
Kevin P. Fleming
b9677dce3d Convert all release tags to Opsound music-on-hold.
For more details:
http://blogs.digium.com/2009/08/18/asterisk-music-on-hold-changes/



git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.2.9@212958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-18 20:42:51 +00:00
Kevin P. Fleming
06de5ee463 importing files for 1.2.9 release
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.2.9@32403 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-05 20:16:44 +00:00
Kevin P. Fleming
0c8846df31 Creating tag for the release of asterisk-1.2.9
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.2.9@32402 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-05 20:15:20 +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
Kevin P. Fleming
5684ba5966 return bridge exit logic to what it was before i broke it :-(
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@31921 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 03:43:35 +00:00
Russell Bryant
9c5890a138 when using moh files mode, don't look for a file past the number of files
that have been loaded, or worse, past the size of the files array


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@31775 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 17:02:49 +00:00
BJ Weschke
efee6cdadf Fix doxygen comment about AST_LIST_HEAD_INIT_NOLOCK
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@31738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 14:48:13 +00:00
Kevin P. Fleming
3feead3415 remove pointless forcing of the channel into SLINEAR mode; the write format will be set later based on the file that is chosen to be played to the channel
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@31555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 21:46:50 +00:00
Kevin P. Fleming
84c0989323 handle Zap transfers behind chan_agent properly so the agent doesn't get stuck waiting for the call to hang up
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@31520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 20:27:50 +00:00
Kevin P. Fleming
f963ebd1ab remove a sample entry that never should have been added (code to support it was not merged)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@31321 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 12:41:47 +00:00
Russell Bryant
71d9095626 if the connection to a FastAGI server fails because of a timeout, log a more
informative log message


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@31194 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 23:50:00 +00:00
Kevin P. Fleming
dbfbe2c679 silence a warning message that is not a warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@31161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 22:26:38 +00:00
Russell Bryant
eeb613ea3d fix misplaced manager event (issue #6866, flefoll)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@31127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 20:26:17 +00:00
Kevin P. Fleming
f43b8a655d check the proper variable...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30874 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-30 19:18:30 +00:00
Kevin P. Fleming
c882c82377 another S/390 build fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-30 16:07:16 +00:00
BJ Weschke
a6a17f1789 Fix infinite loop scenario and add some sanity checking to prevent segfault on a NULL parameter coming in (which probably shouldn't happen, but just to be safe...)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-30 14:55:16 +00:00
BJ Weschke
a94248e7dc A new way to try and deal with deadlocks that occur in app_queue at present. Using this approach, we only manipulate the main queue mutexes when we get a dev state change on a device that is actually a member of a queue. Backported from /trunk for the "bug fix".
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-26 17:09:51 +00:00
BJ Weschke
f1744d3e31 Oops.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 21:22:16 +00:00
Joshua Colp
9ef31203c9 Don't play the enter sound twice when a person joins a conference after the leader has joined it. (issue #6138 reported by shanermn)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 20:03:11 +00:00
Russell Bryant
5e266283e9 add a missing endif from the recent Makefile change and use indentation
to hopefully prevent us from breaking this Makefile once again
(This nesting is no longer used in the trunk version of this Makefile)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 18:40:42 +00:00
Kevin P. Fleming
ce4e323638 don't try to use -march=s390 when building on S/390 systems (reported via asterisk-users mailing list)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 17:39:33 +00:00
Kevin P. Fleming
547a070805 allow SIPCHANINFO(peername) to work for calls from users as well (issue #7215)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 17:18:01 +00:00
Joshua Colp
b2e084ae6d Get rid of an incorrect SIP dial string in the sample extensions.conf - I even tried variations... no go (issue #7222 reported by arkadia)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 15:27:44 +00:00
Kevin P. Fleming
6b101367b8 oops... make sure to stop processing a request once we have sent an authentication challenge (issue #7220)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 21:24:45 +00:00
Kevin P. Fleming
5ecca96df5 don't send CANCEL on a pending INVITE if we haven't received a provisional response yet... mark it pending until the first response is received (issue #7079)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 20:09:24 +00:00
Matt O'Gorman
3e830d9a85 app_meemte used the ast_max_exten instead of path_max
solves bug 6822


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 19:55:21 +00:00
Joshua Colp
42e50f7eae Merge branch for bug 6264 (Privacy option 2 returns dial-status ANSWER / option_priority_jumping not respected) (reported by jkoopmann and branch by murf
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30035 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 19:44:26 +00:00
Joshua Colp
63ffcdfda2 Fix deadlock caused by a race condition in the logger when reloading (issue #7195 reported and fixed by softins)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30033 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 19:14:01 +00:00
Kevin P. Fleming
e9d164d468 support video recording via AGI 'RECORD FILE' command (issue #7068)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 16:59:20 +00:00
Kevin P. Fleming
f5765a22fc fix various bugs related to exiting from queue via keypress and moh handling (issue #6776, different fix)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29971 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 16:52:08 +00:00
Kevin P. Fleming
84790a577b respect 'usecallingpres' in zapata.conf even if CLID has not been set for the channel (issue #7123)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29969 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 16:17:26 +00:00
Kevin P. Fleming
76066c2b74 fix for non-OSP builds (issue #7217)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29959 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 12:31:45 +00:00
Kevin P. Fleming
9739139287 add an option to allow the admin to 'hide' SIP user/peer names from systems trying to 'fish' names
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 03:32:02 +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
d6873875cc simplify/fix lock retry, and fix comment
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 18:16:40 +00:00
BJ Weschke
f84891dfbb Sanity check code for an extended failure in trying to obtain a channel lock that may have been obtained elsewhere. Prevents the monitor thread of the SIP module from going into an infinite loop, effectively, breaking SIP until you restart Asterisk or the mutex is unlocked, whichever comes first.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 17:17:02 +00:00
Kevin P. Fleming
75ca02dbaa backport some mutex initialization and linked list handling fixes from trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 17:15:23 +00:00
BJ Weschke
f1c97e7df8 Fix a potential leak and correct (hopefully) a segfault under certain conditions. #6784 (vovan and perry testing)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 15:58:24 +00:00
Joshua Colp
919e8741b4 Increase the silence threshold to 128 to "fix" it, so I'm told. (issue #6595 reported by davetroy fixed by casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 21:27:12 +00:00
Joshua Colp
7018a80e91 Use the correct language when playing the transfer sound (issue #7109 reported by casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 20:15:04 +00:00
Joshua Colp
f0e022bbad Preserve presentation bit when going through chan_local (issue #7002 reported by acunningham)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 16:33:03 +00:00
Tilghman Lesher
6691ebf59f Bug 7194 - spelling fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29398 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 14:59:59 +00:00
Tilghman Lesher
d5a7d2e170 Bug 7196 - month range did not work
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29394 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 14:34:34 +00:00
BJ Weschke
1795ff12cd When an application that is executed via applicationmap and exits non-zero, make sure that we pass through the correct return value from the application to make sure a segfault doesn't occur by a bridge trying to continue when it should not. Also, when executing applications via applicationmap, make sure that the application is executed against the channel whose DTMF caused it to be fired off in the first place. (part 1/2 of #7090 - this is the only fix that will be applied to both 1.2 and /trunk) acunningham and blitzrage on testing...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29196 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-21 15:16:59 +00:00
Russell Bryant
ee808b6187 fix the possibility of writing one byte past the end of a buffer.
(issue #7189, Mithraen)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-20 19:50:41 +00:00
Kevin P. Fleming
e0989958cc don't allow queue member devices to ring longer than the total queue timeout (issue #6423, reported and patched by bcnit)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-20 02:35:53 +00:00
Russell Bryant
9123735599 fix a case where code made assumptions about how memory for variables is
allocatted on the stack - this patch is slightly different than the one
that went in for the trunk


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28966 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-20 02:31:30 +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
Kevin P. Fleming
0c4cc3b0ce use the specified 'subscribecontext' for a peer rather than the context found via the target domain (domain contexts are for calls, not for subscriptions) (issue #7122, reported by raarts)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28794 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 19:39:55 +00:00
Russell Bryant
a0c5fed6e8 fix the build of smsq with -Werror. I learned something new about format
strings from this patch!  (issue #7141, Mithraen)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 19:18:41 +00:00
Russell Bryant
8506e078c5 This explicit poll is only needed on mac. In fact, it breaks some systems
such as some versions of Fedora, causing 'asterisk -rx' to never exit.  This
has been tested on systems showing the asterisk -rx problem, as well as other
unaffected versions of linux, mac osx 10.4, and FreeBSD 6.
(issue #7071)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28754 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 19:01:17 +00:00
Joshua Colp
dda49ce86b Make the minidle option actually exist as documented (issue #7159 reported by imran)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28698 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 17:04:02 +00:00
Joshua Colp
63c91a899e When forwarding messages use the context that the active voicemail user was found in. (issue #7010)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28651 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 16:03:33 +00:00
Joshua Colp
892d98aca0 Backport of fix for issue #6654 that was fixed in trunk but not here
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 15:52:09 +00:00
Joshua Colp
14285e5b2b Treat paused queue members as unreachable (issue #7127 reported by peterh)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 15:38:59 +00:00
Kevin P. Fleming
89da276678 fix up a few more places to find the SDP properly (fallout from fix for #7124)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 20:43:42 +00:00
Kevin P. Fleming
53a0b36973 handle incoming multipart/mixed message bodies in SIP and find the SDP, if presnet (issue #7124 reported and patched by eborgstrom, but very different fix)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 20:24:07 +00:00
Kevin P. Fleming
bfbf66aec6 use unsigned counters for handling answer/IE lengths while processing DNS results (issue #7174)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 19:35:55 +00:00
Kevin P. Fleming
2ef43a770b support 'inactive' tag for SDP media streams (simple fix, proper fix will appear in 1.4 release) (issue #7130)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 19:16:40 +00:00
Tilghman Lesher
25d2c99737 Bug 7167 - HasNewVoicemail and VMCOUNT() didn't work when USE_ODBC_STORAGE was defined
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28257 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 17:27:59 +00:00
Joshua Colp
3c8d8caca1 Return -1 on error in ODBC messagecount and 0 on success (issue #7133 reported by cfieldmtm)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 16:31:16 +00:00
Joshua Colp
a6d8b31956 Fix endless looping message by checking value of res before doing retries stuff. (issue #7140 reported by tanischen)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 14:27:21 +00:00
Olle Johansson
9911943d3d Video in meetme? Hmmm. Removed until we do have some code for it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28125 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 12:13:46 +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
Olle Johansson
8b96daf53e Issue #7176 - Crash in expire_register
(We need to find out what's causing peer to be undefined, so this
 is just a bandaid, not a real fix)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@27927 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 19:27:15 +00:00
Joshua Colp
968d069242 Priority jumping not working on VoiceMail app with new syntax (issue #7164 reported and fixed by alvaro_palma_aste)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@27847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 17:07:52 +00:00
Joshua Colp
bc3570ac0f OSPNext does not handle success/failure correctly (issue #7147 reported and fixed by eborgstrom)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@27767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 15:17:04 +00:00
Olle Johansson
d5d56f98c3 chan_sip did not use the TRANSFER_CONTEXT for transfers, like res_features. Now fixed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@27723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 09:21:45 +00:00
Tilghman Lesher
728e1d9a31 Bug 7125 - Fix race condition between resequencing and leaving a message
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@27636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 02:19:50 +00:00
Joshua Colp
961bcfe98c Inherit channel variables during call forwards when going through chan_local (issue #7095 reported by raarts)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@27594 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-16 23:31:56 +00:00
Kevin P. Fleming
e6254eeb34 don't leak frames when deferring DTMF or dropping duplicate ANSWER frames (issue #7041, slightly different fix, reported/patched by clausf)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@27468 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-16 20:05:17 +00:00
Tilghman Lesher
ee46d2d92e Bug 7134 - File descriptor leak with ODBC storage of voicemail
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@27093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-13 04:08:29 +00:00
Tilghman Lesher
dd260ec707 Bug 7086 - pbx_checkcondition substitution, so that arbitrary strings are true (for regex)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@27051 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 23:02:57 +00:00
Kevin P. Fleming
bb0812be95 backport fix from trunk for bug #6934, ensuring that RTP mark bit is changed when SSRC changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@26773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 09:05:22 +00:00
Kevin P. Fleming
78986fe938 ensure that we send a response to REGISTER requests that are successfully authenticated but contain invalid Contact URIs
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@26760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 08:52:46 +00:00
BJ Weschke
adbfc9d3c7 Add the appropriate jumping behavior that is the standard for 1.2.X to SIPGetHeader that is now deprecated in /trunk. #7111 (blitzrage!!!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@26090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 14:18:45 +00:00
BJ Weschke
b2e48e3c22 Correct memory leak in find_user_realtime #7118 (fnordian)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@26050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 13:28:39 +00:00
Olle Johansson
6b93396fb9 Issue 7103 - mikma
- The header is named "Require"
- Don't reply to ACK
	(Not using patch against trunk)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25608 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 15:09:55 +00:00
BJ Weschke
6af35712ef Don't show agents as available when they are in wrap-up time. #6726 (ZX81)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25563 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 14:12:20 +00:00
BJ Weschke
249760b951 Make QueueStatusComplete event thread safe by wrapping it inside the queue lock clause already there. #7013 (bziherl reporting)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 13:35:17 +00:00
BJ Weschke
d46fa7e825 Oops. :(
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 13:15:30 +00:00
BJ Weschke
41210a37d6 Don't recheck valid_exit() after getting the result from say_position (which already checks it). Should prevent another loop if the caller hits digits during the position announcement. #6776 (tgj reporting)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25518 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 13:11:32 +00:00
Joshua Colp
72fe69919c Incorrect log statement when playing transfer sounds (issue #7008 reported and fixed by nathan)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 11:16:10 +00:00
BJ Weschke
b3d0a54a6b Fix playback behavior to exit correctly when we receive a hangup during playback of the invalid pin message. #7091 (AntD reporting)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25322 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-07 13:38:11 +00:00
BJ Weschke
053f005508 Reset the value of ast_mainpid if we fork so future remote unix connections display the correct PID. #7098 (tzafrir reporting)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-07 12:48:09 +00:00
Russell Bryant
a7987a4d36 re-add a couple of lines that I shouldn't have removed in the previous commit.
I think I should be going to bed now ...


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-06 02:32:23 +00:00
Russell Bryant
960ad9e350 fix a problem where the frame's data pointer is overwritten by the newly
allocated data buffer before the data can be copied from it.  This is in
the ast_frisolate() function which is rarely used.  (issue #6732, stefankroon)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25160 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-06 02:25:48 +00:00
Russell Bryant
eb19888db5 ensure that the appropriate manager events are sent in all of the places where
alarms are detected or cleared (issue #6866, flefoll)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25123 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-06 00:05:27 +00:00
Russell Bryant
0f643c18be update chan_h323 to reflect the new prototype for rtp_set_peer (issue #6560, casper)
This was fixed a couple months ago in the trunk, but never in 1.2.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25015 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 20:49:53 +00:00
BJ Weschke
3bc1111ea8 Voicemail fixes along with an API change approved by russellb to fix the bug(s). (jcollie and supczinskib) #7064
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25014 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 20:44:53 +00:00
Russell Bryant
d27c901fa2 use the correct function name ...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@24911 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 17:39:03 +00:00
Russell Bryant
9d0eead218 use pbx_checkcondition() instead of ast_true() to evaluate the condition
for MacroIf and WhileIf (issue #7086)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@24837 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 14:44:50 +00:00
Tilghman Lesher
c7ee76b69f Bug 7023 - reload should not unpause members
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@24706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-04 16:27:20 +00:00
BJ Weschke
092055c3a5 Make sure that only the "|" is a recognized delimiter for Verbose(), as the app documentation already specifies. #7080 (alessiof reporting)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@24669 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-04 11:17:13 +00:00
BJ Weschke
1b107baf37 Correct application documentation to make users aware that certain options cannot be used in conjunction with others. #6666 (chotaire)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@24567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 20:58:10 +00:00
Russell Bryant
83dc76b389 fix up "make rpm"
- don't reference the gzipped man page, because we don't store them
  compressed anymore
- add some files that currently were not listed
(issue #6837)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@24496 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 18:31:20 +00:00
Olle Johansson
87d78ee383 Issue #7074 - Problem with long contact lines
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@24381 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 12:39:55 +00:00
BJ Weschke
316e536e5c Make certain ast_stopstream() sets the channel's stream members to NULL after closing them. #7067 (jcomellas)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@24295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 19:39:50 +00:00
Tilghman Lesher
49aa847408 Prompt does not request '#' to end input, so the application should not require it
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@24097 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 02:12:52 +00:00
Tilghman Lesher
00c0af845d Bug 6864 - drop realtime priority on ALL external processes
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@24019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 20:44:24 +00:00
BJ Weschke
822ea9615a Correct a condition from the prior patch that could happen in rare circumstances and cause a core dump. Thanks Qwell!
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@23988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 19:34:29 +00:00
BJ Weschke
b7f8ee4a6d Make sure that when someone 0's out while recording a msg and then chooses to DELETE the recorded file, the .txt file isn't left around by itself to cause problems later. #7061 (dimitripietro reporting, blitzrage confirmed)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@23985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 19:26:43 +00:00
Russell Bryant
d3d73f3499 add missing locking of the dialplan functions list in the "show functions"
CLI command


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@23951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 15:12:32 +00:00
Kevin P. Fleming
9426da88b7 fix this to actually compile so people can learn from it
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@23899 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 10:45:42 +00:00
Kevin P. Fleming
3e1ca33f4e eliminate compiler warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@23898 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 10:45:24 +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
Kevin P. Fleming
a7961494bd allow top-level OPTIMIZE setting to affect builds in these subdirectories too
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@23673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 14:27:56 +00:00
Kevin P. Fleming
5d04193649 let the compiler determine whether hardware or software floating point should be used (like we do in the editline subdirectory)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@23638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 13:55:59 +00:00
Kevin P. Fleming
4397e6dd42 remove extraneous -m64 flag that is not needed
remove old 'look' target which is no longer needed
(these are coming from Debian patches <G>)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@23636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 13:38:22 +00:00
Kevin P. Fleming
e5c7e5df97 ensure that the script output is correctly generated when the system's character set does not use the English lowercase/uppercase character groups
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@23580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 11:19:04 +00:00
Kevin P. Fleming
8ecd579aec do installation in subdirs as a separate target (so external modules can use the Makefile more easily)
generate final messages -after- running any post-install script that may be present


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@23305 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29 11:40:04 +00:00
Russell Bryant
d762abaf3b note that group assignments must be from 0 to 63 (issue #7048)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@23176 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-28 16:40:32 +00:00
Joshua Colp
d0aef28b0e Queue(somequeue,,,,) -> interpreted as Queue(somequeue,,,,0) (issue #7044 reported nathan fixed by jsmith - sort of)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@22954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 19:11:47 +00:00
Matthew Fredrickson
cecda9a947 Fix buglet in channel reassignment on SETUP_ACK
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@22866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 16:12:46 +00:00
Matt O'Gorman
d9b9996a59 do not allow for users to forward voicemail to
themselves, patch from 7001


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@22596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-26 19:18:55 +00:00
Tilghman Lesher
891c6d599e Rolling back change until kpfleming is comfy
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@22113 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 22:39:10 +00:00
Tilghman Lesher
f2dc4f491d Bug 7004 - release all threads waiting on a condition prior to freeing it
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@22112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 22:12:26 +00:00
Kevin P. Fleming
089900af32 support system-specific scripts in safe_asterisk, before starting Asterisk proper
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@21638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 21:10:41 +00:00
Tilghman Lesher
95bdc91eaf Bug 6553 - plug memory leaks when ODBC connection is down
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@21597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 18:43:17 +00:00
Kevin P. Fleming
9d5f3974d3 properly handle brace-wrapped strings in variable/function references in the dialplan
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@21237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 23:31:10 +00:00
Tilghman Lesher
e6b64adab2 Bug 6984 - off by one error in Random()
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@21037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 06:26:04 +00:00
Tilghman Lesher
6abf8e5e92 Bug 6544 - when we remove a music class, the thread servicing it should die
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@20966 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-17 17:00:16 +00:00
Kevin P. Fleming
0c108cb1ec uncomment files that actually do exist (oops)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@20037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 17:21:09 +00:00
Kevin P. Fleming
2939ab99bd update text to match actual prompts being distributed (thanks to Kinsey in the support department for reviewing all the prompts!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@20034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 17:00:32 +00:00
Tilghman Lesher
4bea5adcbf Bug 6947 - Allow vm broadcasts to more than 256 characters worth of mailboxes
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@19891 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-13 20:37:50 +00:00
Kevin P. Fleming
bd9026f975 oops... let's not set a variable and then immediately overwrite it while assuming its old value will magically return
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@19812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-13 17:40:21 +00:00
Tilghman Lesher
9a13dc9d99 Bug 6957 - variable names beginning with CALLERID weren't substituted correctly
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@19768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-13 15:56:35 +00:00
Tilghman Lesher
829bf52765 Bug 6490 - telco intercept should report NOANSWER instead of CHANUNAVAIL
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@19397 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 22:39:59 +00:00
Tilghman Lesher
b224ed93ca Bug 6061 - Fix ODBC storage of VM on PGSQL and MSSQL
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@19394 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 22:24:46 +00:00
Kevin P. Fleming
c3d195a2b3 don't create a 'voicemail' symlink in the sounds directory; app_voicemail has not needed it since January of 2005 (issue #6613)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@19353 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 21:58:47 +00:00
Tilghman Lesher
aea2d73afa Bug 6097 - possible descriptor leak
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@19351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 21:55:51 +00:00
Kevin P. Fleming
5bc6b3b6fd don't call the originating device as part of the Page() operation (issue #6932)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@19348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 21:50:18 +00:00
Kevin P. Fleming
58c3bdc8f1 simplify spy queue flushing logic, and always force a flush when one side gets full, even if the other side is not empty (issue #6457)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@19347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 21:35:52 +00:00
Kevin P. Fleming
6f7efa99d5 don't destroy the entire dialplan during 'reload', just atomically replace it like 'extensions reload' does (issue #6047)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@19345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 21:14:42 +00:00
Joshua Colp
fb912bc629 Minor linked lists bug fix. When you're dealing with swapping entries around a lot it can cause a seg fault.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@19303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 20:46:38 +00:00
Kevin P. Fleming
95dc3bba01 handle call time limit properly when warning is requested _after_ call would hae already ended (issue #6356)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@19301 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 20:11:01 +00:00
BJ Weschke
83b525e2cb When using the silence detector in ast_play_and_record() and ast_play_and_prepend(), the truncation code never gets called to remove the detected silence, because the value of res is zero when control gets to that point. #6903 w/some mods (softins)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@19008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 01:05:01 +00:00
BJ Weschke
4a40420978 Don't say that we can pass an 'exten' argument in the documentation of Park() when we really cannot. #6902 (opsys)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@18866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 17:29:51 +00:00
Tilghman Lesher
08cc142495 Bug 6914 - .txt file fails to rename on operator out
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@18494 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-08 19:20:45 +00:00
Tilghman Lesher
48d13f84a5 Bug 6913 - fix for possible buffer overflow
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@18436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-07 22:07:38 +00:00
Olle Johansson
7b12d67e50 - Fix cause codes
- Add cause code for incompatible formats


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@18260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-07 14:16:41 +00:00
Olle Johansson
d98317c7ad - Fix possible minor memory leak in chan_sip
- Return proper cause code on memory allocation error



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@18250 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-07 13:47:32 +00:00
Kevin P. Fleming
ce8275960e fix typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@18089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 22:15:20 +00:00
Kevin P. Fleming
a6e5c98723 small fix... don't try to check conference details if it couldn't be created or found
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@18088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 22:09:54 +00:00
Kevin P. Fleming
60df6b45d2 don't try to support 'i' or 'r' options if chan_zap is not loaded, and warn the user when they attempt to use them (issue #6675)
update application help text to more clearly define when Zaptel and chan_zap are required


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@18087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 22:04:58 +00:00
Russell Bryant
235212182e move continue out of block that checks verbose level (issue #6880)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@17945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 17:24:25 +00:00
Joshua Colp
831a96aac1 Update email address to my Digium one
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@17905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 17:00:10 +00:00
Joshua Colp
bdea273046 Unlock channel on failure so that ast_mutex_destroy doesn't throw a fit (issue #6647 reported by casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@17702 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05 20:01:19 +00:00
Olle Johansson
f08096e951 Issue #6654: Enum crash on ADDRESS record, possibly bad record, but still a crash
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@17489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05 06:50:35 +00:00
Olle Johansson
d5a3b59ccf Issue #6878 - Unhide DNDstate manager events (thanks casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@17367 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 18:28:14 +00:00
Olle Johansson
457bdd22bb Issue #6882 - move "res=-1" out of verbosity block, minor code cleanups (casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@17335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 17:59:18 +00:00
Matt O'Gorman
43fde6acce Adds documentation to show what the w flag.
Patch from Ian Kinner at Digium.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@17283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 15:24:50 +00:00
Olle Johansson
adf51ade80 Issue 6870 - document that parking lots need to be numeric
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@17150 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-03 20:38:11 +00:00
Olle Johansson
65f95fee51 Issue #6848 take two - Use the tag provided by the SUBSCRIBE request when sending NOTIFY
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@17147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-03 20:22:21 +00:00
Olle Johansson
bca4868578 Ugly patch to avoid hangup causes in non-final responses
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@17074 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-03 17:49:17 +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
Kevin P. Fleming
6c0ac0721e ensure that hint watchers (subscribers) cannot be added or removed while the dialplan is being modified
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@16742 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 18:24:22 +00:00
Tilghman Lesher
65acfca5af Bug 6853 - Manager fixes: 1) extra ActionID, 2) missing colon
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@16581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 22:56:35 +00:00
Tilghman Lesher
3585625b40 Bug 6849 - trivial typo fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@16579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 22:46:06 +00:00
Joshua Colp
c43f01c211 Add another check for 64-bit goodness (issue #6850 reported by evilbunny)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@16559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 21:44:03 +00:00
Joshua Colp
52aa07e2b2 Do not exceed the array size for maximum allowed moh files. (issue #6842)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@16534 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 17:55:28 +00:00
Olle Johansson
b97c1529fc Set initial value on adsipark
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@16346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 01:34:53 +00:00
Olle Johansson
0a48c19845 Typo fix.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@16344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 01:28:41 +00:00
Olle Johansson
8aa27f2c5c Typo (Issue 6839, casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@16303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 00:28:59 +00:00
Tilghman Lesher
0bb7b71572 Bug 6830 - Let GosubIf work with the same conditions as a GotoIf (change in API approved by Russell)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@16192 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 19:11:18 +00:00
Tilghman Lesher
ac1e4d72dd Bug 6835 - Updates to GotoIf help text
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@16082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 14:10:23 +00:00
Russell Bryant
ecf158b51e tell unsetenv for solaris to return the result of the setenv call
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@16008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 04:15:11 +00:00
Olle Johansson
8d417967ce Issue #6823
- Portability issue with the registration port number patch from yesterday.
  Be compatible with more systems than OS/X :-)
  Thanks Rizzo for the advice.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@15898 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 00:58:49 +00:00
Kevin P. Fleming
8d1c316519 ensure that list traversal loops which skip entries properly update the 'previous entry' pointer so when entries _are_ removed the list does not get damaged
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@15896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 00:32:10 +00:00
Russell Bryant
70bd3bebc5 backport astmm + sparch fixes from the trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@15743 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 20:22:05 +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
35ea822831 Fix breakage of NAT support for peers with qualify=yes.
Thanks Damin for access to your system, sorry folks.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@15699 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 19:07:34 +00:00
Russell Bryant
420f3d12aa fix the order in which for loops are expanded (issue #6810)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@15658 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 18:09:05 +00:00
Tilghman Lesher
469e6d539a Bug 6815 - Adding quotes to make bash happy
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@15615 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 17:48:18 +00:00
Olle Johansson
09bf0c3032 Issue #6736 - Use flags for OPTION messages. Thanks Casper!
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@15381 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-27 23:45:31 +00:00
Olle Johansson
3db3883d3d Issue #6597 - sip show registry shows incorrect port
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@15376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-27 23:29:55 +00:00
Olle Johansson
b85f9ea8fb Issue #6409 - Use "s" extension when there's no username in the URI
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@15366 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-27 22:50:41 +00:00
Tilghman Lesher
84b4d40f79 Bug 6601 - More configuration abilities for the RH init script
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-25 05:07:52 +00:00
Tilghman Lesher
ea4baa91d0 Fix incorrect size of zeroing (left over from when maxmsg was hardcoded at 100)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-25 05:01:16 +00:00
Tilghman Lesher
eb76fca6a3 Bug 6783 - When context is specified, voicemail should look for mailboxes in that context
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-25 04:09:04 +00:00
Russell Bryant
677ed9a31a use the correct variable in an error message (issue #6791)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-24 14:48:11 +00:00
BJ Weschke
dea7edda6b Fix a typo in the app description
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14659 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-24 04:53:42 +00:00
BJ Weschke
da3df5ec26 Doxygen comment typo corrections
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-24 00:48:03 +00:00
Joshua Colp
0a0470ad00 Issue #6764 - Return BUSY signal when other party is busy at Attended Transfer (Reported by mnachev)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-23 21:51:50 +00:00
Matthew Fredrickson
b89b296584 Fix SETUP_ACK handling so that we change channels if so requested
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-23 21:44:36 +00:00
BJ Weschke
41feb1c7ff Bug #5884 - fix a possible race state in app_meetme when a channel has gone away and we are reading continuously for more frames. (mneuhauser)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14467 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-23 20:43:05 +00:00
Russell Bryant
9884c9637a don't crash when asked to read from a file that doesn't exist (issue #6786)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-23 20:13:48 +00:00
Joshua Colp
b0f4874196 Fix a minor code issue
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-22 22:18:32 +00:00
Joshua Colp
3667b25224 Issue #6781 - Verbose levels not enforced in app_voicemail (Reported by flobi)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-22 22:13:30 +00:00
Joshua Colp
dcccda229d Issue #5918 - Disposition showing FAILED even though call is answered successfully (Reported by tracinet)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-22 21:38:32 +00:00
Joshua Colp
d31a0d9e7b Issue #6780 - ast_pbx_outgoing_cdr_failed description fix. (Reported and fixed by casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14191 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-22 20:59:21 +00:00
Olle Johansson
674425a343 Issue #6766 - fix ;user=phone functionality. (Reported by alein, fix by russell - thanks!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-22 09:10:13 +00:00
Russell Bryant
efd60d1d1f add a note explaining how to set the DYNAMIC_FEATURES variable to allow the use
of custom features (issue #6747)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 18:59:29 +00:00
Russell Bryant
0cfcb22bbc fix crash when using the ParkAndAnnounce application. When using this application,
there will be no peer channel to play the parking announcement to. (issue #6756)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 18:21:47 +00:00
Russell Bryant
9925080ca6 fix REGEX on strings that contain quotes (issue #6678)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 17:45:56 +00:00
Russell Bryant
e34983cde0 fix spelling of whiskey
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13888 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 16:22:16 +00:00
Russell Bryant
17187101f6 don't add conference participant if the user hangs up while recording their name (issue #6661)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 15:53:27 +00:00
Russell Bryant
747495fc0e re-add the Account parameter to the sample call file since it's not really
deprecated since the CDR function is no longer built in


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13814 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 14:20:28 +00:00
Tilghman Lesher
d564b81083 Bug 6714 - Workaround to avoid retrieving incomplete voicemail message
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 06:24:56 +00:00
Tilghman Lesher
50249c732b Do away with some warnings and fix some indentation
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13707 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 05:27:33 +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
13b57f8255 revert the change made in revision 12927 in favor of keeping the original
behavior of the option.  The documentation has now been updated to reflect
the actual behavior.  (issue #6523)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-19 09:59:55 +00:00
Olle Johansson
6b8f2a96f1 Reset global_rtautoclear at sip reload
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-19 09:25:09 +00:00
Tilghman Lesher
b21dc2c0c2 Bug 6737 - Fix compile warning on OS X
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-16 20:05:00 +00:00
Olle Johansson
f096152b20 Issue #6690 - clarify progressinband default setting
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-16 17:58:54 +00:00
Russell Bryant
3b776cdfdc always use the callerid signalling method set in the zt_pvt strucutre as
opposed to the last one read from the config file (issue #6734, with mods)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-16 17:42:46 +00:00
Olle Johansson
9593aa0aa1 To quote giant developers: "Oops". Thanks, Tony!
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-16 06:56:20 +00:00
Russell Bryant
4edd97a713 - remove some calculations that will always result in 0
- if a CDR was never started, don't try to calculate a duration and consider it failed


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-15 22:16:15 +00:00
Tilghman Lesher
eb1b6f313e Reverting patch from bug 6667
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13095 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-15 18:07:06 +00:00
Olle Johansson
38ca23948d Issue #6728: Remove parameters to Event: header on SUBSCRIBE requests
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13026 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-15 13:01:23 +00:00
Russell Bryant
e6ae8990bc when using the G() option to Dial, fix sending the called channel to 1 priority
beyond what was specified (issue #6523)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@12927 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-14 18:41:05 +00:00
Russell Bryant
14e8c4c5a3 fix a problem with not loading realtime queue members by always reloading a
realtime queue from the database even if it is found in the list (issue #6680)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@12925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-14 18:28:39 +00:00
Tilghman Lesher
b2bd6c27db Bug 6667 - Fix for RFC2833 issues
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@12792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-13 15:28:35 +00:00
Russell Bryant
d3080cc1ae add locking to protect the list of global dialplan variables
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@12646 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-12 19:26:27 +00:00
Olle Johansson
023a312f65 Set properties on two files that lacked properties for eol etc
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@12613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-12 18:54:31 +00:00
Russell Bryant
89995395d9 fix build on parisc (issue #6704)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@12577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-12 17:57:37 +00:00
Olle Johansson
fbe6931218 Issue #5937 - Make sure SIP CANCEL's are re-transmitted
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@12495 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-10 12:13:51 +00:00
Olle Johansson
8545a6d4c0 Issue #6576 - SIP_CODEC not used for early media (reported by gpapadop73)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@12477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-09 17:00:36 +00:00
Olle Johansson
3388661f38 Issue #6657 - Ignore 183 session progress without SDP
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@12458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-08 10:51:47 +00:00
Tilghman Lesher
1d58eff4a7 Bug 6020 - Race condition where packet could be lost if first packet on list is acked
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@12195 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-07 00:05:27 +00:00
Tilghman Lesher
cc4595f85e Bug 6664 - More fixes for Solaris
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@12161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 23:03:54 +00:00
Olle Johansson
ac9f562712 Revert earlier change
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@12072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 14:23:14 +00:00
Olle Johansson
b3af62dc4f Fix for astmm compilation
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@12036 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 11:03:46 +00:00
Russell Bryant
a70900ccd0 fix a typo in the description of the ringtimeout option
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 02:32:35 +00:00
Olle Johansson
782eb432ab Clear page2 flags at reload too
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-05 12:40:10 +00:00
BJ Weschke
4e3b9d6389 Substitute variables in the post_process string (if it exists) before those variables could possibly disappear (channel hangup) #6462
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-04 11:45:37 +00:00
Tilghman Lesher
dbc0f5d2e2 Bug 6638 - Solaris is starting to remind me of RedHat...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11715 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-03 17:13:37 +00:00
Olle Johansson
ea27f3c186 Change of URL
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11659 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-03 08:12:33 +00:00
Tilghman Lesher
2dc23188a2 Bug 6638 - Use POSIX command for Solaris
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-03 00:38:14 +00:00
Tilghman Lesher
a4725e9c73 Bug 6638 - Change from a historic BSD command to a POSIX command for determining username
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11634 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-03 00:34:52 +00:00
Tilghman Lesher
575c2bccd5 Bug 6637 - Fixes for Solaris
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-02 22:26:30 +00:00
Tilghman Lesher
2d5cc8be5c If debugging, the frame pointer is helpful
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11607 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-02 22:19:52 +00:00
Russell Bryant
10191fe126 fix inaccurate ack message to ChangeMonitor action (issue #6630)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-02 19:05:40 +00:00
Russell Bryant
4a391da1bd make the terminology used in the synopsis match the option description
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-02 06:16:26 +00:00
Russell Bryant
86406e8ba0 add the -L option to the synopsis on the man page
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-02 06:11:53 +00:00
Tilghman Lesher
536dcc2058 Bug 6615 - Fix 64bit conversion errors by using a long int
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11503 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-01 17:41:52 +00:00
Tilghman Lesher
c4c44af8e3 Bug 6618 - Solaris compatibility fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-01 06:39:10 +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
Russell Bryant
271ccecaf2 adjust the keys directory when astvarlibdir is specified in asterisk.conf (issue #6602)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-28 19:31:10 +00:00
Russell Bryant
0742e08800 add a missing newline in the agi app description (thanks wunderkin!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-28 18:31:04 +00:00
Russell Bryant
34a135da3b don't try to print the help text for a CLI command when RESULT_SHOWUSAGE is
returned if there is no help text available (issue #6604)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-27 15:20:48 +00:00
Russell Bryant
39139b2802 fix finding realtime peers that are not dynamic by ip address (issue #6093)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-27 15:14:53 +00:00
Russell Bryant
799247b4d5 don't hang up the channel if its state is set to UP before we return from ast_call (issue #6569)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11250 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-27 02:50:09 +00:00
Tilghman Lesher
677a22c209 Bug 5950 - reenable queue log rotation; also, eliminate redundant code
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-26 16:26:39 +00:00
Matthew Fredrickson
973a1dec88 Backport of fix to translation optimizations. Thanks again file!
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-25 19:54:40 +00:00
Kevin P. Fleming
dfc0e65f4b factor the number of translation steps required into translation path decisions, so that equal cost paths that require fewer translations are preferred
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-25 05:08:46 +00:00
Kevin P. Fleming
1e94621214 reformat code to fit guidelines
remember which translation paths are multi-step paths


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11062 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-25 04:59:50 +00:00
Kevin P. Fleming
5fbe407b98 ensure that spy frame queueing is able to deal with translation failing for any reason (issue #6546)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-25 04:23:48 +00:00
Tilghman Lesher
a3ce65e5cd Oops, this was broken in 1.2, too.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-23 23:06:42 +00:00
Kevin P. Fleming
fcf8040825 backport list handling fix from trunk (solves memory leak problem in cdr variables and device state watchers)
remove unusued variable to silence compiler warning


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10863 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-23 14:57:53 +00:00
Kevin P. Fleming
842e9246a6 add comment warning people about trying to use hostnames/IPs in the sample config
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10736 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-22 17:32:15 +00:00
Tilghman Lesher
6b682d34ff Would be nice to tell people to look in the right file to increase a constant
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-20 23:01:12 +00:00
Mark Spencer
1ef0003131 Handle ACKing properly (remove gratuitous -1)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-20 06:17:26 +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
Tilghman Lesher
0a1d8918d8 Okay, fseek doesn't return an offset
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10487 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-19 18:29:16 +00:00
Tilghman Lesher
3da520e492 Fix possible lack of initialization of useadsi
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-19 17:26:31 +00:00
Tilghman Lesher
0a0cf51877 Bug 6539 - Division by two negates error flag
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-19 17:11:02 +00:00
Tilghman Lesher
cab988b595 Bug 6529 - memory leak in ast_play_and_prepend
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-18 00:17:09 +00:00
Russell Bryant
507c47ffa4 fix incorrent index calculation for jitterbuffer history (issue #6517)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-17 01:55:10 +00:00
Russell Bryant
7c92ffe150 when executing the Directory application from voicemail and a context is not
specified, use the "default" context, not the channel's current context (issue #6507)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10301 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-16 18:07:52 +00:00
Kevin P. Fleming
f522e07cbd ensure that agents logged in via the manager interface are stored in the persistence database (related to issue #6301)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 01:21:33 +00:00
Kevin P. Fleming
df18b234b1 handle longer ENUM lookup results (issue #6476)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 00:46:18 +00:00
Kevin P. Fleming
7652fdda20 ensure that FastAGI launcher can handle system call interruption (issue #6449)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 00:36:57 +00:00
Matt O'Gorman
bab77bbab1 bug fix from 6485 with musiconhold not being turned
off by app_meetme


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 20:56:41 +00:00
Kevin P. Fleming
ce008d40a1 don't double-increment abandon counter for calls that are hung up while dialing members (issue #6289)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10018 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 20:20:15 +00:00
Mark Spencer
710445b5b1 Fix stopstream in menus (bug #6137)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 19:11:25 +00:00
BJ Weschke
ba001a7d15 #ifdef the include too.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 18:50:42 +00:00
BJ Weschke
4f144aa5e3 #ifdef'd the prctl fix to only try and compile on linux systems. Thanks rizzo for pointing this out.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 18:45:34 +00:00
Kevin P. Fleming
8d66f50877 when answering INVITE, don't send codecs the peer didn't offer (issue #6052)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 18:30:10 +00:00
Kevin P. Fleming
e0db36550e revert yesterday's temporary fix for issue #6052
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 18:23:13 +00:00
BJ Weschke
13f4e66b14 Fixed my silly backport error from r9861
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 04:45:14 +00:00
BJ Weschke
ae8fe3738b Merged changes from r9844 from /trunk. Make sure that PR_SET_DUMPABLE is set to make certain that we still dump core if Asterisk has setuid'd to run as non-root.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9861 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 03:08:17 +00:00
Kevin P. Fleming
b5111fb985 don't try to use peer's dynamic codec numbers, it leads to duplication (issue #6052)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 00:46:00 +00:00
Josh Roberson
671cde62de Don't set the formats before we stop indications. (issue #6380)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9756 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-13 17:37:53 +00:00
Russell Bryant
0ea76a52a9 fix memory leak from not destroying the scheduler context on module unload
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 19:23:20 +00:00
Russell Bryant
db467378b4 fix due to CDR changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9607 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 19:16:23 +00:00
Russell Bryant
e27d844918 now that CDR is a loadable module, don't depend on it elsewhere (issue #6460)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 18:15:00 +00:00
Kevin P. Fleming
3b0edd5cfe clean up my mess from thread-starting change
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 15:22:55 +00:00
BJ Weschke
74eef60486 kpfleming's fix from r9472 backported to 1.2
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 06:29:34 +00:00
Kevin P. Fleming
b3a8fbf495 don't create monitor threads in detached mode, when we need to be able to pthread_join() them later if the module is unloaded (solve crash-on-unload problem for these channel modules)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9404 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-10 20:38:59 +00:00
Tilghman Lesher
bae6e7b617 Revert behavior change from previous commit (fixes only)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9326 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-09 21:10:10 +00:00
Tilghman Lesher
cf015dbefc Backport 5929 to 1.2
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9323 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-09 21:02:05 +00:00
Russell Bryant
32cc1bedc1 add another location for postgresql headers (issue #6419)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-09 02:31:21 +00:00
Russell Bryant
a96ecb64a6 reload peercontext on iax2 reload (issue #6442)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-09 01:24:55 +00:00
Tilghman Lesher
d1757b3b49 Leave it to RH/CentOS to put the freetds headers in a completely nonstandard location.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9233 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-08 22:34:38 +00:00
Matt O'Gorman
917259bcd3 Make logger report error,warning,notice if logger.conf
not found, also updated chan_oss to give correct
error message if its config file is not found.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-08 22:12:34 +00:00
Tilghman Lesher
eb177856db Bug 6176 - Fix race condition
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9156 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-05 17:10:19 +00:00
Kevin P. Fleming
9849ad993d don't override ASTERISKVERSIONNUM to 000000 for non-svn builds
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-02 18:37:04 +00:00
Matthew Fredrickson
bb886dd488 Fix for (#6309), potential (highly unlikely) memory leak in res_odbc
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9073 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-02 16:12:13 +00:00
Kevin P. Fleming
48fb967c05 disable buggy PRI user-user code until it can be fixed
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-30 17:08:28 +00:00
Olle Johansson
e74a7116e5 Issue 6182 - Don't remove scheduled event until it's really done.
(reported by malverian) 


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-28 13:52:15 +00:00
Olle Johansson
fd25b81993 Issue 6362 - Register without Contact: and Expires: fails (reporter: op)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-27 08:02:16 +00:00
Tilghman Lesher
dcd9d8d58f Bug 6072 - Revisions to the source bison and flex files don't auto-regenerate these files
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8758 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-27 00:52:12 +00:00
Russell Bryant
1d9b2a9df1 fix problem with dtmf on e&m (issue #6364)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-26 19:42:35 +00:00
Olle Johansson
659da47b95 Issue 5898: Registrations does not get deleted if there's an active SIP dialog
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8710 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-26 14:39:36 +00:00
Russell Bryant
e83bfee678 don't call ast_update_realtime with uninitialized variables if we get a
registration with an expirey of 0 seconds (issue #6173)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-25 19:14:43 +00:00
Russell Bryant
ab209c7d92 fix memory leak (inspired by issue #6351)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8666 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-25 18:39:44 +00:00
Olle Johansson
dc08bd8501 Issue #6439 - the "timebomb" bug. Patch by Markster over GPRS
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8632 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-25 09:46:43 +00:00
Russell Bryant
aca3c1f79d don't leak almost 200 bytes for each new channel (issue #6330)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8619 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-25 05:38:36 +00:00
Kevin P. Fleming
e07c977f18 ensure hangup cause code is handled properly when channel does not return a frame (issue #6346)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8608 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-25 01:50:52 +00:00
Russell Bryant
2ae21cc5c3 completely arbitrary whitespace change for testing something with svnmerge ...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 22:55:32 +00:00
Kevin P. Fleming
05fed23d06 ensure that channel cannot become zombie after we check but before we try to start indications
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 22:32:09 +00:00
Matthew Fredrickson
2f43722570 Backport fix for #6229, hangup on polarity reversal
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 20:37:30 +00:00
Olle Johansson
7ea315539c Issue 6114: Don't hangup on BYE/ALSO with no channel.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8562 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 19:21:15 +00:00
Olle Johansson
10d527906a Issue #6308 - never send response to ACK. (Reported by whiskerp)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8537 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 13:15:13 +00:00
Russell Bryant
2f1d118537 fix memory leak from not freeing the queue member list when freeing an old queue
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8445 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-22 19:03:53 +00:00
Russell Bryant
696922defe fix MixMonitor crash (issue #6321, probably others)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-22 17:47:13 +00:00
BJ Weschke
cea50c9247 Bug fix: Correct some scenarios where CALL_LIMIT could not be getting adjusted properly allowing chan_sip to send calls when it really shouldn't. Bug #6111
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-22 15:13:41 +00:00
Tilghman Lesher
636f956bf0 Bug 6281 - Cannot set more than a single header with SIPAddHeader
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-22 08:52:49 +00:00
Russell Bryant
64b1d91701 add a modified fix to prevent writing outside of the provided workspace when
calculating a substring (issue #6271)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8418 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-22 02:05:41 +00:00
Russell Bryant
ff83f7c6ed temporarily revert substring fix pending the result of the discussion in issue #6271
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21 23:43:14 +00:00
Russell Bryant
87c0cd2667 prevent the possibility of writing outside of the available workspace (issue #6271)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8412 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21 23:17:06 +00:00
Tilghman Lesher
366c8a99ef Bug 5936 - AddQueueMember fails on realtime queue, if queue not yet loaded
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8394 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21 18:29:39 +00:00
Russell Bryant
30f2aff526 fix invalid value of prev_q (issue #6302)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-20 18:34:42 +00:00
Matt O'Gorman
962cffffc7 solved problem with delayreject and iax trunking
bug 4291


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8320 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-20 01:00:46 +00:00
Olle Johansson
f196484187 Enable "musicclass" setting for sip peers as per the config sample.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-19 19:40:28 +00:00
Tilghman Lesher
c40fe2f71a Bug 6072 - Memory leaks in the expression parser
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-19 19:14:37 +00:00
Russell Bryant
74c149e891 fix Message-Account header to use the ip address if the fromdomain
isn't set (issue #6278)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-19 04:56:48 +00:00
Russell Bryant
57c82eb66f fix a seg fault due to assuming that space gets allocatted on the stack in the
same order that we declare the variables (issue #6290)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-19 04:17:45 +00:00
Matt O'Gorman
5460606cff Solves issue with the login proccess in meetme
patch from 6136


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8194 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-18 21:02:06 +00:00
Russell Bryant
1a509417a4 remove ChangeLog from the 1.2 branch. It will only be present in the tags.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-18 02:49:21 +00:00
Matt O'Gorman
898cd20ceb Changed order of autoload so that pbx_ comes before
channels, and in doing so cause bug 6002 to not
be an issue


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-18 00:47:04 +00:00
Matt O'Gorman
792b78b317 Stop any generators running on a channel when
festival is called as described in 5996


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17 20:10:29 +00:00
Matthew Fredrickson
4efe647169 Backport of fix for #6094
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17 18:29:57 +00:00
Matt O'Gorman
4fbba55f14 Fixed code ordering of logger_init and queue_log_init
bug 6263


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17 16:55:30 +00:00
Kevin P. Fleming
2efc5a9e83 update CLI copyright notice
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17 13:11:55 +00:00
Kevin P. Fleming
57144d5102 do rlimit check _after_ reading config file, in case 'dumpcore' is specified there
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-16 23:51:37 +00:00
Tilghman Lesher
555bbffec3 Bug 6238 - Fix segfault when delimiter not specified
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8074 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-14 19:06:44 +00:00
Russell Bryant
e22510658b fix spelling errors (issue #6227)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-13 06:07:39 +00:00
Tilghman Lesher
cb08e49303 Bug 6211 - Add option deletevoicemail as equivalent to option delete for Realtime
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7999 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-12 06:14:22 +00:00
Russell Bryant
dee03d2b80 move variable to correct scope (issue #6197)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7986 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 19:08:53 +00:00
Russell Bryant
b5ec3e47fa fix temp greetings with ODBC storage (issue #6078)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7976 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 07:18:16 +00:00
Russell Bryant
ffb11fb950 fix mem leak on module unload (issue #6190)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7972 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 05:46:39 +00:00
Russell Bryant
fbee1f0ed7 don't override an error condition that occurred when acting on the primary channel
when stopping the autoservice on the peer channel.  (from issue #6087)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7970 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 05:26:21 +00:00
Russell Bryant
131ada1116 lock list of translators *before* recalculating the translation matrix
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7965 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 04:53:24 +00:00
Matt O'Gorman
b0609b29aa Minor typo refrenced in 6191
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7963 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 04:38:07 +00:00
Russell Bryant
bbb59b8c5e fix locking error - lock instead of unlock
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7960 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 04:19:21 +00:00
Russell Bryant
72deed0c37 fix a little typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 03:12:44 +00:00
Tilghman Lesher
b9f8c60fa7 Bug 6192 - behave correctly when mailbox is specified as argument
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 01:30:10 +00:00
Olle Johansson
87b36e1ff1 - Adding reference to README.tds
- Reformatting table


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-10 08:48:14 +00:00
Kevin P. Fleming
d8c5d338cb re-initialize _all_ sequence numbers when transfer completes
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 22:48:48 +00:00
Russell Bryant
417438fea0 add missing unlock (issue #6112)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7915 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 22:07:26 +00:00
Tilghman Lesher
5488ffb6d4 Bug 6157 - Memory leak
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7908 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 20:08:24 +00:00
Tilghman Lesher
e8725ce940 Update variable documentation to match the code
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 18:37:50 +00:00
Kevin P. Fleming
0e734920e8 commit user/group-related changes from trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 18:11:23 +00:00
Kevin P. Fleming
ad598a2060 backport fix from revision 7856 of trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7899 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 18:09:53 +00:00
Kevin P. Fleming
bb47f95262 fix breakage introduced in revision 7871
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7898 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 18:08:07 +00:00
Russell Bryant
a7a2115b9c fix seg fault when using greek syntax in VoicemMailMain (issue #6142)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7871 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 05:11:44 +00:00
Russell Bryant
18429f2a69 backport fix for unnecessary unlock (issue #6171)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 04:52:16 +00:00
Tilghman Lesher
7e6430787c Bug 6156 - catch all threading errors, not just simple failure
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7848 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-07 07:27:18 +00:00
Tilghman Lesher
dc3ba8c223 Dumb error messages - "Context 'context' already included in 'in' context"
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-06 00:34:40 +00:00
Kevin P. Fleming
2fd6520a7e update agent persistence when an agent gets logged off by autologoff
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-06 00:21:00 +00:00
Tilghman Lesher
7a61b36104 Bug 6076 - Fix documentation of ast_trim_blank return value
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-05 23:53:07 +00:00
Kevin P. Fleming
2f4783a770 eliminate rounding errors that caused call time limits to be inaccurate (issue #5913)
round 'time left' reported during call limit warnings up to sound more accurate


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-05 23:49:50 +00:00
Tilghman Lesher
6056391a78 Bug 6081 - fix for memory leak, formatting fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7823 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-05 23:07:08 +00:00
Kevin P. Fleming
213b3575ce ensure that variable is initialized
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7819 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-05 20:52:38 +00:00
Olle Johansson
3821e18d08 Fix copyright of changed file
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-05 09:13:21 +00:00
Kevin P. Fleming
224c6e3f7c send device state updates for auto-logoff of agents as well
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-05 00:58:29 +00:00
Kevin P. Fleming
18ab6f429c doh... fseek() has no useful return value
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-05 00:18:46 +00:00
Kevin P. Fleming
07f8542ce7 use proper fwrite() parameters and return value
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 23:51:03 +00:00
Kevin P. Fleming
cf293c224d return properly after extending file
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 23:45:34 +00:00
Kevin P. Fleming
e234ad0011 ensure that ulaw/alaw sound files are filled with silence when extended (not zeroes)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7800 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 23:27:57 +00:00
Kevin P. Fleming
229b778b0b make monitoring more tolerant of peers that deliver frames in bursts
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 23:02:38 +00:00
Olle Johansson
66f484defe Issue #5980: Removing extra CR+LF in manager events - needs port to trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7795 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 21:46:40 +00:00
Olle Johansson
ed523e248a Fixing typo in XML for video updates.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 21:43:14 +00:00
Russell Bryant
3c49f27bf4 use a more correct way of determining the size of the destination buffer
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 07:06:50 +00:00
BJ Weschke
226d146b25 Fix the 'if' clause to be true under the right conditions. Bug #6126
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 05:27:38 +00:00
Kevin P. Fleming
1892289329 remove unused 'old' expression parser
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03 20:22:18 +00:00
Tilghman Lesher
5529fc0355 Bug 6121 - typo in application description
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7743 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03 18:15:12 +00:00
Kevin P. Fleming
73ef559240 revert incorrect fix for bug #6048 from revision 7709
put in correct (simpler) fix
add doxygen docs for channel spy 'state' values


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7740 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03 17:24:56 +00:00
Kevin P. Fleming
b59a63c8cd backport rport scanning fix from trunk (bug #6071)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03 17:00:01 +00:00
Kevin P. Fleming
c36927137f don't leak memory for (most) expression evaluations
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7736 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03 16:34:12 +00:00
Tilghman Lesher
649aaad100 Bug 6084 - MixMonitor after a 'cli stop monitor' deadlocks
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7709 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-02 07:31:54 +00:00
BJ Weschke
ea4c262482 Fix compiler warnings.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-02 02:04:14 +00:00
Tilghman Lesher
89de6c9df6 Bug 6091 - Fix race condition around uniqueid
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-30 14:54:19 +00:00
Russell Bryant
4578bc3b0c fix memory leak in build_rpid (issue #6070)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-28 17:35:56 +00:00
Russell Bryant
8df1e4866a backport fix for permissions of created recordings (issue #6067)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-27 21:07:08 +00:00
Kevin P. Fleming
9f92220a9c backport fix to ensure that DSP is never enabled on pseudo channels
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-27 00:07:45 +00:00
Tilghman Lesher
09a9e7bcb7 Remove copy of code in libc, preferring code in utils.c (public domain code)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-26 20:32:50 +00:00
Russell Bryant
a434f8877a cast time_t to an int in printf/scanf (issue #5635)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7634 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-26 18:19:12 +00:00
Tilghman Lesher
ef891dc0a7 Bug 6051 - VMCOUNT should work as documented and count all, not quit after finding 1
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7608 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-23 06:38:08 +00:00
Kevin P. Fleming
3ebe29c983 add license reference to copyright notice displayed when CLI session begins
add 'show warranty' and 'show license' CLI commands (still need a complete list of non-GPL components included in Asterisk)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-23 03:01:24 +00:00
BJ Weschke
1028e43464 Another app documentation tweak.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7605 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-23 00:00:11 +00:00
Tilghman Lesher
4979f66f28 Bug 6050 SQL requires the use of single ticks to delimit values, not quotes
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7601 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-22 22:04:13 +00:00
Russell Bryant
a5e9fe97c8 revert changes to videosupport to allow per-peer setting, since it isn't quite
complete and there is not an obvious fix at this point


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7599 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-22 20:36:47 +00:00
Russell Bryant
2293cfaf84 remove stray unlock (issue #5955)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-22 16:17:43 +00:00
Josh Roberson
d252dde933 Actually put in the per-peer settings for sip video, as they didn't make it in at astricon somehow, and I've been too busy up until now to redo it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7586 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-21 22:23:39 +00:00
Tilghman Lesher
37a49a5992 Allow a chan_alsa that failed to open sound devices to be unloaded.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-21 20:01:16 +00:00
BJ Weschke
2783801610 Bug #6040 - Documentation correction
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-21 19:53:49 +00:00
Tilghman Lesher
82f19c9a91 Bug 5777 - Remove parentheses on Goto in AEL, so that it parses correctly
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-21 19:23:12 +00:00
Russell Bryant
71d9531e45 check array bounds when parsing arguments to AGI (issue #5868)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-20 20:21:26 +00:00
Russell Bryant
3bbeaefa57 backport fix for reloading peer context (issue #6007)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-20 18:05:45 +00:00
Russell Bryant
4611be805a backport fix for segfault on directed pickup when no CDR is available (issue #5998)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-20 17:34:00 +00:00
Kevin P. Fleming
587493fdfc backport fix for larger-than-20ms-frames from trunk (bug #5697)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-20 12:58:37 +00:00
Russell Bryant
50079144e3 I messed up and accidently committed this to the trunk first ...
- add note on required values of sip_methods struct
- remove duplicate function prototype
- remove duplicate ast_mutex_lock (issue #6025)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-19 23:47:23 +00:00
Tilghman Lesher
2ca80e76a0 Bug 5988 - record append option not working
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-19 19:06:46 +00:00
Tilghman Lesher
68e6502484 Bug 6026 - segfault for the sequence NoCDR(), SetAMAFlags()
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-19 05:38:44 +00:00
Tilghman Lesher
1e91dfa5df Document that curley braces must be on the same line as the keyword.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-17 18:55:38 +00:00
Tilghman Lesher
e4e5f7c65b Bug 6009 - off by one error
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7517 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-17 17:19:32 +00:00
Kevin P. Fleming
8ef66261f1 Max-Forwards headers must only be present on requests, not responses
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7515 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-17 03:59:05 +00:00
Kevin P. Fleming
90812b536c forcibly expire previous subscriptions from a peer when they resubscribe (keeps them from building up and waiting for expiration, and stops us sending unwanted NOTIFY messages to devices)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-17 03:44:30 +00:00
Kevin P. Fleming
2b880d3ef8 fix some buglet when building team branch version strings
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7510 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-17 02:20:04 +00:00
Tilghman Lesher
6ab729aeb3 We want to check the previous value, not the current value (which was just changed).
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-17 01:02:29 +00:00
Tilghman Lesher
c9f97f49c5 First field is truncated
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7497 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-16 00:49:39 +00:00
Christian Richter
8b352fcb94 * Added mISDN/mISDNuser Echo cancel Patch
* Fixed Makefiles so that chan_misdn can be compiled again
* added some hints, that mISDN cannot be compiled against gcc-4, SMP, Spinlock Debug
* fixed some Minor issues in chan_misdn, regarding Type Of Number and Presentation






git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-15 10:52:30 +00:00
BJ Weschke
5a06af4d57 Bug #6003 - Don't free the channel structure until after having sent the manager event.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-15 02:51:54 +00:00
Kevin P. Fleming
2ede900bfd clarify substring documentation
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-13 18:54:22 +00:00
Kevin P. Fleming
fb0ffc7784 correct broken math in tvfix() for timestamp values over one million
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7468 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-13 16:06:27 +00:00
Kevin P. Fleming
e69171dc06 restore ability of caller to hangup calls that are still ringing (issue #5839)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7453 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-13 05:53:00 +00:00
Kevin P. Fleming
8452f6b494 ensure that hangups while incoming calls are in early state are handled properly (issue #5919)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-13 05:14:27 +00:00
Kevin P. Fleming
f9bc6f8afc only report AGENT_IDLE for callback mode agents when they are actually idle (issue #5902)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-13 04:43:38 +00:00
Kevin P. Fleming
f9f44d7d9b use the stream's current point when pausing/unpausing, instead of elapsed time (which doesn't work when the stream has been skipped forward or backward) (issue #5897)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7448 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-13 04:25:14 +00:00
Kevin P. Fleming
86bb1472cc set all the child file descriptors to non-blocking so that we don't hang if the child fails to send a newline-terminated command or error message
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-12 17:30:59 +00:00
Tilghman Lesher
ef09c506c8 Typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-12 17:19:29 +00:00
Russell Bryant
af7b3b420e silence a couple of compiler warnings about pointer signedness
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-11 06:08:56 +00:00
Tilghman Lesher
3b80a35a66 Bug 5965 - major bug in AST_LIST_REMOVE
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-11 01:26:51 +00:00
Tilghman Lesher
f59b27258c Bug 5967
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7427 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-11 01:15:15 +00:00
BJ Weschke
d38fff38f9 Bug #5877
Make sure the digit string from E&M wink DNIS collection is properly null terminated as it grows.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-10 18:10:50 +00:00
Tilghman Lesher
91c5b12f25 Bug 5960
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7406 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-08 23:45:36 +00:00
Tilghman Lesher
894bdd5cda Documenting two keywords that were previously missing
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7404 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-08 23:32:08 +00:00
Kevin P. Fleming
d8c58ca6c8 initialize the buffer before using it...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7386 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-08 01:05:43 +00:00
Kevin P. Fleming
43f7956422 ensure that hints are allowed to use global variable references
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-07 20:46:55 +00:00
Kevin P. Fleming
96fcc02900 ensure that sound/music files are handled as binary
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-06 00:23:05 +00:00
Kevin P. Fleming
2e8b6e7f20 replace with unmodified file
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-06 00:19:17 +00:00
Kevin P. Fleming
3ed93398e9 _really_ don't mess with line endings
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-06 00:08:19 +00:00
Kevin P. Fleming
d84e0caea8 don't try to expand keywords in this file
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-06 00:07:48 +00:00
Kevin P. Fleming
5c1da58b90 set this file to binary mode, so it won't be mangled on export/checkout
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-06 00:02:08 +00:00
Russell Bryant
018c617199 remove ASTERISKVERSIONNUM from the version string given to doxygen
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7340 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-05 06:47:51 +00:00
Russell Bryant
a49f954f6a don't delete dynamic queue members when reloading the static members from a realtime database (issue #5922)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-05 00:09:12 +00:00
Russell Bryant
03a8791440 fix the order of arguments to an error message (issue #5927)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-05 00:01:17 +00:00
Kevin P. Fleming
78ad17381e use a more efficient way to get the revision number, that will also report if the working copy contains uncommitted modifications
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-04 18:03:07 +00:00
Tilghman Lesher
5b03803e2f Bug 5925: check for "Unknown", as that's what app_voicemail puts into the field for Unknown callerid
Also, remove useless res checks (initialized to 0; never set)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7310 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-03 19:55:05 +00:00
Olle Johansson
ee1e461a57 Documenting the default registerattempts setting as 0, continue hammering the server for ever and ever ;-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-03 01:24:40 +00:00
Tilghman Lesher
a543725311 Turn on executable bits for startup scripts, and fix bash var interpolation for Mandrake
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-02 21:12:05 +00:00
Olle Johansson
8c701a0861 Bug #5907. Improve SIP INFO DTMF debugging output. (1.2 & Trunk)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-02 00:52:13 +00:00
Kevin P. Fleming
5fbe566524 inherit channel variables into channels created by Page() application (issue #5888)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-02 00:51:15 +00:00
Kevin P. Fleming
e14cf31bc9 allow previous context-searching behavior to be used if desired (issue #5899)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-02 00:42:40 +00:00
Kevin P. Fleming
0042c03c7e properly handle password changes when mailbox is last line of config file and not followed by a newline (issue #5870)
reformat password changing code to conform to coding guidelines (issue #5870)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-02 00:39:00 +00:00
Kevin P. Fleming
41023ecb9c protect agent_bridgedchannel() from segfaulting when there is no bridged channel (issue #5879)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7271 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-02 00:28:48 +00:00
Kevin P. Fleming
fb8d0a544d allow variables to exist on both 'halves' of the Local channel (issue #5810)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-02 00:26:12 +00:00
Kevin P. Fleming
acaf8c9cc9 don't block waiting for the Festival server forever when it goes away (issue #5882)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-01 23:49:44 +00:00
Kevin P. Fleming
0d3fc8d103 ensure channel's scheduling context is freed (issue #5788)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-01 23:34:58 +00:00
Kevin P. Fleming
9bbfbacacc Makefile 'update' target now supports updating from Subversion repositories (issue #5875)
remove support for 'patches' subdirectory, it's no longer useful


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-01 23:18:29 +00:00
Olle Johansson
8e301c629f Changing bug report address to the Asterisk issue tracker
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-01 23:18:14 +00:00
Olle Johansson
9576d8a081 Removing references to 1.1dev, replacing with 1.2, in documentation files.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-01 22:21:13 +00:00
Olle Johansson
7db96672bf Fixing some spelling errors, as well as changing "cvs" to "subversion" in misdn documentation.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-01 21:38:38 +00:00
Kevin P. Fleming
0d8f099ca2 ensure that 'svn info' output is in the expected language for the script to parse (issue #5880)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7257 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-01 19:25:06 +00:00
Russell Bryant
0a4d7e5068 use ast_app_separate_args to split arguments (issue #5686)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7251 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-01 02:33:58 +00:00
Russell Bryant
a32f75b800 fix queue weight feature - compare member interfaces instead of pointers to
the members, since each queue has its own list of members. (issue #5863)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7249 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-01 01:19:04 +00:00
Russell Bryant
78f37c51ef use '=' instead of '==' for string comparisons. /bin/bash is ok with this, but
/bin/sh is not.  (issue #5885)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7247 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-01 00:44:34 +00:00
Russell Bryant
d6e5eb75ee remove outdated redhat init script and provide the updated one in 'make rpm' (issue #5786)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7244 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 21:31:18 +00:00
Russell Bryant
6f433a7e7b Comment out LD_ASSUME_KERNEL by default.
Print error messages if the asterisk executable or the asterisk configuration
directory are not found. (issue #5785, #5708)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 21:24:52 +00:00
Russell Bryant
ce2ecb5582 fix DIALEDTIME when call has not been answered (issue #5862)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 17:39:36 +00:00
Russell Bryant
45c15e8561 do not allow an rtp message with zero type (issue #5749)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7233 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 14:27:59 +00:00
Russell Bryant
5e3f4186da fix hint case sensitivity (issue #5856)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7231 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 07:22:42 +00:00
Russell Bryant
d03694df19 add description of the "fromdomain" option (issue #5874)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7228 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 05:26:26 +00:00
Josh Roberson
d52e8fa7d2 backport fix from trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 03:52:18 +00:00
Kevin P. Fleming
77c6cd0bff remove remaining CVS references
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 03:37:37 +00:00
Kevin P. Fleming
463ebe8b4b port memory leak fix from rev 7223 in trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 03:20:42 +00:00
Kevin P. Fleming
a563eab49a remove extraneous svn:executable properties
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 18:24:39 +00:00
Kevin P. Fleming
bf9d4b103d do the multiple-lock check for cond_wait properly...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 14:26:22 +00:00
Russell Bryant
7dc2449f3a print an error message if invalid arguments are specified
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7218 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 06:12:29 +00:00
Russell Bryant
27cc20db11 fix a couple of typos and a buglet
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 05:11:05 +00:00
Kevin P. Fleming
4e04f5f731 if the lock protected a pthread_cond is held recursively, warn before waiting onthe condition
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 01:25:28 +00:00
Kevin P. Fleming
5ec3844077 remove CVS ignore lists, set SVN ignore lists
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 00:46:54 +00:00
Kevin P. Fleming
f641c7cd0d port version string computation from trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7208 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-28 04:01:06 +00:00
Kevin P. Fleming
49aa54cafc branch renames
remove unneeded branches


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-27 16:04:52 +00:00
Russell Bryant
e3b81e66a1 issue #5850
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7196 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-25 14:17:38 +00:00
Russell Bryant
7bb6b928b5 fix typo - thanks twisted :)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7194 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-23 06:02:32 +00:00
Russell Bryant
ad4dc7c4a9 fix the date
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-23 05:59:05 +00:00
Russell Bryant
feb9764721 issue #5828
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7191 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-23 05:57:10 +00:00
Russell Bryant
8c74501001 issue #5826
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-23 05:49:35 +00:00
Russell Bryant
5861d3fd64 issue #5829
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7189 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-23 05:43:27 +00:00
Kevin P. Fleming
08acdc6a86 backport fix from HEAD branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7186 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 19:34:09 +00:00
Kevin P. Fleming
3b50570c9b backport fix from HEAD branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 19:31:26 +00:00
Kevin P. Fleming
00d7e962a7 backport fix from HEAD branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 19:29:51 +00:00
Russell Bryant
192f7413c2 revert previous change for Darwin
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 15:57:51 +00:00
Russell Bryant
5bdb8074aa issue #5789
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7170 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 13:40:34 +00:00
Russell Bryant
6abe5e1b23 don't hardcode poll.o for Darwin
fix incorrect portion of yesterday's Solaris fixes


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 13:23:53 +00:00
Russell Bryant
4612b4ccca issue #5815
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 13:17:32 +00:00
Russell Bryant
3245bf61a1 issue #5775
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 02:44:06 +00:00
Russell Bryant
9ee13167bb issue #5787
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 02:03:23 +00:00
Russell Bryant
ca9633ca9b issue #5794
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 01:00:51 +00:00
Russell Bryant
e04884545c issue #5806
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7155 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 00:03:40 +00:00
Russell Bryant
aa2239a050 issue #5773
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 23:56:49 +00:00
Russell Bryant
40a1b60cbd issue #5774
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 23:51:58 +00:00
Russell Bryant
cccb11916f fix logic for n+101 jumps
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 23:42:43 +00:00
Russell Bryant
49641825eb issue #5795
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 23:36:45 +00:00
Russell Bryant
c14c078405 issue #5792
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7150 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 23:33:03 +00:00
Russell Bryant
f2af073588 issue #5799
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 23:27:28 +00:00
Russell Bryant
b9a5eddb6d fix issue number for previous commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 23:22:10 +00:00
Russell Bryant
bffc815375 issue #5791
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 23:21:40 +00:00
Russell Bryant
5c3f322364 Shorten the module description (issue #5791)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 23:18:01 +00:00
Russell Bryant
3a6fae817c fix the output of Makefile generated variables to doxygen
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-18 04:13:39 +00:00
Russell Bryant
d8f74ecb94 Add missing carriage return and line feed to the SDP line indicating that we don't support VAD (issue #5780)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-17 20:26:27 +00:00
Kevin P. Fleming
f7f2b1b033 fix remaining breakage related to chan_modem modules
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-17 04:26:07 +00:00
Admin Commit
601ab7ff82 This commit was manufactured by cvs2svn to create branch 'v1-2'.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-16 22:40:43 +00:00
1146 changed files with 10268 additions and 4426 deletions

0
.cleancount Executable file → Normal file
View File

View File

@@ -1,16 +0,0 @@
asterisk
defaults.h
ast_expr2.output
.version
.depend
.applied
mpg123-0.59r
mpg123-0.59r.tar.gz
update.out
.lastclean
.cleancount
.tags-depend
.tags-sources
tags
TAGS
testexpr2

1
.lastclean Normal file
View File

@@ -0,0 +1 @@
8

1
.version Normal file
View File

@@ -0,0 +1 @@
1.2.9

0
BUGS Executable file → Normal file
View File

0
CHANGES Executable file → Normal file
View File

0
COPYING Executable file → Normal file
View File

4
CREDITS Executable file → Normal file
View File

@@ -13,6 +13,8 @@ Telesthetic - for supporting SIP development
Christos Ricudis - for substantial code contributions
nic.at - ENUM support in Asterisk
Paul Bagyenda, Digital Solutions - for initial Voicetronix driver development
=== WISHLIST CONTRIBUTERS ===
@@ -85,7 +87,7 @@ Leif Madsen, Jared Smith and Jim van Meggelen - the Asterisk book
available under a Creative Commons License at http://www.asteriskdocs.org
=== HOLD MUSIC ===
Music provided by www.freeplaymusic.com
Music provided by www.opsound.org
=== OTHER SOURCE CODE IN ASTERISK ===

2075
ChangeLog Executable file → Normal file

File diff suppressed because it is too large Load Diff

0
HARDWARE Executable file → Normal file
View File

0
LICENSE Executable file → Normal file
View File

177
Makefile Executable file → Normal file
View File

@@ -36,6 +36,8 @@ endif
# Remember the MAKELEVEL at the top
MAKETOPLEVEL?=$(MAKELEVEL)
PWD=$(shell pwd)
ifneq ($(findstring dont-optimize,$(MAKECMDGOALS)),dont-optimize)
######### More GSM codec optimization
######### Uncomment to enable MMXTM optimizations for x86 architecture CPU's
@@ -179,7 +181,6 @@ ifeq ($(OSARCH),Linux)
# You must have GCC 3.4 to use k8, otherwise use athlon
PROC=k8
#PROC=athlon
OPTIONS+=-m64
endif
ifeq ($(PROC),sparc64)
@@ -200,21 +201,22 @@ ifeq ($(OSARCH),Linux)
OPTIONS+=-fsigned-char -mcpu=ep9312
else
ifeq ($(SUB_PROC),xscale)
OPTIONS+=-fsigned-char -msoft-float -mcpu=xscale
OPTIONS+=-fsigned-char -mcpu=xscale
else
OPTIONS+=-fsigned-char -msoft-float
OPTIONS+=-fsigned-char
endif
endif
endif
MPG123TARG=linux
endif
PWD=$(shell pwd)
GREP=grep
ID=id
ifeq ($(OSARCH),SunOS)
GREP=/usr/xpg4/bin/grep
M4=/usr/local/bin/m4
ID=/usr/xpg4/bin/id
endif
INCLUDE+=-Iinclude -I../include
@@ -305,22 +307,24 @@ endif # WITHOUT_ZAPTEL
LIBEDIT=editline/libedit.a
ifneq ($(wildcard .version),)
ASTERISKVERSION=$(shell cat .version)
ASTERISKVERSIONNUM=$(shell awk -F. '{printf "%02d%02d%02d", $$1, $$2, $$3}' .version)
RPMVERSION=$(shell sed 's/[-\/:]/_/g' .version)
ASTERISKVERSION:=$(shell cat .version)
ASTERISKVERSIONNUM:=$(shell awk -F. '{printf "%02d%02d%02d", $$1, $$2, $$3}' .version)
RPMVERSION:=$(shell sed 's/[-\/:]/_/g' .version)
else
RPMVERSION=unknown
endif
ifneq ($(wildcard CVS),)
# CVS mirrors of SVN have .svnrevision files showing
# which SVN revision they are based on, and .svnbranch
# showing the branch they are made from
ifneq ($(wildcard .svnrevision),)
ASTERISKVERSIONNUM=999999
ifneq ($(wildcard CVS/Tag),)
ASTERISKVERSION=$(shell echo "CVS-`sed 's/^T//g' CVS/Tag`-`date +"%D-%T"`")
else
ASTERISKVERSION=CVS HEAD
endif
ASTERISKVERSION:=SVN-$(shell cat .svnbranch)-r$(shell cat .svnrevision)
else
ASTERISKVERSIONNUM=000000
ifneq ($(wildcard .svn),)
ASTERISKVERSIONNUM=999999
ASTERISKVERSION=SVN-$(shell build_tools/make_svn_branch_name)
endif
endif
ASTCFLAGS+= $(DEBUG_THREADS)
@@ -328,7 +332,9 @@ ASTCFLAGS+= $(TRACE_FRAMES)
ASTCFLAGS+= $(MALLOC_DEBUG)
ASTCFLAGS+= $(BUSYDETECT)
ASTCFLAGS+= $(OPTIONS)
ifneq ($(findstring dont-optimize,$(MAKECMDGOALS)),dont-optimize)
ASTCFLAGS+= -fomit-frame-pointer
endif
SUBDIRS=res channels pbx apps codecs formats agi cdr funcs utils stdtime
OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \
@@ -363,7 +369,7 @@ ifeq ($(OSARCH),Darwin)
AUDIO_LIBS=-framework CoreAudio
ASTLINK=-Wl,-dynamic
SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace
OBJS+=poll.o
OBJS+= poll.o
ASTCFLAGS+=-DPOLLCOMPAT
else
#These are used for all but Darwin
@@ -427,10 +433,10 @@ endif
noclean: depend asterisk subdirs
editline/config.h:
cd editline && unset CFLAGS LIBS && ./configure ; \
cd editline && unset CFLAGS LIBS && CFLAGS="$(OPTIMIZE)" ./configure ; \
editline/libedit.a: FORCE
cd editline && unset CFLAGS LIBS && test -f config.h || ./configure
cd editline && unset CFLAGS LIBS && test -f config.h || CFLAGS="$(OPTIMIZE)" ./configure
$(MAKE) -C editline libedit.a
db1-ast/libdb1.a: FORCE
@@ -534,7 +540,7 @@ clean:
$(MAKE) -C stdtime clean
datafiles: all
if test $$(id -u) = 0; then sh mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
if [ x`$(ID) -un` = xroot ]; then sh mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/digits
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/priv-callerintros
for x in sounds/digits/*.gsm; do \
@@ -588,17 +594,16 @@ datafiles: all
mkdir -p $(DESTDIR)$(AGI_DIR)
update:
@if [ -d CVS ]; then \
if [ -f patches/.applied ]; then \
patches=`cat patches/.applied`; \
fi; \
if [ ! -z "$$patches" ]; then \
for x in $$patches; do \
echo "Unapplying $$x..."; \
patch -R -p0 < patches/$$x; \
done; \
rm -f patches/.applied; \
@if [ -d .svn ]; then \
echo "Updating from Subversion..." ; \
svn update | tee update.out; \
rm -f .version; \
if [ `grep -c ^C update.out` -gt 0 ]; then \
echo ; echo "The following files have conflicts:" ; \
grep ^C update.out | cut -b4- ; \
fi ; \
rm -f update.out; \
elif [ -d CVS ]; then \
echo "Updating from CVS..." ; \
cvs -q -z3 update -Pd | tee update.out; \
rm -f .version; \
@@ -607,19 +612,8 @@ update:
grep ^C update.out | cut -d' ' -f2- ; \
fi ; \
rm -f update.out; \
if [ ! -z "$$patches" ]; then \
for x in $$patches; do \
if [ -f patches/$$x ]; then \
echo "Applying patch $$x..."; \
patch -p0 < patches/$$x; \
echo $$x >> patches/.applied; \
else \
echo "Patch $$x no longer relevant"; \
fi; \
done; \
fi; \
else \
echo "Not CVS"; \
echo "Not under version control"; \
fi
NEWHEADERS=$(notdir $(wildcard include/asterisk/*.h))
@@ -636,6 +630,7 @@ bininstall: all
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/system
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/tmp
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/meetme
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/monitor
if [ -f asterisk ]; then $(INSTALL) -m 755 asterisk $(DESTDIR)$(ASTSBINDIR)/; fi
if [ -f cygwin/asterisk.exe ]; then $(INSTALL) -m 755 cygwin/asterisk.exe $(DESTDIR)$(ASTSBINDIR)/; fi
if [ -f asterisk.dll ]; then $(INSTALL) -m 755 asterisk.dll $(DESTDIR)$(ASTSBINDIR)/; fi
@@ -646,13 +641,11 @@ bininstall: all
cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;' > $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ;\
chmod 755 $(DESTDIR)$(ASTSBINDIR)/safe_asterisk;\
fi
for x in $(SUBDIRS); do $(MAKE) -C $$x install || exit 1 ; done
$(INSTALL) -d $(DESTDIR)$(ASTHEADERDIR)
$(INSTALL) -m 644 include/asterisk/*.h $(DESTDIR)$(ASTHEADERDIR)
if [ -n "$(OLDHEADERS)" ]; then \
rm -f $(addprefix $(DESTDIR)$(ASTHEADERDIR)/,$(OLDHEADERS)) ;\
fi
rm -f $(DESTDIR)$(ASTVARLIBDIR)/sounds/voicemail
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds
mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-csv
mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-custom
@@ -671,30 +664,10 @@ bininstall: all
else \
echo "You need to do cvs update -d not just cvs update" ; \
fi
( cd $(DESTDIR)$(ASTVARLIBDIR)/sounds ; ln -s $(ASTSPOOLDIR)/voicemail . )
if [ -f mpg123-0.59r/mpg123 ]; then $(MAKE) -C mpg123-0.59r install; fi
@echo " +---- Asterisk Installation Complete -------+"
@echo " + +"
@echo " + YOU MUST READ THE SECURITY DOCUMENT +"
@echo " + +"
@echo " + Asterisk has successfully been installed. +"
@echo " + If you would like to install the sample +"
@echo " + configuration files (overwriting any +"
@echo " + existing config files), run: +"
@echo " + +"
@echo " + $(MAKE) samples +"
@echo " + +"
@echo " +----------------- or ---------------------+"
@echo " + +"
@echo " + You can go ahead and install the asterisk +"
@echo " + program documentation now or later run: +"
@echo " + +"
@echo " + $(MAKE) progdocs +"
@echo " + +"
@echo " + **Note** This requires that you have +"
@echo " + doxygen installed on your local system +"
@echo " +-------------------------------------------+"
@$(MAKE) -s oldmodcheck
install-subdirs:
for x in $(SUBDIRS); do $(MAKE) -C $$x install || exit 1 ; done
NEWMODS=$(notdir $(wildcard */*.so))
OLDMODS=$(filter-out $(NEWMODS),$(notdir $(wildcard $(DESTDIR)$(MODULES_DIR)/*.so)))
@@ -717,10 +690,32 @@ oldmodcheck:
echo " WARNING WARNING WARNING" ;\
fi
install: all datafiles bininstall
install: all datafiles bininstall install-subdirs
@if [ -x /usr/sbin/asterisk-post-install ]; then \
/usr/sbin/asterisk-post-install $(DESTDIR) . ; \
fi
@echo " +---- Asterisk Installation Complete -------+"
@echo " + +"
@echo " + YOU MUST READ THE SECURITY DOCUMENT +"
@echo " + +"
@echo " + Asterisk has successfully been installed. +"
@echo " + If you would like to install the sample +"
@echo " + configuration files (overwriting any +"
@echo " + existing config files), run: +"
@echo " + +"
@echo " + $(MAKE) samples +"
@echo " + +"
@echo " +----------------- or ---------------------+"
@echo " + +"
@echo " + You can go ahead and install the asterisk +"
@echo " + program documentation now or later run: +"
@echo " + +"
@echo " + $(MAKE) progdocs +"
@echo " + +"
@echo " + **Note** This requires that you have +"
@echo " + doxygen installed on your local system +"
@echo " +-------------------------------------------+"
@$(MAKE) -s oldmodcheck
upgrade: all bininstall
@@ -831,12 +826,12 @@ __rpm: include/asterisk/version.h spec
$(MAKE) DESTDIR=/tmp/asterisk install ; \
$(MAKE) DESTDIR=/tmp/asterisk samples ; \
mkdir -p /tmp/asterisk/etc/rc.d/init.d ; \
cp -f redhat/asterisk /tmp/asterisk/etc/rc.d/init.d/ ; \
cp -f contrib/init.d/rc.redhat.asterisk /tmp/asterisk/etc/rc.d/init.d/asterisk ; \
rpmbuild --rcfile /usr/lib/rpm/rpmrc:redhat/rpmrc -bb asterisk.spec
progdocs:
(cat contrib/asterisk-ng-doxygen; echo "HAVE_DOT=$(HAVEDOT) \
PROJECT_NUMBER=$(ASTERISKVERSION) - $(ASTERISKVERSIONNUM)") | doxygen -
(cat contrib/asterisk-ng-doxygen; echo "HAVE_DOT=$(HAVEDOT)"; \
echo "PROJECT_NUMBER=$(ASTERISKVERSION)") | doxygen -
mpg123:
@wget -V >/dev/null || (echo "You need wget" ; false )
@@ -906,47 +901,3 @@ cleantest:
if cmp -s .cleancount .lastclean ; then echo ; else \
$(MAKE) clean; cp -f .cleancount .lastclean;\
fi
patchlist:
@echo "Experimental Patches:"
@for x in patches/*; do \
patch=`basename $$x`; \
if [ "$$patch" = "CVS" ]; then \
continue; \
fi; \
if grep -q ^$$patch$$ patches/.applied; then \
echo "$$patch (applied)"; \
else \
echo "$$patch (available)"; \
fi; \
done
apply:
@if [ -z "$(PATCH)" ]; then \
echo "Usage: make PATCH=<patchname> apply"; \
elif grep -q ^$(PATCH)$$ patches/.applied 2>/dev/null; then \
echo "Patch $(PATCH) is already applied"; \
elif [ -f "patches/$(PATCH)" ]; then \
echo "Applying patch $(PATCH)"; \
patch -p0 < patches/$(PATCH); \
echo "$(PATCH)" >> patches/.applied; \
else \
echo "No such patch $(PATCH) in patches directory"; \
fi
unapply:
@if [ -z "$(PATCH)" ]; then \
echo "Usage: make PATCH=<patchname> unapply"; \
elif grep -v -q ^$(PATCH)$$ patches/.applied 2>/dev/null; then \
echo "Patch $(PATCH) is not applied"; \
elif [ -f "patches/$(PATCH)" ]; then \
echo "Un-applying patch $(PATCH)"; \
patch -p0 -R < patches/$(PATCH); \
rm -f patches/.tmpapplied || :; \
mv patches/.applied patches/.tmpapplied; \
cat patches/.tmpapplied | grep -v ^$(PATCH)$$ > patches/.applied; \
rm -f patches/.tmpapplied; \
else \
echo "No such patch $(PATCH) in patches directory"; \
fi

2
README Executable file → Normal file
View File

@@ -67,7 +67,7 @@ made every effort possible to maintain backwards compatibility.
In order to discover new features to use, please check the configuration
examples in the /configs directory of the source code distribution.
To discover the major new features of Asterisk 1.2, please visit
http://www.astricon.net/asterisk1-2/
http://edvina.net/asterisk1-2/
* NEW INSTALLATIONS

View File

@@ -1,8 +0,0 @@
About Hold Music
================
Digium has licensed the music included with
the Asterisk distribution From FreePlayMusic
for use and distribution with Asterisk. It
is licensed ONLY for use as hold music within
an Asterisk based PBX.

22
README.opsound Normal file
View File

@@ -0,0 +1,22 @@
About Hold Music
================
These files were obtained from http://opsound.org, where the authors placed them
under the Creative Commons Attribution-Share Alike 2.5 license, a copy of which
may be found at http://creativecommons.org.
Credits
================
macroform-cold_day - Paul Shuler (Macroform)
paulshuler@gmail.com - http://macroform.bandcamp.com/
macroform-robot_dity - Paul Shuler (Macroform)
paulshuler@gmail.com - http://macroform.bandcamp.com/
macroform-the_simplicity - Paul Shuler (Macroform)
paulshuler@gmail.com - http://macroform.bandcamp.com/
manolo_camp-morning_coffee - Manolo Camp
beatbastard@gmx.net - http://ccmixter.org/people/ManoloCamp
reno_project-system - Reno Project
renoproject@hotmail.com - http://www.jamendo.com/en/album/23661

0
SECURITY Executable file → Normal file
View File

11
UPGRADE.txt Executable file → Normal file
View File

@@ -52,8 +52,10 @@ Dialing:
IAX:
* The naming convention for IAX channels has changed in a minor way such
that the call number follows a "-" rather than a "/" character.
* The naming convention for IAX channels has changed in two ways:
1. The call number follows a "-" rather than a "/" character.
2. The name of the channel has been simplified to IAX2/peer-callno,
rather than IAX2/peer@peer-callno or even IAX2/peer@peer/callno.
SIP:
@@ -129,6 +131,11 @@ Applications:
'mailbox options' menu, and 'change your password' option has been
moved to option 5.
* The application VoiceMailMain now only matches the 'default' context if
none is specified in the arguments. (This was the previously
documented behavior, however, we didn't follow that behavior.) The old
behavior can be restored by setting searchcontexts=yes in voicemail.conf.
Queues:
* A queue is now considered empty not only if there are no members but if

0
acl.c Executable file → Normal file
View File

0
aescrypt.c Executable file → Normal file
View File

0
aeskey.c Executable file → Normal file
View File

0
aesopt.h Executable file → Normal file
View File

0
aestab.c Executable file → Normal file
View File

View File

@@ -1,3 +0,0 @@
eagi-test
eagi-sphinx-test
.depend

0
agi/DialAnMp3.agi Executable file → Normal file
View File

2
agi/Makefile Executable file → Normal file
View File

@@ -13,7 +13,7 @@
AGIS=agi-test.agi eagi-test eagi-sphinx-test
CFLAGS+=
CFLAGS+=-DNO_AST_MM
LIBS=
ifeq ($(OSARCH),SunOS)

0
agi/agi-test.agi Executable file → Normal file
View File

0
agi/eagi-sphinx-test.c Executable file → Normal file
View File

0
agi/eagi-test.c Executable file → Normal file
View File

0
agi/fastagi-test Executable file → Normal file
View File

0
agi/numeralize Executable file → Normal file
View File

0
alaw.c Executable file → Normal file
View File

95
app.c Executable file → Normal file
View File

@@ -316,8 +316,12 @@ int ast_dtmf_stream(struct ast_channel *chan,struct ast_channel *peer,char *digi
}
}
}
if (peer)
res = ast_autoservice_stop(peer);
if (peer) {
/* Stop autoservice on the peer channel, but don't overwrite any error condition
that has occurred previously while acting on the primary channel */
if (ast_autoservice_stop(peer) && !res)
res = -1;
}
}
return res;
}
@@ -430,11 +434,11 @@ int ast_control_streamfile(struct ast_channel *chan, const char *file,
const char *stop, const char *pause,
const char *restart, int skipms)
{
long elapsed = 0, last_elapsed = 0;
char *breaks = NULL;
char *end = NULL;
int blen = 2;
int res;
long pause_restart_point = 0;
if (stop)
blen += strlen(stop);
@@ -456,9 +460,6 @@ int ast_control_streamfile(struct ast_channel *chan, const char *file,
if (chan->_state != AST_STATE_UP)
res = ast_answer(chan);
if (chan)
ast_stopstream(chan);
if (file) {
if ((end = strchr(file,':'))) {
if (!strcasecmp(end, ":end")) {
@@ -469,25 +470,18 @@ int ast_control_streamfile(struct ast_channel *chan, const char *file,
}
for (;;) {
struct timeval started = ast_tvnow();
if (chan)
ast_stopstream(chan);
ast_stopstream(chan);
res = ast_streamfile(chan, file, chan->language);
if (!res) {
if (end) {
if (pause_restart_point) {
ast_seekstream(chan->stream, pause_restart_point, SEEK_SET);
pause_restart_point = 0;
}
else if (end) {
ast_seekstream(chan->stream, 0, SEEK_END);
end=NULL;
}
res = 1;
if (elapsed) {
ast_stream_fastforward(chan->stream, elapsed);
last_elapsed = elapsed - 200;
}
if (res)
res = ast_waitstream_fr(chan, breaks, fwd, rev, skipms);
else
break;
end = NULL;
};
res = ast_waitstream_fr(chan, breaks, fwd, rev, skipms);
}
if (res < 1)
@@ -496,17 +490,16 @@ int ast_control_streamfile(struct ast_channel *chan, const char *file,
/* We go at next loop if we got the restart char */
if (restart && strchr(restart, res)) {
ast_log(LOG_DEBUG, "we'll restart the stream here at next loop\n");
elapsed=0; /* To make sure the next stream will start at beginning */
pause_restart_point = 0;
continue;
}
if (pause != NULL && strchr(pause, res)) {
elapsed = ast_tvdiff_ms(ast_tvnow(), started) + last_elapsed;
for(;;) {
if (chan)
ast_stopstream(chan);
if (pause && strchr(pause, res)) {
pause_restart_point = ast_tellstream(chan->stream);
for (;;) {
ast_stopstream(chan);
res = ast_waitfordigit(chan, 1000);
if (res == 0)
if (!res)
continue;
else if (res == -1 || strchr(pause, res) || (stop && strchr(stop, res)))
break;
@@ -516,17 +509,16 @@ int ast_control_streamfile(struct ast_channel *chan, const char *file,
continue;
}
}
if (res == -1)
break;
/* if we get one of our stop chars, return it to the calling function */
if (stop && strchr(stop, res)) {
/* res = 0; */
if (stop && strchr(stop, res))
break;
}
}
if (chan)
ast_stopstream(chan);
ast_stopstream(chan);
return res;
}
@@ -545,7 +537,7 @@ int ast_play_and_wait(struct ast_channel *chan, const char *fn)
static int global_silence_threshold = 128;
static int global_maxsilence = 0;
int ast_play_and_record(struct ast_channel *chan, const char *playfile, const char *recordfile, int maxtime, const char *fmt, int *duration, int silencethreshold, int maxsilence, const char *path)
int ast_play_and_record_full(struct ast_channel *chan, const char *playfile, const char *recordfile, int maxtime, const char *fmt, int *duration, int silencethreshold, int maxsilence, const char *path, const char *acceptdtmf, const char *canceldtmf)
{
int d;
char *fmts;
@@ -559,7 +551,6 @@ int ast_play_and_record(struct ast_channel *chan, const char *playfile, const ch
struct ast_dsp *sildet=NULL; /* silence detector dsp */
int totalsilence = 0;
int dspsilence = 0;
int gotsilence = 0; /* did we timeout for silence? */
int rfmt=0;
struct ast_silence_generator *silgen = NULL;
@@ -597,7 +588,7 @@ int ast_play_and_record(struct ast_channel *chan, const char *playfile, const ch
while((fmt = strsep(&stringp, "|"))) {
if (fmtcnt > MAX_OTHER_FORMATS - 1) {
ast_log(LOG_WARNING, "Please increase MAX_OTHER_FORMATS in app_voicemail.c\n");
ast_log(LOG_WARNING, "Please increase MAX_OTHER_FORMATS in app.c\n");
break;
}
sfmt[fmtcnt++] = ast_strdupa(fmt);
@@ -682,7 +673,7 @@ int ast_play_and_record(struct ast_channel *chan, const char *playfile, const ch
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "Recording automatically stopped after a silence of %d seconds\n", totalsilence/1000);
ast_frfree(f);
gotsilence = 1;
res = 'S';
outmsg=2;
break;
}
@@ -697,19 +688,18 @@ int ast_play_and_record(struct ast_channel *chan, const char *playfile, const ch
/* Write only once */
ast_writestream(others[0], f);
} else if (f->frametype == AST_FRAME_DTMF) {
if (f->subclass == '#') {
if (strchr(acceptdtmf, f->subclass)) {
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "User ended message by pressing %c\n", f->subclass);
res = '#';
ast_verbose(VERBOSE_PREFIX_3 "User ended message by pressing %c\n", f->subclass);
res = f->subclass;
outmsg = 2;
ast_frfree(f);
break;
}
if (f->subclass == '0') {
/* Check for a '0' during message recording also, in case caller wants operator */
if (strchr(canceldtmf, f->subclass)) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "User cancelled by pressing %c\n", f->subclass);
res = '0';
ast_verbose(VERBOSE_PREFIX_3 "User cancelled message by pressing %c\n", f->subclass);
res = f->subclass;
outmsg = 0;
ast_frfree(f);
break;
@@ -771,6 +761,14 @@ int ast_play_and_record(struct ast_channel *chan, const char *playfile, const ch
return res;
}
static char default_acceptdtmf[] = "#";
static char default_canceldtmf[] = "0";
int ast_play_and_record(struct ast_channel *chan, const char *playfile, const char *recordfile, int maxtime, const char *fmt, int *duration, int silencethreshold, int maxsilence, const char *path)
{
return ast_play_and_record_full(chan, playfile, recordfile, maxtime, fmt, duration, silencethreshold, maxsilence, path, default_acceptdtmf, default_canceldtmf);
}
int ast_play_and_prepend(struct ast_channel *chan, char *playfile, char *recordfile, int maxtime, char *fmt, int *duration, int beep, int silencethreshold, int maxsilence)
{
int d = 0;
@@ -786,7 +784,6 @@ int ast_play_and_prepend(struct ast_channel *chan, char *playfile, char *recordf
struct ast_dsp *sildet; /* silence detector dsp */
int totalsilence = 0;
int dspsilence = 0;
int gotsilence = 0; /* did we timeout for silence? */
int rfmt=0;
char prependfile[80];
@@ -827,7 +824,7 @@ int ast_play_and_prepend(struct ast_channel *chan, char *playfile, char *recordf
while((fmt = strsep(&stringp, "|"))) {
if (fmtcnt > MAX_OTHER_FORMATS - 1) {
ast_log(LOG_WARNING, "Please increase MAX_OTHER_FORMATS in app_voicemail.c\n");
ast_log(LOG_WARNING, "Please increase MAX_OTHER_FORMATS in app.c\n");
break;
}
sfmt[fmtcnt++] = ast_strdupa(fmt);
@@ -855,6 +852,7 @@ int ast_play_and_prepend(struct ast_channel *chan, char *playfile, char *recordf
res = ast_set_read_format(chan, AST_FORMAT_SLINEAR);
if (res < 0) {
ast_log(LOG_WARNING, "Unable to set to linear mode, giving up\n");
ast_dsp_free(sildet);
return -1;
}
}
@@ -904,7 +902,7 @@ int ast_play_and_prepend(struct ast_channel *chan, char *playfile, char *recordf
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "Recording automatically stopped after a silence of %d seconds\n", totalsilence/1000);
ast_frfree(f);
gotsilence = 1;
res = 'S';
outmsg=2;
break;
}
@@ -959,6 +957,7 @@ int ast_play_and_prepend(struct ast_channel *chan, char *playfile, char *recordf
} else {
ast_log(LOG_WARNING, "Error creating writestream '%s', format '%s'\n", prependfile, sfmt[x]);
}
ast_dsp_free(sildet);
*duration = end - start;
#if 0
if (outmsg > 1) {

View File

@@ -1 +0,0 @@
.depend

7
apps/Makefile Executable file → Normal file
View File

@@ -86,7 +86,7 @@ endif
all: $(APPS)
clean:
rm -f *.so *.o look .depend
rm -f *.so *.o .depend
%.so : %.o
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}
@@ -103,7 +103,7 @@ app_curl.so: app_curl.o
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CURLLIBS)
app_sql_postgres.o: app_sql_postgres.c
$(CC) -pipe -I/usr/local/pgsql/include $(CFLAGS) -c -o app_sql_postgres.o app_sql_postgres.c
$(CC) -pipe -I$(CROSS_COMPILE_TARGET)/usr/local/pgsql/include -I$(CROSS_COMPILE_TARGET)/usr/include/postgresql $(CFLAGS) -c -o app_sql_postgres.o app_sql_postgres.c
app_sql_postgres.so: app_sql_postgres.o
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -L/usr/local/pgsql/lib -lpq
@@ -111,9 +111,6 @@ app_sql_postgres.so: app_sql_postgres.o
app_sql_odbc.so: app_sql_odbc.o
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lodbc
look: look.c
$(CC) -pipe -O6 -g look.c -o look -lncurses
ifeq (SunOS,$(shell uname))
app_chanspy.so: app_chanspy.o
$(CC) $(SOLINK) -o $@ $< -lrt

0
apps/app_adsiprog.c Executable file → Normal file
View File

3
apps/app_alarmreceiver.c Executable file → Normal file
View File

@@ -558,11 +558,10 @@ static int receive_ademco_contact_id( struct ast_channel *chan, void *data, int
if(checksum){
database_increment("checksum-errors");
if(option_verbose >= 2){
if(option_verbose >= 2)
ast_verbose(VERBOSE_PREFIX_2 "AlarmReceiver: Nonzero checksum\n");
ast_log(LOG_DEBUG, "AlarmReceiver: Nonzero checksum\n");
continue;
}
}
/* Check the message type for correctness */

0
apps/app_authenticate.c Executable file → Normal file
View File

0
apps/app_cdr.c Executable file → Normal file
View File

0
apps/app_chanisavail.c Executable file → Normal file
View File

10
apps/app_chanspy.c Executable file → Normal file
View File

@@ -208,9 +208,9 @@ static int start_spying(struct ast_channel *chan, struct ast_channel *spychan, s
static void stop_spying(struct ast_channel *chan, struct ast_channel_spy *spy)
{
/* If our status has changed, then the channel we're spying on is gone....
/* If our status has changed to DONE, then the channel we're spying on is gone....
DON'T TOUCH IT!!! RUN AWAY!!! */
if (spy->status != CHANSPY_RUNNING)
if (spy->status == CHANSPY_DONE)
return;
if (!chan)
@@ -439,8 +439,8 @@ static int chanspy_exec(struct ast_channel *chan, void *data)
if (recbase) {
char filename[512];
snprintf(filename,sizeof(filename),"%s/%s.%ld.raw",ast_config_AST_MONITOR_DIR, recbase, time(NULL));
if ((fd = open(filename, O_CREAT | O_WRONLY, O_TRUNC)) <= 0) {
snprintf(filename,sizeof(filename),"%s/%s.%d.raw",ast_config_AST_MONITOR_DIR, recbase, (int)time(NULL));
if ((fd = open(filename, O_CREAT | O_WRONLY, O_TRUNC, 0644)) <= 0) {
ast_log(LOG_WARNING, "Cannot open %s for recording\n", filename);
fd = 0;
}
@@ -482,7 +482,7 @@ static int chanspy_exec(struct ast_channel *chan, void *data)
}
}
if (igrp && (!spec || ((strlen(spec) < strlen(peer->name) &&
if (igrp && (!spec || ((strlen(spec) <= strlen(peer->name) &&
!strncasecmp(peer->name, spec, strlen(spec)))))) {
if (peer && (!bronly || ast_bridged_channel(peer)) &&
!ast_check_hangup(peer) && !ast_test_flag(peer, AST_FLAG_SPYING)) {

2
apps/app_controlplayback.c Executable file → Normal file
View File

@@ -140,7 +140,7 @@ static int controlplayback_exec(struct ast_channel *chan, void *data)
} else {
if (res < 0) {
if (priority_jump || option_priority_jumping) {
if (!ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101)) {
if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101)) {
ast_log(LOG_WARNING, "ControlPlayback tried to jump to priority n+101 as requested, but priority didn't exist\n");
}
}

0
apps/app_curl.c Executable file → Normal file
View File

8
apps/app_cut.c Executable file → Normal file
View File

@@ -36,7 +36,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/version.h"
#include "asterisk/app.h"
/* Maximum length of any variable */
@@ -146,8 +145,9 @@ static int sort_internal(struct ast_channel *chan, char *data, char *buffer, siz
int blen = strlen(buffer);
if (element_count++) {
strncat(buffer + blen, ",", buflen - blen - 1);
blen++;
}
strncat(buffer + blen + 1, sortable_keys[count2].key, buflen - blen - 2);
strncat(buffer + blen, sortable_keys[count2].key, buflen - blen - 1);
}
return 0;
@@ -253,6 +253,8 @@ static int cut_internal(struct ast_channel *chan, char *data, char *buffer, size
}
}
}
} else {
return ERROR_NOARG;
}
return 0;
}
@@ -386,7 +388,7 @@ static char *acf_cut_exec(struct ast_channel *chan, char *cmd, char *data, char
switch (cut_internal(chan, data, buf, len)) {
case ERROR_NOARG:
ast_log(LOG_ERROR, "Cut() requires an argument\n");
ast_log(LOG_ERROR, "CUT() requires an argument\n");
break;
case ERROR_NOMEM:
ast_log(LOG_ERROR, "Out of memory\n");

0
apps/app_datetime.c Executable file → Normal file
View File

0
apps/app_db.c Executable file → Normal file
View File

70
apps/app_dial.c Executable file → Normal file
View File

@@ -1,7 +1,7 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 1999 - 2005, Digium, Inc.
* Copyright (C) 1999 - 2006, Digium, Inc.
*
* Mark Spencer <markster@digium.com>
*
@@ -75,7 +75,7 @@ static char *descrip =
"continue if no requested channels can be called, or if the timeout expires.\n\n"
" This application sets the following channel variables upon completion:\n"
" DIALEDTIME - This is the time from dialing a channel until when it\n"
" answers.\n"
" is disconnected.\n"
" ANSWEREDTIME - This is the amount of time for actual call.\n"
" DIALSTATUS - This is the status of the call:\n"
" CHANUNAVAIL | CONGESTION | NOANSWER | BUSY | ANSWER | CANCEL\n"
@@ -108,9 +108,11 @@ static char *descrip =
" other than the number assigned to the caller.\n"
" g - Proceed with dialplan execution at the current extension if the\n"
" destination channel hangs up.\n"
" G(context^exten^pri) - If the call is answered, transfer both parties to\n"
" the specified priority. Optionally, an extension, or extension and\n"
" context may be specified. Otherwise, the current extension is used.\n"
" G(context^exten^pri) - If the call is answered, transfer the calling party to\n"
" the specified priority and the called party to the specified priority+1.\n"
" Optionally, an extension, or extension and context may be specified. \n"
" Otherwise, the current extension is used. You cannot use any additional\n"
" action post answer options in conjunction with this option.\n"
" h - Allow the called party to hang up by sending the '*' DTMF digit.\n"
" H - Allow the calling party to hang up by hitting the '*' DTMF digit.\n"
" j - Jump to priority n+101 if all of the requested channels were busy.\n"
@@ -143,6 +145,8 @@ static char *descrip =
" * GOTO:<context>^<exten>^<priority> - Transfer the call to the\n"
" specified priority. Optionally, an extension, or\n"
" extension and priority can be specified.\n"
" You cannot use any additional action post answer options in conjunction\n"
" with this option.\n"
" n - This option is a modifier for the screen/privacy mode. It specifies\n"
" that no introductions are to be saved in the priv-callerintros\n"
" directory.\n"
@@ -161,7 +165,7 @@ static char *descrip =
" S(x) - Hang up the call after 'x' seconds *after* the called party has\n"
" answered the call.\n"
" t - Allow the called party to transfer the calling party by sending the\n"
" DTMF sequence defiend in features.conf.\n"
" DTMF sequence defined in features.conf.\n"
" T - Allow the calling party to transfer the called party by sending the\n"
" DTMF sequence defined in features.conf.\n"
" w - Allow the called party to enable recording of the call by sending\n"
@@ -303,6 +307,8 @@ static void hanguptree(struct localuser *outgoing, struct ast_channel *exception
ast_cdr_failed(chan->cdr); \
numnochan++; \
break; \
case AST_CAUSE_NORMAL_CLEARING: \
break; \
default: \
numnochan++; \
break; \
@@ -465,6 +471,8 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
o->chan = ast_request(tech, in->nativeformats, stuff, &cause);
if (!o->chan)
ast_log(LOG_NOTICE, "Unable to create local channel for call forward to '%s/%s' (cause = %d)\n", tech, stuff, cause);
else
ast_channel_inherit_variables(in, o->chan);
} else {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Too many forwards from %s\n", o->chan->name);
@@ -512,10 +520,8 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
if (in->cid.cid_ani) {
if (o->chan->cid.cid_ani)
free(o->chan->cid.cid_ani);
o->chan->cid.cid_ani = malloc(strlen(in->cid.cid_ani) + 1);
if (o->chan->cid.cid_ani)
ast_copy_string(o->chan->cid.cid_ani, in->cid.cid_ani, sizeof(o->chan->cid.cid_ani));
else
o->chan->cid.cid_ani = strdup(in->cid.cid_ani);
if (!o->chan->cid.cid_ani)
ast_log(LOG_WARNING, "Out of memory\n");
}
if (o->chan->cid.cid_rdnis)
@@ -650,6 +656,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
ast_hangup(o->chan);
o->chan = NULL;
ast_clear_flag(o, DIAL_STILLGOING);
HANDLE_CAUSE(in->hangupcause, in);
}
}
o = o->next;
@@ -737,6 +744,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
char numsubst[AST_MAX_EXTENSION];
char restofit[AST_MAX_EXTENSION];
char cidname[AST_MAX_EXTENSION];
char toast[80];
char *newnum;
char *l;
int privdb_val=0;
@@ -826,6 +834,21 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
if (!timelimit) {
timelimit = play_to_caller = play_to_callee = play_warning = warning_freq = 0;
warning_sound = NULL;
} else if (play_warning > timelimit) {
/* If the first warning is requested _after_ the entire call would end,
and no warning frequency is requested, then turn off the warning. If
a warning frequency is requested, reduce the 'first warning' time by
that frequency until it falls within the call's total time limit.
*/
if (!warning_freq) {
play_warning = 0;
} else {
while (play_warning > timelimit)
play_warning -= warning_freq;
if (play_warning < 1)
play_warning = warning_freq = 0;
}
}
var = pbx_builtin_getvar_helper(chan,"LIMIT_PLAYAUDIO_CALLER");
@@ -916,20 +939,26 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
}
if( privdb_val == AST_PRIVACY_DENY ) {
strcpy(status, "NOANSWER");
ast_verbose( VERBOSE_PREFIX_3 "Privacy DB reports PRIVACY_DENY for this callerid. Dial reports unavailable\n");
res=0;
goto out;
}
else if( privdb_val == AST_PRIVACY_KILL ) {
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 201);
strcpy(status, "DONTCALL");
if (option_priority_jumping || ast_test_flag(&opts, OPT_PRIORITY_JUMP)) {
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 201);
}
res = 0;
goto out; /* Is this right? */
}
else if( privdb_val == AST_PRIVACY_TORTURE ) {
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 301);
strcpy(status, "TORTURE");
if (option_priority_jumping || ast_test_flag(&opts, OPT_PRIORITY_JUMP)) {
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 301);
}
res = 0;
goto out; /* is this right??? */
}
else if( privdb_val == AST_PRIVACY_UNKNOWN ) {
/* Get the user's intro, store it in priv-callerintros/$CID,
@@ -963,7 +992,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
/* If a channel group has been specified, get it for use when we create peer channels */
outbound_group = pbx_builtin_getvar_helper(chan, "OUTBOUND_GROUP");
ast_copy_flags(peerflags, &opts, OPT_DTMF_EXIT | OPT_GO_ON | OPT_ORIGINAL_CLID);
ast_copy_flags(peerflags, &opts, OPT_DTMF_EXIT | OPT_GO_ON | OPT_ORIGINAL_CLID | OPT_CALLER_HANGUP);
cur = args.peers;
do {
/* Remember where to start next time */
@@ -1039,6 +1068,8 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
tmp->chan = ast_request(tech, chan->nativeformats, stuff, &cause);
if (!tmp->chan)
ast_log(LOG_NOTICE, "Unable to create local channel for call forward to '%s/%s' (cause = %d)\n", tech, stuff, cause);
else
ast_channel_inherit_variables(chan, tmp->chan);
} else {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Too many forwards from %s\n", tmp->chan->name);
@@ -1285,6 +1316,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
opt_args[OPT_ARG_PRIVACY], privcid);
ast_privacy_set(opt_args[OPT_ARG_PRIVACY], privcid, AST_PRIVACY_DENY);
}
strcpy(status,"NOANSWER");
if (ast_test_flag(&opts, OPT_MUSICBACK)) {
ast_moh_stop(chan);
} else if (ast_test_flag(&opts, OPT_RINGBACK)) {
@@ -1515,8 +1547,6 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
}
if (!res) {
char toast[80];
memset(&config,0,sizeof(struct ast_bridge_config));
if (play_to_caller)
ast_set_flag(&(config.features_caller), AST_FEATURE_PLAY_WARNING);
@@ -1560,13 +1590,15 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
}
res = ast_bridge_call(chan,peer,&config);
time(&end_time);
snprintf(toast, sizeof(toast), "%ld", (long)(end_time - start_time));
pbx_builtin_setvar_helper(chan, "DIALEDTIME", toast);
snprintf(toast, sizeof(toast), "%ld", (long)(end_time - answer_time));
pbx_builtin_setvar_helper(chan, "ANSWEREDTIME", toast);
} else
} else {
time(&end_time);
res = -1;
}
snprintf(toast, sizeof(toast), "%ld", (long)(end_time - start_time));
pbx_builtin_setvar_helper(chan, "DIALEDTIME", toast);
if (res != AST_PBX_NO_HANGUP_PEER) {
if (!chan->_softhangup)

0
apps/app_dictate.c Executable file → Normal file
View File

6
apps/app_directed_pickup.c Executable file → Normal file
View File

@@ -3,7 +3,7 @@
*
* Copyright (C) 2005, Joshua Colp
*
* Joshua Colp <jcolp@asterlink.com>
* Joshua Colp <jcolp@digium.com>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
@@ -77,7 +77,7 @@ static int pickup_exec(struct ast_channel *chan, void *data)
/* Find a channel to pickup */
origin = ast_get_channel_by_exten_locked(exten, context);
if (origin) {
if (origin && origin->cdr) {
ast_cdr_getvar(origin->cdr, "dstchannel", &tmp, workspace,
sizeof(workspace), 0);
if (tmp) {
@@ -89,6 +89,8 @@ static int pickup_exec(struct ast_channel *chan, void *data)
}
ast_mutex_unlock(&origin->lock);
} else {
if (origin)
ast_mutex_unlock(&origin->lock);
ast_log(LOG_DEBUG, "No originating channel found.\n");
}

0
apps/app_directory.c Executable file → Normal file
View File

0
apps/app_disa.c Executable file → Normal file
View File

0
apps/app_dumpchan.c Executable file → Normal file
View File

0
apps/app_echo.c Executable file → Normal file
View File

0
apps/app_enumlookup.c Executable file → Normal file
View File

0
apps/app_eval.c Executable file → Normal file
View File

0
apps/app_exec.c Executable file → Normal file
View File

34
apps/app_externalivr.c Executable file → Normal file
View File

@@ -43,6 +43,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/linkedlists.h"
#include "asterisk/app.h"
#include "asterisk/options.h"
static const char *tdesc = "External IVR Interface Application";
@@ -93,9 +95,9 @@ static void send_child_event(FILE *handle, const char event, const char *data,
char tmp[256];
if (!data) {
snprintf(tmp, sizeof(tmp), "%c,%10ld", event, time(NULL));
snprintf(tmp, sizeof(tmp), "%c,%10d", event, (int)time(NULL));
} else {
snprintf(tmp, sizeof(tmp), "%c,%10ld,%s", event, time(NULL), data);
snprintf(tmp, sizeof(tmp), "%c,%10d,%s", event, (int)time(NULL), data);
}
fprintf(handle, "%s\n", tmp);
@@ -250,10 +252,9 @@ static int app_exec(struct ast_channel *chan, void *data)
int res = -1;
int gen_active = 0;
int pid;
char *command;
char *argv[32];
int argc = 1;
char *buf;
char *buf, *command;
FILE *child_commands = NULL;
FILE *child_errors = NULL;
FILE *child_events = NULL;
@@ -270,11 +271,13 @@ static int app_exec(struct ast_channel *chan, void *data)
}
buf = ast_strdupa(data);
command = strsep(&buf, "|");
memset(argv, 0, sizeof(argv) / sizeof(argv[0]));
argv[0] = command;
while ((argc < 31) && (argv[argc++] = strsep(&buf, "|")));
argv[argc] = NULL;
if (!buf) {
ast_log(LOG_ERROR, "Out of memory!\n");
LOCAL_USER_REMOVE(u);
return -1;
}
argc = ast_app_separate_args(buf, '|', argv, sizeof(argv) / sizeof(argv[0]));
if (pipe(child_stdin)) {
ast_chan_log(LOG_WARNING, chan, "Could not create pipe for child input: %s\n", strerror(errno));
@@ -311,13 +314,16 @@ static int app_exec(struct ast_channel *chan, void *data)
/* child process */
int i;
if (option_highpriority)
ast_set_priority(0);
dup2(child_stdin[0], STDIN_FILENO);
dup2(child_stdout[1], STDOUT_FILENO);
dup2(child_stderr[1], STDERR_FILENO);
for (i = STDERR_FILENO + 1; i < 1024; i++)
close(i);
execv(command, argv);
fprintf(stderr, "Failed to execute '%s': %s\n", command, strerror(errno));
execv(argv[0], argv);
fprintf(stderr, "Failed to execute '%s': %s\n", argv[0], strerror(errno));
exit(1);
} else {
/* parent process */
@@ -343,8 +349,6 @@ static int app_exec(struct ast_channel *chan, void *data)
goto exit;
}
setvbuf(child_events, NULL, _IONBF, 0);
if (!(child_commands = fdopen(child_commands_fd, "r"))) {
ast_chan_log(LOG_WARNING, chan, "Could not open stream for child commands\n");
goto exit;
@@ -355,6 +359,10 @@ static int app_exec(struct ast_channel *chan, void *data)
goto exit;
}
setvbuf(child_events, NULL, _IONBF, 0);
setvbuf(child_commands, NULL, _IONBF, 0);
setvbuf(child_errors, NULL, _IONBF, 0);
res = 0;
while (1) {

21
apps/app_festival.c Executable file → Normal file
View File

@@ -53,6 +53,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/config.h"
#include "asterisk/utils.h"
#include "asterisk/lock.h"
#include "asterisk/options.h"
#define FESTIVAL_CONFIG "festival.conf"
@@ -136,6 +137,9 @@ static int send_waveform_to_fd(char *waveform, int length, int fd) {
if (x != fd)
close(x);
}
if (option_highpriority)
ast_set_priority(0);
/*IAS */
#ifdef __PPC__
for( x=0; x<length; x+=2)
@@ -175,7 +179,8 @@ static int send_waveform_to_channel(struct ast_channel *chan, char *waveform, in
if (chan->_state != AST_STATE_UP)
ast_answer(chan);
ast_stopstream(chan);
ast_indicate(chan, -1);
owriteformat = chan->writeformat;
res = ast_set_write_format(chan, AST_FORMAT_SLINEAR);
if (res < 0) {
@@ -455,8 +460,20 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
/* This assumes only one waveform will come back, also LP is unlikely */
wave = 0;
do {
int read_data;
for (n=0; n < 3; )
n += read(fd,ack+n,3-n);
{
read_data = read(fd,ack+n,3-n);
/* this avoids falling in infinite loop
* in case that festival server goes down
* */
if ( read_data == -1 )
{
ast_log(LOG_WARNING,"Unable to read from cache/festival fd");
return -1;
}
n += read_data;
}
ack[3] = '\0';
if (strcmp(ack,"WV\n") == 0) { /* receive a waveform */
ast_log(LOG_DEBUG,"Festival WV command\n");

0
apps/app_flash.c Executable file → Normal file
View File

0
apps/app_forkcdr.c Executable file → Normal file
View File

0
apps/app_getcpeid.c Executable file → Normal file
View File

8
apps/app_groupcount.c Executable file → Normal file
View File

@@ -257,8 +257,8 @@ static char *group_count_descrip =
" Calculates the group count for the specified group, or uses\n"
"the current channel's group if not specifed (and non-empty).\n"
"Stores result in GROUPCOUNT. \n"
"This application has been deprecated, please use the function\n"
"GroupCount.\n";
"Note: This application has been deprecated, please use the function\n"
"GROUP_COUNT.\n";
static char *group_set_descrip =
"Usage: SetGroup(groupname[@category])\n"
@@ -284,8 +284,8 @@ static char *group_match_count_descrip =
" Calculates the group count for all groups that match the specified\n"
"pattern. Uses standard regular expression matching (see regex(7)).\n"
"Stores result in GROUPCOUNT. Always returns 0.\n"
"This application has been deprecated, please use the function\n"
"GroupMatchCount.\n";
"Note: This application has been deprecated, please use the function\n"
"GROUP_MATCH_COUNT.\n";
static char show_channels_usage[] =
"Usage: group show channels [pattern]\n"

132
apps/app_hasnewvoicemail.c Executable file → Normal file
View File

@@ -47,6 +47,12 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/utils.h"
#include "asterisk/app.h"
#include "asterisk/options.h"
#ifdef USE_ODBC_STORAGE
#include "asterisk/res_odbc.h"
static char odbc_database[80];
static char odbc_table[80];
#endif
static char *tdesc = "Indicator for whether a voice mailbox has messages in a given folder.";
static char *app_hasvoicemail = "HasVoicemail";
@@ -68,7 +74,7 @@ static char *hasnewvoicemail_descrip =
"Assumes folder 'INBOX' if folder is not specified. Optionally sets <varname> to the number of messages\n"
"in that folder.\n"
" The option string may contain zero of the following character:\n"
" 'j' -- jump to priority n+101, if there is new voicemail in tolder 'folder' or INBOX\n"
" 'j' -- jump to priority n+101, if there is new voicemail in folder 'folder' or INBOX\n"
" This application sets the following channel variable upon completion:\n"
" HASVMSTATUS The result of the new voicemail check returned as a text string as follows\n"
" <# of messages in the folder, 0 for NONE>\n";
@@ -77,26 +83,93 @@ STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int hasvoicemail_internal(char *context, char *box, char *folder)
#ifdef USE_ODBC_STORAGE
static int hasvoicemail_internal(const char *context, const char *mailbox, const char *folder)
{
char vmpath[256];
DIR *vmdir;
struct dirent *vment;
int count=0;
int nummsgs = 0;
int res;
SQLHSTMT stmt;
char sql[256];
char rowdata[20];
snprintf(vmpath,sizeof(vmpath), "%s/voicemail/%s/%s/%s", (char *)ast_config_AST_SPOOL_DIR, context, box, folder);
if ((vmdir = opendir(vmpath))) {
/* No matter what the format of VM, there will always be a .txt file for each message. */
while ((vment = readdir(vmdir))) {
if (!strncmp(vment->d_name + 7, ".txt", 4)) {
count++;
break;
}
if (!folder)
folder = "INBOX";
/* If no mailbox, return immediately */
if (ast_strlen_zero(mailbox))
return 0;
if (ast_strlen_zero(context))
context = "default";
odbc_obj *obj;
obj = fetch_odbc_obj(odbc_database, 0);
if (obj) {
res = SQLAllocHandle(SQL_HANDLE_STMT, obj->con, &stmt);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Alloc Handle failed!\n");
goto yuck;
}
closedir(vmdir);
snprintf(sql, sizeof(sql), "SELECT COUNT(*) FROM %s WHERE dir = '%s/voicemail/%s/%s/%s'", odbc_table, ast_config_AST_SPOOL_DIR, context, mailbox, folder);
res = SQLPrepare(stmt, sql, SQL_NTS);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Prepare failed![%s]\n", sql);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
goto yuck;
}
res = odbc_smart_execute(obj, stmt);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
goto yuck;
}
res = SQLFetch(stmt);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Fetch error!\n[%s]\n\n", sql);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
goto yuck;
}
res = SQLGetData(stmt, 1, SQL_CHAR, rowdata, sizeof(rowdata), NULL);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Get Data error!\n[%s]\n\n", sql);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
goto yuck;
}
nummsgs = atoi(rowdata);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
} else
ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
yuck:
return nummsgs;
}
#else
static int hasvoicemail_internal(const char *context, const char *mailbox, const char *folder)
{
DIR *dir;
struct dirent *de;
char fn[256];
int count = 0;
if (ast_strlen_zero(folder))
folder = "INBOX";
if (ast_strlen_zero(context))
context = "default";
/* If no mailbox, return immediately */
if (ast_strlen_zero(mailbox))
return 0;
snprintf(fn, sizeof(fn), "%s/voicemail/%s/%s/%s", ast_config_AST_SPOOL_DIR, context, mailbox, folder);
dir = opendir(fn);
if (!dir)
return 0;
while ((de = readdir(dir))) {
if (!strncasecmp(de->d_name, "msg", 3) && !strcasecmp(de->d_name + 8, "txt"))
count++;
}
closedir(dir);
return count;
}
#endif
static int hasvoicemail_exec(struct ast_channel *chan, void *data)
{
@@ -163,7 +236,7 @@ static int hasvoicemail_exec(struct ast_channel *chan, void *data)
if (vmcount > 0) {
/* Branch to the next extension */
if (priority_jump || option_priority_jumping) {
if (!ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101))
if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101))
ast_log(LOG_WARNING, "VM box %s@%s has new voicemail, but extension %s, priority %d doesn't exist\n", vmbox, context, chan->exten, chan->priority + 101);
}
}
@@ -223,6 +296,31 @@ struct ast_custom_function acf_vmcount = {
.read = acf_vmcount_exec,
};
static int load_config(void)
{
#ifdef USE_ODBC_STORAGE
struct ast_config *cfg;
char *tmp;
cfg = ast_config_load("voicemail.conf");
if (cfg) {
if (! (tmp = ast_variable_retrieve(cfg, "general", "odbcstorage")))
tmp = "asterisk";
ast_copy_string(odbc_database, tmp, sizeof(odbc_database));
if (! (tmp = ast_variable_retrieve(cfg, "general", "odbctable")))
tmp = "voicemessages";
ast_copy_string(odbc_table, tmp, sizeof(odbc_table));
ast_config_destroy(cfg);
}
#endif
return 0;
}
int reload(void)
{
return load_config();
}
int unload_module(void)
{
int res;
@@ -239,7 +337,7 @@ int unload_module(void)
int load_module(void)
{
int res;
load_config();
res = ast_custom_function_register(&acf_vmcount);
res |= ast_register_application(app_hasvoicemail, hasvoicemail_exec, hasvoicemail_synopsis, hasvoicemail_descrip);
res |= ast_register_application(app_hasnewvoicemail, hasvoicemail_exec, hasnewvoicemail_synopsis, hasnewvoicemail_descrip);

3
apps/app_ices.c Executable file → Normal file
View File

@@ -44,6 +44,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/translate.h"
#include "asterisk/options.h"
#define ICES "/usr/bin/ices"
#define LOCAL_ICES "/usr/local/bin/ices"
@@ -72,6 +73,8 @@ static int icesencode(char *filename, int fd)
ast_log(LOG_WARNING, "Fork failed\n");
if (res)
return res;
if (option_highpriority)
ast_set_priority(0);
dup2(fd, STDIN_FILENO);
for (x=STDERR_FILENO + 1;x<256;x++) {
if ((x != STDIN_FILENO) && (x != STDOUT_FILENO))

0
apps/app_image.c Executable file → Normal file
View File

0
apps/app_intercom.c Executable file → Normal file
View File

0
apps/app_ivrdemo.c Executable file → Normal file
View File

0
apps/app_lookupblacklist.c Executable file → Normal file
View File

0
apps/app_lookupcidname.c Executable file → Normal file
View File

39
apps/app_macro.c Executable file → Normal file
View File

@@ -104,7 +104,7 @@ static int macro_exec(struct ast_channel *chan, void *data)
char *offsets;
int offset, depth;
int setmacrocontext=0;
int autoloopflag;
int autoloopflag, dead = 0;
char *save_macro_exten;
char *save_macro_context;
@@ -216,8 +216,8 @@ static int macro_exec(struct ast_channel *chan, void *data)
break;
}
switch(res) {
case MACRO_EXIT_RESULT:
res = 0;
case MACRO_EXIT_RESULT:
res = 0;
goto out;
case AST_PBX_KEEPALIVE:
if (option_debug)
@@ -231,6 +231,7 @@ static int macro_exec(struct ast_channel *chan, void *data)
ast_log(LOG_DEBUG, "Spawn extension (%s,%s,%d) exited non-zero on '%s' in macro '%s'\n", chan->context, chan->exten, chan->priority, chan->name, macro);
else if (option_verbose > 1)
ast_verbose( VERBOSE_PREFIX_2 "Spawn extension (%s, %s, %d) exited non-zero on '%s' in macro '%s'\n", chan->context, chan->exten, chan->priority, chan->name, macro);
dead = 1;
goto out;
}
}
@@ -250,37 +251,44 @@ static int macro_exec(struct ast_channel *chan, void *data)
out:
/* Reset the depth back to what it was when the routine was entered (like if we called Macro recursively) */
snprintf(depthc, sizeof(depthc), "%d", depth);
pbx_builtin_setvar_helper(chan, "MACRO_DEPTH", depthc);
if (!dead) {
pbx_builtin_setvar_helper(chan, "MACRO_DEPTH", depthc);
ast_set2_flag(chan, autoloopflag, AST_FLAG_IN_AUTOLOOP);
for (x=1; x<argc; x++) {
ast_set2_flag(chan, autoloopflag, AST_FLAG_IN_AUTOLOOP);
}
for (x = 1; x < argc; x++) {
/* Restore old arguments and delete ours */
snprintf(varname, sizeof(varname), "ARG%d", x);
if (oldargs[x]) {
pbx_builtin_setvar_helper(chan, varname, oldargs[x]);
if (!dead)
pbx_builtin_setvar_helper(chan, varname, oldargs[x]);
free(oldargs[x]);
} else {
} else if (!dead) {
pbx_builtin_setvar_helper(chan, varname, NULL);
}
}
/* Restore macro variables */
pbx_builtin_setvar_helper(chan, "MACRO_EXTEN", save_macro_exten);
if (!dead) {
pbx_builtin_setvar_helper(chan, "MACRO_EXTEN", save_macro_exten);
pbx_builtin_setvar_helper(chan, "MACRO_CONTEXT", save_macro_context);
pbx_builtin_setvar_helper(chan, "MACRO_PRIORITY", save_macro_priority);
}
if (save_macro_exten)
free(save_macro_exten);
pbx_builtin_setvar_helper(chan, "MACRO_CONTEXT", save_macro_context);
if (save_macro_context)
free(save_macro_context);
pbx_builtin_setvar_helper(chan, "MACRO_PRIORITY", save_macro_priority);
if (save_macro_priority)
free(save_macro_priority);
if (setmacrocontext) {
if (!dead && setmacrocontext) {
chan->macrocontext[0] = '\0';
chan->macroexten[0] = '\0';
chan->macropriority = 0;
}
if (!strcasecmp(chan->context, fullmacro)) {
if (!dead && !strcasecmp(chan->context, fullmacro)) {
/* If we're leaving the macro normally, restore original information */
chan->priority = oldpriority;
ast_copy_string(chan->context, oldcontext, sizeof(chan->context));
@@ -299,7 +307,8 @@ static int macro_exec(struct ast_channel *chan, void *data)
}
}
pbx_builtin_setvar_helper(chan, "MACRO_OFFSET", save_macro_offset);
if (!dead)
pbx_builtin_setvar_helper(chan, "MACRO_OFFSET", save_macro_offset);
if (save_macro_offset)
free(save_macro_offset);
LOCAL_USER_REMOVE(u);
@@ -328,7 +337,7 @@ static int macroif_exec(struct ast_channel *chan, void *data)
*label_b = '\0';
label_b++;
}
if (ast_true(expr))
if (pbx_checkcondition(expr))
macro_exec(chan, label_a);
else if (label_b)
macro_exec(chan, label_b);

0
apps/app_math.c Executable file → Normal file
View File

4
apps/app_md5.c Executable file → Normal file
View File

@@ -157,9 +157,9 @@ static int md5check_exec(struct ast_channel *chan, void *data)
ast_log(LOG_DEBUG, "ERROR: MD5 not verified: %s -- %s\n", args.md5hash, args.string);
pbx_builtin_setvar_helper(chan, "CHECKMD5STATUS", "NOMATCH");
if (priority_jump || option_priority_jumping) {
if (!ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101))
if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101))
if (option_debug > 2)
ast_log(LOG_DEBUG, "ERROR: Can't jump to exten+101 (e%s,p%d), sorry\n", chan->exten,chan->priority+101);
ast_log(LOG_DEBUG, "Can't jump to exten+101 (e%s,p%d), sorry\n", chan->exten,chan->priority+101);
}
LOCAL_USER_REMOVE(u);
return res;

93
apps/app_meetme.c Executable file → Normal file
View File

@@ -1,7 +1,7 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 1999 - 2005, Digium, Inc.
* Copyright (C) 1999 - 2006, Digium, Inc.
*
* Mark Spencer <markster@digium.com>
*
@@ -70,8 +70,9 @@ static const char *descrip =
"If the conference number is omitted, the user will be prompted to enter\n"
"one. \n"
"User can exit the conference by hangup, or if the 'p' option is specified, by pressing '#'.\n"
"Please note: A ZAPTEL INTERFACE MUST BE INSTALLED FOR CONFERENCING TO WORK!\n\n"
"Please note: The Zaptel kernel modules and at least one hardware driver (or ztdummy)\n"
" must be present for conferencing to operate properly. In addition, the chan_zap\n"
" channel driver must be loaded for the 'i' and 'r' options to operate at all.\n\n"
"The option string may contain zero or more of the following characters:\n"
" 'a' -- set admin mode\n"
" 'A' -- set marked mode\n"
@@ -95,7 +96,6 @@ static const char *descrip =
" 's' -- Present menu (user or admin) when '*' is received ('send' to menu)\n"
" 't' -- set talk only mode. (Talk only, no listening)\n"
" 'T' -- set talker detection (sent to manager interface and meetme list)\n"
" 'v' -- video mode\n"
" 'w' -- wait until the marked user enters the conference\n"
" 'x' -- close the conference when last marked user exits\n"
" 'X' -- allow user to exit the conference by entering a valid single\n"
@@ -165,7 +165,7 @@ struct ast_conf_user {
int talking; /* Is user talking */
int zapchannel; /* Is a Zaptel channel */
char usrvalue[50]; /* Custom User Value */
char namerecloc[AST_MAX_EXTENSION]; /* Name Recorded file Location */
char namerecloc[PATH_MAX]; /* Name Recorded file Location */
time_t jointime; /* Time the user joined the conference */
struct volume talk;
struct volume listen;
@@ -211,7 +211,7 @@ static void *recordthread(void *args);
#define CONFFLAG_STARMENU (1 << 4) /* If set asterisk will provide a menu to the user when '*' is pressed */
#define CONFFLAG_TALKER (1 << 5) /* If set the use can only send audio to the conference */
#define CONFFLAG_QUIET (1 << 6) /* If set there will be no enter or leave sounds */
#define CONFFLAG_VIDEO (1 << 7) /* Set to enable video mode */
#define CONFFLAG_ANNOUNCEUSERCOUNT (1 << 7) /* If set, when user joins the conference, they will be told the number of users that are already in */
#define CONFFLAG_AGI (1 << 8) /* Set to run AGI Script in Background */
#define CONFFLAG_MOH (1 << 9) /* Set to have music on hold when user is alone in conference */
#define CONFFLAG_MARKEDEXIT (1 << 10) /* If set the MeetMe will return if all marked with this flag left */
@@ -226,7 +226,6 @@ static void *recordthread(void *args);
#define CONFFLAG_EMPTY (1 << 19)
#define CONFFLAG_EMPTYNOPIN (1 << 20)
#define CONFFLAG_ALWAYSPROMPT (1 << 21)
#define CONFFLAG_ANNOUNCEUSERCOUNT (1 << 22) /* If set, when user joins the conference, they will be told the number of users that are already in */
AST_APP_OPTIONS(meetme_opts, {
@@ -263,14 +262,17 @@ static char *istalking(int x)
return "(not talking)";
}
static int careful_write(int fd, unsigned char *data, int len)
static int careful_write(int fd, unsigned char *data, int len, int block)
{
int res;
int x;
while (len) {
x = ZT_IOMUX_WRITE | ZT_IOMUX_SIGEVENT;
res = ioctl(fd, ZT_IOMUX, &x);
if (block) {
x = ZT_IOMUX_WRITE | ZT_IOMUX_SIGEVENT;
res = ioctl(fd, ZT_IOMUX, &x);
} else
res = 0;
if (res >= 0)
res = write(fd, data, len);
if (res < 1) {
@@ -423,7 +425,7 @@ static void conf_play(struct ast_channel *chan, struct ast_conference *conf, int
len = 0;
}
if (data)
careful_write(conf->fd, data, len);
careful_write(conf->fd, data, len, 1);
ast_mutex_unlock(&conflock);
@@ -625,7 +627,7 @@ static int conf_cmd(int fd, int argc, char **argv) {
user->chan->name,
user->userflags & CONFFLAG_ADMIN ? "(Admin)" : "",
user->userflags & CONFFLAG_MONITOR ? "(Listen only)" : "",
user->adminflags & ADMINFLAG_MUTED ? "(Admn Muted)" : "",
user->adminflags & ADMINFLAG_MUTED ? "(Admin Muted)" : "",
istalking(user->talking));
ast_cli(fd,"%d users in that conference.\n",cnf->users);
@@ -734,6 +736,8 @@ static void conf_flush(int fd, struct ast_channel *chan)
f = ast_read(chan);
if (f)
ast_frfree(f);
else /* channel was hung up or something else happened */
break;
}
}
@@ -898,7 +902,9 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
snprintf(user->namerecloc, sizeof(user->namerecloc),
"%s/meetme/meetme-username-%s-%d", ast_config_AST_SPOOL_DIR,
conf->confno, user->user_no);
ast_record_review(chan, "vm-rec-name", user->namerecloc, 10, "sln", &duration, NULL);
res = ast_record_review(chan, "vm-rec-name", user->namerecloc, 10, "sln", &duration, NULL);
if (res == -1)
goto outrun;
}
if (!(confflags & CONFFLAG_QUIET)) {
@@ -946,6 +952,8 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
}
}
ast_indicate(chan, -1);
if (ast_set_write_format(chan, AST_FORMAT_SLINEAR) < 0) {
ast_log(LOG_WARNING, "Unable to set '%s' to write linear mode\n", chan->name);
goto outrun;
@@ -956,7 +964,6 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
goto outrun;
}
ast_indicate(chan, -1);
retryzap = strcasecmp(chan->type, "Zap");
user->zapchannel = !retryzap;
@@ -1062,7 +1069,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
if (!firstpass && !(confflags & CONFFLAG_MONITOR) && !(confflags & CONFFLAG_ADMIN)) {
firstpass = 1;
if (!(confflags & CONFFLAG_QUIET))
if (!(confflags & CONFFLAG_WAITMARKED) || (conf->markedusers >= 1))
if (!(confflags & CONFFLAG_WAITMARKED) || ((confflags & CONFFLAG_MARKEDUSER) && (conf->markedusers >= 1)))
conf_play(chan, conf, ENTER);
}
@@ -1307,14 +1314,18 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
audio frames (in which case carefully writing would only
have delayed the audio even further).
*/
write(fd, f->data, f->datalen);
/* As it turns out, we do want to use careful write. We just
don't want to block, but we do want to at least *try*
to write out all the samples.
*/
careful_write(fd, f->data, f->datalen, 0);
}
} else if ((f->frametype == AST_FRAME_DTMF) && (confflags & CONFFLAG_EXIT_CONTEXT)) {
char tmp[2];
tmp[0] = f->subclass;
tmp[1] = '\0';
if (ast_goto_if_exists(chan, exitcontext, tmp, 1)) {
if (!ast_goto_if_exists(chan, exitcontext, tmp, 1)) {
ret = 0;
break;
} else if (option_debug > 1)
@@ -1343,9 +1354,10 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
if (!menu_active) {
menu_active = 1;
/* Record this sound! */
if (!ast_streamfile(chan, "conf-adminmenu", chan->language))
if (!ast_streamfile(chan, "conf-adminmenu", chan->language)) {
dtmf = ast_waitstream(chan, AST_DIGIT_ANY);
else
ast_stopstream(chan);
} else
dtmf = 0;
} else
dtmf = f->subclass;
@@ -1422,9 +1434,10 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
/* User menu */
if (!menu_active) {
menu_active = 1;
if (!ast_streamfile(chan, "conf-usermenu", chan->language))
if (!ast_streamfile(chan, "conf-usermenu", chan->language)) {
dtmf = ast_waitstream(chan, AST_DIGIT_ANY);
else
ast_stopstream(chan);
} else
dtmf = 0;
} else
dtmf = f->subclass;
@@ -1513,6 +1526,10 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
lastmarked = currentmarked;
}
}
if (musiconhold)
ast_moh_stop(chan);
if (using_pseudo)
close(fd);
else {
@@ -1602,7 +1619,8 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
return ret;
}
static struct ast_conference *find_conf(struct ast_channel *chan, char *confno, int make, int dynamic, char *dynamic_pin)
static struct ast_conference *find_conf(struct ast_channel *chan, char *confno, int make, int dynamic, char *dynamic_pin,
struct ast_flags *confflags)
{
struct ast_config *cfg;
struct ast_variable *var;
@@ -1623,7 +1641,8 @@ static struct ast_conference *find_conf(struct ast_channel *chan, char *confno,
if (dynamic_pin) {
if (dynamic_pin[0] == 'q') {
/* Query the user to enter a PIN */
ast_app_getdata(chan, "conf-getpin", dynamic_pin, AST_MAX_EXTENSION - 1, 0);
if (ast_app_getdata(chan, "conf-getpin", dynamic_pin, AST_MAX_EXTENSION - 1, 0) < 0)
return NULL;
}
cnf = build_conf(confno, dynamic_pin, "", make, dynamic);
} else {
@@ -1676,6 +1695,21 @@ static struct ast_conference *find_conf(struct ast_channel *chan, char *confno,
dynamic_pin[0] = '\0';
}
if (cnf) {
if (confflags && !cnf->chan &&
!ast_test_flag(confflags, CONFFLAG_QUIET) &&
ast_test_flag(confflags, CONFFLAG_INTROUSER)) {
ast_log(LOG_WARNING, "No Zap channel available for conference, user introduction disabled (is chan_zap loaded?)\n");
ast_clear_flag(confflags, CONFFLAG_INTROUSER);
}
if (confflags && !cnf->chan &&
ast_test_flag(confflags, CONFFLAG_RECORDCONF)) {
ast_log(LOG_WARNING, "No Zap channel available for conference, conference recording disabled (is chan_zap loaded?)\n");
ast_clear_flag(confflags, CONFFLAG_RECORDCONF);
}
}
return cnf;
}
@@ -1704,7 +1738,7 @@ static int count_exec(struct ast_channel *chan, void *data)
}
confnum = strsep(&localdata,"|");
conf = find_conf(chan, confnum, 0, 0, NULL);
conf = find_conf(chan, confnum, 0, 0, NULL, NULL);
if (conf)
count = conf->users;
else
@@ -1891,7 +1925,7 @@ static int conf_exec(struct ast_channel *chan, void *data)
}
if (!ast_strlen_zero(confno)) {
/* Check the validity of the conference */
cnf = find_conf(chan, confno, 1, dynamic, the_pin);
cnf = find_conf(chan, confno, 1, dynamic, the_pin, &confflags);
if (!cnf) {
res = ast_streamfile(chan, "conf-invalid", chan->language);
if (!res)
@@ -1929,9 +1963,12 @@ static int conf_exec(struct ast_channel *chan, void *data)
break;
} else {
/* Pin invalid */
res = ast_streamfile(chan, "conf-invalidpin", chan->language);
if (!res)
ast_waitstream(chan, AST_DIGIT_ANY);
if (!ast_streamfile(chan, "conf-invalidpin", chan->language))
res = ast_waitstream(chan, AST_DIGIT_ANY);
else {
ast_log(LOG_WARNING, "Couldn't play invalid pin msg!\n");
break;
}
if (res < 0)
break;
pin[0] = res;

15
apps/app_milliwatt.c Executable file → Normal file
View File

@@ -73,30 +73,29 @@ static void milliwatt_release(struct ast_channel *chan, void *data)
static int milliwatt_generate(struct ast_channel *chan, void *data, int len, int samples)
{
struct ast_frame wf;
unsigned char waste[AST_FRIENDLY_OFFSET];
unsigned char buf[640];
unsigned char buf[AST_FRIENDLY_OFFSET + 640];
int i,*indexp = (int *) data;
if (len > sizeof(buf))
if (len + AST_FRIENDLY_OFFSET > sizeof(buf))
{
ast_log(LOG_WARNING,"Only doing %d bytes (%d bytes requested)\n",(int)sizeof(buf),len);
len = sizeof(buf);
ast_log(LOG_WARNING,"Only doing %d bytes (%d bytes requested)\n",(int)(sizeof(buf) - AST_FRIENDLY_OFFSET),len);
len = sizeof(buf) - AST_FRIENDLY_OFFSET;
}
waste[0] = 0; /* make compiler happy */
wf.frametype = AST_FRAME_VOICE;
wf.subclass = AST_FORMAT_ULAW;
wf.offset = AST_FRIENDLY_OFFSET;
wf.mallocd = 0;
wf.data = buf;
wf.data = buf + AST_FRIENDLY_OFFSET;
wf.datalen = len;
wf.samples = wf.datalen;
wf.src = "app_milliwatt";
wf.delivery.tv_sec = 0;
wf.delivery.tv_usec = 0;
wf.prev = wf.next = NULL;
/* create a buffer containing the digital milliwatt pattern */
for(i = 0; i < len; i++)
{
buf[i] = digital_milliwatt[(*indexp)++];
buf[AST_FRIENDLY_OFFSET + i] = digital_milliwatt[(*indexp)++];
*indexp &= 7;
}
if (ast_write(chan,&wf) < 0)

26
apps/app_mixmonitor.c Executable file → Normal file
View File

@@ -112,9 +112,9 @@ AST_APP_OPTIONS(mixmonitor_opts, {
static void stopmon(struct ast_channel *chan, struct ast_channel_spy *spy)
{
/* If our status has changed, then the channel we're spying on is gone....
/* If our status has changed to DONE, then the channel we're spying on is gone....
DON'T TOUCH IT!!! RUN AWAY!!! */
if (spy->status != CHANSPY_RUNNING)
if (spy->status == CHANSPY_DONE)
return;
if (!chan)
@@ -203,6 +203,17 @@ static void *mixmonitor_thread(void *obj)
if (option_verbose > 1)
ast_verbose(VERBOSE_PREFIX_2 "Begin MixMonitor Recording %s\n", name);
if (mixmonitor->post_process) {
char *p;
for (p = mixmonitor->post_process; *p ; p++) {
if (*p == '^' && *(p+1) == '{') {
*p = '$';
}
}
pbx_substitute_variables_helper(mixmonitor->chan, mixmonitor->post_process, post_process, sizeof(post_process) - 1);
}
while (1) {
struct ast_frame *next;
int write;
@@ -237,17 +248,6 @@ static void *mixmonitor_thread(void *obj)
ast_mutex_unlock(&spy.lock);
}
if (mixmonitor->post_process) {
char *p;
for (p = mixmonitor->post_process; *p ; p++) {
if (*p == '^' && *(p+1) == '{') {
*p = '$';
}
}
pbx_substitute_variables_helper(mixmonitor->chan, mixmonitor->post_process, post_process, sizeof(post_process) - 1);
}
stopmon(mixmonitor->chan, &spy);
if (option_verbose > 1)

3
apps/app_mp3.c Executable file → Normal file
View File

@@ -43,6 +43,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/translate.h"
#include "asterisk/options.h"
#define LOCAL_MPG_123 "/usr/local/bin/mpg123"
#define MPG_123 "/usr/bin/mpg123"
@@ -71,6 +72,8 @@ static int mp3play(char *filename, int fd)
ast_log(LOG_WARNING, "Fork failed\n");
if (res)
return res;
if (option_highpriority)
ast_set_priority(0);
dup2(fd, STDOUT_FILENO);
for (x=0;x<256;x++) {
if (x != STDOUT_FILENO)

4
apps/app_nbscat.c Executable file → Normal file
View File

@@ -44,6 +44,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/translate.h"
#include "asterisk/options.h"
#define LOCAL_NBSCAT "/usr/local/bin/nbscat8k"
#define NBSCAT "/usr/bin/nbscat8k"
@@ -75,6 +76,9 @@ static int NBScatplay(int fd)
ast_log(LOG_WARNING, "Fork failed\n");
if (res)
return res;
if (option_highpriority)
ast_set_priority(0);
dup2(fd, STDOUT_FILENO);
for (x=0;x<256;x++) {
if (x != STDOUT_FILENO)

32
apps/app_osplookup.c Executable file → Normal file
View File

@@ -216,27 +216,33 @@ static int ospnext_exec(struct ast_channel *chan, void *data)
cause = str2cause(args.cause);
temp = pbx_builtin_getvar_helper(chan, "OSPHANDLE");
result.handle = -1;
if (!ast_strlen_zero(temp) && (sscanf(temp, "%d", &result.handle) == 1) && (result.handle > -1)) {
if ((res = ast_osp_next(&result, cause)) > 0) {
char tmp[80];
snprintf(tmp, sizeof(tmp), "%d", result.handle);
pbx_builtin_setvar_helper(chan, "_OSPHANDLE", tmp);
pbx_builtin_setvar_helper(chan, "_OSPTECH", result.tech);
pbx_builtin_setvar_helper(chan, "_OSPDEST", result.dest);
pbx_builtin_setvar_helper(chan, "_OSPTOKEN", result.token);
snprintf(tmp, sizeof(tmp), "%d", result.numresults);
pbx_builtin_setvar_helper(chan, "_OSPRESULTS", tmp);
pbx_builtin_setvar_helper(chan, "OSPNEXTSTATUS", "SUCCESS");
}
if (ast_strlen_zero(temp) || (sscanf(temp, "%d", &result.handle) != 1)) {
result.handle = -1;
}
temp = pbx_builtin_getvar_helper(chan, "OSPRESULTS");
if (ast_strlen_zero(temp) || (sscanf(temp, "%d", &result.numresults) != 1)) {
result.numresults = 0;
}
if ((res = ast_osp_next(&result, cause)) > 0) {
char tmp[80];
snprintf(tmp, sizeof(tmp), "%d", result.handle);
pbx_builtin_setvar_helper(chan, "_OSPHANDLE", tmp);
pbx_builtin_setvar_helper(chan, "_OSPTECH", result.tech);
pbx_builtin_setvar_helper(chan, "_OSPDEST", result.dest);
pbx_builtin_setvar_helper(chan, "_OSPTOKEN", result.token);
snprintf(tmp, sizeof(tmp), "%d", result.numresults);
pbx_builtin_setvar_helper(chan, "_OSPRESULTS", tmp);
pbx_builtin_setvar_helper(chan, "OSPNEXTSTATUS", "SUCCESS");
} else {
if (!res) {
if (result.handle < 0)
ast_log(LOG_NOTICE, "OSP Lookup Next failed for handle '%d'\n", result.handle);
else
ast_log(LOG_DEBUG, "No OSP handle specified\n");
pbx_builtin_setvar_helper(chan, "OSPNEXTSTATUS", "FAILED");
} else
ast_log(LOG_DEBUG, "Got hangup on '%s' while doing OSP Next!\n", chan->name);
pbx_builtin_setvar_helper(chan, "OSPNEXTSTATUS", "FAILED");
}
if (!res) {
/* Look for a "busy" place */

43
apps/app_page.c Executable file → Normal file
View File

@@ -1,7 +1,7 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (c) 2004 - 2005 Digium, Inc. All rights reserved.
* Copyright (c) 2004 - 2006 Digium, Inc. All rights reserved.
*
* Mark Spencer <markster@digium.com>
*
@@ -40,6 +40,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/module.h"
#include "asterisk/file.h"
#include "asterisk/app.h"
#include "asterisk/chanvars.h"
static const char *tdesc = "Page Multiple Phones";
@@ -77,13 +78,14 @@ struct calloutdata {
char tech[64];
char resource[256];
char meetmeopts[64];
struct ast_variable *variables;
};
static void *page_thread(void *data)
{
struct calloutdata *cd = data;
ast_pbx_outgoing_app(cd->tech, AST_FORMAT_SLINEAR, cd->resource, 30000,
"MeetMe", cd->meetmeopts, NULL, 0, cd->cidnum, cd->cidname, NULL, NULL);
"MeetMe", cd->meetmeopts, NULL, 0, cd->cidnum, cd->cidname, cd->variables, NULL, NULL);
free(cd);
return NULL;
}
@@ -91,6 +93,9 @@ static void *page_thread(void *data)
static void launch_page(struct ast_channel *chan, const char *meetmeopts, const char *tech, const char *resource)
{
struct calloutdata *cd;
const char *varname;
struct ast_variable *lastvar = NULL;
struct ast_var_t *varptr;
pthread_t t;
pthread_attr_t attr;
cd = malloc(sizeof(struct calloutdata));
@@ -101,6 +106,29 @@ static void launch_page(struct ast_channel *chan, const char *meetmeopts, const
ast_copy_string(cd->tech, tech, sizeof(cd->tech));
ast_copy_string(cd->resource, resource, sizeof(cd->resource));
ast_copy_string(cd->meetmeopts, meetmeopts, sizeof(cd->meetmeopts));
AST_LIST_TRAVERSE(&chan->varshead, varptr, entries) {
if (!(varname = ast_var_full_name(varptr)))
continue;
if (varname[0] == '_') {
struct ast_variable *newvar = NULL;
if (varname[1] == '_') {
newvar = ast_variable_new(varname, ast_var_value(varptr));
} else {
newvar = ast_variable_new(&varname[1], ast_var_value(varptr));
}
if (newvar) {
if (lastvar)
lastvar->next = newvar;
else
cd->variables = newvar;
lastvar = newvar;
}
}
}
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
if (ast_pthread_create(&t, &attr, page_thread, cd)) {
@@ -121,6 +149,7 @@ static int page_exec(struct ast_channel *chan, void *data)
struct ast_app *app;
char *tmp;
int res=0;
char originator[AST_CHANNEL_NAME];
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "This application requires at least one argument (destination(s) to page)\n");
@@ -142,12 +171,21 @@ static int page_exec(struct ast_channel *chan, void *data)
return -1;
}
ast_copy_string(originator, chan->name, sizeof(originator));
if ((tmp = strchr(originator, '-')))
*tmp = '\0';
tmp = strsep(&options, "|");
if (options)
ast_app_parse_options(page_opts, &flags, NULL, options);
snprintf(meetmeopts, sizeof(meetmeopts), "%ud|%sqxdw", confid, ast_test_flag(&flags, PAGE_DUPLEX) ? "" : "m");
while ((tech = strsep(&tmp, "&"))) {
/* don't call the originating device */
if (!strcasecmp(tech, originator))
continue;
if ((resource = strchr(tech, '/'))) {
*resource++ = '\0';
launch_page(chan, meetmeopts, tech, resource);
@@ -155,6 +193,7 @@ static int page_exec(struct ast_channel *chan, void *data)
ast_log(LOG_WARNING, "Incomplete destination '%s' supplied.\n", tech);
}
}
if (!ast_test_flag(&flags, PAGE_QUIET)) {
res = ast_streamfile(chan, "beep", chan->language);
if (!res)

0
apps/app_parkandannounce.c Executable file → Normal file
View File

0
apps/app_playback.c Executable file → Normal file
View File

16
apps/app_privacy.c Executable file → Normal file
View File

@@ -193,13 +193,21 @@ static int privacy_exec (struct ast_channel *chan, void *data)
}
/*Got a number, play sounds and send them on their way*/
if ((retries < maxretries) && res == 1 ) {
if ((retries < maxretries) && res >= 0 ) {
res = ast_streamfile(chan, "privacy-thankyou", chan->language);
if (!res)
res = ast_waitstream(chan, "");
ast_set_callerid (chan, phone, "Privacy Manager", NULL);
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_3 "Changed Caller*ID to %s\n",phone);
ast_set_callerid (chan, phone, "Privacy Manager", NULL);
/* Clear the unavailable presence bit so if it came in on PRI
* the caller id will now be passed out to other channels
*/
chan->cid.cid_pres &= (AST_PRES_UNAVAILABLE ^ 0xFF);
if (option_verbose > 2) {
ast_verbose (VERBOSE_PREFIX_3 "Changed Caller*ID to %s, callerpres to %d\n",phone,chan->cid.cid_pres);
}
pbx_builtin_setvar_helper(chan, "PRIVACYMGRSTATUS", "SUCCESS");
} else {
if (priority_jump || option_priority_jumping)

594
apps/app_queue.c Executable file → Normal file
View File

@@ -1,7 +1,7 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 1999 - 2005, Digium, Inc.
* Copyright (C) 1999 - 2006, Digium, Inc.
*
* Mark Spencer <markster@digium.com>
*
@@ -298,10 +298,18 @@ struct member {
int status; /*!< Status of queue member */
int paused; /*!< Are we paused (not accepting calls)? */
time_t lastcall; /*!< When last successful call was hungup */
int dead; /*!< Used to detect members deleted in realtime */
unsigned int dead:1; /*!< Used to detect members deleted in realtime */
unsigned int delme:1; /*!< Flag to delete entry on reload */
struct member *next; /*!< Next member */
};
struct ast_member_interfaces {
char interface[80];
AST_LIST_ENTRY(ast_member_interfaces) list; /*!< Next call queue */
};
static AST_LIST_HEAD_STATIC(interfaces, ast_member_interfaces);
/* values used in multi-bit flags in ast_call_queue */
#define QUEUE_EMPTY_NORMAL 1
#define QUEUE_EMPTY_STRICT 2
@@ -430,6 +438,8 @@ static enum queue_member_status get_member_status(const struct ast_call_queue *q
enum queue_member_status result = QUEUE_NO_MEMBERS;
for (member = q->members; member; member = member->next) {
if (member->paused) continue;
switch (member->status) {
case AST_DEVICE_INVALID:
/* nothing to do */
@@ -455,6 +465,7 @@ static void *changethread(void *data)
struct ast_call_queue *q;
struct statechange *sc = data;
struct member *cur;
struct ast_member_interfaces *curint;
char *loc;
char *technology;
@@ -467,36 +478,50 @@ static void *changethread(void *data)
free(sc);
return NULL;
}
if (option_debug)
ast_log(LOG_DEBUG, "Device '%s/%s' changed to state '%d' (%s)\n", technology, loc, sc->state, devstate2str(sc->state));
ast_mutex_lock(&qlock);
for (q = queues; q; q = q->next) {
ast_mutex_lock(&q->lock);
cur = q->members;
while(cur) {
if (!strcasecmp(sc->dev, cur->interface)) {
if (cur->status != sc->state) {
cur->status = sc->state;
if (!q->maskmemberstatus) {
manager_event(EVENT_FLAG_AGENT, "QueueMemberStatus",
"Queue: %s\r\n"
"Location: %s\r\n"
"Membership: %s\r\n"
"Penalty: %d\r\n"
"CallsTaken: %d\r\n"
"LastCall: %ld\r\n"
"Status: %d\r\n"
"Paused: %d\r\n",
q->name, cur->interface, cur->dynamic ? "dynamic" : "static",
cur->penalty, cur->calls, cur->lastcall, cur->status, cur->paused);
AST_LIST_LOCK(&interfaces);
AST_LIST_TRAVERSE(&interfaces, curint, list) {
if (!strcasecmp(curint->interface, sc->dev))
break;
}
AST_LIST_UNLOCK(&interfaces);
if (curint) {
if (option_debug)
ast_log(LOG_DEBUG, "Device '%s/%s' changed to state '%d' (%s)\n", technology, loc, sc->state, devstate2str(sc->state));
ast_mutex_lock(&qlock);
for (q = queues; q; q = q->next) {
ast_mutex_lock(&q->lock);
cur = q->members;
while(cur) {
if (!strcasecmp(sc->dev, cur->interface)) {
if (cur->status != sc->state) {
cur->status = sc->state;
if (!q->maskmemberstatus) {
manager_event(EVENT_FLAG_AGENT, "QueueMemberStatus",
"Queue: %s\r\n"
"Location: %s\r\n"
"Membership: %s\r\n"
"Penalty: %d\r\n"
"CallsTaken: %d\r\n"
"LastCall: %d\r\n"
"Status: %d\r\n"
"Paused: %d\r\n",
q->name, cur->interface, cur->dynamic ? "dynamic" : "static",
cur->penalty, cur->calls, (int)cur->lastcall, cur->status, cur->paused);
}
}
}
cur = cur->next;
}
cur = cur->next;
ast_mutex_unlock(&q->lock);
}
ast_mutex_unlock(&q->lock);
}
ast_mutex_unlock(&qlock);
ast_mutex_unlock(&qlock);
} else {
if (option_debug)
ast_log(LOG_DEBUG, "Device '%s/%s' changed to state '%d' (%s) but we don't care because they're not a member of any queue.\n", technology, loc, sc->state, devstate2str(sc->state));
}
free(sc);
return NULL;
}
@@ -593,6 +618,99 @@ static void clear_queue(struct ast_call_queue *q)
q->wrapuptime = 0;
}
static int add_to_interfaces(char *interface)
{
struct ast_member_interfaces *curint, *newint;
if (!interface)
return 0;
AST_LIST_LOCK(&interfaces);
AST_LIST_TRAVERSE(&interfaces, curint, list) {
if (!strcasecmp(curint->interface, interface))
break;
}
if (!curint) {
if (option_debug)
ast_log(LOG_DEBUG, "Adding %s to the list of interfaces that make up all of our queue members.\n", interface);
if ((newint = malloc(sizeof(*newint)))) {
memset(newint, 0, sizeof(*newint));
ast_copy_string(newint->interface, interface, sizeof(newint->interface));
AST_LIST_INSERT_HEAD(&interfaces, newint, list);
}
}
AST_LIST_UNLOCK(&interfaces);
return 0;
}
static int interface_exists_global(char *interface)
{
struct ast_call_queue *q;
struct member *mem;
int ret = 0;
if (!interface)
return ret;
ast_mutex_lock(&qlock);
for (q = queues; q && !ret; q = q->next) {
ast_mutex_lock(&q->lock);
mem = q->members;
while(mem) {
if (!strcasecmp(interface, mem->interface)) {
ret = 1;
break;
}
mem = mem->next;
}
ast_mutex_unlock(&q->lock);
}
ast_mutex_unlock(&qlock);
return ret;
}
static int remove_from_interfaces(char *interface)
{
struct ast_member_interfaces *curint;
if (!interface)
return 0;
AST_LIST_LOCK(&interfaces);
AST_LIST_TRAVERSE_SAFE_BEGIN(&interfaces, curint, list) {
if (!strcasecmp(curint->interface, interface) && !interface_exists_global(interface)) {
if (option_debug)
ast_log(LOG_DEBUG, "Removing %s from the list of interfaces that make up all of our queue members.\n", interface);
AST_LIST_REMOVE_CURRENT(&interfaces, list);
free(curint);
}
}
AST_LIST_TRAVERSE_SAFE_END;
AST_LIST_UNLOCK(&interfaces);
return 0;
}
static void clear_and_free_interfaces(void)
{
struct ast_member_interfaces *curint;
AST_LIST_LOCK(&interfaces);
AST_LIST_TRAVERSE_SAFE_BEGIN(&interfaces, curint, list) {
AST_LIST_REMOVE_CURRENT(&interfaces, list);
free(curint);
}
AST_LIST_TRAVERSE_SAFE_END;
AST_LIST_UNLOCK(&interfaces);
return;
}
/*! \brief Configure a queue parameter.
\par
For error reporting, line number is passed for .conf static configuration.
@@ -743,6 +861,7 @@ static void rt_handle_member_record(struct ast_call_queue *q, char *interface, c
m = create_queue_member(interface, penalty, 0);
if (m) {
m->dead = 0;
add_to_interfaces(interface);
if (prev_m) {
prev_m->next = m;
} else {
@@ -755,28 +874,67 @@ static void rt_handle_member_record(struct ast_call_queue *q, char *interface, c
}
}
static void free_members(struct ast_call_queue *q, int all)
{
/* Free non-dynamic members */
struct member *curm, *next, *prev = NULL;
for (curm = q->members; curm; curm = next) {
next = curm->next;
if (all || !curm->dynamic) {
if (prev)
prev->next = next;
else
q->members = next;
remove_from_interfaces(curm->interface);
free(curm);
} else
prev = curm;
}
}
static void destroy_queue(struct ast_call_queue *q)
{
free_members(q, 1);
ast_mutex_destroy(&q->lock);
free(q);
}
static void remove_queue(struct ast_call_queue *q)
{
struct ast_call_queue *cur, *prev = NULL;
ast_mutex_lock(&qlock);
for (cur = queues; cur; cur = cur->next) {
if (cur == q) {
if (prev)
prev->next = cur->next;
else
queues = cur->next;
} else {
prev = cur;
}
}
ast_mutex_unlock(&qlock);
}
/*!\brief Reload a single queue via realtime.
\return Return the queue, or NULL if it doesn't exist.
\note Should be called with the global qlock locked.
When found, the queue is returned with q->lock locked. */
static struct ast_call_queue *reload_queue_rt(const char *queuename, struct ast_variable *queue_vars, struct ast_config *member_config)
\note Should be called with the global qlock locked. */
static struct ast_call_queue *find_queue_by_name_rt(const char *queuename, struct ast_variable *queue_vars, struct ast_config *member_config)
{
struct ast_variable *v;
struct ast_call_queue *q, *prev_q;
struct ast_call_queue *q, *prev_q = NULL;
struct member *m, *prev_m, *next_m;
char *interface;
char *tmp, *tmp_name;
char tmpbuf[64]; /* Must be longer than the longest queue param name. */
/* Find the queue in the in-core list (we will create a new one if not found). */
q = queues;
prev_q = NULL;
while (q) {
for (q = queues; q; q = q->next) {
if (!strcasecmp(q->name, queuename)) {
break;
}
q = q->next;
prev_q = q;
}
@@ -788,6 +946,7 @@ static struct ast_call_queue *reload_queue_rt(const char *queuename, struct ast_
ast_mutex_unlock(&q->lock);
return NULL;
} else {
ast_mutex_unlock(&q->lock);
return q;
}
}
@@ -814,7 +973,7 @@ static struct ast_call_queue *reload_queue_rt(const char *queuename, struct ast_
prev_q->next = q->next;
}
ast_mutex_unlock(&q->lock);
free(q);
destroy_queue(q);
} else
ast_mutex_unlock(&q->lock);
}
@@ -850,10 +1009,11 @@ static struct ast_call_queue *reload_queue_rt(const char *queuename, struct ast_
v = v->next;
}
/* Temporarily set members dead so we can detect deleted ones. */
/* Temporarily set non-dynamic members dead so we can detect deleted ones. */
m = q->members;
while (m) {
m->dead = 1;
if (!m->dynamic)
m->dead = 1;
m = m->next;
}
@@ -874,6 +1034,7 @@ static struct ast_call_queue *reload_queue_rt(const char *queuename, struct ast_
} else {
q->members = next_m;
}
remove_from_interfaces(m->interface);
free(m);
} else {
prev_m = m;
@@ -881,13 +1042,60 @@ static struct ast_call_queue *reload_queue_rt(const char *queuename, struct ast_
m = next_m;
}
ast_mutex_unlock(&q->lock);
return q;
}
static struct ast_call_queue *load_realtime_queue(char *queuename)
{
struct ast_variable *queue_vars = NULL;
struct ast_config *member_config = NULL;
struct ast_call_queue *q;
/* Find the queue in the in-core list first. */
ast_mutex_lock(&qlock);
for (q = queues; q; q = q->next) {
if (!strcasecmp(q->name, queuename)) {
break;
}
}
ast_mutex_unlock(&qlock);
if (!q || q->realtime) {
/*! \note Load from realtime before taking the global qlock, to avoid blocking all
queue operations while waiting for the DB.
This will be two separate database transactions, so we might
see queue parameters as they were before another process
changed the queue and member list as it was after the change.
Thus we might see an empty member list when a queue is
deleted. In practise, this is unlikely to cause a problem. */
queue_vars = ast_load_realtime("queues", "name", queuename, NULL);
if (queue_vars) {
member_config = ast_load_realtime_multientry("queue_members", "interface LIKE", "%", "queue_name", queuename, NULL);
if (!member_config) {
ast_log(LOG_ERROR, "no queue_members defined in your config (extconfig.conf).\n");
return NULL;
}
}
ast_mutex_lock(&qlock);
q = find_queue_by_name_rt(queuename, queue_vars, member_config);
if (member_config)
ast_config_destroy(member_config);
if (queue_vars)
ast_variables_destroy(queue_vars);
ast_mutex_unlock(&qlock);
}
return q;
}
static int join_queue(char *queuename, struct queue_ent *qe, enum queue_result *reason)
{
struct ast_variable *queue_vars = NULL;
struct ast_config *member_config = NULL;
struct ast_call_queue *q;
struct queue_ent *cur, *prev = NULL;
int res = -1;
@@ -895,35 +1103,12 @@ static int join_queue(char *queuename, struct queue_ent *qe, enum queue_result *
int inserted = 0;
enum queue_member_status stat;
/*! \note Load from realtime before taking the global qlock, to avoid blocking all
queue operations while waiting for the DB.
This will be two separate database transactions, so we might
see queue parameters as they were before another process
changed the queue and member list as it was after the change.
Thus we might see an empty member list when a queue is
deleted. In practise, this is unlikely to cause a problem. */
queue_vars = ast_load_realtime("queues", "name", queuename, NULL);
if (queue_vars) {
member_config = ast_load_realtime_multientry("queue_members", "interface LIKE", "%", "queue_name", queuename, NULL);
if (!member_config) {
ast_log(LOG_ERROR, "no queue_members defined in your config (extconfig.conf).\n");
return res;
}
}
q = load_realtime_queue(queuename);
if (!q)
return res;
ast_mutex_lock(&qlock);
q = reload_queue_rt(queuename, queue_vars, member_config);
/* Note: If found, reload_queue_rt() returns with q->lock locked. */
if(member_config)
ast_config_destroy(member_config);
if(queue_vars)
ast_variables_destroy(queue_vars);
if (!q) {
ast_mutex_unlock(&qlock);
return res;
}
ast_mutex_lock(&q->lock);
/* This is our one */
stat = get_member_status(q);
@@ -966,57 +1151,15 @@ static int join_queue(char *queuename, struct queue_ent *qe, enum queue_result *
qe->chan->cid.cid_num ? qe->chan->cid.cid_num : "unknown",
qe->chan->cid.cid_name ? qe->chan->cid.cid_name : "unknown",
q->name, qe->pos, q->count );
#if 0
ast_log(LOG_NOTICE, "Queue '%s' Join, Channel '%s', Position '%d'\n", q->name, qe->chan->name, qe->pos );
#endif
if (option_debug)
ast_log(LOG_DEBUG, "Queue '%s' Join, Channel '%s', Position '%d'\n", q->name, qe->chan->name, qe->pos );
}
ast_mutex_unlock(&q->lock);
ast_mutex_unlock(&qlock);
return res;
}
static void free_members(struct ast_call_queue *q, int all)
{
/* Free non-dynamic members */
struct member *curm, *next, *prev;
curm = q->members;
prev = NULL;
while(curm) {
next = curm->next;
if (all || !curm->dynamic) {
if (prev)
prev->next = next;
else
q->members = next;
free(curm);
} else
prev = curm;
curm = next;
}
}
static void destroy_queue(struct ast_call_queue *q)
{
struct ast_call_queue *cur, *prev = NULL;
ast_mutex_lock(&qlock);
for (cur = queues; cur; cur = cur->next) {
if (cur == q) {
if (prev)
prev->next = cur->next;
else
queues = cur->next;
} else {
prev = cur;
}
}
ast_mutex_unlock(&qlock);
free_members(q, 1);
ast_mutex_destroy(&q->lock);
free(q);
}
static int play_file(struct ast_channel *chan, char *filename)
{
int res;
@@ -1156,12 +1299,17 @@ static int say_position(struct queue_ent *qe)
ast_verbose(VERBOSE_PREFIX_3 "Told %s in %s their queue position (which was %d)\n",
qe->chan->name, qe->parent->name, qe->pos);
res = play_file(qe->chan, qe->parent->sound_thanks);
if (res && !valid_exit(qe, res))
res = 0;
playout:
/* Set our last_pos indicators */
qe->last_pos = now;
qe->last_pos_said = qe->pos;
ast_moh_start(qe->chan, qe->moh);
/* Don't restart music on hold if we're about to exit the caller from the queue */
if (!res)
ast_moh_start(qe->chan, qe->moh);
return res;
}
@@ -1178,7 +1326,7 @@ static void recalc_holdtime(struct queue_ent *qe)
ast_mutex_lock(&qe->parent->lock);
if (newvalue <= qe->parent->servicelevel)
qe->parent->callscompletedinsl++;
qe->parent->callscompletedinsl++;
oldvalue = qe->parent->holdtime;
qe->parent->holdtime = (((oldvalue << 2) - oldvalue) + newvalue) >> 2;
ast_mutex_unlock(&qe->parent->lock);
@@ -1224,6 +1372,7 @@ ast_log(LOG_NOTICE, "Queue '%s' Leave, Channel '%s'\n", q->name, qe->chan->name
ast_mutex_unlock(&q->lock);
if (q->dead && !q->count) {
/* It's dead and nobody is in it, so kill it */
remove_queue(q);
destroy_queue(q);
}
}
@@ -1261,11 +1410,11 @@ static int update_status(struct ast_call_queue *q, struct member *member, int st
"Membership: %s\r\n"
"Penalty: %d\r\n"
"CallsTaken: %d\r\n"
"LastCall: %ld\r\n"
"LastCall: %d\r\n"
"Status: %d\r\n"
"Paused: %d\r\n",
q->name, cur->interface, cur->dynamic ? "dynamic" : "static",
cur->penalty, cur->calls, cur->lastcall, cur->status, cur->paused);
cur->penalty, cur->calls, (int)cur->lastcall, cur->status, cur->paused);
}
break;
}
@@ -1304,7 +1453,7 @@ static int compare_weight(struct ast_call_queue *rq, struct member *member)
ast_mutex_lock(&q->lock);
if (q->count && q->members) {
for (mem = q->members; mem; mem = mem->next) {
if (mem == member) {
if (!strcmp(mem->interface, member->interface)) {
ast_log(LOG_DEBUG, "Found matching member %s in queue '%s'\n", mem->interface, q->name);
if (q->weight > rq->weight) {
ast_log(LOG_DEBUG, "Queue '%s' (weight %d, calls %d) is preferred over '%s' (weight %d, calls %d)\n", q->name, q->weight, q->count, rq->name, rq->weight, rq->count);
@@ -1528,7 +1677,7 @@ static int background_file(struct queue_ent *qe, struct ast_channel *chan, char
if (!res) {
/* Wait for a keypress */
res = ast_waitstream(chan, AST_DIGIT_ANY);
if (res <= 0 || !valid_exit(qe, res))
if (res < 0 || !valid_exit(qe, res))
res = 0;
/* Stop playback */
@@ -1566,8 +1715,9 @@ static int say_periodic_announcement(struct queue_ent *qe)
/* play the announcement */
res = background_file(qe, qe->chan, qe->parent->sound_periodicannounce);
/* Resume Music on Hold */
ast_moh_start(qe->chan, qe->moh);
/* Resume Music on Hold if the caller is going to stay in the queue */
if (!res)
ast_moh_start(qe->chan, qe->moh);
/* update last_periodic_announce_time */
qe->last_periodic_announce_time = now;
@@ -1728,7 +1878,7 @@ static struct localuser *wait_for_answer(struct queue_ent *qe, struct localuser
if (f) {
if (f->frametype == AST_FRAME_CONTROL) {
switch(f->subclass) {
case AST_CONTROL_ANSWER:
case AST_CONTROL_ANSWER:
/* This is our guy if someone answered. */
if (!peer) {
if (option_verbose > 2)
@@ -1892,18 +2042,17 @@ static int wait_our_turn(struct queue_ent *qe, int ringing, enum queue_result *r
}
/* Make a position announcement, if enabled */
if (qe->parent->announcefrequency && !ringing)
res = say_position(qe);
if (res)
if (qe->parent->announcefrequency && !ringing &&
(res = say_position(qe)))
break;
/* Make a periodic announcement, if enabled */
if (qe->parent->periodicannouncefrequency && !ringing)
res = say_periodic_announcement(qe);
if (qe->parent->periodicannouncefrequency && !ringing &&
(res = say_periodic_announcement(qe)))
break;
/* Wait a second before checking again */
if (!res) res = ast_waitfordigit(qe->chan, RECHECK * 1000);
if (res)
if ((res = ast_waitfordigit(qe->chan, RECHECK * 1000)))
break;
}
return res;
@@ -2097,10 +2246,10 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
cur = cur->next;
}
if (qe->parent->timeout)
to = qe->parent->timeout * 1000;
else
to = -1;
if (qe->expire && (!qe->parent->timeout || (qe->expire - now) <= qe->parent->timeout))
to = (qe->expire - now) * 1000;
else
to = (qe->parent->timeout) ? qe->parent->timeout * 1000 : -1;
ring_one(qe, outgoing, &numbusies);
ast_mutex_unlock(&qe->parent->lock);
if (use_weight)
@@ -2118,7 +2267,6 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
if (!peer) {
if (to) {
/* Musta gotten hung up */
record_abandoned(qe);
res = -1;
} else {
res = digit;
@@ -2173,7 +2321,7 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
/* Agent must have hung up */
ast_log(LOG_WARNING, "Agent on %s hungup on the customer. They're going to be pissed.\n", peer->name);
ast_queue_log(queuename, qe->chan->uniqueid, peer->name, "AGENTDUMP", "%s", "");
record_abandoned(qe);
record_abandoned(qe);
if (qe->parent->eventwhencalled) {
manager_event(EVENT_FLAG_AGENT, "AgentDump",
"Queue: %s\r\n"
@@ -2203,7 +2351,7 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
if (res < 0) {
ast_queue_log(queuename, qe->chan->uniqueid, peer->name, "SYSCOMPAT", "%s", "");
ast_log(LOG_WARNING, "Had to drop call because I couldn't make %s compatible with %s\n", qe->chan->name, peer->name);
record_abandoned(qe);
record_abandoned(qe);
ast_hangup(peer);
return -1;
}
@@ -2280,13 +2428,10 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
(long)(time(NULL) - callstart));
}
if(bridge != AST_PBX_NO_HANGUP_PEER)
if (bridge != AST_PBX_NO_HANGUP_PEER)
ast_hangup(peer);
update_queue(qe->parent, member);
if (bridge == 0)
res = 1; /* JDG: bridge successfull, leave app_queue */
else
res = bridge; /* bridge error, stay in the queue */
res = bridge ? bridge : 1;
}
out:
hangupcalls(outgoing, NULL);
@@ -2383,7 +2528,7 @@ static int remove_from_queue(char *queuename, char *interface)
free(last_member);
if (queue_persistent_members)
dump_queue_members(q);
dump_queue_members(q);
res = RES_OKAY;
} else {
@@ -2394,6 +2539,8 @@ static int remove_from_queue(char *queuename, char *interface)
}
ast_mutex_unlock(&q->lock);
}
if (res == RES_OKAY)
remove_from_interfaces(interface);
ast_mutex_unlock(&qlock);
return res;
}
@@ -2404,41 +2551,45 @@ static int add_to_queue(char *queuename, char *interface, int penalty, int pause
struct member *new_member;
int res = RES_NOSUCHQUEUE;
ast_mutex_lock(&qlock);
for (q = queues ; q ; q = q->next) {
ast_mutex_lock(&q->lock);
if (!strcmp(q->name, queuename)) {
if (interface_exists(q, interface) == NULL) {
new_member = create_queue_member(interface, penalty, paused);
/* \note Ensure the appropriate realtime queue is loaded. Note that this
* short-circuits if the queue is already in memory. */
q = load_realtime_queue(queuename);
if (new_member != NULL) {
new_member->dynamic = 1;
new_member->next = q->members;
q->members = new_member;
manager_event(EVENT_FLAG_AGENT, "QueueMemberAdded",
ast_mutex_lock(&qlock);
if (q) {
ast_mutex_lock(&q->lock);
if (interface_exists(q, interface) == NULL) {
add_to_interfaces(interface);
new_member = create_queue_member(interface, penalty, paused);
if (new_member != NULL) {
new_member->dynamic = 1;
new_member->next = q->members;
q->members = new_member;
manager_event(EVENT_FLAG_AGENT, "QueueMemberAdded",
"Queue: %s\r\n"
"Location: %s\r\n"
"Membership: %s\r\n"
"Penalty: %d\r\n"
"CallsTaken: %d\r\n"
"LastCall: %ld\r\n"
"LastCall: %d\r\n"
"Status: %d\r\n"
"Paused: %d\r\n",
q->name, new_member->interface, new_member->dynamic ? "dynamic" : "static",
new_member->penalty, new_member->calls, new_member->lastcall, new_member->status, new_member->paused);
if (dump)
dump_queue_members(q);
q->name, new_member->interface, new_member->dynamic ? "dynamic" : "static",
new_member->penalty, new_member->calls, (int)new_member->lastcall, new_member->status, new_member->paused);
res = RES_OKAY;
} else {
res = RES_OUTOFMEMORY;
}
if (dump)
dump_queue_members(q);
res = RES_OKAY;
} else {
res = RES_EXISTS;
res = RES_OUTOFMEMORY;
}
ast_mutex_unlock(&q->lock);
break;
} else {
res = RES_EXISTS;
}
ast_mutex_unlock(&q->lock);
}
@@ -2468,7 +2619,7 @@ static int set_member_paused(char *queuename, char *interface, int paused)
mem->paused = paused;
if (queue_persistent_members)
dump_queue_members(q);
dump_queue_members(q);
ast_queue_log(q->name, "NONE", interface, (paused ? "PAUSE" : "UNPAUSE"), "%s", "");
@@ -2876,7 +3027,7 @@ static int queue_exec(struct ast_channel *chan, void *data)
queuetimeoutstr = info_ptr;
/* set the expire time based on the supplied timeout; */
if (queuetimeoutstr)
if (!ast_strlen_zero(queuetimeoutstr))
qe.expire = qe.start + atoi(queuetimeoutstr);
else
qe.expire = 0;
@@ -2917,7 +3068,7 @@ static int queue_exec(struct ast_channel *chan, void *data)
check_turns:
if (ringing) {
ast_indicate(chan, AST_CONTROL_RINGING);
} else {
} else {
ast_moh_start(chan, qe.moh);
}
for (;;) {
@@ -2931,8 +3082,8 @@ check_turns:
ast_queue_log(queuename, chan->uniqueid, "NONE", "ABANDON", "%d|%d|%ld", qe.pos, qe.opos, (long)time(NULL) - qe.start);
if (option_verbose > 2) {
ast_verbose(VERBOSE_PREFIX_3 "User disconnected from queue %s while waiting their turn\n", queuename);
res = -1;
}
res = -1;
break;
}
if (!res)
@@ -2954,7 +3105,7 @@ check_turns:
/* Leave if we have exceeded our queuetimeout */
if (qe.expire && (time(NULL) > qe.expire)) {
record_abandoned(&qe);
record_abandoned(&qe);
reason = QUEUE_TIMEOUT;
res = 0;
ast_queue_log(queuename, chan->uniqueid,"NONE", "EXITWITHTIMEOUT", "%d", qe.pos);
@@ -2963,9 +3114,8 @@ check_turns:
if (makeannouncement) {
/* Make a position announcement, if enabled */
if (qe.parent->announcefrequency && !ringing)
res = say_position(&qe);
if (res && valid_exit(&qe, res)) {
if (qe.parent->announcefrequency && !ringing &&
(res = say_position(&qe))) {
ast_queue_log(queuename, chan->uniqueid, "NONE", "EXITWITHKEY", "%s|%d", qe.digits, qe.pos);
break;
}
@@ -2974,10 +3124,8 @@ check_turns:
makeannouncement = 1;
/* Make a periodic announcement, if enabled */
if (qe.parent->periodicannouncefrequency && !ringing)
res = say_periodic_announcement(&qe);
if (res && valid_exit(&qe, res)) {
if (qe.parent->periodicannouncefrequency && !ringing &&
(res = say_periodic_announcement(&qe))) {
ast_queue_log(queuename, chan->uniqueid, "NONE", "EXITWITHKEY", "%c|%d", res, qe.pos);
break;
}
@@ -2990,8 +3138,9 @@ check_turns:
record_abandoned(&qe);
ast_queue_log(queuename, chan->uniqueid, "NONE", "ABANDON", "%d|%d|%ld", qe.pos, qe.opos, (long)time(NULL) - qe.start);
}
} else if (res > 0)
} else if (valid_exit(&qe, res)) {
ast_queue_log(queuename, chan->uniqueid, "NONE", "EXITWITHKEY", "%s|%d", qe.digits, qe.pos);
}
break;
}
@@ -3029,8 +3178,8 @@ check_turns:
ast_queue_log(queuename, chan->uniqueid, "NONE", "ABANDON", "%d|%d|%ld", qe.pos, qe.opos, (long)time(NULL) - qe.start);
if (option_verbose > 2) {
ast_verbose(VERBOSE_PREFIX_3 "User disconnected from queue %s when they almost made it\n", queuename);
res = -1;
}
res = -1;
break;
}
if (res && valid_exit(&qe, res)) {
@@ -3039,12 +3188,10 @@ check_turns:
}
/* exit after 'timeout' cycle if 'n' option enabled */
if (go_on) {
if (option_verbose > 2) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Exiting on time-out cycle\n");
res = -1;
}
ast_queue_log(queuename, chan->uniqueid, "NONE", "EXITWITHTIMEOUT", "%d", qe.pos);
record_abandoned(&qe);
record_abandoned(&qe);
reason = QUEUE_TIMEOUT;
res = 0;
break;
@@ -3056,7 +3203,7 @@ check_turns:
if (!is_our_turn(&qe)) {
if (option_debug)
ast_log(LOG_DEBUG, "Darn priorities, going back in queue (%s)!\n",
qe.chan->name);
qe.chan->name);
goto check_turns;
}
}
@@ -3140,7 +3287,7 @@ static void reload_queues(void)
struct ast_config *cfg;
char *cat, *tmp;
struct ast_variable *var;
struct member *prev, *cur;
struct member *prev, *cur, *newm;
int new;
char *general_val = NULL;
char interface[80];
@@ -3188,15 +3335,13 @@ static void reload_queues(void)
/* Re-initialize the queue, and clear statistics */
init_queue(q);
clear_queue(q);
free_members(q, 0);
prev = q->members;
if (prev) {
/* find the end of any dynamic members */
while(prev->next)
prev = prev->next;
for (cur = q->members; cur; cur = cur->next) {
if (!cur->dynamic) {
cur->delme = 1;
}
}
var = ast_variable_browse(cfg, cat);
while(var) {
while (var) {
if (!strcasecmp(var->name, "member")) {
/* Add a new member */
ast_copy_string(interface, var->value, sizeof(interface));
@@ -3209,19 +3354,55 @@ static void reload_queues(void)
}
} else
penalty = 0;
cur = create_queue_member(interface, penalty, 0);
/* Find the old position in the list */
for (prev = NULL, cur = q->members; cur; prev = cur, cur = cur->next) {
if (!strcmp(cur->interface, interface)) {
break;
}
}
newm = create_queue_member(interface, penalty, cur ? cur->paused : 0);
if (cur) {
if (prev)
prev->next = cur;
else
q->members = cur;
prev = cur;
/* Delete it now */
newm->next = cur->next;
if (prev) {
prev->next = newm;
} else {
q->members = newm;
}
free(cur);
} else {
/* Add them to the master int list if necessary */
add_to_interfaces(interface);
newm->next = q->members;
q->members = newm;
}
} else {
queue_set_param(q, var->name, var->value, var->lineno, 1);
}
var = var->next;
}
/* Free remaining members marked as delme */
for (prev = NULL, newm = NULL, cur = q->members; cur; prev = cur, cur = cur->next) {
if (newm) {
free(newm);
newm = NULL;
}
if (cur->delme) {
if (prev) {
prev->next = cur->next;
newm = cur;
} else {
q->members = cur->next;
newm = cur;
}
remove_from_interfaces(cur->interface);
}
}
if (!new)
ast_mutex_unlock(&q->lock);
if (new) {
@@ -3243,7 +3424,7 @@ static void reload_queues(void)
else
queues = q->next;
if (!q->count) {
free(q);
destroy_queue(q);
} else
ast_log(LOG_WARNING, "XXX Leaking a little memory :( XXX\n");
} else {
@@ -3272,7 +3453,13 @@ static int __queues_show(int manager, int fd, int argc, char **argv, int queue_s
time(&now);
if ((!queue_show && argc != 2) || (queue_show && argc != 3))
return RESULT_SHOWUSAGE;
/* We only want to load realtime queues when a specific queue is asked for. */
if (queue_show)
load_realtime_queue(argv[2]);
ast_mutex_lock(&qlock);
q = queues;
if (!q) {
ast_mutex_unlock(&qlock);
@@ -3435,13 +3622,13 @@ static int manager_queues_status( struct mansession *s, struct message *m )
"Membership: %s\r\n"
"Penalty: %d\r\n"
"CallsTaken: %d\r\n"
"LastCall: %ld\r\n"
"LastCall: %d\r\n"
"Status: %d\r\n"
"Paused: %d\r\n"
"%s"
"\r\n",
q->name, mem->interface, mem->dynamic ? "dynamic" : "static",
mem->penalty, mem->calls, mem->lastcall, mem->status, mem->paused, idText);
mem->penalty, mem->calls, (int)mem->lastcall, mem->status, mem->paused, idText);
}
}
/* List Queue Entries */
@@ -3464,13 +3651,13 @@ static int manager_queues_status( struct mansession *s, struct message *m )
}
ast_mutex_unlock(&q->lock);
}
ast_mutex_unlock(&qlock);
ast_cli(s->fd,
"Event: QueueStatusComplete\r\n"
"%s"
"\r\n",idText);
ast_mutex_unlock(&qlock);
return RESULT_SUCCESS;
}
@@ -3766,6 +3953,7 @@ int unload_module(void)
{
int res;
clear_and_free_interfaces();
res = ast_cli_unregister(&cli_show_queue);
res |= ast_cli_unregister(&cli_show_queues);
res |= ast_cli_unregister(&cli_add_queue_member);

2
apps/app_random.c Executable file → Normal file
View File

@@ -82,7 +82,7 @@ static int random_exec(struct ast_channel *chan, void *data)
if ((!prob) || (sscanf(prob, "%d", &probint) != 1))
probint = 0;
if ((random() % 100) + probint > 100) {
if ((random() % 100) + probint >= 100) {
res = ast_parseable_goto(chan, s);
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "Random branches to (%s,%s,%d)\n",

0
apps/app_read.c Executable file → Normal file
View File

17
apps/app_readfile.c Executable file → Normal file
View File

@@ -95,15 +95,16 @@ static int readfile_exec(struct ast_channel *chan, void *data)
}
}
returnvar = ast_read_textfile(file);
if(len > 0){
if(len < strlen(returnvar))
returnvar[len]='\0';
else
ast_log(LOG_WARNING,"%s is longer than %d, and %d \n", file, len, (int)strlen(returnvar));
if ((returnvar = ast_read_textfile(file))) {
if (len > 0) {
if (len < strlen(returnvar))
returnvar[len]='\0';
else
ast_log(LOG_WARNING, "%s is longer than %d, and %d \n", file, len, (int)strlen(returnvar));
}
pbx_builtin_setvar_helper(chan, varname, returnvar);
free(returnvar);
}
pbx_builtin_setvar_helper(chan, varname, returnvar);
free(returnvar);
LOCAL_USER_REMOVE(u);
return res;
}

0
apps/app_realtime.c Executable file → Normal file
View File

8
apps/app_record.c Executable file → Normal file
View File

@@ -277,6 +277,7 @@ static int record_exec(struct ast_channel *chan, void *data)
if (res) {
ast_log(LOG_WARNING, "Problem writing frame\n");
ast_frfree(f);
break;
}
@@ -295,16 +296,15 @@ static int record_exec(struct ast_channel *chan, void *data)
break;
}
}
}
if (f->frametype == AST_FRAME_VIDEO) {
} else if (f->frametype == AST_FRAME_VIDEO) {
res = ast_writestream(s, f);
if (res) {
ast_log(LOG_WARNING, "Problem writing frame\n");
ast_frfree(f);
break;
}
}
if ((f->frametype == AST_FRAME_DTMF) &&
} else if ((f->frametype == AST_FRAME_DTMF) &&
(f->subclass == terminator)) {
ast_frfree(f);
break;

0
apps/app_rpt.c Executable file → Normal file
View File

0
apps/app_sayunixtime.c Executable file → Normal file
View File

2
apps/app_senddtmf.c Executable file → Normal file
View File

@@ -50,7 +50,7 @@ static char *synopsis = "Sends arbitrary DTMF digits";
static char *descrip =
" SendDTMF(digits[|timeout_ms]): Sends DTMF digits on a channel. \n"
" Accepted digits: 0-9, *#abcd\n"
" Accepted digits: 0-9, *#abcd, w (.5s pause)\n"
" The application will either pass the assigned digits or terminate if it\n"
" encounters an error.\n";

0
apps/app_sendtext.c Executable file → Normal file
View File

0
apps/app_setcallerid.c Executable file → Normal file
View File

0
apps/app_setcdruserfield.c Executable file → Normal file
View File

0
apps/app_setcidname.c Executable file → Normal file
View File

0
apps/app_setcidnum.c Executable file → Normal file
View File

0
apps/app_setrdnis.c Executable file → Normal file
View File

0
apps/app_settransfercapability.c Executable file → Normal file
View File

9
apps/app_skel.c Executable file → Normal file
View File

@@ -3,7 +3,7 @@
*
* Copyright (C) <Year>, <Your Name Here>
*
* <Your Name Here> <<You Email Here>>
* <Your Name Here> <<Your Email Here>>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
@@ -20,7 +20,7 @@
*
* \brief Skeleton application
*
* This is a skeleton for development of an Asterisk application */
* This is a skeleton for development of an Asterisk application
* \ingroup applications
*/
@@ -53,7 +53,7 @@ static char *descrip = "This application is a template to build other applicatio
#define OPTION_C (1 << 2) /* Option C(str) */
#define OPTION_NULL (1 << 3) /* Dummy Termination */
AST_DECLARE_OPTIONS(app_opts,{
AST_APP_OPTIONS(app_opts,{
['a'] = { OPTION_A },
['b'] = { OPTION_B, 1 },
['c'] = { OPTION_C, 2 }
@@ -77,7 +77,6 @@ static int app_exec(struct ast_channel *chan, void *data)
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "%s requires an argument (dummy|[options])\n",app);
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -96,7 +95,7 @@ static int app_exec(struct ast_channel *chan, void *data)
if ((argc = ast_app_separate_args(args, '|', argv, sizeof(argv) / sizeof(argv[0])))) {
dummy = argv[0];
options = argv[1];
ast_parseoptions(app_opts, &flags, opts, options);
ast_app_parse_options(app_opts, &flags, opts, options);
}
if (!ast_strlen_zero(dummy))

34
apps/app_sms.c Executable file → Normal file
View File

@@ -694,7 +694,7 @@ static void sms_readfile (sms_t * h, char *fn)
}
while (fgets (line, sizeof (line), s))
{ /* process line in file */
char *p;
unsigned char *p;
for (p = line; *p && *p != '\n' && *p != '\r'; p++);
*p = 0; /* strip eoln */
p = line;
@@ -1178,25 +1178,24 @@ static void sms_messagetx(sms_t * h)
static int sms_generate (struct ast_channel *chan, void *data, int len, int samples)
{
struct ast_frame f = { 0 };
unsigned char waste[AST_FRIENDLY_OFFSET];
#define MAXSAMPLES 800
#ifdef OUTALAW
unsigned char buf[800];
unsigned char *buf;
#else
signed short buf[800];
short *buf;
#endif
#define SAMPLE2LEN sizeof(*buf)
sms_t *h = data;
int i;
if (len > sizeof (buf)) {
ast_log (LOG_WARNING, "Only doing %d bytes (%d bytes requested)\n", (int)(sizeof (buf) / sizeof (signed short)), len);
len = sizeof (buf);
#ifdef OUTALAW
samples = len;
#else
samples = len / 2;
#endif
if (samples > MAXSAMPLES) {
ast_log (LOG_WARNING, "Only doing %d samples (%d requested)\n",
MAXSAMPLES, samples);
samples = MAXSAMPLES;
}
waste[0] = 0; /* make compiler happy */
len = samples * SAMPLE2LEN + AST_FRIENDLY_OFFSET;
buf = alloca(len);
f.frametype = AST_FRAME_VOICE;
#ifdef OUTALAW
f.subclass = AST_FORMAT_ALAW;
@@ -1206,8 +1205,7 @@ static int sms_generate (struct ast_channel *chan, void *data, int len, int samp
f.datalen = samples * 2;
#endif
f.offset = AST_FRIENDLY_OFFSET;
f.mallocd = 0;
f.data = buf;
f.data = buf + AST_FRIENDLY_OFFSET;
f.samples = samples;
f.src = "app_sms";
/* create a buffer containing the digital sms pattern */
@@ -1379,8 +1377,8 @@ static int sms_exec (struct ast_channel *chan, void *data)
ast_copy_string (h.cli, chan->cid.cid_num, sizeof (h.cli));
{
char *d = data,
*p,
unsigned char *p;
unsigned char *d = data,
answer = 0;
if (!*d || *d == '|') {
ast_log (LOG_ERROR, "Requires queue name\n");
@@ -1449,7 +1447,7 @@ static int sms_exec (struct ast_channel *chan, void *data)
d = p;
h.udl = 0;
while (*p && h.udl < SMSLEN)
h.ud[h.udl++] = utf8decode((unsigned char **)&p);
h.ud[h.udl++] = utf8decode(&p);
if (is7bit (h.dcs) && packsms7 (0, h.udhl, h.udh, h.udl, h.ud) < 0)
ast_log (LOG_WARNING, "Invalid 7 bit GSM data\n");
if (is8bit (h.dcs) && packsms8 (0, h.udhl, h.udh, h.udl, h.ud) < 0)

0
apps/app_softhangup.c Executable file → Normal file
View File

Some files were not shown because too many files have changed in this diff Show More