Compare commits

...

1500 Commits
0.7.2 ... 1.0.4

Author SHA1 Message Date
Kevin P. Fleming
6e20552bca 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.0.4@212958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-18 20:42:51 +00:00
Kevin P. Fleming
f09fbd398e remove extraneous svn:executable properties
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.0.4@7221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 18:24:39 +00:00
Kevin P. Fleming
517518809a remove remaining .cvsignore files
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.0.4@7220 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 18:09:49 +00:00
Kevin P. Fleming
b4cd946ef0 automatic tag renames
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.0.4@7201 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-27 17:18:34 +00:00
Admin Commit
59286cfbc1 This commit was manufactured by cvs2svn to create tag 'v1-0-4'.
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/v1-0-4@4850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-01-20 04:02:58 +00:00
Mark Spencer
1700f24dd3 Strip mp3 id3 headers (bug #2525)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-27 20:04:00 +00:00
James Golovich
aa2e435d82 Remove duplicate sys/socket.h include from res_agi.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3845 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-27 14:54:07 +00:00
James Golovich
2fc5fed79e Fix 2 memory leaks
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-27 05:06:22 +00:00
Russell Bryant
efd42d2d5c make pick-up extension configurable. update ChangeLog
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3843 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-26 20:47:01 +00:00
Mark Spencer
2ff6a84a16 Hold peerl lock while updating autocreatepeer stuff
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-26 20:42:03 +00:00
James Golovich
01c0938ddf Fix inband priindication checking in chan_zap.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-26 18:16:06 +00:00
Russell Bryant
fda8fa2367 add includes in res_agi.c to fix BSD compatibility
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3840 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-26 17:01:39 +00:00
James Golovich
998ef5948c Fix typo in cdr.txt (bug 2510)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3839 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-26 16:39:11 +00:00
Russell Bryant
cbc39f7d71 tweak the queues.conf.sample
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3838 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-26 02:31:13 +00:00
Mark Spencer
802a44a15b Fix for "show applications like" (bug #2501)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3837 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-25 22:42:17 +00:00
Mark Spencer
efbb88225c Fix URL for Tony
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3836 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-25 22:38:52 +00:00
Mark Spencer
30d264ebda Add Asterlink/anthm to the CREDITS list
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3835 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-25 21:36:01 +00:00
Mark Spencer
bf4ca23372 Make holdtime announcement say "less than 2 minutes" instead of "1 minutes" (bug #2500)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3834 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-25 14:22:27 +00:00
Anthony Minessale II
9ecfd9f33e fix polish stuff in say.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3833 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-24 22:15:43 +00:00
Anthony Minessale II
255ce93616 add app_forkcdr
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-24 21:33:48 +00:00
Mark Spencer
4ffa6c246f If no RTP stream is up, always request digits (bug #2492)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-24 19:21:24 +00:00
Mark Spencer
a9db074776 Make olle happy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-24 16:49:00 +00:00
Mark Spencer
7b10240bc3 Document hints in extensions.conf.sample (Astricon suggestion)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-24 16:41:45 +00:00
James Golovich
9812bcc03c Include sys/socket.h in res/res_agi.c (bug 2490)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-23 18:10:46 +00:00
James Golovich
fb6e840213 Fix formatting again
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-23 16:58:09 +00:00
Anthony Minessale II
2a896e5d3c tweak prior commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3826 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-23 16:39:33 +00:00
James Golovich
ab67420c37 Fix formatting
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-23 16:02:10 +00:00
Anthony Minessale II
07a6cd4592 allow file arg in ast_control_streamfile to accept trailing :end to indicate an instant seek ti the end.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3824 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-23 15:26:01 +00:00
Anthony Minessale II
762cd4621d ast_control_streamfile caused seg with null stop or pause chars
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3823 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-23 14:46:09 +00:00
Mark Spencer
a23534c4e2 Update Changelog
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-23 11:30:08 +00:00
Mark Spencer
1597114535 Implement Fast AGI (agi://) over TCP socket (Astricon talk idea)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-22 15:21:36 +00:00
Mark Spencer
aea667c7c8 Fix originate success/failure formatting (bug #2485)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3819 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-22 14:11:44 +00:00
Mark Spencer
e0f335a4eb Check to be sure # of samples is > 0...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-22 12:15:00 +00:00
Mark Spencer
78531a0f32 Handle arbitrary long dial sequences (like what we need at Astricon)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-22 05:19:06 +00:00
Mark Spencer
a2297d6776 Support colors in eterm
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3816 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-22 05:10:50 +00:00
Jeremy McNamara
ef889d6672 support early media/intercept Bug #562
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3815 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-21 18:42:37 +00:00
Jeremy McNamara
291ce3e839 Add a bit more newbie protection
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3814 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-21 15:52:42 +00:00
Anthony Minessale II
42806dc1ac fix placement of f->fmt->close
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-20 23:15:49 +00:00
Mark Spencer
45a157ec0e Fixup vm user struct (bug #2472)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-20 21:16:00 +00:00
James Golovich
49389bd690 Remove duplicate plus.gsm from sounds.txt
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3811 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-20 15:47:40 +00:00
Mark Spencer
a638a19ea2 Don't register auth against something that isn't a register (bug #2468)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-19 17:21:26 +00:00
Jeremy McNamara
199ec4356a protect against seg on busy systems. Bug #2249
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-19 16:53:01 +00:00
Mark Spencer
5dad6f4319 Merge UK + DTMF Caller*ID stuff and fix app_test description
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-19 16:17:18 +00:00
Mark Spencer
27e4a2ee57 Minor fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-18 23:39:39 +00:00
Mark Spencer
d7fb7e9ed7 Add "TrySystem" variation to System (bug #768)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-18 14:14:15 +00:00
Mark Spencer
528cf89739 Clarify descriptions of VM functions moved to app (bug #2463)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-18 14:01:35 +00:00
Mark Spencer
b96abb803c LPC fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-18 13:56:28 +00:00
Mark Spencer
574d3785ab Add extra checks for keys and convenience encrypt/decrypt functions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-18 03:59:51 +00:00
Mark Spencer
d1be79cce2 If singlepath=yes, don't send multiple RTP streams during transfer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-17 20:08:40 +00:00
Mark Spencer
9d8c71ee86 Move routines from voicemail to app for general use (part of bug #752)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-17 15:05:29 +00:00
James Golovich
877f1f64c2 Cleanup code. Spacing issues, nested if issues, lots of strlen used instead of ast_strlen_zero
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3800 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-17 14:15:11 +00:00
James Golovich
a9f5393bfe Make chan_iax2.c compile again on older gcc. Remember definitions must come first
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-17 13:58:38 +00:00
Mark Spencer
038cd054ae Merge steven davie's IAX2 jitterbuffer fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-17 12:45:03 +00:00
Mark Spencer
e228c88d2a Merge anthm's monitor patch with minor mods (bug #2383)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-17 03:49:57 +00:00
Ben Kramer
4824ee8b20 / fixed slight typo/cut-n-paste bug
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3796 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-17 00:34:51 +00:00
Ben Kramer
0da1f7593d / fixed operation with record_play
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3795 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-17 00:14:48 +00:00
Mark Spencer
8fae88d368 Use compression on "make update"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3794 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-16 18:46:39 +00:00
Mark Spencer
5c32080a0c Get rid of compile warnings
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-16 18:45:34 +00:00
Mark Spencer
610d52b054 Add IAX2/SIP register events to system (bug #2117)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-16 16:18:53 +00:00
Mark Spencer
0aa4c95a89 Fix tiny typo (bug #2455)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-16 12:53:10 +00:00
Mark Spencer
d2385517ac Fix sample macro
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-16 00:19:01 +00:00
Mark Spencer
3fc2609468 Fix app_disa to not ignore ignorepat :) (bug #2451)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-15 22:06:30 +00:00
Mark Spencer
0eec8c8318 Make ADSI in voicemail configurable (bug #2209)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-15 19:54:46 +00:00
Mark Spencer
bdc00dae0e Merge ADSI parking announcement (bug #2211)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3787 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-15 19:49:33 +00:00
Mark Spencer
a1442538b5 Update mp3 copyright header, fix pedantic + register in SIP (bug #2422)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-15 19:27:23 +00:00
Mark Spencer
ce68497243 First pass at LPC10
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-15 18:40:07 +00:00
Mark Spencer
9a387e5a7a Queue congestion on REJECT (bug #2448)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-15 17:31:37 +00:00
Mark Spencer
c4aa1dadbd Use file that is in Asterisk rather than asterisk-sounds (bug #2445)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-15 14:12:45 +00:00
Mark Spencer
556f27ecf1 Fix extraneous message when using mysql friends
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3782 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-15 13:16:56 +00:00
Mark Spencer
ef2cd744cf Support both MySQL and traditional mailboxes in vmail.cgi (bug #2297)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3781 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-15 05:11:41 +00:00
Mark Spencer
f5b1c6c27e Update astgenkey to make empty ones too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-15 04:19:58 +00:00
Mark Spencer
5f93d06cf8 Oops, fix small typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3779 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-15 00:43:13 +00:00
Mark Spencer
952a5e6dd9 Consider both tags as possible matches (bug #2422)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-14 23:04:39 +00:00
Mark Spencer
238b9d24c6 Make sure patterns are always last (bug #2435)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-14 22:35:53 +00:00
Mark Spencer
7457c51bc2 Add status for async manager originate (including ActionID) (bug #2434)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3776 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-14 22:15:50 +00:00
Mark Spencer
a4437b1362 Inband notifies always succeed (bug #2420)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3775 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-14 12:36:14 +00:00
Mark Spencer
45b91a90e1 Add pulse dial support
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3774 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-13 23:07:50 +00:00
Mark Spencer
3cb1d7843b Bring sanity to inband notification on PRI
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-13 22:14:34 +00:00
Mark Spencer
4d6b943ea4 Fix star 80 to star 60 (bug #2247)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-13 21:34:47 +00:00
Mark Spencer
d8aff59a9e Add set debug option, make output for set verbose better (bug #2428)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-13 18:19:15 +00:00
Mark Spencer
e9dbd238c8 Work with globals too (bug #2427)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-13 12:32:04 +00:00
Mark Spencer
89447a99ec Use fromdomain in creating callid if specified (bug #2427)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-13 12:24:38 +00:00
Jim Dixon
e499028440 Fixed minor issue in app_rpt(). Allows it to work better with many Linux distributions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-13 12:12:17 +00:00
Mark Spencer
2f82498995 Don't forget to return something other than -1 on the first pass if appropriate!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-12 15:29:56 +00:00
Mark Spencer
71df4d92da Automatically send proper signal on iax switch following dial (bug #2420)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3766 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-12 15:05:37 +00:00
Mark Spencer
ac1e884328 Improve initial poking behavior (bug #2419)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3765 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-11 13:50:26 +00:00
Mark Spencer
e31d4ee777 Don't set guardtime if channel is only reserved (bug #2421)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-11 13:37:36 +00:00
Mark Spencer
cc30079edd Use longer timeout if using http (bug #2418)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3763 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-11 13:31:04 +00:00
Mark Spencer
b76252d68e Add readme for variable (bug #2409)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-11 13:25:15 +00:00
Mark Spencer
ce868ed5f5 Do the same thing for pri_hangup_all in terms of releasing the PRI lock
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3761 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-10 18:58:05 +00:00
Mark Spencer
8283811633 Make sure we don't try to grab the sub and channel locks while still having the PRI lock! (bug #2392)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-10 18:47:13 +00:00
Mark Spencer
00f227a684 Properly lock management stuff (bug #2406)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-10 15:11:38 +00:00
Mark Spencer
a6e748e491 Handle macros in the CDR properly (bug #2414)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3758 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-10 13:40:56 +00:00
Matthew Fredrickson
8a12240f73 macro support in the dial command
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3757 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-10 02:31:30 +00:00
Mark Spencer
815318b12f Handle both pre- and post- whitespace if pedantic checking is on (bug #2411)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3756 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-10 02:03:05 +00:00
Mark Spencer
5e0b84633e Make ${CALLINGPRES} available (bug #2409)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3755 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-09 20:05:57 +00:00
Mark Spencer
aa2a8ed77c Only pool CONGESTION if there is an owner in the case of a 501
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3754 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-09 15:40:07 +00:00
Mark Spencer
9e96cb612b Fix GotoIf logging level (bug #2396)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-09 13:00:21 +00:00
Mark Spencer
f54c287c73 Make GetVar respect ActionID (bug #2404/2405)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3752 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-09 12:50:56 +00:00
Mark Spencer
14e1fe4795 Make sure rtp->f.data is initialized properly for 3389 (asterisk dev mailing list)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-09 02:33:14 +00:00
Mark Spencer
81df8343d3 Only accept first callerid number (bug #2395)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-09 02:29:10 +00:00
Mark Spencer
388ca07547 Use noncodec capability when masking (bug #2394)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-09 02:07:26 +00:00
Mark Spencer
b3fdacf9cc Minor formatting fixup (bug #2397)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-09 01:36:01 +00:00
Mark Spencer
cb896da998 Don't consider RTP timeout if the channel isn't up
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-09 01:33:17 +00:00
Mark Spencer
879c401544 Add option to register extensions on IAX or SIP registration
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-07 23:45:34 +00:00
Matthew Fredrickson
c6025e41c6 bug fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3745 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-07 15:18:14 +00:00
Matthew Fredrickson
52647db120 Changes from Dimitri for OSP codes, minor buglets
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3744 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-07 15:16:18 +00:00
James Golovich
5adfdcba1e Change recent patch to not use a hard coded path inside of a .c file
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3743 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-07 15:02:53 +00:00
James Golovich
550e8e56ba Formatting cleanups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3742 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-07 15:01:48 +00:00
James Golovich
8d457d07c4 Formatting cleanups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3741 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-07 14:51:20 +00:00
Mark Spencer
b3333ebc2e Don't attempt to qualify before we have a socket (bug #2331)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3740 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-07 14:40:34 +00:00
Mark Spencer
3454b5927f Make background support a language override (bug #2378)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3739 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-07 14:37:35 +00:00
James Golovich
54e81f5ca0 Formatting cleanups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-07 14:36:56 +00:00
Mark Spencer
c1e14143fa Upgrade firmware to version 19 (improved timestamps from bug #2370), extra protetions for buck boost Q7.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3737 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-07 02:09:08 +00:00
Mark Spencer
97904aee06 Turn on usecallerid if distinctiveringdetection is on (bug #2389)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3736 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-07 01:56:18 +00:00
Mark Spencer
24e902d2a4 Merge anthm's "-t" flag (with minor mods) (bug #2380)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-07 01:49:08 +00:00
Mark Spencer
0da197d593 Compute power of 10 using ints instead of silly floats (bug #2390)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-07 01:28:52 +00:00
Mark Spencer
6b2e3f29f9 Consider service unavailable as CONGESTION (bug #2391)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-07 01:25:18 +00:00
Mark Spencer
64b9a563f2 Make menu interruptible (bug #2377), Also fix PBX "add extension" CLI (bug #2289)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-07 01:22:57 +00:00
Mark Spencer
a703e927b1 Add Czech digit/voicemail support
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-06 15:43:43 +00:00
Mark Spencer
8d0d386970 Use stdlib.h instead of alloca.h
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3730 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-06 15:29:41 +00:00
Mark Spencer
dc542971df Allow "-" in password to make it unchangable (bug #2386)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-06 06:19:17 +00:00
Mark Spencer
8fb1ddeb5d Don't prompt for password if one is not needed (bug #2385)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3728 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-05 19:38:17 +00:00
Mark Spencer
e94fa076cb Fix some small voicemail password bugs (bug #2373)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3727 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-05 18:31:50 +00:00
Mark Spencer
f83715ce9c Add Anthony's format_sln (bug #2381)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-05 18:00:55 +00:00
Mark Spencer
b0970b9e33 Merge Brian West's append hostname patch (bug #2372)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-05 03:48:05 +00:00
Mark Spencer
f4b60a5c65 Turn off the hook detection unless explicitly compiled in
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-04 15:00:05 +00:00
Mark Spencer
e7908a50e8 Add stream support and permit minimum respawn time (bug #2254)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-04 05:41:01 +00:00
Mark Spencer
789c4f4587 If nativeformats changes, recalculate formats (bug #2224)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-04 01:06:42 +00:00
Mark Spencer
19be63c4c3 Treat 400 response as "CONGESTION" (bug #2369)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-04 00:29:00 +00:00
Mark Spencer
04a9441769 Fix escaping ; (bug #2368)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3720 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-03 15:36:13 +00:00
Mark Spencer
a2da1f08bd Make sure shell version happens even if MySQL mailboxes are there (bug #2367)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-03 15:25:11 +00:00
Mark Spencer
eb57ea95d6 reload documentation, don't display res in app_test...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3718 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-03 14:02:12 +00:00
Mark Spencer
1e2db0e885 Allow external program to be used to change password (bug #2357)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-03 03:53:48 +00:00
Mark Spencer
d77ae42896 Display elapsed time in hours/mins/seconds (bug #2365 kinda sorta)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3716 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-03 03:44:35 +00:00
Mark Spencer
2a2d65541b Use exitcontext when available (bug #2363)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3715 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-03 03:26:29 +00:00
Mark Spencer
fd7577eed2 Don't try to look offhook with channel banks & Loopstart (bug #2362), also make individual modules reloadable...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-02 20:45:24 +00:00
Mark Spencer
93818c761b If '#' is sent for username, use callerid if available (bug #2301)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3713 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-02 19:18:35 +00:00
Mark Spencer
bc72d7584a Don't use FXO's with no battery (bug #2359)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3712 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-02 19:07:24 +00:00
Mark Spencer
b813a5f3fa Fix both app_read and underlying read issue (bug #2352)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-02 13:52:58 +00:00
Mark Spencer
d952c7ed71 Fix "duplicate answer" issue (bug #2342)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3710 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-02 13:48:11 +00:00
Mark Spencer
07166e63a3 Improve voicemail verbosity (bug #2351)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3709 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-02 04:57:37 +00:00
Mark Spencer
9888487f9c Fix minor typo (bug #2343)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3708 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-02 04:07:28 +00:00
Mark Spencer
3c7ab1ca5e Eliminate unnecessary historic "rm" commands from Makefile (bug #2349)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3707 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-02 03:34:12 +00:00
Mark Spencer
08a8632ac7 Decrease use count in wav_gsm (bug #2350)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-02 03:33:09 +00:00
Mark Spencer
4b2877834e Fix threeway calling + immediate mode (bug #2344)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-02 03:32:07 +00:00
Mark Spencer
344ec00439 Add additional timeout debugging information on parking
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-01 19:51:19 +00:00
Mark Spencer
082f628401 Slightly more verbose detail on PBX startup (bug #2339)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-01 18:29:43 +00:00
Mark Spencer
3cf360ae44 Fix teeny typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3702 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-09-01 02:28:38 +00:00
Mark Spencer
0c39d6de8e Grab each lock individually...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-31 21:55:19 +00:00
Mark Spencer
53262335c8 Add documentation for new courtesy tone (bug #2329)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3700 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-31 19:19:05 +00:00
Jeremy McNamara
380b9a40a3 nit picky fixups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3699 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-31 17:50:41 +00:00
Jeremy McNamara
f6109b7b94 add exten example. Thanks ManxPower
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3698 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-31 17:38:41 +00:00
Mark Spencer
1db964ad95 When queueing frames, it's pointless to queue a frame after a HANGUP frame is queued...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-31 17:30:46 +00:00
Mark Spencer
416079db61 Some need bigger registery
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-31 17:17:00 +00:00
Mark Spencer
49ca05642a Use "fullcontact" on outbound calls too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3695 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-31 17:12:09 +00:00
Mark Spencer
7d88098555 Use Contact for URI if supplied...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3694 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-31 16:49:20 +00:00
Mark Spencer
82db278716 More Asterisk sparc patches (courtesy Belgarath)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-31 16:33:00 +00:00
Mark Spencer
cfb711bf57 Make app_festival change more portable, allow '*' for context in iax2
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-31 14:59:58 +00:00
Mark Spencer
471df8f512 Be sure to do ntohl before considering extended field
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-31 14:03:18 +00:00
Mark Spencer
9f1562a599 Minor SIP cleanup for poking on startup (bug #2331)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3690 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-31 13:49:18 +00:00
Mark Spencer
e2fe8ef485 Permit in-band and out-of-band Busy/Congestion (bug #2325)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3689 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-31 13:47:23 +00:00
Mark Spencer
4a19a2644f Don't redefine _THREAD_SAFE (bug #2332)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-31 13:39:04 +00:00
Mark Spencer
066a53df8a Fix permissions for festival app (bug #2334)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-31 13:37:30 +00:00
Mark Spencer
2a108b9b06 Merge NetBSD and Courtesty tone with modifications (bug #2329)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3686 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-31 13:32:11 +00:00
Mark Spencer
6749f1b8b5 Be sure we still check for proper buffer length
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-31 05:09:20 +00:00
Mark Spencer
8ff9c0d1b9 Adjust Makefiles to support Ultrasparc architecture (thanks Belgarath) (bug #2319)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3684 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-31 03:31:59 +00:00
Mark Spencer
b48987922c First pass at handling RTP header extension bit
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-31 00:16:28 +00:00
Mark Spencer
5259155e52 Make sure we behave properly for parking (bug #2292)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-31 00:08:52 +00:00
Mark Spencer
2f753040ef Revert back to 16 so keys are displayed properly (bug #2240)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3681 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-30 05:27:51 +00:00
Mark Spencer
bd7ca6bb69 Track extra parameters in contact (bug #732)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-30 05:21:34 +00:00
Mark Spencer
0f88c702df Look for feature group D on all E&M Wink Lines (bug #2228)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3679 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-30 05:07:27 +00:00
Mark Spencer
28e5320ab4 Minor fix in directory app (bug #2322)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-30 01:44:41 +00:00
Mark Spencer
47f8883942 Add test application (TestClient/TestServer), thanks Russell!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-30 01:43:41 +00:00
Mark Spencer
4c133e47da Set DTMF modes by peer/user properly (bug #2303)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-29 18:58:30 +00:00
Mark Spencer
0cf6b2ba31 Minor Makefile cleanups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-29 17:40:58 +00:00
Mark Spencer
7fffa6e20a Make the polish speech not such an insane coding style
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-29 17:23:54 +00:00
Mark Spencer
ccdd86775f Don't use "class" keyword in music on hold (bug #2316)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-29 06:09:29 +00:00
Mark Spencer
91d2e58d1b Update DISA to be internationalized (bug #2284)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3672 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-28 19:41:18 +00:00
Mark Spencer
1327846518 Oops, back out bad makefile change
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3671 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-28 17:34:40 +00:00
Mark Spencer
11b1e81197 Major DISA improvements (bug #2284)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3670 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-28 17:33:43 +00:00
Mark Spencer
616780b64e Warn if unable to open an overridden config file (but #2285)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3669 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-28 17:12:01 +00:00
Mark Spencer
90a497c3b8 Fix generator for VAD as well as for automatically syncing to incoming signal if present (bug #2312)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3668 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-27 22:53:56 +00:00
Mark Spencer
de1d9a90dd Fix nat registration (bug #2315)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3667 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-27 20:19:14 +00:00
Mark Spencer
516cd1ba8d Be sure errors on wite are passed back up (bug #2311)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3666 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-27 16:17:16 +00:00
Mark Spencer
c7541bd672 Merge "show applications" from corydon76 (bug #2291)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-27 04:21:09 +00:00
Mark Spencer
c3c13114fb Merge mochouinard's meetme fixups (bug #2230)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-27 04:12:55 +00:00
Mark Spencer
2863202bed Run generators from zap timers when available so as to interop with VAD
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-27 03:28:32 +00:00
Mark Spencer
cab4557006 When detecting a hairpin, redirect to the appropriate local extension (bug #1974)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3662 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-27 03:16:16 +00:00
Mark Spencer
f1be7d7ffc Add new "route" mode to work around UNIDEN bugs (bug #2308)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3661 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-27 02:45:35 +00:00
Mark Spencer
c22fdb7232 Include UniqueId in rename events... (bug #2306)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3660 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-26 22:45:26 +00:00
Mark Spencer
bd1c5ac3cf Fix directory name in SMS (bug #2307)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3659 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-26 21:28:42 +00:00
Mark Spencer
fa814abe05 Repair offer/answer model (bug #2293), initial CNG work for new frametype
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3658 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-26 04:56:26 +00:00
Anthony Minessale II
03cd30b746 fixed a use count bug
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3657 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-25 18:30:51 +00:00
Anthony Minessale II
7ede296efd fix a bug in some small changes to astxs utility
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-25 18:20:49 +00:00
Malcolm Davenport
264fead207 Fixed??
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-25 14:14:57 +00:00
Malcolm Davenport
e5ad308a2b Still..
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-25 14:08:51 +00:00
Malcolm Davenport
f31a210cb2 Still working to resolve this...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-25 14:05:35 +00:00
Mark Spencer
b27c9f26fe Document caveats of promiscredir (bug #2195)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-25 06:25:18 +00:00
Anthony Minessale II
0ffa958fc4 some small changes to astxs utility
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3651 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-25 02:41:38 +00:00
Malcolm Davenport
e8483c021b Still trying...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3650 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-24 22:34:38 +00:00
Malcolm Davenport
5596c6a5da Still more tests
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-24 22:31:20 +00:00
Malcolm Davenport
0a6f41cdf2 More tests for asterisk-cvs@lists
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-24 22:28:59 +00:00
Malcolm Davenport
4219bdc2b4 More updates to test lists
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-24 21:26:19 +00:00
Malcolm Davenport
fa9c265ce7 More attempts to fix lists
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3646 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-24 21:09:05 +00:00
Malcolm Davenport
6d447004ea More attempts to fix lists
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3645 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-24 21:06:57 +00:00
Malcolm Davenport
091c6c36b9 Still testing asterisk-cvs@lists
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-24 21:00:25 +00:00
Malcolm Davenport
1f34a1dab4 Silly update to see if asterisk-cvs@lists is still borked
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-24 20:41:49 +00:00
Malcolm Davenport
ba55e8ae64 Silly change to see if asterisk-cvs@lists is working...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3642 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-24 20:29:55 +00:00
Malcolm Davenport
461596d9b1 Testing to see if asterisk-cvs@lists is still borked
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-24 20:15:34 +00:00
Malcolm Davenport
0e3fc6a4fe Still testing asterisk-cvs@lists...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-24 17:49:30 +00:00
Malcolm Davenport
6a589d5630 Still trying to debug the asterisk-cvs@lists problem :(
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-24 17:44:48 +00:00
Malcolm Davenport
b8c18d6176 Test "fix" to see what's wrong w/ asterisk-cvs@lists
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-24 17:34:54 +00:00
Anthony Minessale II
4210fd6ad9 make bug 2272 (which is actually caused by human error) less likely to happen
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-23 19:07:15 +00:00
Mark Spencer
1ddd0afe36 Make the guardtime work even if the date is < the year 1970, and if something weird happens in zap, don't stack overflow
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-23 17:37:24 +00:00
Mark Spencer
230d4b38a3 Qualify rtptimeout with a reinvite having taken place (bug #2286)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-23 14:31:20 +00:00
Mark Spencer
1afd98d916 Handle quoted <'s (bug #2223)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3634 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-23 14:16:25 +00:00
Mark Spencer
60707a4172 Fix sigchld handling (bug #2245)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-22 18:33:19 +00:00
Jim Dixon
f2dcfca9c4 Fixed timing race with thread creation in app_rpt.c, and added settable
delays and such in config file.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3632 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-22 03:58:42 +00:00
Jim Dixon
d8436708c0 Made some what turned out to be several changes to allow for radio channels
to be handled properly in the case of an Alarm state on their span.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-21 21:41:54 +00:00
Mark Spencer
de3528f0be Save CID and switches in "save dialplan" command (bug #2279)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-21 18:55:39 +00:00
Mark Spencer
d0ab0358aa Fix small memory leak... (bug #2277)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-21 18:49:52 +00:00
Mark Spencer
4f9f6df42c Don't split unless it's got echo training
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-20 21:07:10 +00:00
Ben Kramer
ed20af4517 / check so as not to enable loo-drop on FXS
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-20 02:55:29 +00:00
Mark Spencer
3ca96a1317 Fix divide by zero (bugs #2268 and 2259)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-19 18:52:56 +00:00
Ben Kramer
3bcff2d2f9 / bit of a clean up and change of pthread_create to ast_pthread_create
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3625 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-18 23:58:07 +00:00
Malcolm Davenport
3e85e4b82c Add README.mp3 to docs to clear up confusion about working and
non-working versions of mpg123


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3624 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-18 14:27:25 +00:00
Mark Spencer
299b26ae4a Remove unused tmp2 variable
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-18 14:13:35 +00:00
Mark Spencer
bbbbcaf73f Make sure jointcapability really indicates joint capability (bug #2210)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-18 13:55:03 +00:00
Ben Kramer
37e789fd79 / lots of fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3621 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-18 05:06:26 +00:00
Mark Spencer
27f3c530ed Fix sample config typo (bug #2263)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-18 02:16:48 +00:00
Mark Spencer
534e44c599 Add another field to track whether video was invited or not (bug #2226)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3619 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-18 02:16:04 +00:00
Mark Spencer
1587fd6b84 Fix port numbers in IAX2 and iax2prov (bug #2261)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3618 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-17 23:57:36 +00:00
Mark Spencer
ce51451ca6 Fix minor typos (bug #2260)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3617 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-17 23:53:15 +00:00
Mark Spencer
3385ecc112 Can't check incoming sip debug until after we receive the packet!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-17 14:26:25 +00:00
Mark Spencer
5d589eb866 Fix broken 100 Trying on REFER and also send NOTIFY as per RFC 3515
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3615 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-17 14:20:43 +00:00
Mark Spencer
039aad9ff4 Merge Lenny's sorcery....
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3614 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-17 01:57:16 +00:00
Mark Spencer
a0b8879af4 Add little note about hold music
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-16 17:43:48 +00:00
Mark Spencer
e1c9ebc5b9 Merge MOG's first serious patch (new message patch) (bug #2071)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3612 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-16 04:05:43 +00:00
Mark Spencer
02ffc0eec8 Fix trivial typo (bug #2253)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3611 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-16 01:57:10 +00:00
Jim Dixon
a560227ccb Fixed remote base audio problem (where 2 different interfaces are in use) and
allow for non-rbi remotes and rbi remotes to co-exist on same system


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-16 01:35:02 +00:00
Mark Spencer
87a7a3aaff Fix little oops on sizeof()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-15 01:01:34 +00:00
Mark Spencer
6723ea3afb Oops, forgot message length
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3608 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-14 21:28:30 +00:00
Mark Spencer
3ff53cd50b Create binary versions of signature functions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3607 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-14 20:19:38 +00:00
Mark Spencer
94f18868f1 Build on older versions of TDS (bug #2194)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-13 20:27:58 +00:00
Mark Spencer
e85d440f88 Don't request tones when in-band DTMF mode is enabled (bug #2248)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3605 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-13 13:19:29 +00:00
Mark Spencer
6910fd79f2 Fix missing \r\n
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-12 23:12:44 +00:00
Mark Spencer
c14b405974 Make Asterisk cause codes match those of Q.931 (bug #1999)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-12 22:09:18 +00:00
Mark Spencer
0125ed120f Specify D/ package in mgcp send digit routine (first commit from Adtran!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3602 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-12 20:26:40 +00:00
Mark Spencer
be2d39a1a5 Fix duplex code for FreeBSD
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3601 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-12 03:19:19 +00:00
Mark Spencer
cbe0264949 Prep for RC-2
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3599 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-12 03:05:08 +00:00
Mark Spencer
96e2c3a3aa Fix agentcallbacklogin wrapup time
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3598 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-11 19:02:46 +00:00
Mark Spencer
7216081447 Allow on/off (bug #2233)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-08 22:22:30 +00:00
Mark Spencer
7acee329e1 Merge BSD stack size work (bug #2067)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-08 17:15:02 +00:00
Mark Spencer
916566ac11 Make sure we use AF_INET
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-08 04:49:43 +00:00
Mark Spencer
785eaf01b3 Only consider linear frames for talk detection -- ignore anything else (bug #2219)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3594 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-07 22:57:13 +00:00
Mark Spencer
ccbc7a6835 Fix a couple minor command line completion issues
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-07 19:27:54 +00:00
Mark Spencer
6193bc31b8 Merge Steven Davie's bridging patches
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-07 19:16:53 +00:00
Mark Spencer
698820f4e3 Add application to set callerid presentation (bug #2078)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3591 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-07 15:51:11 +00:00
Mark Spencer
34e40a3a59 Wait for command to complete (bug #1733) and take RTP 19 as CN too...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3590 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-07 14:22:09 +00:00
Mark Spencer
a21e295c96 Add CDR documentation (bug #2205)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-07 04:15:33 +00:00
Mark Spencer
082d7ee4b8 Don't install mpg123 unless it was built
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-07 03:01:52 +00:00
Mark Spencer
bdd9753f1e Make clean target too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-07 02:57:28 +00:00
Mark Spencer
0df4b4eb64 Add mpg123 target
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3586 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-07 01:26:09 +00:00
Mark Spencer
2ee29be0e8 Fix pager voicemail notification from string (bug #2142), MOG's first patch!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-06 21:30:39 +00:00
Mark Spencer
172a45d603 Merge the remaining bit of the verbose update (bug #2213)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3584 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-06 17:09:54 +00:00
Mark Spencer
27d0ebc686 Only play announce time on first pass
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3583 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-06 14:43:25 +00:00
Mark Spencer
be02813c26 Keep track of timelimit across entries to ast_channel_bridge (bug #2222)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-06 13:54:07 +00:00
James Golovich
85a15b4fc9 Add app_verbose.c to cvs (bug 2212)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-06 02:12:54 +00:00
Mark Spencer
c16542c1d0 Allow directory to be searched by first name (bug #2208)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-05 22:02:33 +00:00
Mark Spencer
1de05fb7da Merge (slightly modified) app_verbose from tilghman (bug #2213)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-05 21:45:58 +00:00
Mark Spencer
a2e82071c5 Fix little MGCP buglet with the wildcard endpoint (bug #2216)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3578 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-05 21:36:33 +00:00
Mark Spencer
cfba600eab Fix verboser issue over network (#2217)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-05 21:22:56 +00:00
Mark Spencer
99f901f065 Fix "tell" for wav (bug #2212)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-04 00:42:49 +00:00
Mark Spencer
f074b92823 Merge nicolasg's manager/cli patch (bug #2207)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3575 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-03 17:48:18 +00:00
Mark Spencer
07f349766c Don't offer codecs not allowed on a reinvite
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-03 17:00:54 +00:00
Malcolm Davenport
892b06e282 Add BKW's fix so that MOH doesn't get killed on Call Parking
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-03 14:09:48 +00:00
Mark Spencer
f3522b6c01 Plane commits (a.k.a. the Delta deltas): 1) Make muted reconnect 2) Add "X" option to meetme and add ${MEETME_EXIT_CONTEXT}, 3) Allow SIP call parking with supervised transfer, 4) Only create parking entries when calls actually get parked, 5) Add "sunshine" song, 6) Update hardware documentation, 7) Don't load empty strings from history file
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3572 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-03 06:31:20 +00:00
Mark Spencer
437f625786 Add user number (bug #2203)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3571 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-02 15:28:12 +00:00
Mark Spencer
8b364485a0 dynamic_pin can be NULL (bug #2202)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3570 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-02 13:10:15 +00:00
Malcolm Davenport
345dff63e9 Add CREDITS credit for www.freeplaymusic.com - Hold Music
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3569 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-02 12:20:46 +00:00
Mark Spencer
76913125d8 Create initial framework for single channel support
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-02 04:32:37 +00:00
Mark Spencer
f195e423f4 Correct for user selecting 'D' when they should be selecting 'd' (bug #2200)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-02 02:58:15 +00:00
Mark Spencer
5abc3ecb56 Don't reload subchannels of wild card endpoint on reload.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-01 21:25:35 +00:00
Mark Spencer
87787b05ae Fix OpenBSD compile (bug #2193)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-01 18:48:37 +00:00
Mark Spencer
4f2b8f8e9a Add some more hold music
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-01 18:47:02 +00:00
Mark Spencer
c8170cf360 Fix double comma typo in sql_create_table (bug #2196)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3563 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-01 18:28:10 +00:00
Mark Spencer
358ff9f7d6 Make sure it's really a dotted IP (bug #2198)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3562 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-01 18:26:41 +00:00
Mark Spencer
e094bf07dc Don't record empty lines (bug #2175, but not using proposed patch)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-01 18:12:52 +00:00
Mark Spencer
05e338ce75 Rename newp to newpvt (bug #2190), change hold music.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-01 14:19:04 +00:00
Mark Spencer
fbe6024753 Fix reload with wildcard endpoint
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-01 03:59:13 +00:00
Mark Spencer
4d3f4f719a Get rid of TDS warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-01 03:53:34 +00:00
Mark Spencer
b240128ed4 Make sure it's a const
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-01 03:14:11 +00:00
Mark Spencer
70b3ab34a8 Uhm, that should be 0!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-01 02:39:32 +00:00
Mark Spencer
27e3cd9ca8 Merge gryn's transfer digit timeout patch (bug #2184)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-01 01:38:15 +00:00
Mark Spencer
13a45232fa Get other instance of 101 changed to "payload" (bug #2191)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3554 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-31 23:02:55 +00:00
Mark Spencer
c4bfcdeec5 Create manager show channels comamnd (#2186) to monitor zap channel status
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-31 20:43:24 +00:00
Mark Spencer
cfcc58d96e Don't hard code the RTP payload type to 101 (bug #2192)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-31 20:31:11 +00:00
Mark Spencer
096feeeddd Allow priority to be set in addition to -U / -G (bug #2173)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-31 20:25:07 +00:00
Mark Spencer
2de01f7b7e Send proper contact in 200 OK to REGISTER
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-31 04:04:05 +00:00
Mark Spencer
0369242c4c Fix information elements
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3549 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-31 02:51:40 +00:00
Mark Spencer
a70d444333 Improve debugging of RTP ports (bug #2131, heavily modified)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3548 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-31 02:31:24 +00:00
Mark Spencer
79a00a33f9 Respect "AST_EDITOR" rather than "EDITOR" so as not to change the default bindings from emacs to vi (bug #2185)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-31 02:23:27 +00:00
Malcolm Davenport
c542576190 Bug # 2171: Add permission to QueueAdd and QueueRemove manager commands
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-30 20:38:45 +00:00
Malcolm Davenport
725c352e94 Bug # 2170: Add authority_to_str function to let Administrator issue command to find privilege string
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-30 20:27:42 +00:00
Mark Spencer
64e1166e6f Reset conferencing on final hangup (bug #2172)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3544 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-30 20:23:06 +00:00
Mark Spencer
57b6515d82 Fix potential overflow in H.323
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-30 20:01:58 +00:00
Mark Spencer
e786eae3cd Fix MGCP endpoint (#2182)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3542 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-30 19:58:20 +00:00
Malcolm Davenport
a322c6f411 chan_h323 Makefile change for Bug #2064. Also back out changes for Bug #2115..next time read carefully. :)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-30 18:57:37 +00:00
Mark Spencer
943133953e Fix little unregister buglet
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-30 18:42:46 +00:00
Malcolm Davenport
f6717c92b2 Bug # 2174: Respect EDITOR environment variable
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-30 18:30:48 +00:00
Malcolm Davenport
9b0b4bf041 Bug # 2115: Allow Caller TON to be retrieved in the dialplan
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-30 18:21:54 +00:00
Malcolm Davenport
183fb08ee6 Bug # 2181: Support the PING event in MGCP.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3537 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-30 18:02:18 +00:00
Malcolm Davenport
760bc42049 Bug # 2090: Add mgcp.conf.sample for Wave7Optics FTTH LMG
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-30 17:57:02 +00:00
Mark Spencer
3329f8154e Add default username patch (bug #2178)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-30 14:59:56 +00:00
Mark Spencer
b4f6d91eda Default port to 5060
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3534 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-29 18:58:57 +00:00
Mark Spencer
0f93207cda Clear things out for the bearer too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3533 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-29 04:26:42 +00:00
Mark Spencer
43866cf0d9 Don't get stuck looping when looking for CRV's
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3532 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-29 02:07:03 +00:00
Mark Spencer
deb02a000f Add "username" to sip show peer (bug #2163) as well as a few config cleanups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-28 21:07:38 +00:00
Mark Spencer
baef4818d2 Somehow matt's patch didn't make it all the way in
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-28 20:41:49 +00:00
Mark Spencer
bf70a01da6 Merge alternate hangup and meetme patches from Matt N.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-28 19:25:14 +00:00
Mark Spencer
5733f64bdd Only Call PQfinish if conn isn't NULL (bug #2162)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-28 18:42:35 +00:00
Mark Spencer
a57ad69b53 Fix "ZapOffHook" (bug #2161)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-28 18:38:29 +00:00
Mark Spencer
7b52e19b6d Unify queue add/remove from manager and CLI (bug #2125/2123)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3526 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-28 02:55:22 +00:00
Mark Spencer
728e55e697 Fix date/time in TDS stuff (bug #2147)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-27 21:16:41 +00:00
Mark Spencer
71f41a06dc Make ACK sticky too (bug #2134)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3524 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-27 19:00:06 +00:00
Mark Spencer
e90022767d Allow optional event whenever an agent is called from a queue (bug #2066)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-27 04:13:04 +00:00
Mark Spencer
a395d75a91 Make request URI in CANCEL match that of the original INVITE exactly (bug #2134)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-27 04:04:45 +00:00
Mark Spencer
42837cde4c Allow you to enter the pin again during th "invalid pin" message
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-27 03:10:26 +00:00
Mark Spencer
1394a78bd6 Merge tilghman's meetme fix for reentering pin (bug #2143)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-27 03:08:00 +00:00
Mark Spencer
e4d4c93bd8 Merge ALSA fixes (bug #2145)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-27 02:46:24 +00:00
Mark Spencer
00f3bf560b Make sure index >= 0 before initializing
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3518 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-27 02:19:52 +00:00
Mark Spencer
5bd8cf6cde Swap subs before releasing lock
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3517 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-27 00:53:09 +00:00
Mark Spencer
9e789de703 Work properly on a reload
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3516 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-26 19:37:11 +00:00
Mark Spencer
d1ad2a695d Turn off DTMF generally in MGCP and make option to enable RFC2833 or in-band
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3515 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-26 19:33:36 +00:00
Mark Spencer
d0c1882cf7 Make sure we release the correct lock!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-26 13:38:47 +00:00
Mark Spencer
0abd9ec096 Fix potential transfer seg
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-26 13:16:57 +00:00
Mark Spencer
25afd9876c Fix ADSI prog to only accept 253 (bug #2135)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-26 03:23:38 +00:00
Mark Spencer
eb718e597d Let safe_asterisk take arguments (bug #2085)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-25 23:12:33 +00:00
Mark Spencer
1bfdd45fca Upgrade IAXY firmware to version 18
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3510 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-25 22:11:20 +00:00
Mark Spencer
d189993f15 Add Manager CDR (off by default) (bug #2127) courtesy cybershield
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-25 14:56:34 +00:00
Mark Spencer
6f5eb3b8fa Create one generally useful runtime option and one compile time option to work around bugs in the DPH100M phone (bug #2122)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-25 01:20:16 +00:00
Mark Spencer
4eedf0cd2e Sometimes we get subunalloced, gotta free lock first
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-24 23:53:02 +00:00
Mark Spencer
630ca201d6 Oops
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3506 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-24 23:45:37 +00:00
Mark Spencer
bf17aa1eca Hold lock for three-way channel (bug #2107)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3505 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-24 23:38:23 +00:00
Mark Spencer
5ed7dc3590 Lower default volume
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3504 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-24 21:06:54 +00:00
Mark Spencer
0fc1ef8c9d Fix astman build on FreeBSD (bug #2119)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3503 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-24 03:52:53 +00:00
Mark Spencer
d89ed4ab5f Create option for joining empty queue (bug #2126)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3502 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-24 03:37:50 +00:00
Mark Spencer
0905b587cf Add debian initialization script (bug #2008)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3501 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-24 03:17:52 +00:00
Mark Spencer
35ffb12ae8 Work on copy of firmware so that it doesn't get corrupted on a "make install" (bug #2106)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3500 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-24 02:50:11 +00:00
Anthony Minessale II
4dba976a7f added support to be able to set the channel var TRANSFER_CONTEXT so when
a #transfer is executed it uses ${TRANSFER_CONTEXT} from transferree else
from transferer else it acts as always
-anthm


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3499 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-24 02:29:40 +00:00
Mark Spencer
d3499da6fd Merge tilghman's app/appdata in newexten patch (bug #2104)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3498 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-24 02:26:07 +00:00
Mark Spencer
a1531e0ae3 Ad MSSQL CDR support (bug #1859)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3497 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-23 17:34:57 +00:00
James Golovich
7f234dbc4e Clarify in extesions.conf.sample that there must always be a priority 1 for an extension to be valid
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3496 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-23 17:00:04 +00:00
Mark Spencer
1a3ec0536c Revert to firmware 16, since 17 seems to have issues breaking dialtone
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3495 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-23 02:07:20 +00:00
Mark Spencer
832da92bdc Demand more information on callerid to prevent possible overruns
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3494 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-23 00:27:26 +00:00
Mark Spencer
e85731555d Fix YDL build (bug #2109)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-22 23:43:26 +00:00
Mark Spencer
7ab67c9fba Remove quotes from MD5 (bug #2116)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3492 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-22 23:16:40 +00:00
Jeremy McNamara
0afbb8bcbf clean up warnings, and re-add a return, how did that get removed?
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3491 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-22 04:24:50 +00:00
Mark Spencer
bb75fcc4db Copy account code and flags form incoming to outgoing channel for purposes of local stuff
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-22 03:51:54 +00:00
Jeremy McNamara
0bb8d95674 more changes to properly copy the call token and a small code optimization
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-21 16:36:10 +00:00
Jeremy McNamara
405d0be9fe const is evil?
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3488 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-21 00:49:06 +00:00
Mark Spencer
b5ad8c24be Make '*' count as cancel (bug #2098)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3487 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-20 22:24:15 +00:00
Mark Spencer
e252af2152 Fix user agent on reload
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3486 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-20 22:22:36 +00:00
Jeremy McNamara
a59c1d2ac4 first attempt to properly copy and then free call detail strings.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3485 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-20 21:04:16 +00:00
Mark Spencer
e49aae74d0 Never destroy channel when there is an owner
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3484 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-20 15:29:09 +00:00
Mark Spencer
c87d1f6309 Fix logger issue at hangup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3483 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-20 15:10:18 +00:00
Mark Spencer
a23fa08274 Minor scheduling fixups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-20 13:43:33 +00:00
Mark Spencer
24a5704798 Update dial documentation (bug #2096)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3481 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-19 19:47:21 +00:00
Mark Spencer
d3397cd37d Don't copmile in the no-RTP checksum stuff for non-Linux (bug #2089)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3480 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-19 18:09:33 +00:00
Mark Spencer
f8594ac304 Make sure s is initialized, make FAX_DETECT + OLD_DSP_ROUTINES build
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-19 16:00:40 +00:00
Mark Spencer
ed42d3074d Merge mic's minor patchlet (bug #2092)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3478 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-19 15:52:57 +00:00
James Golovich
eb80683222 Fix chan_zap compiling without libpri
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-19 05:00:05 +00:00
Mark Spencer
5808760bf4 Fix signalling for GR303 FXSKS CPE so we can look like a concentrator
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3476 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-19 02:18:11 +00:00
Mark Spencer
404485711e Merge damin's updated redhat scripts for starting/stopping/reloading asterisk
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-19 01:48:52 +00:00
Mark Spencer
daf76979ca Add options to background (bug #2075) and update documentation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3474 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-19 00:30:39 +00:00
Mark Spencer
73f91fcc44 Grab the Message-ID too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-18 20:50:37 +00:00
Mark Spencer
8a4967294f Make that setgid...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3472 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-18 18:52:36 +00:00
Mark Spencer
dc60239686 Add Asterisk manpage
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-18 17:58:05 +00:00
Mark Spencer
b600cf2232 Add -U and -G options to set user/group to run as
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-18 16:20:54 +00:00
Mark Spencer
d9be9eb5a8 Need actual offset space (bug #2076)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-18 15:58:57 +00:00
Mark Spencer
449bef5a36 Oops, make that ast_features
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3468 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-17 23:56:12 +00:00
Mark Spencer
b53507021e Fix the name :)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3467 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-17 23:54:23 +00:00
Mark Spencer
463444b391 Don't consider port number in name of peer in create_addr (bug #1974)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-17 23:27:11 +00:00
Mark Spencer
a1cf0fbd43 REduce chattyness
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-17 22:06:26 +00:00
Mark Spencer
2f2122875a Add option to disable checksums on RTP UDP ports (bug #2068)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-17 21:08:12 +00:00
Mark Spencer
569b95352a rename "parking" to "features" in preparation for some more (possibly post 1.0) feature additions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-17 20:58:01 +00:00
Mark Spencer
ab7cd94b60 Update documentaion to be clearer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-17 20:36:31 +00:00
Mark Spencer
57217916f1 First pass at AGI registration
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3461 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-17 20:25:39 +00:00
Mark Spencer
de4188df06 Merge musiconhold stuff (bug #2027), restructure AGI to eventually support registration
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3460 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-17 20:12:28 +00:00
Jeremy McNamara
f10148d3e3 actually implement the setting of noFastStart and noH245Tunneling.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3459 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-17 19:38:30 +00:00
Mark Spencer
b1e841edab Make bound more unique (bug #2072)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-17 19:24:36 +00:00
Mark Spencer
68070c82d0 Change IAX2 naming convention
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3456 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-17 04:13:12 +00:00
Mark Spencer
823f4559c9 Update Changelog/BUGS
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3455 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-17 02:52:52 +00:00
Mark Spencer
f202a8dbb3 Typo / whitespace fixes (bug #2052)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-17 02:25:53 +00:00
Mark Spencer
09c3679e2d Voicemail fixes (bug #1982)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3453 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-17 01:34:20 +00:00
Mark Spencer
6b8ecfa35f Add separated dialplan support (bug #2043)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-17 01:30:43 +00:00
Mark Spencer
3abd26bfdf Don't look for bearers when there are none.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-16 22:15:30 +00:00
Mark Spencer
03b1d1ea8c Re-listen after MGCP reload (bug #2061)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3450 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-16 21:22:55 +00:00
Mark Spencer
b1d55878a7 Implement confirmation for PRI
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-16 20:51:54 +00:00
Mark Spencer
d5c614397a Fix minor memory leak from tab completion (bug #2059)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3448 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-16 20:41:17 +00:00
Mark Spencer
eac29e9814 Only apply acking when method matches, too, when not acking a response
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-16 15:45:37 +00:00
Mark Spencer
bba1faf910 Last set of strncpy/snprintf updates (bug #2049)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-16 04:40:54 +00:00
Mark Spencer
78117423fa Allow multiple groups (group categories)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3445 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-16 04:32:17 +00:00
Mark Spencer
5de01235b6 Put header files in -devel package (bug #2058)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3444 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-16 03:46:52 +00:00
Mark Spencer
e167cc89f8 Fix native zap bridging with GR-303
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3443 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-16 02:24:57 +00:00
Mark Spencer
05d3d9c25f Fix silly typo (and make order slightly easier to read) bug #2054
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-15 22:14:27 +00:00
Mark Spencer
957782627c If breakon is unspecified, make it ""
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3441 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-15 14:37:09 +00:00
Mark Spencer
6e9d4faf61 Build contact without @ sign if there is no extension
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-15 14:31:20 +00:00
Ben Kramer
0a4a5483ae / changed samples from 240 to 160 as per all other drivers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3439 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-15 01:24:15 +00:00
Ben Kramer
bab6f6bdf2 / remove extrenous NULL at end of function
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3438 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-14 21:55:01 +00:00
James Golovich
fa0ca01ffe Minor formatting fix from code audit in cli.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-14 14:53:24 +00:00
Mark Spencer
044ad2e2e7 Merge remaining audit patch (save dlfcn.c)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-14 13:57:15 +00:00
Mark Spencer
9cd917c42a Improve SIP history
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-14 11:51:44 +00:00
Mark Spencer
1b9251ad14 If we get 200 OK back on INVITE after we send CANCEL, send ACK *and* send BYE
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3434 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-14 11:10:05 +00:00
Mark Spencer
2f1c9c690f Add missing include (bug #2040)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-14 10:34:25 +00:00
Mark Spencer
0c6b76f7c2 Make parked calls events more consistant (bug #2033)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-14 07:53:57 +00:00
Mark Spencer
2a9d43407b Oops forgot one (bug #2038)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3431 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-14 07:48:47 +00:00
Mark Spencer
8ed49644a6 Remaining rgagnon source audit improvements (bug #2011)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-14 07:44:19 +00:00
Mark Spencer
872685d088 Merge rgagnon's pedantic string changes (apps n-z) (bug #2038)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-14 07:34:34 +00:00
Mark Spencer
4d32c46126 Merge rgagnon's pedantic string checks (apps a-m, bug #2035)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3428 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-14 07:22:30 +00:00
Mark Spencer
4290558ec0 Don't overwite config files in RPM (bug #2036)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3427 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-14 07:14:20 +00:00
Jim Dixon
9b08305eae Made changes to app_rpt.c and rpt.conf, including fully user-definable DTMF
command definitions, and an improved ID methodology.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-14 05:54:54 +00:00
Mark Spencer
f78179c374 Publish DIALEDTIME and ANSWEREDTIME in case people want to know them
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-14 01:10:24 +00:00
Anthony Minessale II
e42c11905e fix compiler warning in res_config_odbc.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-13 22:53:17 +00:00
Mark Spencer
3fdbac912a Use tohost, not the name of the peer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-13 02:44:11 +00:00
Mark Spencer
3ba284094e Fix silly little seg
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3422 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-13 02:34:02 +00:00
Mark Spencer
634521b59b Make code agree with documentation so you can use sip peers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-13 02:20:44 +00:00
Jeremy McNamara
423fd40090 attempt to stop lamers from doing inband DTMFon compressed codecs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3420 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-12 20:06:05 +00:00
Mark Spencer
058f20179b Merge cosmetic fixes from steve
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-12 15:33:40 +00:00
Mark Spencer
dd293ed6fe First pass at properly handling account codes in forwarding
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3418 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-12 14:46:10 +00:00
Mark Spencer
3c7300d145 Just to be especially nice, only send 100 Trying at the start of parking and don't send the 202 Accepted until the end -- still doesn't help the SNOM. They seem to give dialtone as soon as they send REFER...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-09 22:43:15 +00:00
Mark Spencer
fb3f2062fa Fix silly pbx spool buglet (bug #2007)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3416 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-09 21:34:24 +00:00
James Golovich
9e0e3799bf Fixes from bkw_. Formatting in app_db.c and handle start right in cdr_pgsql.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3415 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-09 16:19:00 +00:00
Anthony Minessale II
f107562f75 fix res_config_odbc iax dual peer issue
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-09 14:47:59 +00:00
Mark Spencer
602d616726 Expire time fix (bug #1996)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-09 11:03:33 +00:00
Mark Spencer
611da9b699 Swap states early in masquerade process (bug #1987)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3412 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-09 10:57:43 +00:00
Mark Spencer
34ed331f82 Fix Zap buglet, add support for SIP parking -- doesn't seem to work quite right on SNOM.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-09 10:46:50 +00:00
Mark Spencer
7ca6f85a41 More strcpy / snprintf as part of rgagnon's audit (bug #2004)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-09 10:08:09 +00:00
Jeremy McNamara
069d045513 fix seg fault condition
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-09 08:52:35 +00:00
Mark Spencer
7c97de2611 Give Busy() and Congestion() an optional timeout
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-09 08:32:09 +00:00
Mark Spencer
11ee0b6a41 Add "skipaftercmd" option to voicemail to move to the next message automatically (bug #1984)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3407 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-09 07:39:39 +00:00
Mark Spencer
a40e6c115f Fix provisioning for unload/reload
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3406 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-09 07:37:44 +00:00
James Golovich
4113c814c7 Massive res_config_odbc.c formatting cleanups from bkw_. Thanks!!!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3405 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-08 20:16:28 +00:00
James Golovich
8426e454de Massive code formatting cleanup in res_odbc.c thanks to bkw_
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3404 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-08 19:58:26 +00:00
Malcolm Davenport
c5e44cc3cb Bug # 1973: Change write to ast_carefulwrite
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3403 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-08 19:41:34 +00:00
James Golovich
c793ab62ff Fix *BSD compilation of iax2-provision.c. We should probably move the IPTOS_MINCOST checking stuff over to a header fle that gets included
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3402 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-08 19:35:42 +00:00
James Golovich
decd0771ee Cleanup recent manager changes. We have a doc/CODING-GUIDELINES file for
a reason.  Make sure all future patches follow the guidelines.

Some of the problems with this include:
	Unnecessary whitespace changes
	Use of spaces instead of tabs
	Code formatting that doesn't follow the published guidelines
	Nested statements without braces
	Comment problems


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3401 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-08 17:08:38 +00:00
Mark Spencer
68dd66c46d Don't free until after externnotify (bug #1993)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-08 16:24:16 +00:00
Anthony Minessale II
568ba9c398 This patch allows an event mask to be sent on a manager login session
either using an integer value or a ',' sep list of flags exactly like
the manager.conf read and write lines.

e.g.
Events: system,call,log
or
Events: off
or
Events: on

Also you can change it mid-session with Action: Events

e.g.
Action: Events
EventMask: system,call,log

-Tony (anthm)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3399 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-08 15:39:35 +00:00
Mark Spencer
e3d12a2ab2 Re-fix bug #1977 (bug #1997)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3398 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-08 15:03:48 +00:00
Malcolm Davenport
c4a633a87b Bug #: 1992. Include priority
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3397 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-08 14:49:03 +00:00
Mark Spencer
b5780eda44 Use real bind address
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3396 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-08 14:06:22 +00:00
Mark Spencer
65fc87b245 Merge bkw_'s ODBC patch
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3395 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-08 13:18:04 +00:00
Mark Spencer
12b3b6c86e Use proper bind address
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3394 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-08 13:04:42 +00:00
Mark Spencer
8ebfe337a7 Extend bindaddr to RTP connections on SIP (bug #1989 et al)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-08 11:46:15 +00:00
Mark Spencer
28076a9c68 Cleanup SIP formatting, strncpy's strncats and global variable names (bug #1990)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-08 11:05:03 +00:00
Mark Spencer
851fce9568 Make ringing clearer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-08 09:20:14 +00:00
Mark Spencer
91a7960ad5 Add SQLite CDR support (bug #1986)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-08 08:29:26 +00:00
Mark Spencer
216fd6e249 Merge matt's voicemail patch with some restructuring (bug #1971)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3389 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-08 07:31:09 +00:00
Mark Spencer
18844270c3 When doing rport, remove the ";rport" before adding ";rport=5060"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-08 07:21:52 +00:00
Malcolm Davenport
fd9b6d13e6 Trivial fix for README.messages-expire
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3387 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-07 21:02:07 +00:00
Malcolm Davenport
5fa70e63a0 Bug #: 1988 Fix compile problem with iax2-provision.c under
FreeBSD


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3386 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-07 17:26:28 +00:00
Mark Spencer
432bb121f3 Cleanups to the ordering of events in dial, don't freak out on the wrong codec
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-07 16:02:13 +00:00
Mark Spencer
52549b25cd Deprecate emailtitle since emailsubject is more powerful.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-07 12:42:44 +00:00
Mark Spencer
fba5172e8a voicemail cleanups from rgagnon (bug #1977)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3383 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-07 12:29:20 +00:00
Mark Spencer
155d84a979 Add IAX provisioning support to Asterisk
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-07 09:34:01 +00:00
Mark Spencer
a7d2842beb Fix typo in sample config
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3381 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-03 22:44:17 +00:00
James Golovich
70c530630a Fix compiler warning because file.h isnt included
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-03 16:19:23 +00:00
Jeremy McNamara
a722b0462e add utils.h include. Bug #1965
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-03 05:22:21 +00:00
Mark Spencer
f63d46097d Back out accidental changes by anthm
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-02 23:11:14 +00:00
Anthony Minessale II
75d4369dfc autodial update
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-02 22:40:09 +00:00
James Golovich
3697f7dbcc Make app_txtcidname.c use ast_strlen_zero and cleanup the code a bit
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-02 19:24:16 +00:00
James Golovich
9de6aed36b Fix TXT lookups so they dont strip off the last 2 characters
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3375 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-02 19:20:09 +00:00
Mark Spencer
2e5873cb5d Fix missing context when calling app_hasvoicemail (bug #1962)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-01 21:58:50 +00:00
Mark Spencer
d2f22c57fe Merge Steven Davies latest jitter buffer patch
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-01 21:55:06 +00:00
Anthony Minessale II
b1d9a040d4 bring justice to gotoif's always true bug
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3372 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-01 20:42:49 +00:00
James Golovich
fb8ebe6365 Reverse login on voicemail email sending. Last change made it send email only if there was no address specified
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-01 17:34:42 +00:00
James Golovich
201849fb42 Fix IAX2 registration time. We want to set reg->refresh to the new value only if its lower not if its higher. (bug 1955)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-01 04:04:30 +00:00
Malcolm Davenport
8e2e53c987 Fix stupid typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-30 18:30:48 +00:00
Malcolm Davenport
bd7418b625 Bug #1957. Take two
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3367 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-30 18:30:10 +00:00
Malcolm Davenport
3cf3edb14f "Unfix" Bug 1957...this isn't the solution
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3366 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-30 18:11:56 +00:00
Malcolm Davenport
3e2806114b Bug # 1957. No more sending e-mails if the address isn't
present.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-30 17:49:42 +00:00
Mark Spencer
2f911dfba6 Use INET_ADDRLEN (bug #1956) (from airport!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-30 16:56:51 +00:00
Mark Spencer
64439e0692 Read/Record updates (bug #1947)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-30 16:04:28 +00:00
Malcolm Davenport
b94f5ca495 Bug #1952: iaxbuf now declared in chan_iax2.c and chan_sip.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3362 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-30 13:57:49 +00:00
Mark Spencer
1f1c915fea Merge Steven Davie's timestamp improvements
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-30 06:03:57 +00:00
Mark Spencer
7be9c6e469 Add "show file formats" (courtesy bkw_) and Update IAXY firmware to 17 (altserver support)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-30 03:22:29 +00:00
Mark Spencer
60ad539878 Formatting fixes (bug #1951)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3359 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-29 20:10:57 +00:00
Mark Spencer
9b32ff1eeb Minor formatting fixes for pbx_wilcalu
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3358 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-29 20:09:43 +00:00
James Golovich
074f8d9378 Use snprintf in __ast_request_and_dial instead of sprintf
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3356 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-29 19:29:03 +00:00
Mark Spencer
4b5f53d6a0 One more FreeBSD fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-29 19:21:25 +00:00
Mark Spencer
34208f76a5 Update variable descriptions (bug #1948)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3354 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-29 18:02:38 +00:00
Mark Spencer
e7bd1ce7b9 Remove duplicate declaration (bug #1950)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3353 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-29 18:00:14 +00:00
Mark Spencer
a8d8221357 FreeBSD fix for utils (bug #1949)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3352 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-29 17:54:25 +00:00
Mark Spencer
ee4a248e6b Make history configurable
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-29 14:44:29 +00:00
Mark Spencer
4d0dd2775a Report checksum failures as such (bug #1942)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-29 14:22:27 +00:00
Mark Spencer
eb6b35b75f Display invalid extension when there is one, fix minor OSP typo, Don't send 200 OK after 403 Forbidden on SUBSCRIBE
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-29 13:52:03 +00:00
Mark Spencer
9a478cb855 Prefer extensions within a macro to those outside (bug #1943)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-29 13:12:18 +00:00
Mark Spencer
457528ae86 Don't build old chan_iax by default (oops)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-29 13:03:39 +00:00
Mark Spencer
733c167528 Update asterisk spec file (bug #1946)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-29 12:57:52 +00:00
Mark Spencer
f97df161f4 Create reentrant ast_inet_ntoa and replace all inet_ntoa's with ast_inet_ntoa's (but #1944)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-29 12:56:46 +00:00
Mark Spencer
5bb0c3786d Oops (fix typo)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-29 12:40:15 +00:00
Mark Spencer
6195ae7453 Perform deadlock avoidance on initial entry, too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3343 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-29 12:38:04 +00:00
Mark Spencer
779140b94c Placeholder for GR303-FXSKS signalling (not yet finished)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3342 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-29 11:45:51 +00:00
Mark Spencer
196112076c Fix small typo (bug #1945)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-29 11:40:54 +00:00
Mark Spencer
30910d48bc Avoid potential deadlocks in channel_walk_locked, and detect serious failures
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3340 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-29 10:51:00 +00:00
James Golovich
408ead2dda Add manager action descriptions for 'Events', 'Logoff', and 'Hangup'.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-29 05:04:48 +00:00
Jim Dixon
baa46147a5 More improvements to app_rpt.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-29 04:43:20 +00:00
James Golovich
3d0e3d3c0f More formatting cleanups.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-29 04:42:19 +00:00
Mark Spencer
560068617a Make sure pollres is initialized to 0
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3336 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-29 01:43:55 +00:00
Mark Spencer
ef0128ec41 Allow nat=never mode to work around buggy UNIDEN UIP200 firmware (bug #1935)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-28 23:24:36 +00:00
Mark Spencer
5fec7176e0 Merge Tilghman's meetme updates (bug #1934)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3334 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-28 22:10:50 +00:00
Mark Spencer
a11c4965b7 If we don't accept a SUBSCRIBE, set needdestroy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-28 21:37:25 +00:00
Mark Spencer
b283a02a7d Merge seconds announcement for queue hold time (bug #1941)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-28 20:17:20 +00:00
Mark Spencer
09c41b415d Merge OSX compatibility patch (bug #1940)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-28 20:10:28 +00:00
Mark Spencer
9b6bd35ed3 Allow custom beep to be specified for agents (bug #1938)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-28 18:40:41 +00:00
Mark Spencer
eb9adf42d6 Directory fixes (bug #1887)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-28 15:08:39 +00:00
Jeremy McNamara
6f0a7f7a15 Add new built-in app 'SetAMAFlags'
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-28 03:48:53 +00:00
Jeremy McNamara
614d878b04 Add new built-in app 'SetAMAFlags'
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-28 03:41:41 +00:00
Jim Dixon
a9da004305 Added 'polite ID' concept in app_rpt.c and fixed a couple of silly telemetry issues.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3326 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-27 20:16:58 +00:00
Jeremy McNamara
88eede5218 apply temporary fix to stop people from whining.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3325 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-27 20:06:44 +00:00
Mark Spencer
9127ab071b Add option for in-band progress (bug #1879)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3324 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-26 21:17:12 +00:00
Mark Spencer
05110e85d3 Add ability to send detailed mailbox info (bug #1690)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3323 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-26 20:55:35 +00:00
Jim Dixon
ca75adf9cb Fixed autopatch so that it would take digits from link peer.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3322 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-26 19:28:55 +00:00
Mark Spencer
54dcc9bf56 Fix astman build (bug #1930)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3321 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-26 19:25:39 +00:00
Jim Dixon
ca7fc00ad5 Fixed a couple of silly things that I overlooked before :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3320 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-26 19:08:57 +00:00
Mark Spencer
df2394af02 Minor cleanups on zap when hangup on callwait
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-26 18:38:19 +00:00
Jim Dixon
c3af8944af Added support for Doug Hall RBI-1 Remote base controller, memory channels for
remote bases, and updated the rpt.conf doc a little bit.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-26 18:06:17 +00:00
Mark Spencer
b140eef0aa Implement queue wide wrapuptime (bug #1707)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-26 16:26:39 +00:00
Mark Spencer
88bcbb2368 Don't repeat option 3 (bug #1910)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-26 16:06:19 +00:00
Mark Spencer
d9ed36059c Add peercontext parameter for default outbound context (bug #1929)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3315 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-26 15:48:30 +00:00
Mark Spencer
1af31f2c64 Merge cmaj's ZapDND and specific channel status manager commands (bugs #1917, 1918)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-26 14:31:09 +00:00
Mark Spencer
b76935b95c Minor alsa fixes, add "delayreject" option to IAX to implement request of bug #1846)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3313 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-26 14:19:38 +00:00
Mark Spencer
03fbf171a7 Zap NSF merge, major ALSA improvements
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-26 05:20:42 +00:00
Mark Spencer
3db853b428 Merge source cleanups (bug #1911)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-26 03:50:14 +00:00
Mark Spencer
a30ae193db Add crypto to FreeBSD build (bug #1912)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3310 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-25 22:56:28 +00:00
Mark Spencer
a466fdbc40 Merge voicemail internationalization (bug #1485)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3309 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-25 21:25:44 +00:00
Mark Spencer
2fb8ad79c2 Don't munge outgoing call progress when fax enabled (bug #1909)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3308 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-25 21:17:08 +00:00
Mark Spencer
9ab74af94f Fixes to -R feature
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-25 21:14:03 +00:00
Mark Spencer
c9f168ed0f Add subaddress support (bug #1877)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-25 19:33:27 +00:00
Jim Dixon
dbea1448bd Fixed problems with multiple links and added timeout message
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3305 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-25 19:33:22 +00:00
Mark Spencer
e6de64a5a9 Cleanup handling of complex expressions (bug #1919)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-25 18:23:26 +00:00
Mark Spencer
fe4b2401bd Handle URL encoded stuff in pedantic checking
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-25 18:23:06 +00:00
Mark Spencer
d37b6dd459 Add Tilghman's -R option to allow reconnecting when disconnected (bug #1916)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-25 14:39:38 +00:00
Mark Spencer
0a059f8ce1 Update Chanelog
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3301 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-25 14:37:14 +00:00
Mark Spencer
80c9620612 Add sample config file, implement verification
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3300 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-25 05:52:55 +00:00
Mark Spencer
2f421a55da Small outgoing OSP cleanups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-25 04:27:55 +00:00
Mark Spencer
42ad569376 Commit remaining changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-25 04:07:52 +00:00
Mark Spencer
bdbed69984 Somehow the Makefile didn't get merged
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-25 04:06:11 +00:00
Mark Spencer
1d473f25dd Add outgoing OSP support (SIP only at this point)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-25 03:59:07 +00:00
Mark Spencer
b0972b8d1f Make sure other drivers also zero delivery (thanks to steven davies)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-24 13:27:44 +00:00
Mark Spencer
f6f67727c6 Merge Ehud's MySQL users support (bug #1815)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3294 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-24 04:07:44 +00:00
Mark Spencer
8ef1f1ea2e oops
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-24 03:04:25 +00:00
Mark Spencer
df93792f9c Extend delay slightly
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3292 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-23 22:01:46 +00:00
Mark Spencer
08ac005489 Make delay for echo training configurable
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-23 22:00:04 +00:00
Mark Spencer
27bb1601d3 Generate "failed" context on busy, too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-23 20:46:58 +00:00
Mark Spencer
da49f53b66 datetime patches from Tilghman (bug #1905)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3289 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-23 20:19:12 +00:00
Mark Spencer
e9f2a805b9 Merge in-access updates for queue priorities (bug #1821)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-23 20:05:18 +00:00
Mark Spencer
74fdefdf1e Merge Tilghman's voicemail broadcast improvements (thanks!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-23 18:00:50 +00:00
Mark Spencer
68248b91f0 Be sure to hold lock during answer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3286 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-23 17:41:51 +00:00
Jim Dixon
6729301b4d Fixed bug in remote base part of app_rpt, and updated rpt.conf.sample to
reflect new changes in operation.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-23 14:37:46 +00:00
Mark Spencer
5e36feac27 Add 'w' option to meetme which causes us to wait for a "marked" user to enter the bridge
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-23 04:55:04 +00:00
Mark Spencer
7a363d3d17 Small simplification
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-23 03:19:32 +00:00
Mark Spencer
2187465cae Set ${DIALSTATUS} from app_dial, make zap return BUSY on a phone that is busy, update macro-stdexten to demo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-23 03:16:58 +00:00
Mark Spencer
0f6db9f939 Don't segfault if chan_zap can't load
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-23 01:27:44 +00:00
Mark Spencer
a03db324dd Tilghman's directory fix (bug #1892)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3280 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-23 00:06:46 +00:00
James Golovich
3f9c34f415 Misc formatting cleanups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-22 20:11:15 +00:00
James Golovich
024f486810 Code formatting cleanups in utils.c and include/asterisk/lock.h
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-22 19:53:36 +00:00
James Golovich
f5c18f62a1 Remove pthread.h from source. We should be using asterisk/lock.h everywhere instead (except in asterisk/lock.h).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-22 19:32:52 +00:00
James Golovich
8801247d76 Remove pthread.h from source. We should be using asterisk/lock.h everywhere instead (except in asterisk/lock.h).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-22 18:49:00 +00:00
Mark Spencer
45ee2978cd Update messages-expire script
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-22 18:04:46 +00:00
Mark Spencer
f5de717d6e Merge Steven Davie's IAX2 jitter buffer enhancements
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-22 17:50:39 +00:00
Mark Spencer
5546e32355 Merge major BSD mutex and symbol conflict patches (bug #1816) (link patch still pending)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-22 17:42:14 +00:00
Mark Spencer
2f4a0dc3f5 Fix potential deadlocks in res_monitor
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-22 14:47:21 +00:00
Mark Spencer
652e085d0f Make DTMF mode configurable on ISDN
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3271 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-22 14:17:07 +00:00
Mark Spencer
8b2b0278c9 Make sure outgoing is not NULL
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-22 13:53:45 +00:00
Mark Spencer
e66aef0c05 Can't check outbound without having lock (bug #1886)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-22 04:54:52 +00:00
Mark Spencer
9cb185e126 Add "Progress" application
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-22 03:51:34 +00:00
Mark Spencer
2bd13db091 Directory fixes courtesy rgagnon (bug #1887)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-22 03:43:41 +00:00
Mark Spencer
551e3ad719 Add userevent application (bug #1300)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-21 23:00:00 +00:00
Mark Spencer
df4ea0cec4 Make CAS tone quieter
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-21 22:36:25 +00:00
Mark Spencer
3ccf8627e0 Add app_alarmreceiver (bug #1783)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-21 19:28:34 +00:00
Mark Spencer
aa63104784 Fix ast_safe_system
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-21 19:12:20 +00:00
Mark Spencer
2efcb2e331 Don't stop moh until after announcement finishes (bug #789)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-21 18:28:35 +00:00
Mark Spencer
76fe489c86 Support extended regular expressions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-21 18:20:17 +00:00
Mark Spencer
ec3f9d5041 More fixes for remote_party_id
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-21 16:52:04 +00:00
Mark Spencer
7b0160ee51 Sorry, 403 is "Forbidden" not "Permission Denied"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-21 14:51:38 +00:00
Mark Spencer
b0991ab170 Check if subscribe is for mailbox. If so, return 200 OK or 403 Permission Denied as appropriate
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-21 14:39:19 +00:00
Mark Spencer
8c4cacbd58 Use ' instead of " for quoting in extensions.conf (bug #1872)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3257 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-21 14:20:03 +00:00
Mark Spencer
502e74e5db Fix app_dial buglet
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-21 13:30:58 +00:00
Anthony Minessale II
b168dcdddf I don't know what this last update was for but app_dial.c was broken
so I added these 2 variable defs to make it compile right to spare
all the end users...


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-21 12:55:53 +00:00
Mark Spencer
585afa7e8e Add promiscuous redirect option
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3254 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-21 06:11:56 +00:00
Mark Spencer
737e9b2458 Merge outgoing MSN support + Remote Party ID for SIP (bug #1841) with cleanups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-21 04:29:50 +00:00
Jim Dixon
2ee28d0ccf Majorly updated app_rpt.c allowing linking of repeaters/remote bases using (IAX2) and supporting remote base nodes as well (also added visual documentation in rpt_flow.pdf)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3252 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-21 04:24:50 +00:00
Mark Spencer
bbe5ff18c2 Fix locking in zapscan
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3251 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-21 04:08:54 +00:00
Mark Spencer
ef4d9eb5b7 Avoid iflock/chlock race
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3250 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-21 03:37:13 +00:00
Mark Spencer
491e5d941c Make 'x' option behave as advertised (bug #1878)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3249 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-21 02:37:34 +00:00
Mark Spencer
b72227e845 Merge (and cleanup) anthm's CDR changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3248 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-20 22:46:42 +00:00
Mark Spencer
70167380a3 Allow CDR's to be linked and work on the linked list
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3247 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-20 15:19:36 +00:00
Mark Spencer
347f32ab97 Hold private lock while handling digits
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-20 14:07:44 +00:00
Mark Spencer
3b3a042cef Hold pending digits until setup_ack is received, then send (bug#1875)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3245 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-20 06:53:53 +00:00
James Golovich
a054fec8ef Typo in comment in app_dial.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3244 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-20 06:24:25 +00:00
Mark Spencer
bc9e475d6e Allow penalty argument to AddQueueMember
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3243 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-19 16:00:50 +00:00
James Golovich
18fef6deb1 Formatting fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-18 16:23:56 +00:00
Mark Spencer
133120aa38 Be sure we hold channel lock in write before talking to PRI channel
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-18 15:24:29 +00:00
Mark Spencer
e32c8f1ebe Debugging cleanups (bug #1633)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3240 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-18 13:53:48 +00:00
Mark Spencer
19d5ae6e8d Send 403 when authentication fails on a call
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-18 03:59:19 +00:00
Mark Spencer
3932d756d4 Oops
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3238 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-17 14:53:25 +00:00
Mark Spencer
f75a3079e0 Implement proper locking on INFO_RECEIVED
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-17 14:51:44 +00:00
Mark Spencer
d11177774a More meetme locking fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3236 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-17 05:21:54 +00:00
James Golovich
e5629ea138 Cleanup formatting in config.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-17 04:53:55 +00:00
Mark Spencer
4f72a1da77 Fix doubly-linked list delete
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-17 04:42:03 +00:00
Mark Spencer
095b971fc6 Small typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3233 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-17 04:32:10 +00:00
Mark Spencer
2d78f0d53c PRI locking fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-17 04:23:57 +00:00
Mark Spencer
4a4e1e348d Must be inside lock when finding start
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3231 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-17 02:42:42 +00:00
Mark Spencer
702b8a96b0 Close logging stuff so system doesn't have to (bug #1855)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-17 01:13:10 +00:00
Mark Spencer
dd4aba8022 Document ability to change user agent (bug #1867)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-17 00:09:41 +00:00
Mark Spencer
e3c58c8ebe Gotta set slot to 0 before you print :)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3228 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-16 21:26:53 +00:00
Mark Spencer
fdf586e416 Don't forget to run the schedule queue
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-16 21:15:15 +00:00
Mark Spencer
88aec64bce Minor fixup to voicemail (bug #1865)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-16 18:35:01 +00:00
Mark Spencer
db8da3c376 Use new extensible setup method of libpri
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3225 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-16 15:34:21 +00:00
Mark Spencer
7538cee13b Enable support for RFC3581 (bug #1862)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-16 14:14:57 +00:00
Mark Spencer
be9d4b4333 Remove ancient requirement that ts > 0
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-16 13:52:50 +00:00
Mark Spencer
b3b931fab9 Merge EOF patch (bug #1860)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3222 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-16 03:28:42 +00:00
Anthony Minessale II
8fa9d75365 fix a miscalled arg in the #include support in external config handles
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-15 22:02:56 +00:00
Jeremy McNamara
1f4eadaf6a check to make sure the extension exists b4 actually accepting the call and lets hope this gives Open H.323 enough time to sync up (bug #1714)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3220 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-15 20:56:06 +00:00
Mark Spencer
ada1e768c4 Fix unexpected behavior in voicemail (bug #1856)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-15 20:33:26 +00:00
James Golovich
7255d8797c Formatting fix. Tabs not spaces :)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3218 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-15 19:31:25 +00:00
Anthony Minessale II
46303772e5 Added an extra reload_logger() after *.so is loaded in case a custom config handler binded to logger.conf
to solve a chicken/egg issue where logger.conf is parsed before lodable modules are loaded.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3217 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-15 18:48:07 +00:00
Mark Spencer
d0e532a070 Eliminate duplicate init_logger_chain call (bug #1853)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-15 18:44:14 +00:00
Mark Spencer
6c9b510d5d When dialing outbound, if we match a peer name, use it (who really cares?) (bug #1850)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3215 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-15 15:16:16 +00:00
Mark Spencer
dc7ceb7fd8 Cleanup leak in editline (bug #1847)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3214 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-15 14:37:36 +00:00
James Golovich
d88a461764 Cleanup formatting
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-14 22:15:21 +00:00
James Golovich
db8da85266 Cleanup formatting
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-14 22:05:12 +00:00
James Golovich
bc80b3130d Cleanup formatting
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-14 22:03:59 +00:00
Mark Spencer
001623fa0a Minor formatting cleanups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-14 21:47:08 +00:00
Mark Spencer
c53e76528d Allow escaping of commas as well as ability to use quotes (bug #1826)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-14 21:43:16 +00:00
Mark Spencer
ee664e6ccd Fix small typos
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3208 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-14 21:40:57 +00:00
Mark Spencer
427be16475 Handle PROGRESS event
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-14 21:40:02 +00:00
Mark Spencer
5b9cab6c13 Separate PROCEEDING and PROGRESS
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-14 21:18:52 +00:00
James Golovich
f70b57352b Fix MailboxExists to follow the original behavior of jumping to +101 if the voicemailuser exists
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3205 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-14 20:40:14 +00:00
Mark Spencer
bec994b037 Merge Matt's work
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3204 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-14 19:43:41 +00:00
Mark Spencer
3cf5ea7383 Make meetme operate in linear so as to keep alaw folk happy, minor iax2
authentication cleanup


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-14 03:12:46 +00:00
Mark Spencer
d208532e6e x86-64 compile fixes and cleanups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3202 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-13 21:25:10 +00:00
James Golovich
800ad7f727 Use ast_strlen_zero instead of &id in app_queue.c (Thanks folsson)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-13 19:45:59 +00:00
Mark Spencer
fd70e7920e Provide dialtone when doing overlap dial (bug #1832)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-13 07:25:27 +00:00
Mark Spencer
d030752f72 Make sure overlap dial goes into "RING" state instead of just "RESERVED"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3198 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-13 07:16:00 +00:00
Mark Spencer
319011b0e3 Fix ODBC build for FreeBSD
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-13 01:54:53 +00:00
Mark Spencer
9e3a90e249 Display error when having trouble reading from /dev/phone
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3196 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-12 16:48:12 +00:00
Mark Spencer
439e5eeeb4 Use 401 Unauthorized instead of 407 Proxy Authentication required for REGISTER,
and use 403 for final request on proxy instead of 401 (bug #1798)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3195 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-12 16:38:36 +00:00
Mark Spencer
1b23fce2bd Fix OpenBSD compile (bug #1830)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3194 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-12 14:53:53 +00:00
Mark Spencer
a3355d9fe2 Add "LOW_MEMORY" option and increase some buffer sizes (bug #1827)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-12 14:34:15 +00:00
Jeremy McNamara
c359ec8f5c fix list initialization
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3192 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-12 03:44:51 +00:00
James Golovich
31b39fe85e Fix voicemail description. We send calls into extension 'a' or 'o' not priority
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3191 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-11 21:11:22 +00:00
James Golovich
c51934cd70 Update sample extensions.conf macro-stdexten to include an a extension that sends the user into voicemailmain when * is pressed
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-11 21:09:27 +00:00
James Golovich
481a59e92e Build ecodes string a little better in app_voicemail so that the 'a' extension will work even if the 'o' extension doesn't exist. Also update the description to include info on the 'a' extension
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3189 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-11 21:01:42 +00:00
Mark Spencer
1bc96b7aab Add talk detectection app (BackgroundDetect)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3188 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-11 14:06:30 +00:00
Mark Spencer
bad7cc9c14 Add "show channels concise" for machine readable format
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3187 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-11 00:18:30 +00:00
Mark Spencer
c96b39a960 Merge res_odbc and res_config
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3186 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-11 00:12:35 +00:00
Mark Spencer
758f246390 Display which span/channel we're receiving restarts on
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-10 19:00:20 +00:00
Mark Spencer
b1a658f57e Although I can't think of any scenario that it could result in a race, don't hold a private iax or sip lock while allocating a channel
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-09 23:07:55 +00:00
Mark Spencer
8800bd6b1f Merge rmarchev's vox fixes (bug #1812)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-09 20:55:20 +00:00
Mark Spencer
a53d260d5f Minor meetme cleanups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-09 19:43:23 +00:00
Mark Spencer
3ef099dede In spite of my extreme distaste for SRV, make it the default.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-09 14:01:04 +00:00
Mark Spencer
1794aac9e1 Return NULL if no CRV found
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-09 13:55:52 +00:00
Mark Spencer
de57be6bbd Lock fixes for FreeBSD (bug #1810)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3179 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-09 13:49:42 +00:00
James Golovich
a23c43cefa Make chan_zap initialize the pri threads to AST_PTHREADT_NULL and check when calling unload in case load_module fails complete
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3177 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-09 08:46:32 +00:00
Mark Spencer
727abcdec7 Merge FreeBSD locking fixes (bug #1411)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3176 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-09 01:45:08 +00:00
Mark Spencer
c96046b6c2 Handle binding more nicely
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-09 01:33:16 +00:00
Mark Spencer
f105351643 Make fax detect configurable by direction (bug #1803)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-08 22:34:25 +00:00
Mark Spencer
5ae7b48700 Update changelog
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-08 03:39:29 +00:00
Mark Spencer
8c2bc79b77 chan_phone portability (bug #1788)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3172 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-08 01:50:57 +00:00
Mark Spencer
d3fd49f2cf Update sample configuration to show fax detect has to be enabled
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-07 23:38:58 +00:00
Mark Spencer
68c45465c8 Make faxdetect configurable and turn OFF by default
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3170 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-07 23:38:39 +00:00
Mark Spencer
ad49896f6b Simplify trunk transmission path and remove potential race (bug #1802)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-07 19:48:53 +00:00
Mark Spencer
8995f5d810 Zapras fix for BSD (bug #1801)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-07 19:12:14 +00:00
Anthony Minessale II
22de310e04 fix res_monitor bug
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-07 16:51:21 +00:00
Mark Spencer
9bd9958722 More GR-303 protocol fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-07 15:57:18 +00:00
Mark Spencer
dff7c80952 Fix tiny typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-07 14:49:25 +00:00
Mark Spencer
a14ba4f1b5 Initial, incomplete support for D-channel backup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-07 03:39:18 +00:00
Mark Spencer
994c0a5573 Update IAXY firmware to version 16 (provides better timestamps)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-07 02:55:31 +00:00
Mark Spencer
a9b5a6cbb0 Handle bearer failures cleanly (still need d-channel backup)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-06 23:26:29 +00:00
Mark Spencer
8699103fa1 Handle multiple span memberships properly
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3160 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-06 22:51:37 +00:00
Mark Spencer
469c7d6de9 Must call spanstat before checking number of channels (bug #1796)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-06 22:22:48 +00:00
Mark Spencer
9c42fa75a4 Fix small arrangement issue
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-06 20:47:51 +00:00
Mark Spencer
0f2e75a257 Clearly label EAGAIN as being the UDP checksum error that it is
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-06 17:44:47 +00:00
Mark Spencer
e115566669 Can't use the same buffer to snprintf that we're grabbing
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3156 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-06 17:36:57 +00:00
Mark Spencer
65d5921dde Don't require "c" before CRV syntax
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3155 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-06 08:52:24 +00:00
Mark Spencer
e325aa312f Try to parse callerid properly on /dev/phone (bug #1788)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-06 07:01:37 +00:00
Mark Spencer
7b7dbfb855 Small fixup for non-PRI build
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-06 03:32:55 +00:00
Anthony Minessale II
cc36c3d475 fix D() issue with to short of a duration
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-06 02:30:10 +00:00
Mark Spencer
a550016fd6 Add bi-directional GR-303 support
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-06 01:54:22 +00:00
Mark Spencer
df9b7608a9 Fix voicemail.conf typo (bug #1794)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3150 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-05 23:00:16 +00:00
Mark Spencer
b9d81ae6ad Add ${AVAILORIGCHAN} with original channel name (bug #1793)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-05 18:42:59 +00:00
Mark Spencer
32ecea7b8c More small fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-05 07:07:12 +00:00
Mark Spencer
746d2e7f67 Minor cleanups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-05 07:01:23 +00:00
Mark Spencer
27578642b8 Add support for trunk groups in anticipation of NFAS and GR-303, Initial GR-303 work
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-05 06:54:52 +00:00
James Golovich
63b280e97c Cleanup some formatting in app_agi.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3145 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-04 19:01:07 +00:00
Mark Spencer
0062fe9588 IAX2 fixup, fix res_monitor sillyseg
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3144 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-04 18:30:35 +00:00
Mark Spencer
103bb4a334 Enhancements for zaptel+bsd (bug #1781)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-04 15:44:14 +00:00
Mark Spencer
aa2795cc46 Get rid of small copmile warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-03 23:44:43 +00:00
Mark Spencer
269507ad59 Fix handling when MONITOR_EXEC is unspecified
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3141 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-03 23:16:55 +00:00
Mark Spencer
ca0c646539 Make sure that auto created "pseudo" isn't a member of any groups (bugs #1776, #1777)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-03 22:40:13 +00:00
Mark Spencer
8cc1ffe2ab Merge agent callback login/logoff events and logging (bug #1775)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-03 17:33:35 +00:00
Mark Spencer
dc7e5f5f03 Initialize frame for playtones just in case
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-03 17:06:33 +00:00
Mark Spencer
799b876aa0 Make monitor merge application settable via variable, allow setting of variables via manager interface, allow mix flag to be set via manager (bug #1268)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-03 15:42:36 +00:00
Mark Spencer
8f5498177e WOrk on the proper pointer (bug #1773)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3136 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-02 23:27:50 +00:00
Mark Spencer
8f9ace9228 Add information for IAX on Free World Dialup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-02 23:19:36 +00:00
James Golovich
5a9ab574de Add 'ListCommands' manager command
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-02 22:30:42 +00:00
Mark Spencer
ea2b6241fd Lock while installign generator
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-02 20:18:18 +00:00
James Golovich
ea70485e7b Add description to manager_action structure, and add some comments.
Add ast_manager_register2 which adds description as an additional arg
Rework how events are added so they get ordered alphabetically
Add 'show manager command <commandname>' (with tab completion) to
	view info on each command

Added descriptions to 'Ping' and 'Originate' but they kinda suck, so we
need other people to come up with good descriptions for each of the
manager commands.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-02 20:08:08 +00:00
Mark Spencer
37ae3cd701 Fix app_read to return string even if not # terminated (bug #1769)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-02 18:15:24 +00:00
Mark Spencer
b6beb440cd Use pseudo channel instead of just /dev/zap/pseudo, now with proper protections (bug #1766)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-02 16:57:14 +00:00
Mark Spencer
bc86e5de2a Allocate pseudo channel if it's not explicitly listed
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-02 16:35:06 +00:00
James Golovich
2587e6faa4 Code formatting fixes in chan_zap.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3128 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-02 16:13:25 +00:00
Mark Spencer
ce82bfa75a Play acknowledgement in all cases (bug #1767)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-02 00:03:49 +00:00
Mark Spencer
31e427d775 Oops slightly premature
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-01 22:54:18 +00:00
Mark Spencer
a435f135b5 Use pseudo channel (but real channel) instead of just directly opening /dev/zap/pseudo to enable future meetme enhancements (bug #1766)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3125 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-01 22:53:52 +00:00
Mark Spencer
36b87b3b33 Voicemail fixes (bug #1758)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-01 19:38:06 +00:00
Mark Spencer
8164972e34 allow multiple exit characters on control_streamfile, allow '1' to skip envelope
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3123 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-01 18:50:18 +00:00
Mark Spencer
49257bafbc Only call the update once
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-31 23:44:04 +00:00
Mark Spencer
9286f2c6d3 More BSD compile fixes (bugs #1754 and #1756)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-31 19:40:23 +00:00
Mark Spencer
fdcf41cef0 Fix compile warning on FreeBSD (bug #1755)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-31 17:01:32 +00:00
Mark Spencer
66fae27e3a Add missing strings include for BSD
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3119 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-31 16:51:28 +00:00
Mark Spencer
c66bf9a326 Trivial removal of unused variable when not on linux (bug #1753)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3118 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-31 16:43:35 +00:00
Jim Dixon
8968d50976 Complete re-vamp of Radio Repeater application (app_rpt) and VERY minor changes in chan_zap (to allow pseudo-channels to work properly (finally!)) and in dsp.c to allow for super-relaxed DTMF decoding which radio systems need to function properly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3117 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-31 16:04:10 +00:00
Jeremy McNamara
b0f9569b5c make sending indications more robust and proper
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3116 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-31 02:49:53 +00:00
Mark Spencer
514acf8dfc Fix lag in diverging clocks (bug #1696)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3115 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-30 22:22:49 +00:00
Mark Spencer
89561c6a29 Update queue member after end of call (bug #1727)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3114 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-30 22:10:09 +00:00
Mark Spencer
c47538a24b Take member as argument, not lpeer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3113 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-30 20:43:55 +00:00
Mark Spencer
5ee4f3048c Fix formatting issues
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-30 20:38:05 +00:00
Mark Spencer
0f5ed60d51 Minor RTP video fixes, be more careful about closing fd's in meetme (bug #1743)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-30 20:24:48 +00:00
Jim Dixon
5ef2ef8a1d Fixed annoying SIP 'NOTIFY' messages printed on console every n seconds from some SIP peers. Also fixed problem where 'INFO' was not being responded to if in 'ignore' state.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-30 20:03:39 +00:00
Mark Spencer
d34639a601 Allow variable substitution in from string (bug #1741)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-30 03:03:19 +00:00
Mark Spencer
bf2ec2d6d0 Initialize secrets properly (bug #1748)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-29 23:40:22 +00:00
Anthony Minessale II
f30d55fbf6 saw this in valgrind (-tony)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-29 03:40:35 +00:00
James Golovich
8136198e53 Use ast_strlen_zero in res_musiconhold.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-28 19:44:33 +00:00
James Golovich
fa9a8d158a Hopefully last ast_strlen_zero fix in cli.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-28 19:23:30 +00:00
James Golovich
cc698e15cf Use ast_strlen_zero in privacy.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3104 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-28 19:20:29 +00:00
James Golovich
4926908616 Use ast_strlen_zero in db.c and some optimizations. Lets store the return value of strlen and use that rather than using strlen every time, and snprintf returns the length of the string
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-28 18:56:23 +00:00
Mark Spencer
a2cc6b01be Really don't authenticate if we're not supposed to authenticate (bug #1738)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3102 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-28 15:47:57 +00:00
Mark Spencer
63074875d6 Ringing and progress are not identical
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3101 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-28 02:02:33 +00:00
Mark Spencer
04887bcc3e Minor reinvite typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3100 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-28 00:52:45 +00:00
Mark Spencer
5b53760717 Only print PRI messages when in verbose mode (bug #1732)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3099 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-27 22:38:13 +00:00
Mark Spencer
ff2ba012d2 Merge connor's exit context patch (#1737)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-27 22:35:47 +00:00
Mark Spencer
e446f4ca81 Merge OSS fixes for FreeBSD, implement rtptimeout and rtpholdtimeout
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3097 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-27 22:12:55 +00:00
Mark Spencer
4d1706d05f Fix gross oversights in original ACL patch
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3096 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-27 21:31:25 +00:00
Mark Spencer
4f5ddbc374 Add ACL copy routines (bug #1733)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3095 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-27 20:53:02 +00:00
Mark Spencer
96117402b1 Unlock PRI lock, fix variable pasing
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-27 16:50:07 +00:00
Mark Spencer
2cd1eb39b1 Don't count as outgoing until we actually send the new INVITE
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3092 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-27 16:14:46 +00:00
Mark Spencer
03cb980dc2 Meetme fixes (bug #1729)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-27 14:35:26 +00:00
Mark Spencer
b820fd0075 Doc fix for controlplayback, get rid of 500ms wait in rtp.c (bug #1589)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-27 05:06:32 +00:00
Mark Spencer
cf57ba2310 Make RTP handle codecs (first pass)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-27 04:18:46 +00:00
James Golovich
fc7593e594 More formatting fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-27 00:07:18 +00:00
Anthony Minessale II
54780434a6 enhance control_playback to have an app (app_controlplayback) and to allow pause (inherited by app_voicemail)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-26 23:56:41 +00:00
Mark Spencer
ec14976ac3 Perform proper heap bounds checking on skinny messages (bug #1726)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3085 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-26 23:15:23 +00:00
Mark Spencer
fdb8ffe20d Cancel destroy request on new invite, merge bkw's control playback changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3084 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-26 22:18:59 +00:00
Jeremy McNamara
f7a7158f3f oopsie
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-26 19:41:58 +00:00
James Golovich
b4a2ee6104 Use ast_strlen_zero in manager.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-26 19:30:12 +00:00
Jeremy McNamara
728cceca7e explain a proper upgrade sequence (lowering the signal-to-noise ratio again)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3081 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-26 19:28:14 +00:00
James Golovich
7baf86bc8b Fix comment in pbx.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3080 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-26 19:24:47 +00:00
Jeremy McNamara
9432a1c19f properly clean capabilites from the endpoint
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-26 19:14:51 +00:00
Mark Spencer
1b5d2d4667 Cancel self destruct on provisional responses too (bug #1722)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-26 18:46:36 +00:00
Mark Spencer
682913a1f3 Add controlplayback app
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3077 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-26 18:38:10 +00:00
James Golovich
82b3a5f417 Formatting fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-26 16:51:25 +00:00
Anthony Minessale II
8f9e2b6633 add ast_control_streamfile api call
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-26 15:22:54 +00:00
Ben Kramer
8161efd26a cleaned up locking, more logging on locks, still havent worked out why
locks become screwed if a call isnt Answered before a Dial.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3074 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-26 01:29:29 +00:00
Mark Spencer
1799dd3641 It's angler's first patch!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3073 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-25 15:53:28 +00:00
Mark Spencer
1147ed1e8c Fix record option to take from the right channel
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-25 15:37:30 +00:00
Mark Spencer
0f966565af Handle debugging of unknown IE's properly
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-25 15:16:45 +00:00
Mark Spencer
2cc7d3e8db Make sure transmitted timestamps are solid on trunks (bug #1713)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3068 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-25 13:57:57 +00:00
Mark Spencer
67b3ab9ee5 Merge useragent patch (bug #712)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-25 05:36:49 +00:00
Mark Spencer
7dee677799 Fix major typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-25 04:50:54 +00:00
Mark Spencer
9dbb2ef08c Enable understanding of service identifier and provisioning version
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-25 04:34:43 +00:00
Mark Spencer
0e1e513d5a Fix makefile for apple
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3064 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-25 02:51:38 +00:00
Jeremy McNamara
588801931f optmize call setup process
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3063 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-25 02:27:59 +00:00
Mark Spencer
e3ad88c784 Eliminate useless pass checking
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3062 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-25 00:23:02 +00:00
Mark Spencer
af69f68359 Fix AES for MacOS build
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3061 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-24 20:09:05 +00:00
Mark Spencer
3377298b06 Handle different contexts (bug #1702)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-24 19:24:20 +00:00
Mark Spencer
15b86b3afb Fix security codes in asterisk.adsi (bug #1709)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-24 19:22:25 +00:00
Mark Spencer
776497fb6b Fix potential segfault, add support for MacOS X locks
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-24 15:28:36 +00:00
Mark Spencer
9082b027ef Improve sample configuration files (bug #1125)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3057 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-24 15:09:34 +00:00
Mark Spencer
bbce72c316 Fix small typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3056 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-24 15:07:08 +00:00
Mark Spencer
d7ba067af6 Always authenticate when insecure is not "very" even on matching IP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3055 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-24 14:44:47 +00:00
Mark Spencer
1798abd909 Minor path tweak
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3054 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-24 13:53:52 +00:00
Ben Kramer
4b5f7f0ef6 / work in progress, still tracking down locking bug
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-24 05:37:15 +00:00
Ben Kramer
5273e43919 / fixed up timers for ring back and busy tones
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3051 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-24 01:43:05 +00:00
Mark Spencer
316bffd061 Fix voicemail ADSI codes (bug #1680)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-24 00:44:40 +00:00
Mark Spencer
ba264f8158 Minor mailbox cleanups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3049 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-24 00:26:46 +00:00
Mark Spencer
cf24f7ff7e Change 'u' back to 's' since it's required for both user and admin menus
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-23 23:46:43 +00:00
James Golovich
5e29d3a518 Make mkdep throw away stderr since people think the error messages printed are serious when they are not
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-23 17:17:27 +00:00
Mark Spencer
25ca4c854c Small fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3046 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-23 14:55:50 +00:00
Mark Spencer
50449d5c87 MeetMe documentation improvements (bug #1703)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-23 14:19:45 +00:00
Mark Spencer
740243552f Use find_user for existsmailbox
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-23 05:07:43 +00:00
Mark Spencer
9f14461cb7 Fixes to mailbox exists
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3043 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-23 04:21:42 +00:00
Mark Spencer
194fe2a4a5 Copy hangup cause at end of a good call
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-22 23:17:33 +00:00
Mark Spencer
e300367ad8 Obviously don't send alerting, progress, or proceeding on outbound calls (bug #1700)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3041 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-22 19:05:53 +00:00
Mark Spencer
15b2f1f635 When dialing out, we're always proceeding :)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3040 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-22 15:36:59 +00:00
Mark Spencer
47133fda31 Work on a copy with app_agi
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3039 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-22 04:52:50 +00:00
Mark Spencer
a0486afb83 Merge fabeman's extensive meetme improvements (bug #1624)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3038 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-22 04:11:22 +00:00
Mark Spencer
ad67680ed3 First pass at handling responses properly for retransmissions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3036 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-21 06:05:20 +00:00
Mark Spencer
93da37619a Fix some small broken prompts (bug #1684 & 1686)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3035 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-21 04:35:19 +00:00
Ben Kramer
0284bc4b99 / updated locking
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-21 02:51:05 +00:00
Mark Spencer
7f1117a71f Don't send the same codec twice even if listed twice in allow section (bug #1691)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3033 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-21 00:59:38 +00:00
Mark Spencer
0004e8a4be Stop stream when interrupted by '#' or '*' or '0' (bug #1689)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3032 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-21 00:55:36 +00:00
Jeremy McNamara
41c995dd18 Fix FreeTDS/MSSQL from bkw
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3031 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-21 00:40:02 +00:00
Jeremy McNamara
89dbeddcfc backout code optimization, add more explict error reporting
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-20 21:56:12 +00:00
Mark Spencer
6195dd35e0 Make ast_channel_walk become ast_channel_walk_locked
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-20 16:30:10 +00:00
Jeremy McNamara
e1b72cf020 cleanup code and debug
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-20 09:00:04 +00:00
Mark Spencer
b1462cd593 Make playback of envelope a configurable option (bug #1683)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3027 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-20 07:58:15 +00:00
Mark Spencer
868fec3692 Congestion with Hangup sends expected RELEASE code (but #1681)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3026 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-20 07:57:19 +00:00
Mark Spencer
a105455487 Stage 1 of deadlock fix (bug #1673 -- but not yet solved, just started) and fix configs ending with no newline (bug #1672)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3025 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-20 07:52:07 +00:00
Mark Spencer
0882f61a8e Fix compile order (bug #1682)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-20 07:08:31 +00:00
Jeremy McNamara
eff9477388 properly send call progress and alerting PDUs, re-fix one-way audio on call manager, and hopefully add call progress (N+101) support (not tested)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3023 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-20 07:07:18 +00:00
Jeremy McNamara
fc6a82fcb8 only complain if ZAPATA_PRI is defined
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-20 07:02:47 +00:00
Ben Kramer
2bc871a62e / working on pstn->sip half duplex bug
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-20 01:59:03 +00:00
Mark Spencer
61ce929656 Merge Mike's announcement enhancements
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3020 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-20 00:29:09 +00:00
Mark Spencer
67e1c59427 Add missing queue header file (bug #1626)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-19 21:13:49 +00:00
Mark Spencer
3f6896acd3 Update for newer libpri
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3018 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-19 21:02:11 +00:00
James Golovich
17aeeda774 Re-Disable building chan_iax.so
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-19 17:16:46 +00:00
Mark Spencer
143b73ee7b Always send proceeding, send progress when appropriate
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3016 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-19 15:40:01 +00:00
Mark Spencer
260fcde6e2 Alert for in-band audio
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3015 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-19 15:23:11 +00:00
Mark Spencer
ce55c480e9 Don't qualify with overlap dial anymore
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3014 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-19 15:11:27 +00:00
Mark Spencer
5738da5225 Send proceeding if appropriate on audio transmission, too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-19 15:00:14 +00:00
Mark Spencer
457f4caf6f Don't automatically send proceeding/alerting
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3012 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-19 14:51:11 +00:00
Mark Spencer
34347418e3 Allow multiple codecs to be printed in debug (bug #989)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3011 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-19 03:39:44 +00:00
Mark Spencer
5d9aa86efa Provide example for using e164.org
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-19 03:28:36 +00:00
Mark Spencer
ff5851c685 Make muted handle transfers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-19 03:16:59 +00:00
Mark Spencer
7976579ef6 Merge small bkw_ queue enhancements
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-19 02:29:15 +00:00
James Golovich
36f888e06e Clarify app_dial documentation regarding transfers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-18 18:27:55 +00:00
Jeremy McNamara
a73524874c fix documenation bug
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3005 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-18 16:06:30 +00:00
Jeremy McNamara
1c445d44c5 Don't advertise Janus, its still broken
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3004 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-18 15:20:37 +00:00
Jeremy McNamara
a54a0e5ecb clean up code and attempt to stablize inbound h.323 calls
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-18 10:33:46 +00:00
Jeremy McNamara
e0ab451084 clean up code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3002 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-18 10:32:34 +00:00
Mark Spencer
2310261cbe Flesh out remaining "rrmemory" logic
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-18 05:56:46 +00:00
Mark Spencer
99876da380 Update coding guidelines
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-18 05:52:52 +00:00
Mark Spencer
76a22457ce Add date formatting capability for logger (bug #1665)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2999 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-18 05:47:27 +00:00
Mark Spencer
e36ed02083 Add Round-Robin w/ Memory queueing strategy (rrmemory)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2998 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-18 05:41:53 +00:00
Jeremy McNamara
1f506e55d0 add explict version info
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2997 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-18 04:39:09 +00:00
Mark Spencer
a80bce7e58 Allow translation table to be recalculated, including with higher resolution
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2996 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-17 22:59:27 +00:00
James Golovich
4b56cf02f0 Fix compiler warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2994 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-17 21:15:37 +00:00
James Golovich
668f8161ab Make variables work in manager originate again
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2993 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-17 21:10:26 +00:00
Mark Spencer
d117f2258f Propagate language properly across chan_local (bug #1663)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-17 15:52:33 +00:00
Mark Spencer
1a81758f1c manage multiple subchannels per device
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-17 07:00:21 +00:00
Mark Spencer
655bce9e1f clean up config file sample
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-17 06:39:17 +00:00
Mark Spencer
9242c5c05e Add muted for malcolm!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-17 06:31:24 +00:00
Jeremy McNamara
adc4fbe921 nitpicky fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-17 02:05:27 +00:00
Mark Spencer
95ef751780 Fix compile for old builds
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-16 20:42:58 +00:00
Mark Spencer
e2dd1cc3da Add ability to look up callerid name by txt (bug #1442)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2986 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-16 18:12:16 +00:00
Mark Spencer
2dfb2d723f Fix callerid on quicknet stuff (bug #1613)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-16 17:54:53 +00:00
Mark Spencer
1feaac6a54 Allow defining a default context (bug #1658)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2984 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-16 17:52:24 +00:00
Mark Spencer
4fc75f6559 Ignore progress frames in request/dial (bug #1657)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2983 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-16 17:50:14 +00:00
Jeremy McNamara
e37c73ef97 add iLBC optimizations from bkw
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2982 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-16 17:35:51 +00:00
Jeremy McNamara
3c50e18f46 add new file README.h323 to help lower the signal-to-noise ratio
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2981 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-16 16:52:18 +00:00
Mark Spencer
ed443d08cf Timely packet removal and make valgrind happy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2980 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-16 16:31:42 +00:00
Jeremy McNamara
3794c9bfef add ./configure for the thick headed who can't read documentation...wait will they even read the README?
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2979 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-16 16:10:56 +00:00
Mark Spencer
1081dc05c2 Improve handling of multiple CANCEL requests
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2978 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-16 16:01:09 +00:00
Mark Spencer
72ca19339d Add indications for Chile
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-16 15:30:37 +00:00
Jeremy McNamara
83c46fb83e try to enable ringback on H.323->SIP calls (bug #1645) and clean up code a lil bit
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2976 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-16 07:04:48 +00:00
Mark Spencer
b8190d0e92 Make sure that we have the sin_family set to AF_INET for FreeBSD
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2975 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-16 05:53:33 +00:00
Mark Spencer
103034acf2 Add Taiwan support (bug #1599)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-15 23:32:07 +00:00
Mark Spencer
2742f2ca72 Don't worry about tones we can't send (bug #1652)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-15 22:53:55 +00:00
Mark Spencer
f222665d1d Fix timezone handling for FreeBSD
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2972 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-15 22:52:12 +00:00
Mark Spencer
70007e6095 Don't call out an FXO until at least 2 seconds after it was hungup.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2971 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-15 22:50:51 +00:00
Mark Spencer
694c1c0c9c FreeBSD compile fix (bug #1655)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2970 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-15 22:42:25 +00:00
Mark Spencer
d146b72e53 Fix typo in outgoing rfc2833 handling (bug #1646)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2969 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-15 16:26:52 +00:00
Mark Spencer
4d1137ded4 Fix a couple of small typos (bug #1648)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-15 15:40:08 +00:00
Mark Spencer
2293ad0b1f Update coding guidelines, fix "say.c" compile on older compilers, update coding guidelines (includes bug #1631)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2967 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-15 15:34:31 +00:00
Mark Spencer
f59f077d27 Fix logic in gethostbyname_r (bug #1634)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2966 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-15 05:02:42 +00:00
Ben Kramer
28c55ae8e3 / fixed up coding style to recommened
/ fixed timer start/restart bug
/ added disabling off loop-drop detection option
/ added "w" "f" Dial string translations
/ clean up of logging messages


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2965 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-14 04:39:16 +00:00
Mark Spencer
7254cca9f3 Really fix ast_gethostbyname
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2963 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-13 21:54:30 +00:00
Mark Spencer
50b637d1f9 Add polish support to say.c (bug #1629)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2962 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-13 21:39:43 +00:00
Mark Spencer
023939d65f Add taiwanese support for saynumber/datetime (bug #1615)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-13 20:06:27 +00:00
Mark Spencer
83a8b6745f Update documentation of asterisk -h (bug #1622)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2960 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-13 19:57:45 +00:00
Mark Spencer
baeb134536 Better document SIP (bug #1603)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2959 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-13 19:54:42 +00:00
Mark Spencer
c1b3b1d5b1 Lose all the "auth" stuff since we don't use it (bug #1627)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-13 19:51:54 +00:00
Mark Spencer
beae1fb946 Add events for join/leave (bug #1625)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-13 19:02:47 +00:00
Mark Spencer
6b0805633b Add linear file generator, CIRCQ emulation for BSD (bug #1626)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2956 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-13 19:01:10 +00:00
Mark Spencer
c9d3a81c3a Make sure we initialize attributes properly on thread (bug #1563)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-13 18:23:34 +00:00
Mark Spencer
dbb7b83ecc Minor memory cleanups, initialize peer/user invite status from global
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-12 23:35:50 +00:00
Jeremy McNamara
ed01d3b366 Turn off lamp on call completion, code cleanup and a couple other minor bug fixes.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-12 21:30:23 +00:00
Mark Spencer
88fa72f892 Fix FreeBSD compile (bug #1620)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-12 19:20:34 +00:00
Mark Spencer
1aba1bbca4 Minor cleanups (bug #1618 included)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-12 17:30:55 +00:00
Mark Spencer
10c25aa6d9 Put sip history stuff in (for real) and provide voicemail context (when not default) in some critical places (bug #1609)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-12 00:17:31 +00:00
Mark Spencer
34e400fe2b Refuse to gethostbyname on a pure integer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-11 18:41:09 +00:00
Mark Spencer
a7818fb1be German language improvements (bug #1606)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2948 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-11 18:23:48 +00:00
Mark Spencer
e753e1a460 Don't say "re-recording" on CLI.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-11 15:20:55 +00:00
Mark Spencer
fb80a4a397 Change "boundary" to be less likely to cause e-mail conflicts (bug #1602)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-11 15:03:52 +00:00
Mark Spencer
964565519c Increase max write size (bug #1601)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-11 15:00:28 +00:00
Anthony Minessale II
960c01e4c6 Patch Submitted by BKW on 5/10/2004 to chan_sip.c
Fixing 'show help' inefficency.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-10 18:45:20 +00:00
Mark Spencer
87e3b8b2ad Allow characterset to be specified (bug #1598)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2943 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-10 13:27:39 +00:00
Mark Spencer
230eb50e96 Set mimetype to lower case (bug #1597)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2942 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-10 13:18:12 +00:00
Mark Spencer
1bc23d416c Fix missing semicolons in sample configurations (bug #1596)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2941 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-10 13:16:09 +00:00
Mark Spencer
4b84c43811 More minor bkw fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2940 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-09 23:40:49 +00:00
Mark Spencer
22243ee9ae merge brian's cleanups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-09 22:03:38 +00:00
Mark Spencer
2d8c703fa0 Include app.h in senddtmf (bug #1594)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2938 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-09 21:07:38 +00:00
Mark Spencer
6ead43beb1 Add SIPUSERAGENT, SIPCALLID, and fix some formatting (bug #1593)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2937 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-09 21:05:43 +00:00
Mark Spencer
62eef7c695 Fix accidental strlen_zero mistransfer (bug #1592)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-09 20:46:18 +00:00
Mark Spencer
f2e0152108 Fix minor formatting problem
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2935 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-09 19:39:23 +00:00
Mark Spencer
25b07915d6 Remove "jitter"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2934 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-09 19:18:15 +00:00
Mark Spencer
811f5cff35 Merge Connor's ringback feature for queue (bug #1560)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-09 19:13:43 +00:00
James Golovich
c00550f3ae Add new file utils.c, Move ast_gethostbyname to utils.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2931 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-09 08:22:15 +00:00
James Golovich
8ef3b1544b More ast_strlen_zero changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-09 07:51:44 +00:00
James Golovich
3e3642433b Code formatting fixes in pbx.c (still more todo)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-09 07:19:00 +00:00
James Golovich
aff78a98cf Fix null pointer dereference in app_groupcount.c (bug 1588)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2928 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-09 06:23:30 +00:00
Mark Spencer
d2a4408930 Show peers formatting fixes, SIP strlen optimizations, and using ACL for local network matching (bugs #1587, 1586, 1585, 1584)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2927 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-08 20:58:24 +00:00
Mark Spencer
9740f51d00 Update default astman types for newer newt (bug #1578)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2926 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-08 20:41:27 +00:00
Mark Spencer
812b527dd8 Add Spanish support to say date with format (bug #1583)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-08 15:47:01 +00:00
Mark Spencer
297e62b8be Copy musicclass to right field (bug #1582)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2924 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-08 14:45:49 +00:00
Mark Spencer
3189e70baa Allow notransfer to be a global option
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2923 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-08 14:38:48 +00:00
Mark Spencer
dca37d634e Add missing unlock (although it shouldn't make a difference)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2922 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-08 14:24:58 +00:00
James Golovich
29718a5001 ast_strlen_zero changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2921 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-08 08:07:47 +00:00
Mark Spencer
0ce20fea8a Do proper PRI locking in zt_call (not to mention lock the zt_pvt structure itself)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2920 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-07 21:22:46 +00:00
James Golovich
46b24e8a27 Code cleanup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2919 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-07 21:14:55 +00:00
Anthony Minessale II
66b96f417c Created API call ast_dtmf_stream
int ast_dtmf_stream(struct ast_channel *chan,struct ast_channel *peer,char *digits,int between)

changed app_senddtmf.c to use this new call
added D() parameter to app_dial to allow post connect dtmf stream to be sent using above call

-Tony


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2918 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-07 20:39:14 +00:00
Mark Spencer
b974395573 Check h_addr_list, too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-07 20:18:55 +00:00
Mark Spencer
1057e70da0 Check that hp->h_addr is not NULL before returning success (bug #1576)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2916 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-07 20:15:45 +00:00
Mark Spencer
1d7c058f08 Add sip show peers (trivial zap fix, too) bug #1573
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2915 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-07 18:57:17 +00:00
Mark Spencer
36911830dd Add debugging to failure
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2914 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-07 14:08:50 +00:00
Anthony Minessale II
2fbee61fff make channel.c use autoservice_start/stop when playing warning sound files
during bridged calls.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-06 22:29:00 +00:00
Mark Spencer
76adf66390 Add "sip show subscriptions" command (bug #1569)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-06 21:30:45 +00:00
James Golovich
c94e23b2f6 Use ast_strlen_zero in file.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2911 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-06 21:17:06 +00:00
James Golovich
28f4e820f7 Use ast_strlen_zero in channel.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2910 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-06 21:04:22 +00:00
James Golovich
6f9829fa5e Use ast_strlen_zero in cli.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2909 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-06 20:49:24 +00:00
Mark Spencer
6d280193d6 Fix silly typo in iax2 where strlen was used instead of sizeof
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2908 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-06 20:39:31 +00:00
James Golovich
bb8d1dbb3a Use ast_strlen_zero in logger.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2907 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-06 20:23:48 +00:00
James Golovich
f1d0d949dc Use ast_strlen_zero in cdr.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2906 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-06 20:21:06 +00:00
Mark Spencer
efc8c74b9a Allow global authentication realm to be set (bug #1567)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-06 20:00:19 +00:00
Mark Spencer
5f2dc3fe14 Enhance Spanish and Mexican support (bug #1566) thanks!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-06 19:40:13 +00:00
Mark Spencer
05a87a441c Don't autodestruct on semi-ack. We'll add it as we need it case-by-case.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-06 14:41:03 +00:00
Jeremy McNamara
9c5c609de2 fix formatting, from bkw
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2902 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-06 03:20:05 +00:00
Mark Spencer
ab3c603b1c If user fails host access, search for peers too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-06 01:33:24 +00:00
James Golovich
be1efdbf89 include utils.h in chan_iax2.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-05 22:13:27 +00:00
James Golovich
960f681dec Use ast_strlen_zero in chan_iax2.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2899 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-05 21:14:36 +00:00
James Golovich
995468ea0a Include utils.h in chan_skinny.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2898 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-05 05:16:42 +00:00
Jeremy McNamara
ecbd983648 use ast_strlen_zero
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2897 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-05 05:03:48 +00:00
James Golovich
2bda857bf7 Use ast_strlen_zero in chan_zap.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-05 04:23:18 +00:00
Mark Spencer
6f3dd86f22 Ignore dupe packets for RFC2833 (bug #1034)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2895 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-05 03:56:27 +00:00
Mark Spencer
cc1da2eb5b Qualify that SIP INFO stuff is real (bug #1558)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-05 01:56:03 +00:00
Mark Spencer
cc9ffa5ac1 Fix SIP autohangup mishap
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2893 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-04 20:10:37 +00:00
Mark Spencer
9cc62f6461 Print route when doing sip show channel foo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2892 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-04 19:41:31 +00:00
Mark Spencer
6ac10272bc Make sure we don't accidently send weird delivery times on DISA
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2891 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-04 19:20:20 +00:00
Mark Spencer
19a080ddd7 strlen fixes and don't destroy SIP channels that still have pending things on them (bug #1552 et al)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-04 19:11:25 +00:00
Mark Spencer
fdec9012eb Documentation fixes (bug #1554).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-04 16:33:31 +00:00
Mark Spencer
67c11acbbf Add app_groupcount to manage groups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2888 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-04 16:09:35 +00:00
Mark Spencer
a5ad1269ef More strlen_zero checks (bug #1549)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2887 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-04 14:54:42 +00:00
Mark Spencer
958668f001 Fix swedish, german, and french support for say number (bug #1550)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2886 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-04 14:33:27 +00:00
James Golovich
5acaa777b8 Change strlen calls to ast_strlen_zero in callerid.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2885 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-04 06:42:06 +00:00
James Golovich
9bb1b64d48 Change strlen calls to ast_strlen_zero in pbx.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2884 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-04 06:34:34 +00:00
Mark Spencer
cf0659f7af More expression fixes (bug #1548 again)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-04 03:23:35 +00:00
Mark Spencer
e158ab2fe9 Clean agi-sphinx-test (bug #1547)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2882 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-04 01:46:01 +00:00
Mark Spencer
5098302f2f Update for backwards compatability (bug #1548)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2881 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-04 01:45:00 +00:00
Jeremy McNamara
e8ed258aa4 use ast_stren_zero
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2880 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-03 22:19:03 +00:00
Mark Spencer
b4a674e0ac Add swedish support, fix german support (bug #1543)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2879 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-03 21:10:57 +00:00
Mark Spencer
d4c439c61d Use strlen_zero function in chan_sip (bug #1545)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2878 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-03 21:01:14 +00:00
Mark Spencer
9c683b7423 Fix compiler warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2877 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-03 21:00:20 +00:00
Mark Spencer
ca2069a246 Don't update route once it's set (bug #1491)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2876 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-03 20:06:38 +00:00
James Golovich
07a40f5141 Oops, actually use the right variable in channels/Makefile
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-03 19:29:52 +00:00
James Golovich
3b3674807b Fix channels/Makefile so USE_MYSQL_FRIENDS implies USE_SIP_MYSQL_FRIENDS
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2874 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-03 19:14:50 +00:00
Mark Spencer
bbaf536f6a Add "insecure=very" where we don't authenticate peers who are registered
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2873 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-03 05:14:52 +00:00
Mark Spencer
b50ecc25b2 Merge slepp's sub-second expiration timer although hopefully it will never have to be used.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2872 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-03 05:03:19 +00:00
Mark Spencer
f2ccbc81d9 Internationalize say_date_time, fix small pbx_config seglet (bug #1537)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2871 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-03 04:38:31 +00:00
James Golovich
5537e1ad17 Change strlen calls to ast_strlen_zero in voicemail checking stuff because it is called all the time
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-03 04:37:03 +00:00
Mark Spencer
0e89f839e1 Make directory spell name if available
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-03 04:36:46 +00:00
James Golovich
131a8c8f53 Add include/asterisk/utils.h file. Which includes the function
ast_strlen_zero, which should be used instead of strlen to check if a
string has length or doesn't have length.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-03 04:31:11 +00:00
Mark Spencer
603511ea6f Merge BKW's mp3 improvements
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-03 03:32:04 +00:00
Mark Spencer
ded7dae112 Merge slepp's REGISTER RFC compliance fixes (bug #1538)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-03 02:22:19 +00:00
James Golovich
8c05e4677e Code formatting cleanup in channel.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2865 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-03 02:02:27 +00:00
Mark Spencer
73b389da6c Add SayPhonetic and SayAlpha applications (bug #793)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-03 00:54:16 +00:00
James Golovich
09eeb42315 Add doc/CODING-GUIDELINES document
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2863 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-02 19:24:05 +00:00
Mark Spencer
e05b6242a5 Merge Tilghman's color patches for the asterisk prompt (bug #1535)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2862 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-02 19:13:16 +00:00
Mark Spencer
c3c38eeeaf Let OSS know how to deal with indication -1
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2861 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-02 17:52:45 +00:00
Mark Spencer
6cdbd6903c On a reload, don't stop supporting sip if we can't find our ip.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2860 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-02 17:43:15 +00:00
Mark Spencer
503dbb3d8a Add new "authname" field so we can authenticate BYE properly on incoming calls (bug #1436)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2859 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-02 16:30:05 +00:00
Mark Spencer
35ca4404f0 On incoming call, set peername to username to properly authenticate BYE (it's not used for anything else, as far as I know)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-02 16:17:40 +00:00
Mark Spencer
ee0532702a Merge Matteo's language setting code for iax2 (bug #1476)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2857 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-02 06:36:31 +00:00
Mark Spencer
44de97d496 Provide more fine grained control of sip and iax show peers (bug #1470)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2856 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-02 05:38:20 +00:00
Mark Spencer
9d1e203b3d Merge murf's generous expression contributions (bug #1292)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2855 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-02 04:09:35 +00:00
Mark Spencer
cb59df7bed Make overlap dial be interpreted in the same way an FXS would be (bugs #1080 and #1452)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2854 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-02 03:39:17 +00:00
Mark Spencer
70d5cd0210 Add new zealand tone definitions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2853 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-02 02:16:46 +00:00
Mark Spencer
3c134b6549 Revert earlier changes. The right answer for bug #1436 should be using username=
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2852 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-02 00:51:11 +00:00
Mark Spencer
511816a56d Allow "fast" asynchronous manager initiation of events (bug #772)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-01 23:52:27 +00:00
Mark Spencer
3ad6ed3e92 Add ability to specify custom e-mail subject line (bug #1291)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-01 23:28:33 +00:00
Mark Spencer
9144ad4883 Further minor fixup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-01 22:29:54 +00:00
Mark Spencer
00c2c1b70e Merge german say number enhancements (bug #1532) thanks!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2848 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-01 22:14:42 +00:00
Mark Spencer
307168cc0f Merge sbinger's voicemailf ixes for duration and short files (bug #1282) thanks!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-01 22:11:58 +00:00
Mark Spencer
58a42e51e2 Fix wrap error
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-01 21:42:11 +00:00
Mark Spencer
5b34d11ce9 Allow debug to be enabled on a per-peer or per-IP basis (bug #850)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2845 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-01 21:25:31 +00:00
Mark Spencer
1dbc8e3f0e Rid compiler warning, make information meaningful in sip debug for codecs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-01 20:59:37 +00:00
Mark Spencer
3d775d9286 Correct loadavg documentation (bug #1305)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2843 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-01 15:23:35 +00:00
Mark Spencer
faaef0fbe3 Add DTX support (mark bit) (bug #1234)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-01 15:18:28 +00:00
Mark Spencer
ff7f09ecc7 Add documentation for CLI prompt
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-01 14:49:36 +00:00
Mark Spencer
0a457907fe Improve mp3 player quality (bug #1527)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2840 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-01 14:03:37 +00:00
James Golovich
73b62ab0f6 Add HasVoicemail application (bug 1520)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2839 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-01 05:54:50 +00:00
James Golovich
0122a3ea08 Fix 'remove extension' completion
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2838 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-01 05:50:51 +00:00
James Golovich
c432265ab7 format_ilbc.c comment fix from bkw
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2837 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-01 04:19:56 +00:00
Mark Spencer
b773853b03 Put poll in a loop forever when not doing anything else.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2836 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-01 03:14:02 +00:00
Mark Spencer
3d16691c9e Revert routing change
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2835 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-01 03:04:04 +00:00
Jeremy McNamara
770796275d Document usage of PGSQL. Bug#1486
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2834 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-30 05:27:35 +00:00
Jeremy McNamara
a717d81cea Increase DTMF duration in f.sample, just in case. Bug#1414
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2833 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-30 05:21:36 +00:00
Mark Spencer
ec6644c146 Only clear route if we have a new one
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-30 04:05:22 +00:00
Jeremy McNamara
93fd179b4c correctly stay in admin menu until user wants out (bug #977)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-30 02:29:56 +00:00
Jeremy McNamara
a3803a3c93 rollback bug#77..the right fix immanent
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-30 02:08:12 +00:00
Anthony Minessale II
489656458f update astxs to default /usr/src/asterisk
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-30 02:07:29 +00:00
Mark Spencer
30e9661919 Stay in admin menu until user wants out (bug #977)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-30 01:18:26 +00:00
Mark Spencer
3e48f862a7 Work properly with USE_SIP_MYSQL_FRIENDS set to 1 for linking
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2826 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-30 01:09:52 +00:00
Mark Spencer
722f92e834 Say "message 1" in title (bug #1521)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-30 00:25:07 +00:00
Mark Spencer
d106797a26 Add relaxdtmf option to sip
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2824 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-29 22:27:40 +00:00
Malcolm Davenport
6f9df58afe Bug # 1503: Add Peter's fix to include "accountcode" support to MySQL based IAX-Friends
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2823 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-29 20:09:05 +00:00
Anthony Minessale II
66498eee0b update astxs utility to allow auto load/unload and url compile
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2822 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-29 19:55:46 +00:00
Anthony Minessale II
1f21ca187a add seconds.gsm for call timeout warning feature (bug 1353)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-29 14:14:27 +00:00
Mark Spencer
c7df3b4b22 Even better, let it be specified per-context
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-29 13:53:38 +00:00
Mark Spencer
da010f1600 Add ability to customize directory introduction (bug #1488)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2819 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-29 13:50:29 +00:00
Jeremy McNamara
709e526ad9 populate global options correctly. Bug#1515
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-29 13:34:54 +00:00
Mark Spencer
cd788e2ab9 Handle fromdomain properly when there is no @ sign
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-29 05:01:32 +00:00
Mark Spencer
01f39a3e51 Use -1 not NULL
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2816 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-29 04:41:37 +00:00
Mark Spencer
1622c57f07 Add russian indications (bug #1471)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2815 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-29 04:22:51 +00:00
Mark Spencer
a46999cf0d Loader fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-29 04:13:06 +00:00
Mark Spencer
b34020d5a6 Don't propsoe sotp now on empty read (bug #1511)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-29 03:39:36 +00:00
Mark Spencer
4f51ef7ab7 Unbuffered music on hold
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2811 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-29 03:36:46 +00:00
Mark Spencer
ec8a80b070 Send ActionID in response ot action command (bug #1484)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-29 02:59:29 +00:00
Mark Spencer
5192a1a054 Add support for French, Danish, Portuguese, Spanish, Italian, and Dutch numbers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-29 02:30:14 +00:00
Mark Spencer
7e79c52808 Don't double receive INFO or MESSAGE elements (bug #1512)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-28 22:12:08 +00:00
Mark Spencer
314877e155 Fix potential seg in iax2 from reload when registrations are going
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-28 22:07:59 +00:00
Mark Spencer
da8f6a9acf OpenBSD portability to H323
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-28 21:06:29 +00:00
Mark Spencer
e5059cb891 Add revk's SMS application (bug #1437). Thanks!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-28 20:43:06 +00:00
Mark Spencer
ebba5fd9af Make paths not absolute
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-28 20:37:52 +00:00
Mark Spencer
e6b464ed23 More FreeBSD fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-28 19:55:04 +00:00
James Golovich
33faf463a0 Make sure causes.h can only be included once. Not that any code does this now, but it could in the future.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-28 18:09:00 +00:00
James Golovich
ceb572a280 ast_frdup optimization: only call strlen once and save the result
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-28 17:54:01 +00:00
James Golovich
8ace87616e Optimize inaddrcmp (a little) by making it inline
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2800 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-28 17:28:35 +00:00
Mark Spencer
ffe885b21f Trivial portability fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-28 15:29:26 +00:00
Mark Spencer
b18913b338 When creating a new DSP, initialize the progress zone just in case
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-28 14:55:38 +00:00
Mark Spencer
fd9d8ca43b Run setstate after setting all appropriate variables including callerid
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-28 14:35:20 +00:00
Mark Spencer
882411586a Add Peter's SQL complaint script (bug #1482)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2795 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-28 13:58:19 +00:00
Mark Spencer
90a331f7a5 Provide gethostbyname_r emulation for FreeBSD and fix zap call to setstate to include callerid (bug #1411, #1498)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-28 13:53:01 +00:00
Mark Spencer
478474bcb1 Merge bug 1483 -- advanced voicemail options
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-28 04:33:16 +00:00
Mark Spencer
19064660d2 Build again without PRI
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-28 04:26:26 +00:00
Mark Spencer
0fe6d16e89 Fix deadlock in IAX2 trunking, small MGCP fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-28 04:23:14 +00:00
Mark Spencer
7ca96ea7e5 Add white space condensing to pedantic mode of chan_sip.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-27 22:32:57 +00:00
Mark Spencer
5f71712b8b Make sure we are proceeding when we answer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-27 21:50:24 +00:00
James Golovich
6cbc92b760 Portability fix, use the shells path for sed and env
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2787 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-27 21:30:32 +00:00
James Golovich
286d0656e2 Revert formatting changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-27 21:21:57 +00:00
Mark Spencer
f34b684e0e Improve responsiveness of MGCP during a reload (bug #1488)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-27 21:18:02 +00:00
Anthony Minessale II
f9226cd9cd Bug Fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-27 16:42:43 +00:00
Mark Spencer
7596de9ac8 Extreme IAX2 trunking performance improvements
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-27 15:18:55 +00:00
Anthony Minessale II
5385ca0a0e applied final release of bug 1353 per Mark's permission
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2782 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-26 23:22:34 +00:00
Mark Spencer
f4b55b802c SIP cleanups for database linkage
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2781 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-26 14:54:33 +00:00
Mark Spencer
0d048dee56 Use insmod instead of modprobe (bug #939)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-26 13:53:31 +00:00
Mark Spencer
6726488e48 Allow two contexts to be specified for directory application (reimplementation fo bug #643)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2779 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-26 13:48:56 +00:00
Mark Spencer
3b64c4830f Unify all the res_ninit patches
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-26 13:32:57 +00:00
Mark Spencer
add7cf7ded Move skinny to support poll
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-26 12:51:49 +00:00
Mark Spencer
6b55f06a23 vmail.cgi updates
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2776 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-26 12:41:42 +00:00
Mark Spencer
2b5a352840 Avoid another voipme by explaining you need CVS update when SIG_EM_E1 is invalid
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2774 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-26 12:30:28 +00:00
Mark Spencer
2a3fc7b8ea Remove obsolete chan_zap_old.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-26 12:27:00 +00:00
Mark Spencer
1511750650 Use proper token for authenticating BYE
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-26 12:26:02 +00:00
Mark Spencer
cce37f8d32 Hold call structure longer iwth find_callno
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-26 11:38:21 +00:00
James Golovich
69f5623a03 Make redhat init.d script call asterisk to reload instead of forcing a restart (bug 1481)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-26 07:06:29 +00:00
James Golovich
7567113e71 Make RemoveQueueMember and AddQueueMember jump to priority + 101 (bug 1022)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-26 06:57:15 +00:00
James Golovich
9c13bd8884 Change iaxtel entry in sample extensions.conf to use XXXXXXX instead of NXXXXXX because iaxtel assigns numbers that have a NPA starting with 1
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-26 05:47:45 +00:00
Mark Spencer
30a7162bd9 Merge JS's Cisco MGCP fixes (Bug #693)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-26 05:18:55 +00:00
Mark Spencer
f85d0713cf Clean up SQL queries (bug #1479)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2766 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-26 05:08:30 +00:00
Mark Spencer
64c9e859e0 Also handle properly \r\n instead of just \n...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2765 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-26 03:45:10 +00:00
Mark Spencer
ed360fcf57 Committed a little bit too quickly there...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-26 03:41:07 +00:00
Mark Spencer
c924d1a322 First pass at handling multi-line headers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2763 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-26 03:38:32 +00:00
Mark Spencer
ce44c6ec41 More select/poll updates for various applications
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-26 03:02:49 +00:00
Mark Spencer
459fda5e44 Migrate chan_zap from select to poll
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2761 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-25 22:37:09 +00:00
Mark Spencer
435e55958f Properly migrate from select to poll for core asterisk.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-25 20:42:45 +00:00
James Golovich
0eca3cf384 Start with a reasonable default timeout in parkandannounce
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2758 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-25 19:44:03 +00:00
Mark Spencer
b9604cde6c Temporarily revert poll changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2757 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-24 23:11:28 +00:00
Mark Spencer
470f226d9d Change select references to poll in core asterisk functions (hope this works)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2756 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-24 23:02:21 +00:00
Mark Spencer
8a411edf9f Make sure call is valid when handling mini-frame.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2754 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-24 15:16:48 +00:00
Mark Spencer
243a3df832 Improve echo cancellation in iaxy firmware (version 14)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-23 15:54:57 +00:00
Mark Spencer
90778ada6d Fix timestamps on IAX2 trunk mode transmit direction
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2752 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-23 05:35:12 +00:00
Mark Spencer
7bf0c1bc45 Fix double close of file descriptor (bug #1473)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-23 04:38:11 +00:00
Mark Spencer
f9aef7098f Oops that wasn't quite right. Partially revert changes until real data is collected.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-22 19:16:52 +00:00
Mark Spencer
ba078042ba Make trunking and timestamps palce nicely
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-22 18:51:42 +00:00
Mark Spencer
3534419f14 Add missing break
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-22 18:41:11 +00:00
Mark Spencer
025ae183eb Fix swap_subs for better locking
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-22 16:02:56 +00:00
James Golovich
6534f4d668 Fix some comments in chan_zap
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2745 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-22 05:24:50 +00:00
Mark Spencer
0d9adb7294 Oopsies
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2742 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-22 05:11:11 +00:00
Mark Spencer
d851db3cee Small fixes from bkw
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2741 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-22 03:39:54 +00:00
Mark Spencer
a640df56e6 Fix iLBC with valgrind, add iLBC format from bkw_
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2740 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-22 03:34:13 +00:00
Mark Spencer
17563e2929 Handle transitions in delivery time and non-delivery time
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2739 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-22 03:02:27 +00:00
James Golovich
12bcd39583 Typo in logger.c (bug 1466)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2737 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-22 02:57:10 +00:00
Mark Spencer
e30e0c5135 Use ast_strdupa instead of strdup in goto (bug #1465)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-22 00:27:48 +00:00
Mark Spencer
d3f9887589 gethostbyname isn't reentrant, who knew...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-22 00:20:34 +00:00
Mark Spencer
ca493a14e1 Increase buffer size (bug #1459)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-21 21:55:40 +00:00
James Golovich
250c1d2068 Make manager "Link" and "Unlink" events include the channel uniqueids (bug 1456)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-21 04:52:18 +00:00
James Golovich
65c3fe8b33 Unload g726 file formats in the order they were loaded (bug 1460)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-21 04:27:58 +00:00
James Golovich
fe9255a816 Log when we unload a translator (bug 1460)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2730 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-21 04:26:38 +00:00
James Golovich
0f3f7eee9a Log that we are unregistering cdr module (bug 1460)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-21 04:25:44 +00:00
James Golovich
22411494aa image unregister typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2727 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-21 03:54:25 +00:00
James Golovich
fcf07fce61 Fix format unregister
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-21 03:53:15 +00:00
Jeremy McNamara
87e84064d2 rollback to pre-janus, for the moment
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-21 02:28:05 +00:00
Mark Spencer
0134d2cc85 Select user by more logical grounds when no user is specified (bug #1458, sorta)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-21 00:33:09 +00:00
Mark Spencer
c984a64f3e Documentation fixes (bug #1439)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-20 23:31:13 +00:00
James Golovich
f864caba2f Add app_exec (bug 1198
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-20 20:05:14 +00:00
Mark Spencer
0709926b82 Don't spam 3389 warning message
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2720 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-20 19:23:08 +00:00
Mark Spencer
8f86c8409d Don't dereference consumed frame delivery.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-20 15:28:58 +00:00
Mark Spencer
ef89a2709a Fix pingtime calculation in bridge optimized mode
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2718 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-20 15:14:06 +00:00
Mark Spencer
c96b093a58 Update australian tonezones.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-20 14:01:13 +00:00
Mark Spencer
b54d2b2c38 Make sure we safely lock both channels when doing a masquerade.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2716 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-20 03:16:01 +00:00
Jeremy McNamara
50edb67fc4 update once again to the right version
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2715 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-19 23:47:34 +00:00
Mark Spencer
776a66f5db Merge Matt's extern notify patch
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-19 23:27:37 +00:00
Mark Spencer
8a7f4bcd7a Hold the lock properly on async goto now that we have recursive mutex support.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2713 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-19 23:00:50 +00:00
Mark Spencer
8e0f9147b2 Fix trailing slash problem (Zap) and making sure refers get ignored the second tiem around.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2712 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-19 22:55:35 +00:00
Mark Spencer
a84bb950fa Fix lock initialization in lock debugging mode
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-19 21:52:39 +00:00
Jeremy McNamara
e9ea9975de Make comptable with Open H.323's Janus release. See http://www.sf.net/projects/openh323/ for details. These changes will cause any version less than Janus to fail at compile time. This update may also address the recent instability noise...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2710 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-19 19:47:27 +00:00
Mark Spencer
7a8ec5bea4 Always give real timestamps on IAX ping/pong messages
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2709 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-19 15:24:51 +00:00
James Golovich
98533cbccc OpenBSD portability enhancements (bug 1002)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2708 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-19 08:11:51 +00:00
James Golovich
36a13f931a Make 'iax2 show users' print key if a key is used (bug 1253)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2707 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-18 21:53:13 +00:00
James Golovich
295ce9fc8d Make extension matching non case sensitive. So 'T' and 't' are
different extensions (bug 1327)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-18 05:50:55 +00:00
James Golovich
e7f819bed1 Fix compile warning in chan_zap if libpri not installed
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-17 23:48:19 +00:00
Anthony Minessale II
34e415222e * Patch to Makefiles to allow a script to query the make envirnoment.
* contrib/scripts/astxs (The tool itself)
* see bug 1329

-Anthony Minessale (anthm)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2702 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-16 18:57:07 +00:00
Mark Spencer
d8a6763be4 Add support for E1 E&M
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-16 18:00:00 +00:00
Jeremy McNamara
2d232c4c57 Remove all capabilities first
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2700 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-16 05:57:30 +00:00
Mark Spencer
1487d749fe Answer if it needs it...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2699 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-16 02:51:47 +00:00
Mark Spencer
74de37e81e Warn to use DeadAGI in general on hungup channels if AGI or EAGI is called.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2698 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-15 21:01:55 +00:00
Mark Spencer
ec6d3b535a Don't set the address with NAT mode if we haven't programmed an address
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-15 20:12:46 +00:00
Mark Spencer
698b0b090b Make substring deprecated
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-15 18:41:17 +00:00
Mark Spencer
a3d9d7b58b Do proper bounds checking in formats (bug #1356)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2694 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-15 16:02:42 +00:00
Mark Spencer
de51a91db3 Fix for uclibc
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-15 00:13:30 +00:00
Mark Spencer
97dd838cda Fix name properly
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-15 00:02:07 +00:00
Mark Spencer
02287658f7 Store modules in the order they're loaded to make reload work properly
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-14 21:10:00 +00:00
Mark Spencer
083d9c8039 Clean up timestamps on IAX2
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2690 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-14 18:15:16 +00:00
Jeremy McNamara
5ebb0b8c15 Lets see if this way works to remove all capabilities from the list
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-13 19:07:51 +00:00
Jeremy McNamara
64d509a931 back out lame attempt
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-13 18:54:24 +00:00
Jeremy McNamara
9cb2272494 print out capability set, if h323debug is turned on
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2686 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-13 18:32:23 +00:00
Jeremy McNamara
d3f45d14b3 make sure capability set is clean before setting new value(s)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-13 18:26:27 +00:00
Mark Spencer
7ed519ba84 Use fputs where it makes sense instead of fprintf
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-13 04:45:51 +00:00
Mark Spencer
c512310934 Don't allow the format to be doubly handled
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2681 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-13 04:27:06 +00:00
Mark Spencer
e15b5a83d5 Lock on indication too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-12 22:00:12 +00:00
Mark Spencer
fec02c20a9 Revert locking changes which break static locks (even on linux since it's part of an ENUM not define)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2679 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-12 20:54:24 +00:00
James Golovich
63702b9a78 Change mutex defines so it should work on OS that don't have the _NP mutex types. Also move the #defines up so we don't need to duplicate them
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-12 19:56:32 +00:00
Mark Spencer
a8fb88516a Fix implementation of waitfordigit_full
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-12 16:25:34 +00:00
Mark Spencer
694cacc93d Fix cut properly (bug #1138)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-12 16:08:20 +00:00
Mark Spencer
d2019972f7 Revert earlier jcdutton ALSA improvements which are not disclaimed
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-11 01:59:11 +00:00
Mark Spencer
f2ee5d3a80 Don't hang up if the file is missing (not a bug, but fix anyway) (#1380)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-10 21:10:22 +00:00
Mark Spencer
43d7359221 Don't check PRI settings unless there is PRI
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2672 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-10 03:46:59 +00:00
James Golovich
ae07b8ee83 Allow zapscan to select a specific channel (bug 1371)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2671 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-10 02:49:06 +00:00
James Golovich
fcf76b36aa Hopefully last fix to remote cli completion
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2669 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-09 17:46:04 +00:00
Mark Spencer
639438836b Don't take digits in-band when in overlap dial mode
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2668 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-09 16:33:37 +00:00
James Golovich
cbd5a0e6bb Fix sounds.txt to have extensions for recently included sound files
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2667 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-09 00:15:34 +00:00
James Golovich
9cb145c44c Add sound files for dynamic conf stuff (bug 1026)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2666 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-08 19:38:47 +00:00
James Golovich
4d7386fc5f Add ability to do PINs with dynamic conf (bug 1026)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-08 19:38:26 +00:00
James Golovich
8f591d1b71 Add new sounds text for conf mod (bug 1026)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-08 19:38:02 +00:00
James Golovich
e9c65d0c08 Hopefully the last round of removing needlock stuff
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-08 19:28:05 +00:00
James Golovich
1b2dc7ef75 Remove more needlock stuff
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2662 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-08 19:19:24 +00:00
James Golovich
0f2bcccaba Free some cli memory
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2660 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-08 05:28:53 +00:00
Mark Spencer
6cde9d87a3 Turn off MOH later rather than sooner.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2659 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-08 05:03:47 +00:00
Ben Kramer
61ff225f1d updated to work with change by markster: Get rid of all that old needlock garbage now that we're using recursive mutexes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2658 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-08 00:59:39 +00:00
Mark Spencer
50edc08001 Fix SendDTMF which was clearly not even tested before it was last committed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2657 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-07 20:14:19 +00:00
James Golovich
0b2a9dc297 Remove extra argument from ast_set_*_format calls
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-07 20:12:42 +00:00
James Golovich
f7b250f963 Fix command completion and remove compile time warnings
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-07 18:26:24 +00:00
Mark Spencer
78641613c7 Add sendtext application
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-07 17:19:25 +00:00
Mark Spencer
42034844dc First pass at fixing chan_alsa
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-07 16:46:39 +00:00
Mark Spencer
d45addcc7a Fix compile warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2651 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-07 16:17:31 +00:00
Malcolm Davenport
df9089d3f8 More changes to Matt's application
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2650 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-07 16:16:56 +00:00
Mark Spencer
6938bb6109 fix chan_oss for revised queue structure.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-07 15:59:14 +00:00
Mark Spencer
5a2c606d94 Keep random data around, we'll need it for certain bogus REGISTER and INVITE network hiccups (bug # 1236)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-07 15:09:58 +00:00
Mark Spencer
a3d396b11b Remove double unlock from ast_read
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-07 14:43:18 +00:00
Mark Spencer
a1ffc320e4 Don't say we're unable to find the channel if we're able to find it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2646 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-07 14:11:49 +00:00
Mark Spencer
512583709a Fix double parking crash (bug #1302)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2645 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-07 04:11:00 +00:00
Mark Spencer
13bca43aa8 Get rid of all that old needlock garbage now that we're using recursive mutexes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-06 22:17:32 +00:00
Malcolm Davenport
d0037ea2fd Add Matt's option to call an external application when a voicemail is
left


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-06 21:52:42 +00:00
Mark Spencer
6b09ce4336 Don't redefine ast_mutex_init
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2642 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-06 20:57:15 +00:00
Mark Spencer
584936aa9b Update locking for non-debug mode, too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-06 20:35:55 +00:00
Mark Spencer
672e3e49fb Bite the bullet and require RECURSIVE mutexes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-06 20:08:44 +00:00
James Golovich
1d8f780f45 Include inttypes.h in md5.h instead of stdint.h (since stdint.h contains the right info on freebsd and on linux inttypes.h includes stdint.h) (bug 1369)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-06 18:20:30 +00:00
Mark Spencer
d3bcf405c2 Small IAX fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-06 15:55:40 +00:00
Mark Spencer
426bf55df2 Print actual hook state in chan_zap
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-06 15:50:18 +00:00
Mark Spencer
1bbf0d2cf6 Bump branch id on INVITE with auth (bug #1313)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-06 14:02:47 +00:00
James Golovich
8cfed866d3 Remove size restiction on remote console command completion (bug 1360)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2634 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-06 07:42:01 +00:00
Mark Spencer
852422f4ab Add "WaitExten" application
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-06 04:14:19 +00:00
Jeremy McNamara
528c513602 swap out printf's for ast_verbose
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2632 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-06 03:43:43 +00:00
Mark Spencer
1cf4ea2eb3 Don't translate time for packets with no delivery
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-05 20:47:44 +00:00
Jeremy McNamara
70dfab8be0 on outbound calls make sure we use requested codec
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-05 20:45:14 +00:00
Mark Spencer
f897350521 Fix timestamps for codec translations with different sized frames
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-05 19:45:53 +00:00
James Golovich
b5da1073b0 Allow manager.conf to use port and portno, but log that portno is deprecated.
(bug 1343)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-05 19:40:30 +00:00
James Golovich
dc383a7ee7 Make outgoing call spool only consider # a comment if at the beginning of a line or following whitespace (bug 1346)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2625 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-05 18:03:40 +00:00
Ben Kramer
09e0fc2074 / implemented basic group'ing, as per chan_zap
/ reformated whole file to consistent format


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2624 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-05 05:37:01 +00:00
Mark Spencer
940a5deb2e Support some more SIP idiocies
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-05 05:12:00 +00:00
James Golovich
aacc5e108b Only update utime in pbx_spool.c if the file exists
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2621 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-05 02:47:48 +00:00
James Golovich
1cf0d5ad9d Make pbx_spool update utime with every safe_append
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2619 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-05 00:00:23 +00:00
Mark Spencer
9f726fce46 603 is a busy too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2618 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-04 22:54:35 +00:00
Mark Spencer
d051e2da43 Recognize + as a valid part of a phone number
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2617 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-04 22:14:10 +00:00
Mark Spencer
94279f00c1 Various video fixes (bug #688)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-04 21:54:38 +00:00
Mark Spencer
ef1f39d29e Save appl and data around exec (bug #1301)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2615 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-04 21:30:24 +00:00
Mark Spencer
9c7ffa265e Fix small SIP issue with SER (bug #1181)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2614 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-04 21:09:22 +00:00
Mark Spencer
9cc3adbdd9 Clear out delivery fields just in case
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-04 20:43:07 +00:00
Mark Spencer
d42f7886ab Merge changes from jcdutton (thanks!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2612 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-04 17:21:03 +00:00
Mark Spencer
e2b0f32c18 Minor samples updates
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2611 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-04 16:33:56 +00:00
Mark Spencer
52f13283ea Make chan_zap allocate a comfortable amount of space for VMWI
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-04 02:02:15 +00:00
Mark Spencer
7d2624dd3c Wait a half a second before sending VMWI...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-04 02:00:19 +00:00
Mark Spencer
7ae1d61120 Provide more useful debugging on retries and scheddestroy()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2608 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-04 01:55:16 +00:00
Mark Spencer
39c9375eef Fix minor typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2607 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-03 22:59:12 +00:00
Mark Spencer
cdb1b1dba3 Merge Mike's updates for agent CDR updates
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-03 00:41:47 +00:00
Mark Spencer
3d61f5f20e Don't double lock the stream
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2605 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-02 23:25:24 +00:00
Mark Spencer
59859d8cc2 Fix generator race (bug #1202)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-02 21:58:10 +00:00
Mark Spencer
b285cd40b2 Keep REGISTER dialog open a little longer in case they don't get our 200 OK right away...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-02 21:43:07 +00:00
Mark Spencer
3415434e04 When going to in-band, be sure to allocate DSP (bug #1336)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2602 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-02 14:40:21 +00:00
James Golovich
36a8fb3e4d Make app_dial complain if the timeout passed is non numeric
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2601 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-02 07:47:23 +00:00
Mark Spencer
a925c1b306 Update security document, work on threading with pbx.c and small SIP fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-02 07:24:33 +00:00
Ben Kramer
7f6b9ccb5b / updated config file with all available options
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2599 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-02 06:57:58 +00:00
Ben Kramer
3cedced29a / added more samples to the config file, now has samples for all boards
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2598 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-02 05:25:21 +00:00
Mark Spencer
1d53342b18 Expand SIP opaque buffers, prefer recursive to "error checking" mutexes...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-01 06:27:10 +00:00
Ben Kramer
1e87c2aa48 / added a note to top of file to have patches sent to support@voicetronix.com.au
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-31 23:40:20 +00:00
Mark Spencer
fbc5be2426 Fix small typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-31 19:06:17 +00:00
Mark Spencer
4b02c78aaa Don't die on a bad voicemail conf timezone entry (bug #1326)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2591 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-31 18:59:42 +00:00
Mark Spencer
71e80e5f62 Leave retry time alone, handle "opaque" stuff in message.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-31 08:00:26 +00:00
Ben Kramer
8b5bbe4673 / commit of a great deal of changes
/ tested these features using an OpenSwitch12
/   FXO=>FXS
/   FXS=>FXS
/   FXS=>FXO
/   FXO=>SIP
/   Echo cancelation.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-31 04:29:55 +00:00
James Golovich
c89cbd916d Change md5 to use uint32_t instead of uint32
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-30 23:55:41 +00:00
James Golovich
3c70509e9b Fix md5 on 64bit systems (aside from alpha)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2586 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-30 23:54:21 +00:00
Malcolm Davenport
e1112c64c9 Fix the 'n' option of app_queue. Thanks Mike
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-30 22:04:07 +00:00
Mark Spencer
8dec8d3632 Fix progzone loader
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2584 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-30 21:23:16 +00:00
Mark Spencer
722babe8d1 Indicate the need to reload without actually reloading...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-30 16:16:05 +00:00
Mark Spencer
3e9c337946 Small SIP fix, voicemail fix, and some delivery fixes on new apps
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-29 08:20:35 +00:00
James Golovich
2c0d0d836c Get rid of annoying beeps on remote console
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-29 04:12:13 +00:00
Mark Spencer
dbbf64fdd4 Attempt at incrementing branch (or changing it) at the right places (bug #1313)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-28 04:05:58 +00:00
Mark Spencer
1ccab64d86 Add support for Costa Rica to DSP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-28 02:53:04 +00:00
Mark Spencer
4b234476bb Merge more Sentito contributions (thanks serkan)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2575 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-27 17:51:22 +00:00
James Golovich
6ce8fc0b15 More read/write lock fixes in various modules
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-27 07:41:33 +00:00
James Golovich
9fca20acc1 Fixup read/write locking
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-27 07:34:37 +00:00
Mark Spencer
eeb2ca5b26 Make read/write mode have a lock parameter and use it properly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2572 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-27 06:50:12 +00:00
James Golovich
4b4c55e328 Pick the right location to endian.h based on OS in md5.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2570 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-26 08:37:51 +00:00
James Golovich
3ee43dd572 Add example of using Account in sample.call file
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-26 08:04:13 +00:00
James Golovich
a222dbe8c7 Make chan_vpb.c detect austel busy (bug 545)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-26 07:18:26 +00:00
James Golovich
2ff5d7de53 Add manager action 'SetCDRUserField' (bug #1298)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-26 06:28:56 +00:00
James Golovich
c6aaaf438e Allow CLI Prompt to be customizable via ASTERISK_PROMPT environment
variable (bug #1270)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-26 04:59:41 +00:00
Mark Spencer
fb0af47761 Update sample sip.conf
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-25 20:52:57 +00:00
Jeremy McNamara
211afe3a4b document mwi issues for voicemail contexts
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-25 18:28:35 +00:00
Jeremy McNamara
ea1c68b666 Document the maximum length of voicemail email message body. Bug #1299
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-25 18:11:24 +00:00
James Golovich
82bf2663e3 Tiny optimization in chan_iax2.c that the compiler would
probably take care of, but better that we do it


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-25 18:10:52 +00:00
Mark Spencer
638684636c Make sure calculation of time is always > 0...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-25 07:17:33 +00:00
Malcolm Davenport
3ec7218ffb Bug # 1287: Festival cache string bug fixed
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-24 22:50:43 +00:00
Mark Spencer
96c7fb890e Reduce volume of hold music to 8k / 4k
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2554 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-24 21:54:05 +00:00
Malcolm Davenport
efd7427f33 Bug # 1108: chan_alsa fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-24 21:34:21 +00:00
Mark Spencer
b43c1f054b Allow expiration of several messages to be non-fatal.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-24 21:21:59 +00:00
James Golovich
f8b04c4bb6 *** empty log message ***
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2549 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-24 08:36:36 +00:00
James Golovich
bb8b00dad8 Actually support the zaptel timing parameters the sample config file says we support adjusting. prewink, preflash, wink, flash, start, rxwink, rxflash, debounce
Still need to hear back from Jim Dixon if the radio timing params should be adjustable


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2548 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-24 08:36:28 +00:00
James Golovich
8279f0eac5 Make cli_complete buffer as large as the one used in handle_commandmatchesarray (bug 1281)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-24 08:09:01 +00:00
Mark Spencer
61d1fd9a0e Make FAX enableable/disablabable, fix async goto support properly
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2544 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-24 05:01:44 +00:00
Jeremy McNamara
4f72330f5c check input for errors. Bug #435
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-24 03:48:18 +00:00
Mark Spencer
3b6c8b3f77 Improve ast_safe_system
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-23 21:55:46 +00:00
Mark Spencer
a05ef35ca8 Improve verbose messages
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-23 21:45:38 +00:00
James Golovich
359430871f Check to make sure opendir works in chan_iax2.c (bug 1283)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-23 21:42:35 +00:00
Mark Spencer
747a18f65d It's okay to send RINGING > 1 time, and don't try to send it in-band
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2537 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-23 18:09:25 +00:00
Mark Spencer
598d7963e5 Install to iaxy.bin, not iaxy.conf
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-23 17:00:13 +00:00
Jeremy McNamara
484484ce89 fix agi to accept multiple arguments. Bug #664
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-23 12:50:15 +00:00
Mark Spencer
6e15f28d6a Clarify documentation on Directory
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2533 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-23 05:32:36 +00:00
Mark Spencer
b5d452b1c7 Minor SIP cleanups for valgrind, finally close the coffin on IAX1 and take it ou
t of the normal build process.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2532 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-23 05:06:50 +00:00
Mark Spencer
b46d67e301 Unlock the owner when we're done (duh!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-23 03:26:23 +00:00
Mark Spencer
3107d6d03b Hold owner lock when changing codecs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-23 00:56:36 +00:00
Mark Spencer
67af82457e Fix locks that are held too long
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-22 22:48:59 +00:00
Mark Spencer
2a16a0a30c Use caller's negotiated values when possible.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2526 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-22 21:52:22 +00:00
Mark Spencer
b19cb95257 Fix superfluous return NULL
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-22 19:47:25 +00:00
James Golovich
dc41c40eba Make app_system.c use ast_safe_system
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-22 17:34:21 +00:00
Malcolm Davenport
71eafcf3da Typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-22 15:47:32 +00:00
Malcolm Davenport
7555e69cdc Bug # 1271: Document the 'o' extension in VoiceMail application
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-22 15:42:44 +00:00
Mark Spencer
284a5b3465 Store recorded file in RECORDED_FILE if %d is used... (bug #1062)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-22 04:04:07 +00:00
James Golovich
25d74e0334 More app_read.c fixes (bug 1261)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2518 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-22 03:46:19 +00:00
Mark Spencer
c1c704c042 Fix mysql friends by type
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2517 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-21 21:24:40 +00:00
Mark Spencer
3f5277d57b Don't reconstruct authentication information on retransmissions.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2515 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-21 19:25:13 +00:00
Mark Spencer
98b59da9ad Create ast_safe_system which closes off file descriptors before spawning system() and so on.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-21 18:15:37 +00:00
James Golovich
a8bbe997d2 Fix some small typos in comments
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-21 11:23:10 +00:00
Mark Spencer
893ed27f5b Create temporary file and then sendmail it, then delete it, to avoid a hanging mailcmd from hanging asterisk (bug #1262)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-21 08:01:53 +00:00
Mark Spencer
97c5b2b7d7 Take out unnecessary setting of delivery times.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2510 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-21 07:35:40 +00:00
Jeremy McNamara
730ca5f9b1 Enhance to accept a maximum of N digits. Bug #1261
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-21 00:33:05 +00:00
Mark Spencer
7c35f68e29 Fix milliwatt and musiconhold to know about delivery times
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-20 23:31:40 +00:00
Mark Spencer
79668f0624 Correctly handle call flow with outgoing queue, avoiding retries while call acti
ve (bug #1018)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2505 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-20 21:13:12 +00:00
Mark Spencer
4ba3ced42f Fix ACL for bizarre routing cases
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2504 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-20 19:08:57 +00:00
Mark Spencer
21d31939d1 Merge ADSI fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2501 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-20 17:27:10 +00:00
Jeremy McNamara
68e767078f re-apply possible CCM fix. Someone still needs to test this
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2500 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-20 14:29:36 +00:00
Jeremy McNamara
ff9621e279 rollback e.164 and prefix routing attempted fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2499 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-20 14:25:39 +00:00
Jeremy McNamara
de20d2a179 rollback everything to known good state. E.164 and prefix routing patches are broken
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2498 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-20 14:24:20 +00:00
Jeremy McNamara
6fb5ebfedb try to work around CCM interop, UNTESTED! Someone with a CCM needs to test this
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2497 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-20 14:14:00 +00:00
Jeremy McNamara
7132570353 Change 'show locals' into 'local show channels' to follow other channel methods. Bug #1255
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2496 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-20 13:26:52 +00:00
James Golovich
92f6d077fd Fix ast_translator_free_path (bug 1254)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2494 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-20 10:55:57 +00:00
James Golovich
1498cc552f Make primary key context and voicemailbox and make the file easier on
the eyes (bug 1208)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2492 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-20 07:51:56 +00:00
James Golovich
32bde5b009 If asterisk is started with progname of 'rasterisk' assume its a remote
console (bug 842)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2491 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-20 07:26:54 +00:00
Mark Spencer
af6016cfd0 Add experimental nbscat application
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-20 07:16:27 +00:00
James Golovich
f3d440a16f Improve sample extensions.conf (bug 1190)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2488 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-20 06:52:03 +00:00
Mark Spencer
47b6495e9b Same for transmit core
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2487 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-20 05:22:52 +00:00
Mark Spencer
7192fbfae7 Round offset timestamps to nearest 20ms to clean up numbers.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2486 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-20 05:19:45 +00:00
James Golovich
be59053650 Add some comments to lock.h
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2484 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-20 05:07:21 +00:00
Mark Spencer
c36ec4f9d7 Major MGCP enhancements (*very* big thank you to serkan and Sentito) (bug #1114)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2483 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-19 22:57:08 +00:00
Malcolm Davenport
5191a04055 Bug # 1088: Add MailboxExists, conditionally branches to priority n+101
if specified mailbox exists (in the config).  Thanks Tilghman


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-19 22:39:02 +00:00
Malcolm Davenport
9ef542b3cb Bug # 1179: Remove "show voicemail users" when using MYSQL voicemail interface
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2480 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-19 21:42:48 +00:00
Malcolm Davenport
2414aeb4dd Fix small typo in sip.conf.sample
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-19 21:29:13 +00:00
Mark Spencer
cd8bc46a15 It helps to use the local copy yo ucreated
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-19 20:36:21 +00:00
Malcolm Davenport
b79b6aba5d Bug # 1013: More explanation in the sip.conf.sample thanks to oej
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2476 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-19 20:30:03 +00:00
Jeremy McNamara
fa308aa83b language is not supported in datetime. Bug 686
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-19 18:23:33 +00:00
Mark Spencer
b90a103e22 First pass at populating delivery times through translation. Not sure how this will affect translations with different packet sizes, but it *ought* to resolve itself in the end.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2474 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-19 15:03:43 +00:00
Jeremy McNamara
0ddcb1f666 Add hangupcause to the hangup manager event
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-19 09:37:28 +00:00
Mark Spencer
785ac43c84 Just to be on the safe side, don't update timestamps against anything but voice packets.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2472 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-19 08:16:19 +00:00
Mark Spencer
7075b58ee1 Don't use hard timestamps for non-voice frames.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-19 08:12:04 +00:00
Mark Spencer
a386f01a7c Favor requested codec whenever possible (pass #1)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-19 08:00:13 +00:00
Mark Spencer
ce9e964c5f Fix LEN segfault (bug #1228)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-19 06:36:25 +00:00
Mark Spencer
2524d2c413 Add support for new PING/PONG on zaptel which reduces the # of file descriptors on SIP/IAX channels (when zaptel interface is available) by 2 per channel
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2467 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-19 04:23:20 +00:00
James Golovich
687b0ebe6e Check tempchan->type in app_zapscan.c (bug 1250)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-19 03:46:01 +00:00
Mark Spencer
8c232e1dbb Populate DNID for SIP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-19 02:04:45 +00:00
Mark Spencer
bc2a510fb7 Remember when we started/stopped ringing so that ringing twice works as expected
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-19 00:08:43 +00:00
James Golovich
130c64e5d9 Clarify in voicemail.conf that certain variables are in seconds
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2460 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-18 23:03:33 +00:00
Malcolm Davenport
264bfb7121 Bug # 1247: Add patch to specify minimum vmail length and discard that
which does not meet the minimum


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2459 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-18 22:49:06 +00:00
Jeremy McNamara
d3b2cb19e4 Properly deal with E.164 and Prefix routing
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-18 20:39:15 +00:00
Mark Spencer
e7ecf6accb Populated RDNIS
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-18 20:33:55 +00:00
Mark Spencer
4c06525432 Make RDNIS really work right
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2456 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-18 20:02:15 +00:00
Mark Spencer
bf5d593e71 Fix parser
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2455 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-18 06:04:22 +00:00
Mark Spencer
29b7818ebf Fix timestamp to always be unsigned
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2453 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-18 06:01:53 +00:00
Mark Spencer
ce88c6dd08 Populate RDNIS information
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-18 05:48:40 +00:00
Mark Spencer
1b05e77127 Fix small but deadly typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-17 16:49:00 +00:00
Mark Spencer
726d3cba43 Answer the line when hangup received and callwait is up
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2450 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-16 23:42:41 +00:00
Mark Spencer
b690dc13aa Fix timestamp delivery calculation in IAX... Still might be some mess left...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-16 22:55:05 +00:00
Malcolm Davenport
b0d28cedf7 Bug # 1116. CallerID number not hidden when RestrictCID is on, Fixed
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-16 17:07:51 +00:00
Mark Spencer
b3f94c4c00 Fix small typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-16 16:02:57 +00:00
Malcolm Davenport
0753ca66ab Bug #1222: Fixed
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2444 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-15 23:32:58 +00:00
Mark Spencer
e02fae664a Alpha portability from Ricudis
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-15 16:51:58 +00:00
Mark Spencer
2a75bbb711 Mute received DTMF path
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-15 16:20:01 +00:00
James Golovich
9223055df1 Fixup some pthread_t checking in channels
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2438 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-15 09:14:16 +00:00
James Golovich
4b0d26c93d Actually commit the new #defines
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-15 08:36:25 +00:00
James Golovich
0e90480d6b Fix bug 1217. Change pthread_t initializers to AST_PTHREADT_NULL and
AST_PTHREADT_STOP


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2434 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-15 07:51:22 +00:00
James Golovich
c30ff0935d Add 'pri show span <spanno>' command to chan_zap.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-15 05:57:47 +00:00
James Golovich
200ae67551 Update spool file times after we close the file (bug 1018)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2431 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-15 05:38:41 +00:00
Malcolm Davenport
89c55fe46c Bug #1213. Fix for improperly specified Content-Length header
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-15 02:06:47 +00:00
Mark Spencer
f997f9f139 Increase amount of time we send tones on RTP to 100ms
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2428 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-14 23:12:22 +00:00
Mark Spencer
0852f5a930 Preserve IAX timestamps
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2427 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-14 23:01:12 +00:00
Mark Spencer
9e83daa3bb If an RTP peer hasn't been set, ignore audio from it (Plexus workaround)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-14 22:49:26 +00:00
Mark Spencer
ea92b714f2 Turn off silence suppression in SDP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-14 22:13:18 +00:00
Mark Spencer
aa2bdcc078 Handle 4 byte packets too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2422 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-14 21:01:13 +00:00
Mark Spencer
7989800674 Try to make smoother G.729B aware, and able to handle VAD bytes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-14 18:01:29 +00:00
James Golovich
9d8952f3a8 Make ZapScan wait 100ms for data
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-14 09:49:58 +00:00
James Golovich
51f004494a Make sure time is valid for uptime (bug 1214)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-14 09:11:32 +00:00
Mark Spencer
044aa4fa60 Cleanups of RX/TX calculations
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2416 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-14 05:31:47 +00:00
Mark Spencer
17e2416f68 Merge queue changes from Bug #214
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2415 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-13 06:00:41 +00:00
Mark Spencer
8750f1c05f Move timestamp around in RTP.... Gotta do iax2 eventually here...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-13 03:52:14 +00:00
Mark Spencer
afab3c4151 Fix a martin segfault
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-12 21:26:45 +00:00
Mark Spencer
3a2f0750cb Fix safe_asterisk script
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-12 20:20:36 +00:00
James Golovich
4efa995ae1 Fix incorrect endpos when sildet is used during AGI record (bug 1210)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-12 18:49:52 +00:00
Mark Spencer
f1330f7efd Whentohangup is in seconds, not milliseconds
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2406 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-12 16:47:07 +00:00
Mark Spencer
1e8ea5eece Fix small buglet, version #13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2405 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-12 00:50:38 +00:00
Mark Spencer
12a8e15227 Add support for ADPCM to IAXY firwmare (version 12)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2404 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-11 21:27:13 +00:00
Mark Spencer
a082f8d8c7 By default disable non-standard changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2402 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-11 20:56:26 +00:00
Mark Spencer
39c60235f8 Make ADPCM frames standard
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-11 19:57:10 +00:00
Mark Spencer
f12928f700 Make sure no path leaves channel lock locked
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2399 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-11 18:00:08 +00:00
James Golovich
8812409528 Make voicemail not say goodbye twice on hangup (bug 1201)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2397 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-11 07:00:46 +00:00
James Golovich
6406e07a79 Make ParkAndAnnounce check some things (bug 1194)
This code really needs to get cleaned up


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2395 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-11 06:16:15 +00:00
James Golovich
6741234ec9 Make sure usedistinctivering gets set to the right value
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-11 05:10:23 +00:00
James Golovich
c0ef6a5d1b Free dsp in agi record file if it exits before the end (bug 1199)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-10 21:17:13 +00:00
James Golovich
18b3da6bab Wipe out p->exten in zt_hangup (bug 1115)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2389 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-10 09:11:05 +00:00
James Golovich
fac46c078a Make distinctiveringdetection configurable per channel (bug 1168)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2387 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-10 08:33:07 +00:00
James Golovich
21832436ec Remove unnecessary ast_check_hangup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-10 07:05:01 +00:00
James Golovich
6c6bd28308 Make ZapScan exit when '*' is pressed. Has the side effect of making
the app exit when the channel is hungup which wasn't happening before


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2383 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-10 03:51:59 +00:00
James Golovich
d298a73aab Fix chan_iax2 compiling with MYSQL_FRIENDS
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2381 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-09 20:10:23 +00:00
James Golovich
f82797006f Verify the right vars are passed to manager originate (bug 1185)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-09 20:01:46 +00:00
James Golovich
6f0d8022d1 Make mess more informative if non-dynamic sip user registers (bug 1186)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-09 17:42:29 +00:00
Mark Spencer
3edb8bfc21 Upgrade firmware to version 10
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-09 17:30:59 +00:00
Malcolm Davenport
f986561b62 Add the app_eval.c file
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2375 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-09 15:57:56 +00:00
Malcolm Davenport
d971478d75 Bug # 1182: Add app_eval: Permits a string to be evaulated twice in the context
of the dialplan.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-09 15:57:16 +00:00
Mark Spencer
b1718d715e Clarify that jitter buffering is usually a loss
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2372 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-08 19:17:46 +00:00
Mark Spencer
674d81ce27 Fix strncpy auditing (bug #1152)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-08 05:04:11 +00:00
James Golovich
0d5dcf7358 Fix typo in chan_zap.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-08 04:26:36 +00:00
Mark Spencer
653b86fa48 Don't complain about not knowing about -1
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2366 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-08 02:09:56 +00:00
Mark Spencer
3461b2f5bb Upgrade IAXY firmware to version 10 (support static IP)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-08 00:30:44 +00:00
James Golovich
f2b52d46d0 Make sure chan_iax.c and chan_iax2.c know the size of G726 frames
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-07 22:57:00 +00:00
Mark Spencer
d9359f8249 Fix for endianness (bug #1174)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-07 04:36:52 +00:00
James Golovich
146469ab19 Allow multiple switches in the same context (bug #1171)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-06 20:15:08 +00:00
James Golovich
fa4ed416c7 Fix comment in cli.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2358 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-06 09:01:08 +00:00
Mark Spencer
7f2e23bb50 Add absolute timeout option to dial that applies when call is up (bug #1107)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-06 00:02:40 +00:00
James Golovich
d97cc460b0 Fix pbx_builtin_atimeout comment
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-05 23:42:58 +00:00
Mark Spencer
2bc6301e39 And of course return us as a winner
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2353 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-05 18:32:59 +00:00
Mark Spencer
c07a37b91d Minor optimizations and actually set SOFTHANGUP_TIMEOUT if appropriate
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-05 18:31:06 +00:00
Mark Spencer
94f3b5751a Consider whentohangup in timeout (bug #1107)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-05 18:22:31 +00:00
Mark Spencer
e42e998f76 Expand our definition of 3XX responses
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-05 18:09:35 +00:00
Mark Spencer
5bf9b86aa4 Know how to send ADPCM
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-05 17:32:00 +00:00
Mark Spencer
1b37f94737 Bail an AGI on PBX_KEEPALIVE being set in an exec.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-05 14:23:22 +00:00
James Golovich
82a2a8b7eb Fix pri->pvt[chan]->owner dereference (bug #1161)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-05 04:15:55 +00:00
James Golovich
359160d8a1 Change tormenta.conf to zaptel.conf
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-05 03:30:38 +00:00
Mark Spencer
a1d8701369 Formatting fixup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-05 00:31:55 +00:00
Mark Spencer
b4ea3725da Set the context properly for a given peer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2336 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-04 23:43:58 +00:00
Mark Spencer
595049117c Add iaxy.bin, IAXy firmware version 01
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-04 22:09:48 +00:00
James Golovich
a51ca42b18 Make the Wait application accept time with fractions of a second
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-04 21:45:21 +00:00
Mark Spencer
fa7454688b Eliminate spurious select warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-04 21:32:32 +00:00
Jeremy McNamara
657056b114 clean up warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-04 06:29:12 +00:00
Jeremy McNamara
16d9e65b32 check to see if sub->rtp is allocated. Bug #1040
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-04 06:25:27 +00:00
Jeremy McNamara
9e21bc74ac check return value stop seg. Bug #967
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-04 06:11:23 +00:00
Mark Spencer
0a103544e4 Copy old extension unless it's ASYNCGOTO (bug #1141)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2326 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-04 05:57:47 +00:00
Mark Spencer
80904fddcf Fix DNS variable name
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2324 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-04 05:31:43 +00:00
Mark Spencer
550785ba29 Fix GotoIfTime if time is bad
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2321 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-04 05:23:50 +00:00
Jeremy McNamara
1f691912e1 deal with bindaddr properly
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2320 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-04 02:07:32 +00:00
Jeremy McNamara
bff0a94507 deal with bindaddr properly
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-04 01:57:32 +00:00
Mark Spencer
806bb3c63f Add support for parking with IAX2
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-04 01:11:25 +00:00
Mark Spencer
534e78b372 Add DeadAGI Application
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-03 18:58:57 +00:00
James Golovich
4653b4bb79 Unregister apps in app_queue.c on unload_module
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-03 08:53:04 +00:00
James Golovich
e67f8a50f9 Make PRI span completion only show spans that actually are PRIs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2313 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-03 03:54:25 +00:00
James Golovich
d260293f62 Make DNS callbacks return -1 on error, so invalid records are ignored
(bug #1137)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-03 03:12:59 +00:00
James Golovich
22b56f13cc Fix typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2308 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-03 00:05:00 +00:00
Mark Spencer
6d799e9ff8 Fix small (yet big) bug in show_display
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-02 23:56:37 +00:00
James Golovich
e141e7311c Improve restart handling
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2305 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-02 23:50:03 +00:00
James Golovich
96e3d08787 Fix asterisk exiting on verbose without a console (bug #1126)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-02 23:36:53 +00:00
Mark Spencer
b82aa22442 Process SDP on 183 session progress (bug #930)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2301 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-02 23:29:00 +00:00
Mark Spencer
9d5fe279b6 More BSD compat crap
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2300 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-02 22:55:05 +00:00
Mark Spencer
231dbeea61 BSD portability fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-02 22:53:08 +00:00
James Golovich
40ec19961c Fix app_chanisavail.c when passed string is big (bug #1139)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-02 17:49:33 +00:00
Mark Spencer
4cd13f4ebf Ignore interrupted system call error on "accept"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-02 16:58:17 +00:00
James Golovich
5fafcdd73c Remove extra spacing from manager.c and change Event action/variable to
work the same during login and action


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-02 08:45:51 +00:00
James Golovich
7409bc052d Add function ast_false, like ast_true
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2289 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-02 07:57:06 +00:00
Mark Spencer
8f73da1f79 Allow semi-blocking fd's on manager (bug #1100)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-01 21:12:32 +00:00
James Golovich
4de0a2e30e Fix app_random.c (bug #792)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-01 20:44:48 +00:00
James Golovich
32a11a2b20 Remove extra \r\n from manager event sent by res_parking.c (bug #1134)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-01 20:31:25 +00:00
Mark Spencer
a9d042db2c Handle video codecs properly
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-01 16:14:41 +00:00
James Golovich
4160dfa6e1 Remove comment about EXPERIMENTAL_TRANSLATION since its not used
anywhere anymore


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-01 07:17:01 +00:00
James Golovich
b32c690175 Fix app_chanisavail if there are invalid arguments (bug #1130)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-29 18:30:48 +00:00
Mark Spencer
064d7ffdb2 Don't write duration if file disappears (bug #1102 -- thanks hmodes)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-28 00:33:15 +00:00
Mark Spencer
6a73e70663 Make iax2 compile on *BSD
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-27 16:35:32 +00:00
James Golovich
5f68a5f70d Change text in ast_get_group to explain that max group is 31 (bug #1014)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-27 09:04:42 +00:00
James Golovich
ade75fecae Add 'SAY TIME' to AGI. (bug #269)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-27 08:30:30 +00:00
Mark Spencer
43d758e630 Include errno.h
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-27 06:58:39 +00:00
Mark Spencer
0f111e2d3a Ignore ECHILD in app_system
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-27 06:56:08 +00:00
James Golovich
a232d8e060 Move ast_get_group from res_parking.c to channel.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-27 06:15:49 +00:00
James Golovich
cf854246fa Typo in app_zapras.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-27 06:00:35 +00:00
Mark Spencer
548d6bb6c0 Add G.726, revise Changelog
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-27 05:16:26 +00:00
James Golovich
6a0bc27b35 Typo in app_queue.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-27 04:38:30 +00:00
James Golovich
a303a83b92 Get rid of compiler warnings when calling ast_queue_log
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2257 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-27 04:32:54 +00:00
James Golovich
e8c21dfe67 Check result of malloc in app_dial.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-27 04:24:42 +00:00
Malcolm Davenport
3439c08170 Fix Bug # 981
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-26 17:29:49 +00:00
James Golovich
133748f004 Really fix format_wav_gsm.c. Thanks PCadach! (bug #1087)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2251 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-26 06:46:01 +00:00
James Golovich
35f3f86df4 Fix 'show translations'
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2249 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-26 01:12:38 +00:00
James Golovich
462cfbe8ae Bug #1087. Fix wav49 format so it can be played. Make file functions
looking for extension use f->exts instead of f->name.  Fix bug
where error message didn't print file extension. Fix comments in header file.
Everything is completely backwards compatible


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2247 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-25 22:31:51 +00:00
James Golovich
38198d8cb3 Add extra \n so email sent by voicemail has the right header delimiter
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2245 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-25 21:43:32 +00:00
Mark Spencer
500ebad7aa Fix slow down in rtp.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2244 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-25 20:59:39 +00:00
James Golovich
6de8d14b29 Replace MP3 with G726 in ast_codec2str
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-25 18:43:55 +00:00
Mark Spencer
853ead07d4 Increase length of DTMF tones in SIP et all, in-band
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-25 16:01:56 +00:00
Mark Spencer
8bfe5e86b4 Don't be biased against G.726 in translation table
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2240 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-25 04:24:51 +00:00
Mark Spencer
ff976ce055 Add G.726-32kbps Codec Transcoder (Tested with Cisco ATA-186)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-25 04:10:32 +00:00
James Golovich
96abbad91d Add missing include to chan_iax2.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2238 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-25 03:49:25 +00:00
Malcolm Davenport
6023b736d9 Bug # 1052 Got it this time..I'm sure of it ;)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-25 01:16:45 +00:00
Mark Spencer
066212158e Add IAX2 firmware upgrade support
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-24 21:27:16 +00:00
Malcolm Davenport
2a9044d607 Bug # 1079. indications.conf.sample changes for Greece
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2233 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-24 20:32:12 +00:00
Malcolm Davenport
23eaf5c442 Fix Bug # 935 and Bug # 1052
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2231 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-24 19:48:46 +00:00
Mark Spencer
39a358ef56 Fix corruptin in app_cut (bug #1084)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-24 18:57:46 +00:00
Mark Spencer
f62061aa78 Handle change password properly with multiple VM contexts (bug #1069)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-24 17:11:23 +00:00
Mark Spencer
406e4283fd Really initialize queue log
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-23 20:18:27 +00:00
Mark Spencer
1f33e8b807 Optimization in pri_fixup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-23 14:58:18 +00:00
James Golovich
a23c89dd75 Fix some comments in pbx.c and pbx_config.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-23 05:37:24 +00:00
Mark Spencer
d1cb6a3aa9 Merge Tilghman's and Cam's user defined cadence patch
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-23 05:02:24 +00:00
James Golovich
d53b0d0643 Fixed gramatical error in app_queue.c (bug #1083)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-23 04:15:04 +00:00
James Golovich
a06b48ccc6 Fix restarting when not called from the main console (bug #830 and #864)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2217 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-23 03:43:21 +00:00
James Golovich
c278f09897 Fix ast_add_extension2 updating ast_exten correctly in certain cases
where extensions.conf is not ordered numerically by priority (bug #1065)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2215 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-23 02:47:22 +00:00
Mark Spencer
e08247218e Small but important fix for channel relocation (bug #54)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-22 20:41:15 +00:00
James Golovich
84cbebcf17 Fix another typo in the app_dial description
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-22 05:31:42 +00:00
James Golovich
d03dbf91a6 Add ${LANGUAGE} channel variable (bug #1078)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-22 05:25:58 +00:00
Mark Spencer
90594b5fc8 Properly lock slave and master in zt_unlink (bug #1008)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2208 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-20 21:23:22 +00:00
Mark Spencer
de6910a6b6 Fix minor ordering issue (bug #981)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-20 20:00:49 +00:00
Mark Spencer
ce8778c01b Add support for Norwegian numbers (bug #1067)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2204 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-20 17:43:46 +00:00
Mark Spencer
6724dd1597 Improve SIP friends support (should address bugs #1063 & #1052)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2202 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-20 15:39:43 +00:00
Mark Spencer
79500cdb9f Initialize queue logger
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2201 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-19 23:17:52 +00:00
Mark Spencer
0b8234edb4 Don't free clone lock until after *both* fixups have taken place
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-19 20:07:01 +00:00
Mark Spencer
b2a648b4da Just in case resources with the same name are loaded
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-19 01:04:21 +00:00
James Golovich
48496a930c Fix another spelling typo in chan_sip.c (bug #1059)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2196 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-19 00:42:10 +00:00
James Golovich
43e312bd62 Fix spelling typo in chan_sip.c (bug #1059)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-19 00:14:58 +00:00
Mark Spencer
fb96473eb0 Fix comparision in RTP native bridge (bug #1043)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2192 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-18 21:38:46 +00:00
Mark Spencer
89c76a80f2 Minor file.c cleanup for valgrind, log PRI event properly
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2189 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-18 16:32:49 +00:00
Mark Spencer
f285c61830 Cleanups to recent changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2187 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-18 04:52:56 +00:00
Mark Spencer
cc894e6100 Use call numbers instead of pointers in IAX2
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2186 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-17 22:16:14 +00:00
Mark Spencer
e2ecedfa70 Add Icecast streaming support
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-17 07:03:14 +00:00
Mark Spencer
a1c6ac945d Make sure smoother only creates frames with offsets (bug #1029)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-16 15:05:21 +00:00
James Golovich
509e9a4d4e Fix 'show channel<tab>' completion, where show channel would be
autocompleted instead of displaying channel and channels.  Also update
comment to reflect that items in the list should have longest matches
first.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-15 09:07:00 +00:00
James Golovich
c28a51899f Typo in app_waitforring.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-15 08:41:56 +00:00
James Golovich
9028579d84 Spelling error in app_dial.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2177 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-15 08:33:19 +00:00
James Golovich
2cbef73a27 Various spelling errors fixed in docs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-15 07:48:46 +00:00
Jim Dixon
dbe3dea363 Added us-old zone in indications.conf
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-15 07:38:47 +00:00
Jim Dixon
df987c2086 Added support for specifing Zaptel tonezone on a per-channel basis for
Zaptel channels in zaptel.conf (using tonezone= parameter)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-15 07:35:32 +00:00
James Golovich
2655e5c7b9 Make astman ignore 'StatusComplete' events.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-15 07:17:37 +00:00
James Golovich
52be37dd37 Fix 2 typos in README
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2170 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-15 06:58:43 +00:00
James Golovich
8a6dc0d0b4 Fix typo in iax.conf.sample (bug #1035)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-15 06:39:49 +00:00
James Golovich
7907a37002 Fix typo in chan_sip.c (bug #1037)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-15 06:35:22 +00:00
James Golovich
4b26ec2372 Fix command completion (bug #988)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-15 05:19:44 +00:00
Mark Spencer
2a31c91136 Add logging of agent login/logoff
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-14 04:54:39 +00:00
Martin Pycko
f49d75994e Fix recording the agent's calls by default
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2160 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-12 22:28:35 +00:00
Mark Spencer
864fe70e35 Add queue logging and fix indications buglet
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-12 22:11:02 +00:00
Mark Spencer
98391c1324 Free mysql results
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2156 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-11 06:29:35 +00:00
Mark Spencer
e83acf8658 Don't free if it's NULL
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-11 05:14:19 +00:00
Mark Spencer
bac2215fb6 Fix several memory leaks
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-11 03:54:28 +00:00
Mark Spencer
7cdb6d36f4 Fix a couple of memory leaks
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-11 00:17:48 +00:00
Martin Pycko
2671e3d9bb Fix some minor errors: when logging off using AgentCallbackLogin don't put again the global *AGENTID* variable. Remove the '.' from the link that is put in the userfiled of CDR record
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-10 21:14:48 +00:00
Jim Dixon
29571cfcb1 Fixed bug in FXOGS. Was not closing loop after starting.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-10 07:24:15 +00:00
Mark Spencer
260072954e Revert meetme work around now that zaptel is fixed
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-10 06:47:42 +00:00
Mark Spencer
077975cba7 Fix memory leak with SIP friends (bug #1010)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2145 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-09 06:09:45 +00:00
Mark Spencer
e1df8c9082 Properly fully URL decode the REPLACES in SIP and also watch for edge condition (bug #1015)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-09 05:38:17 +00:00
Mark Spencer
02f99cb631 Omit PRI layer 1 information for data call (need updated libpri too) (bug #1012)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-08 00:23:20 +00:00
Mark Spencer
ae4adad5c4 Insert blank after REFER (bug #997)
Correct path to VM sample (bug #994)
Make manager interface non-blocking (bug #861)
Don't bork on empty from in SIP (bug #887)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-07 07:13:33 +00:00
Mark Spencer
cf4825233d Don't free private structure until iax2_hangup is actually called
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2136 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-06 18:11:13 +00:00
Mark Spencer
82e18770bc Increase buffer size (1005)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-06 05:52:03 +00:00
Mark Spencer
0dd66bd2e9 Implement temporary work around for pseudo channels with SMP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-05 22:28:44 +00:00
Martin Pycko
8baa1ed52e Add 'm' option to Monitor app to use soxmix (if available) to mix the output recording to one file.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-05 22:10:19 +00:00
Martin Pycko
ba3b53d64a Add AgentMonitorOutgoing application to allow recording of outgoing calls made by the interface that is registered as an callback agent. Refer to "show application AgentMonitorOutput" for more info.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-05 21:13:17 +00:00
Mark Spencer
02858c574c Don't call release if we have no generator
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-04 23:18:16 +00:00
Martin Pycko
1e4b334321 Fix the deadlock in show queue <queue_name>
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-04 19:42:18 +00:00
962 changed files with 52898 additions and 21133 deletions

View File

@@ -1,5 +0,0 @@
asterisk
build.h
ast_expr.c
.version
.depend

5
BUGS Executable file → Normal file
View File

@@ -1,3 +1,8 @@
Asterisk 1.0-RC-1 Known Major Bugs
==================================
* Some people still have issues with H.323
* QuickNet driver still not entirely stable
Asterisk Bug Tracking Information
=================================

85
CHANGES Executable file → Normal file
View File

@@ -1,3 +1,88 @@
NOTE: Corrections or additions to the ChangeLog may be submitted
to http://bugs.digium.com. A complete listing of changes
is available through the Asterisk-CVS mailing list hosted
at http://lists.digium.com.
Asterisk 1.0.4
-- general
-- fix memory leak evident with extensive use of variables
-- update IAXy firmware to version 22
-- enable some special write protection
-- enable outbound DTMF
-- fix seg fault with incorrect usage of SetVar
-- other minor fixes including typos and doc updates
-- chan_sip
-- fix codecs to not be case sensitive
-- Re-use auth credentials
-- fix MWI when using type=friend
-- fix global NAT option
-- chan_agent / chan_local
-- fix incorrect use count
-- chan_zap
-- Allow CID rings to be configured in zapata.conf
-- no more patching needed for UK CID
-- app_macro
-- allow Macros to exit with '*' or '#' like regular extension processing
-- app_voicemail
-- don't allow '#' as a password
-- add option to save voicemail before going to the operator
-- fix global operator=yes
-- app_read
-- return 0 instead of -1 if user enters nothing
-- res_agi
-- don't exit AGI when file not found to stream
-- send script parameter when using FastAGI
Asterisk 1.0.3
-- chan_zap
-- fix seg fault when doing *0 to flash a trunk
-- rtp
-- seg fault fix
-- chan_sip
-- fix to prevent seg fault when attempting a transfer
-- fix bug with supervised transfers
-- fix codec preferences
-- chan_h323
-- fix compilation problem
-- chan_iax2
-- avoid a deadlock related to a static config of a BUNCH of peers
-- cdr_pgsql
-- fix memory leak when reading config
-- Numerous other minor bug fixes
Asterisk 1.0.2
-- Major bugfix release
Asterisk 1.0.1
-- Added AGI over TCP support
-- Add ability to purge callers from queue if no agents are logged in
-- Fix inband PRI indication detection
-- Fix for MGCP - always request digits if no RTP stream
-- Fixed seg fault for ast_control_streamfile
-- Make pick-up extension configurable via features.conf
-- Numerous other bug fixes
Asterisk 1.0.0
-- Use Q.931 standard cause codes for asterisk cause codes
-- Bug fixes from the bug tracker
Asterisk 1.0-RC2
-- Additional CDR backends
-- Allow muted to reconnect
-- Call parking improvements (including SIP parking support)
-- Added licensed hold music from FreePlayMusic
-- GR-303 and Zap improvements
-- More bug fixes from the bug tracker
-- Improved FreeBSD/OpenBSD/MacOS X support
Asterisk 1.0-RC1
-- Innumerable bug fixes and features from the bug tracker
-- Added Open Settlement Protocol (OSP) support
-- Added Non-facility Associated Signalling (NFAS) Support
-- Added alarm Monitoring support
-- Added new MeetMe options
-- Added GR-303 Support
-- Added trunk groups
-- ADPCM Standardization
-- Numerous bug fixes
-- Add IAX2 Firmware Support
-- Add G.726 support
-- Add ices/icecast support
-- Numerous bug fixes
Asterisk 0.7.2
-- Countless small bug fixes from bug tracker
-- DSP Fixes

11
CREDITS Executable file → Normal file
View File

@@ -5,6 +5,8 @@ Asterisk:
Pilosoft, Inc. - for supporting ADSI development in Asterisk
Asterlink, Inc. - for supporting broad Asterisk development
GFS - for supporting ALSA development
Telesthetic - for supporting SIP development
@@ -12,6 +14,7 @@ Telesthetic - for supporting SIP development
Christos Ricudis - for substantial code contributions
Paul Bagyenda, Digital Solutions - for initial Voicetronix driver development
=== WISHLIST CONTRIBUTERS ===
Jeremy McNamara - SpeeX support
Nick Seraphin - RDNIS support
@@ -23,6 +26,8 @@ Wasim - Hangup detect
PhoneJack and Linejack card to the project. (http://www.quicknet.net)
=== MISCELLANEOUS PATCHES ===
Anthony Minessale - Countless big and small fixes, and relentless forward push
anthmct@yahoo.com http://www.asterlink.com
James Golovich - Innumerable contributions
You can find him and asterisk-perl at http://asterisk.gnuinter.net
Andre Bierwirth - Extension hints and status
@@ -53,11 +58,15 @@ Thorsten Lockert - OpenBSD, FreeBSD ports, making MacOS X port run on 10.3,
bugs. tholo@sigmasoft.com
Brian West - ODBC support and Bug Marshaling
William Waites - syslog support, SIP NAT traversal for SIP-UA. ww@styx.org
Rich Murphey - Porting to FreeBSD, NetBSD, OpenBSD, and Darwin.
rich@whiteoaklabs.com http://whiteoaklabs.com
=== OTHER CONTRIBUTIONS ===
John Todd - Monkey sounds and associated teletorture prompt
=== HOLD MUSIC ===
Music provided by www.opsound.org
=== OTHER SOURCE CODE IN ASTERISK ===
I did not implement the codecs in asterisk. Here is the copyright on the

6
HARDWARE Executable file → Normal file
View File

@@ -16,11 +16,11 @@ Zaptel compatible hardware
* Wildcard X100P - Single FXO interface connects to Loopstart phone
line
* Wildcard T400P - Quad T1 interface connects to four T1/PRI
* Wildcard T400P (obsolete) - Quad T1 interface connects to four T1/PRI
interfaces. Supports RBS and PRI voice and PPP, FR, and HDLC data.
* Wildcard E400P - Quad E1 interface connects to four E1/PRI (or PRA)
interfaces. Supports PRA/PRI, EuroISDN voice and PPP, FR, HDLC data.
* Wildcard E400P (obsolete)- Quad E1 interface connects to four E1/PRI
(or PRA) interfaces. Supports PRA/PRI, EuroISDN voice and data.
* Wildcard T100P - Single T1 interface connects to a single T1/PRI
interface. Supports RBS and PRI voice and PPP, FR, and HDLC data.

0
LICENSE Executable file → Normal file
View File

162
Makefile Executable file → Normal file
View File

@@ -20,11 +20,30 @@ OSARCH=$(shell uname -s)
ifeq (${OSARCH},Linux)
PROC=$(shell uname -m)
else
ifeq (${OSARCH},FreeBSD)
ifeq ($(PROC),x86_64)
# You must have GCC 3.4 to use k8, otherwise use athlon
PROC=k8
#PROC=athlon
OPTIONS+=-m64
endif
ifeq ($(PROC),sparc64)
#The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
#This works for even old (2.96) versions of gcc and provides a small boost either way.
#A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn't support it.
#So we go lowest common available by gcc and go a step down, still a step up from
#the default as we now have a better instruction set to work with. - Belgarath
PROC=ultrasparc
OPTIONS+=$(shell if $(CC) -mtune=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mtune=$(PROC)"; fi)
OPTIONS+=$(shell if $(CC) -mcpu=v8 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mcpu=v8"; fi)
OPTIONS+=-fomit-frame-pointer
endif
endif
ifeq ($(findstring BSD,${OSARCH}),BSD)
PROC=$(shell uname -m)
endif
endif
# Pentium Pro Optimize
#PROC=i686
@@ -43,15 +62,18 @@ PWD=$(shell pwd)
#K6OPT = -DK6OPT
#Tell gcc to optimize the asterisk's code
OPTIMIZE=-O6
OPTIMIZE+=-O6
#Include debug symbols in the executables (-g) and profiling info (-pg)
DEBUG=-g #-pg
# New hangup routines for chan_zap.c
# If this flag is uncommented then you need to have new libpri code in your system
# You can still use the old libpri if you do "cvs update -D "08/03/03" in libpri source code
OPTIONS += -DNEW_PRI_HANGUP
# If you are running a radio application, define RADIO_RELAX so that the DTMF
# will be received more reliably
#OPTIONS += -DRADIO_RELAX
# If you don't have a lot of memory (e.g. embedded Asterisk), uncomment the
# following to reduce the size of certain static buffers
#OPTIONS += -DLOW_MEMORY
# Optional debugging parameters
DEBUG_THREADS = #-DDEBUG_THREADS #-DDO_CRASH
@@ -98,6 +120,7 @@ ASTCONFPATH=$(ASTETCDIR)/asterisk.conf
ASTBINDIR=$(INSTALL_PREFIX)/usr/bin
ASTSBINDIR=$(INSTALL_PREFIX)/usr/sbin
ASTVARRUNDIR=$(INSTALL_PREFIX)/var/run
ASTMANDIR=$(INSTALL_PREFIX)/usr/share/man
MODULES_DIR=$(ASTLIBDIR)/modules
AGI_DIR=$(ASTVARLIBDIR)/agi-bin
@@ -105,12 +128,27 @@ AGI_DIR=$(ASTVARLIBDIR)/agi-bin
INCLUDE=-Iinclude -I../include
CFLAGS=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE #-DMAKE_VALGRIND_HAPPY
CFLAGS+=$(OPTIMIZE)
ifneq ($(PROC),ultrasparc)
CFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
CFLAGS+=$(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi)
ifeq (${OSARCH},FreeBSD)
CFLAGS+=-pthread
INCLUDE+=-I/usr/local/include
endif
CFLAGS+=$(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi)
CFLAGS+=$(shell if [ -f /usr/include/osp/osp.h ]; then echo "-DOSP_SUPPORT -I/usr/include/osp" ; fi)
ifeq (${OSARCH},FreeBSD)
OSVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
CFLAGS+=$(shell if test ${OSVERSION} -lt 500016 ; then echo "-D_THREAD_SAFE"; fi)
LIBS+=$(shell if test ${OSVERSION} -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi)
INCLUDE+=-I/usr/local/include
CFLAGS+=$(shell if [ -d /usr/local/include/spandsp ]; then echo "-I/usr/local/include/spandsp"; fi)
endif # FreeBSD
ifeq (${OSARCH},NetBSD)
CFLAGS+=-pthread
INCLUDE+=-I/usr/local/include -I/usr/pkg/include
endif
ifeq (${OSARCH},OpenBSD)
CFLAGS+=-pthread
endif
@@ -119,10 +157,11 @@ endif
#CFLAGS+=-DOLD_DSP_ROUTINES
CFLAGS+=$(shell if [ -f /usr/include/linux/zaptel.h ]; then echo "-DZAPTEL_OPTIMIZATIONS"; fi)
CFLAGS+=$(shell if [ -f /usr/local/include/zaptel.h ]; then echo "-DZAPTEL_OPTIMIZATIONS"; fi)
LIBEDIT=editline/libedit.a
ASTERISKVERSION=$(shell if [ -f .version ]; then cat .version; else if [ -d CVS ]; then echo "CVS-`date +"%D-%T"`"; fi; fi)
ASTERISKVERSION=$(shell if [ -f .version ]; then cat .version; else if [ -d CVS ]; then if [ -f CVS/Tag ] ; then echo "CVS-`sed 's/^T//g' CVS/Tag`-`date +"%D-%T"`"; else echo "CVS-HEAD-`date +"%D-%T"`"; fi; fi; fi)
HTTPDIR=$(shell if [ -d /var/www ]; then echo "/var/www"; else echo "/home/httpd"; fi)
RPMVERSION=$(shell if [ -f .version ]; then sed 's/[-\/:]/_/g' .version; else echo "unknown" ; fi)
CFLAGS+=-DASTERISK_VERSION=\"$(ASTERISKVERSION)\"
@@ -147,29 +186,30 @@ SUBDIRS=res channels pbx apps codecs formats agi cdr astman stdtime
ifeq (${OSARCH},Linux)
LIBS=-ldl -lpthread
endif
ifeq (${OSARCH},OpenBSD)
LIBS=-pthread
else
ifeq (${OSARCH},FreeBSD)
LIBS=-pthread
else
endif
endif
LIBS+=-lncurses -lm
ifeq (${OSARCH},Linux)
LIBS+=-lresolv #-lnjamd
endif
ifeq (${OSARCH},Darwin)
ifeq ($(shell uname -r),7.0.0)
LIBS+=-lresolv
endif
ifeq (${OSARCH},FreeBSD)
LIBS+=-lcrypto
endif
ifeq (${OSARCH},NetBSD)
LIBS+=-lpthread -lcrypto -lm -L/usr/local/lib -L/usr/pkg/lib -lncurses
endif
ifeq (${OSARCH},OpenBSD)
LIBS=-lcrypto -lpthread -lm -lncurses
endif
LIBS+=-lssl
OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \
translate.o file.o say.o pbx.o cli.o md5.o term.o \
ulaw.o alaw.o callerid.o fskmodem.o image.o app.o \
cdr.o tdd.o acl.o rtp.o manager.o asterisk.o ast_expr.o \
dsp.o chanvars.o indications.o autoservice.o db.o privacy.o \
astmm.o enum.o srv.o dns.o aescrypt.o aestab.o aeskey.o
astmm.o enum.o srv.o dns.o aescrypt.o aestab.o aeskey.o \
utils.o
ifeq (${OSARCH},Darwin)
OBJS+=poll.o dlfcn.o
ASTLINK=-Wl,-dynamic
@@ -191,7 +231,7 @@ _all: all
@echo " + $(MAKE) install +"
@echo " +-------------------------------------------+"
all: depend asterisk subdirs
all: depend asterisk subdirs
editline/config.h:
cd editline && unset CFLAGS LIBS && ./configure ; \
@@ -228,6 +268,14 @@ cli.o: cli.c build.h
asterisk.o: asterisk.c build.h
manpage: asterisk.8.gz
asterisk.8.gz: asterisk.sgml
rm -f asterisk.8
docbook2man asterisk.sgml
mv ./*.8 asterisk.8
gzip asterisk.8
ifneq ($(strip $(ASTERISKVERSION)),)
build.h: .version
./make_build_h
@@ -245,7 +293,10 @@ stdtime/libtime.a: FORCE
fi
asterisk: editline/libedit.a db1-ast/libdb1.a stdtime/libtime.a $(OBJS)
$(CC) $(DEBUG) -o asterisk $(ASTLINK) $(OBJS) $(LIBS) $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a
$(CC) $(DEBUG) -o asterisk $(ASTLINK) $(OBJS) $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a $(LIBS)
muted: muted.o
$(CC) -o muted muted.o
subdirs:
for x in $(SUBDIRS); do $(MAKE) -C $$x || exit 1 ; done
@@ -256,6 +307,7 @@ clean:
rm -f build.h
rm -f ast_expr.c
@if [ -e editline/Makefile ]; then $(MAKE) -C editline distclean ; fi
@if [ -d mpg123-0.59r ]; then make -C mpg123-0.59r clean; fi
$(MAKE) -C db1-ast clean
$(MAKE) -C stdtime clean
@@ -269,7 +321,25 @@ datafiles: all
exit 1; \
fi; \
done
for x in sounds/vm-* sounds/transfer* sounds/pbx-* sounds/ss-* sounds/beep* sounds/dir-* sounds/conf-* sounds/agent-* sounds/invalid* sounds/tt-* sounds/auth-* sounds/privacy-*; do \
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/letters
for x in sounds/letters/*.gsm; do \
if grep -q "^%`basename $$x`%" sounds.txt; then \
install -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds/letters ; \
else \
echo "No description for $$x"; \
exit 1; \
fi; \
done
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/phonetic
for x in sounds/phonetic/*.gsm; do \
if grep -q "^%`basename $$x`%" sounds.txt; then \
install -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds/phonetic ; \
else \
echo "No description for $$x"; \
exit 1; \
fi; \
done
for x in sounds/vm-* sounds/transfer* sounds/pbx-* sounds/ss-* sounds/beep* sounds/dir-* sounds/conf-* sounds/agent-* sounds/invalid* sounds/tt-* sounds/auth-* sounds/privacy-* sounds/queue-*; do \
if grep -q "^%`basename $$x`%" sounds.txt; then \
install -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds ; \
else \
@@ -287,7 +357,7 @@ datafiles: all
update:
@if [ -d CVS ]; then \
echo "Updating from CVS..." ; \
cvs -q update -Pd; \
cvs -q -z3 update -Pd; \
rm -f .version; \
else \
echo "Not CVS"; \
@@ -301,6 +371,7 @@ bininstall: all
mkdir -p $(DESTDIR)$(ASTSBINDIR)
mkdir -p $(DESTDIR)$(ASTVARRUNDIR)
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/voicemail
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/tmp
install -m 755 asterisk $(DESTDIR)$(ASTSBINDIR)/
install -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/
if [ ! -f $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ]; then \
@@ -318,19 +389,23 @@ bininstall: all
rm -f $(DESTDIR)$(ASTSPOOLDIR)/vm; \
fi
ln -s $(ASTSPOOLDIR)/voicemail/default $(DESTDIR)$(ASTSPOOLDIR)/vm
rm -f $(DESTDIR)$(MODULES_DIR)/chan_ixj.so
rm -f $(DESTDIR)$(MODULES_DIR)/chan_tor.so
rm -f $(DESTDIR)$(MODULES_DIR)/cdr_mysql.so
rm -f $(DESTDIR)$(MODULES_DIR)/cdr_unixodbc.so
rm -f $(DESTDIR)$(MODULES_DIR)/codec_mp3_d.so
rm -f $(DESTDIR)$(MODULES_DIR)/format_mp3.so
rm -f $(DESTDIR)$(MODULES_DIR)/app_voicemail2.so
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds
mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-csv
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/keys
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/firmware
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/firmware/iax
mkdir -p $(DESTDIR)$(ASTMANDIR)/man8
install -m 644 keys/iaxtel.pub $(DESTDIR)$(ASTVARLIBDIR)/keys
install -m 644 keys/freeworlddialup.pub $(DESTDIR)$(ASTVARLIBDIR)/keys
install -m 644 asterisk.8.gz $(DESTDIR)$(ASTMANDIR)/man8
if [ -d contrib/firmware/iax ]; then \
install -m 644 contrib/firmware/iax/iaxy.bin $(DESTDIR)$(ASTVARLIBDIR)/firmware/iax/iaxy.bin; \
else \
echo "You need to do cvs update -d not just cvs update" ; \
fi
( cd $(DESTDIR)$(ASTVARLIBDIR)/sounds ; ln -s $(ASTSPOOLDIR)/vm . )
( 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 +"
@@ -392,12 +467,13 @@ samples: all datafiles adsi
for x in sounds/*.mp3; do \
install -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/mohmp3 ; \
done
rm -f $(DESTDIR)$(ASTVARLIBDIR)/mohmp3/sample-hold.mp3
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/INBOX
:> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/unavail.gsm
for x in vm-theperson digits/1 digits/2 digits/3 digits/4 vm-isunavail; do \
cat $(DESTDIR)$(ASTVARLIBDIR)/sounds/$$x.gsm >> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/unavail.gsm ; \
done
:> $(DESTDIR)$(ASTVARLIBDIR)/sounds/voicemail/default/1234/busy.gsm
:> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/busy.gsm
for x in vm-theperson digits/1 digits/2 digits/3 digits/4 vm-isonphone; do \
cat $(DESTDIR)$(ASTVARLIBDIR)/sounds/$$x.gsm >> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/busy.gsm ; \
done
@@ -422,7 +498,6 @@ webvmail:
mailbox:
./contrib/scripts/addmailbox
rpm: __rpm
@@ -435,10 +510,16 @@ __rpm: _version
cp -f redhat/asterisk /tmp/asterisk/etc/rc.d/init.d/ ; \
sed "s/^Version:.*/Version: $(RPMVERSION)/g" redhat/asterisk.spec > asterisk.spec ; \
rpmbuild --rcfile /usr/lib/rpm/rpmrc:redhat/rpmrc -bb asterisk.spec
progdocs:
doxygen contrib/asterisk-ng-doxygen
mpg123:
@wget -V >/dev/null || (echo "You need wget" ; false )
[ -f mpg123-0.59r.tar.gz ] || wget http://www.mpg123.de/mpg123/mpg123-0.59r.tar.gz
[ -d mpg123-0.59r ] || tar xfz mpg123-0.59r.tar.gz
make -C mpg123-0.59r linux
config:
if [ -d /etc/rc.d/init.d ]; then \
install -m 755 contrib/init.d/rc.redhat.asterisk /etc/rc.d/init.d/asterisk; \
@@ -447,7 +528,6 @@ config:
install -m 755 init.asterisk /etc/init.d/asterisk; \
fi
dont-optimize:
$(MAKE) OPTIMIZE= K6OPT= install
@@ -460,3 +540,9 @@ depend: .depend
./mkdep ${CFLAGS} `ls *.c`
FORCE:
%_env:
make -C $(shell echo $@ | sed "s/_env//g") env
env:
env

4
README Executable file → Normal file
View File

@@ -24,7 +24,7 @@ community on this Wiki:
must apply to all loadable modules as well, except as defined below.
Digium, Inc. (formerly Linux Support Services) retains copyright to all
of the core Asterisk system, and therefore can grant, at its sole discression,
of the core Asterisk system, and therefore can grant, at its sole discretion,
the ability for companies, individuals, or organizations to create proprietary
or Open Source (but non-GPL'd) modules which may be dynamically linked at
runtime with the portions of Asterisk which fall under our copyright
@@ -34,7 +34,7 @@ umbrella, or are distributed under more flexible licenses than GPL.
If you wish to use our code in other GPL programs, don't worry -- there
is no requirement that you provide the same exemption in your GPL'd
products (although if you've written a module for Asterisk we would
strongly encourage you to make the same excemption that we do).
strongly encourage you to make the same exemption that we do).
Specific permission is also granted to OpenSSL and OpenH323 to link to
Asterisk.

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

6
SECURITY Executable file → Normal file
View File

@@ -25,15 +25,15 @@ the "default" context within other private contexts by using:
in the appropriate section. A well designed PBX might look like this:
[longdistance]
exten => _91NXXNXXXXXX,1,Dial,Tor/g2/BYEXTENSION
exten => _91NXXNXXXXXX,1,Dial(Zap/g2/${EXTEN:1})
include => local
[local]
exten => _9NXXNXXX,1,Dial,Tor/g2/BYEXTENSION
exten => _9NXXNXXX,1,Dial(Zap/g2/${EXTEN:1})
include => default
[default]
exten => 6123,Dial,Tor/1
exten => 6123,Dial(Zap/1)
DON'T FORGET TO TAKE THE DEMO CONTEXT OUT OF YOUR DEFAULT CONTEXT. There

105
acl.c Executable file → Normal file
View File

@@ -13,7 +13,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <string.h>
#include <sys/time.h>
#include <signal.h>
@@ -22,6 +21,8 @@
#include <asterisk/acl.h>
#include <asterisk/logger.h>
#include <asterisk/channel.h>
#include <asterisk/utils.h>
#include <asterisk/lock.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <netdb.h>
@@ -33,11 +34,9 @@
#include <fcntl.h>
#include <net/route.h>
static ast_mutex_t routeseq_lock = AST_MUTEX_INITIALIZER;
AST_MUTEX_DEFINE_STATIC(routeseq_lock);
#endif
#define AST_SENSE_DENY 0
#define AST_SENSE_ALLOW 1
struct ast_ha {
/* Host access rule */
@@ -55,6 +54,7 @@ struct my_ifreq {
struct sockaddr_in ifru_addr;
};
/* Free HA structure */
void ast_free_ha(struct ast_ha *ha)
{
struct ast_ha *hal;
@@ -65,10 +65,52 @@ void ast_free_ha(struct ast_ha *ha)
}
}
/* Copy HA structure */
static void ast_copy_ha(struct ast_ha *from, struct ast_ha *to)
{
memcpy(&to->netaddr, &from->netaddr, sizeof(from->netaddr));
memcpy(&to->netmask, &from->netmask, sizeof(from->netmask));
to->sense = from->sense;
}
/* Create duplicate of ha structure */
static struct ast_ha *ast_duplicate_ha(struct ast_ha *original)
{
struct ast_ha *new_ha = malloc(sizeof(struct ast_ha));
/* Copy from original to new object */
ast_copy_ha(original, new_ha);
return(new_ha);
}
/* Create duplicate HA link list */
/* Used in chan_sip2 templates */
struct ast_ha *ast_duplicate_ha_list(struct ast_ha *original)
{
struct ast_ha *start=original;
struct ast_ha *ret = NULL;
struct ast_ha *link,*prev=NULL;
while(start) {
link = ast_duplicate_ha(start); /* Create copy of this object */
if (prev)
prev->next = link; /* Link previous to this object */
if (!ret)
ret = link; /* Save starting point */
start = start->next; /* Go to next object */
prev = link; /* Save pointer to this object */
}
return (ret); /* Return start of list */
}
struct ast_ha *ast_append_ha(char *sense, char *stuff, struct ast_ha *path)
{
struct ast_ha *ha = malloc(sizeof(struct ast_ha));
char *nm;
char *nm="255.255.255.255";
char tmp[256] = "";
struct ast_ha *prev = NULL;
struct ast_ha *ret;
@@ -119,6 +161,7 @@ struct ast_ha *ast_append_ha(char *sense, char *stuff, struct ast_ha *path)
else
ret = ha;
}
ast_log(LOG_DEBUG, "%s/%s appended to acl for peer\n",stuff, nm);
return ret;
}
@@ -127,6 +170,13 @@ int ast_apply_ha(struct ast_ha *ha, struct sockaddr_in *sin)
/* Start optimistic */
int res = AST_SENSE_ALLOW;
while(ha) {
char iabuf[INET_ADDRSTRLEN];
char iabuf2[INET_ADDRSTRLEN];
/* DEBUG */
ast_log(LOG_DEBUG,
"##### Testing %s with %s\n",
ast_inet_ntoa(iabuf, sizeof(iabuf), sin->sin_addr),
ast_inet_ntoa(iabuf2, sizeof(iabuf2), ha->netaddr));
/* For each rule, if this address and the netmask = the net address
apply the current rule */
if ((sin->sin_addr.s_addr & ha->netmask.s_addr) == (ha->netaddr.s_addr))
@@ -139,7 +189,8 @@ int ast_apply_ha(struct ast_ha *ha, struct sockaddr_in *sin)
int ast_get_ip(struct sockaddr_in *sin, char *value)
{
struct hostent *hp;
hp = gethostbyname(value);
struct ast_hostent ahp;
hp = ast_gethostbyname(value, &ahp);
if (hp) {
memcpy(&sin->sin_addr, hp->h_addr, sizeof(sin->sin_addr));
} else {
@@ -149,12 +200,6 @@ int ast_get_ip(struct sockaddr_in *sin, char *value)
return 0;
}
int inaddrcmp(struct sockaddr_in *sin1, struct sockaddr_in *sin2)
{
return ((sin1->sin_addr.s_addr != sin2->sin_addr.s_addr )
|| (sin1->sin_port != sin2->sin_port));
}
/* iface is the interface (e.g. eth0); address is the return value */
int ast_lookup_iface(char *iface, struct in_addr *address) {
int mysock, res = 0;
@@ -186,29 +231,30 @@ int ast_ouraddrfor(struct in_addr *them, struct in_addr *us)
struct rt_msghdr m_rtm;
char m_space[512];
} m_rtmsg;
char *cp, *p = ast_strdupa(inet_ntoa(*them));
char iabuf[INET_ADDRSTRLEN];
char *cp, *p;
int i, l, s, seq, flags;
pid_t pid = getpid();
static int routeseq; /* Protected by "routeseq_lock" mutex */
p = ast_strdupa(ast_inet_ntoa(iabuf, sizeof(iabuf), *them));
memset(us, 0, sizeof(struct in_addr));
memset(&m_rtmsg, 0, sizeof(m_rtmsg));
m_rtmsg.m_rtm.rtm_type = RTM_GET;
m_rtmsg.m_rtm.rtm_flags = RTF_UP | RTF_HOST;
m_rtmsg.m_rtm.rtm_version = RTM_VERSION;
ast_mutex_lock(&routeseq_lock);
seq = ++routeseq;
ast_mutex_unlock(&routeseq_lock);
m_rtmsg.m_rtm.rtm_seq = seq;
m_rtmsg.m_rtm.rtm_addrs = RTA_IFA | RTA_DST;
m_rtmsg.m_rtm.rtm_addrs = RTA_DST | RTA_IFA;
m_rtmsg.m_rtm.rtm_msglen = sizeof(struct rt_msghdr) + sizeof(struct sockaddr_in);
sin = (struct sockaddr_in *)m_rtmsg.m_space;
sin->sin_family = AF_INET;
sin->sin_len = sizeof(struct sockaddr_in);
sin->sin_addr = *them;
if ((s = socket(PF_ROUTE, SOCK_RAW, 0)) < 0) {
if ((s = socket(PF_ROUTE, SOCK_RAW, AF_UNSPEC)) < 0) {
ast_log(LOG_ERROR, "Error opening routing socket\n");
return -1;
}
@@ -221,7 +267,7 @@ int ast_ouraddrfor(struct in_addr *them, struct in_addr *us)
}
do {
l = read(s, (char *)&m_rtmsg, sizeof(m_rtmsg));
} while (l > 0 && (m_rtmsg.m_rtm.rtm_seq != 1 || m_rtmsg.m_rtm.rtm_pid != pid));
} while (l > 0 && (m_rtmsg.m_rtm.rtm_seq != seq || m_rtmsg.m_rtm.rtm_pid != pid));
if (l < 0) {
if (errno != EAGAIN)
ast_log(LOG_ERROR, "Error reading from routing socket\n");
@@ -253,7 +299,7 @@ int ast_ouraddrfor(struct in_addr *them, struct in_addr *us)
if (i == RTA_IFA && sa->sa_family == AF_INET) {
sin = (struct sockaddr_in *)sa;
*us = sin->sin_addr;
ast_log(LOG_DEBUG, "Found route to %s, output from our address %s.\n", p, inet_ntoa(*us));
ast_log(LOG_DEBUG, "Found route to %s, output from our address %s.\n", p, ast_inet_ntoa(iabuf, sizeof(iabuf), *us));
return 0;
}
cp += sa->sa_len > 0 ?
@@ -279,7 +325,7 @@ int ast_ouraddrfor(struct in_addr *them, struct in_addr *us)
fgets(line,sizeof(line),PROC);
while (!feof(PROC)) {
char iface[8];
char iface[256];
unsigned int dest, gateway, mask;
int i,fieldnum;
char *fields[40];
@@ -303,18 +349,21 @@ int ast_ouraddrfor(struct in_addr *them, struct in_addr *us)
i = offset - line;
}
}
if (fieldnum >= 8) {
sscanf(fields[0],"%s",iface);
sscanf(fields[1],"%x",&dest);
sscanf(fields[2],"%x",&gateway);
sscanf(fields[7],"%x",&mask);
sscanf(fields[0],"%s",iface);
sscanf(fields[1],"%x",&dest);
sscanf(fields[2],"%x",&gateway);
sscanf(fields[7],"%x",&mask);
#if 0
printf("Addr: %s %08x Dest: %08x Mask: %08x\n", inet_ntoa(*them), remote_ip, dest, mask);
{ char iabuf[INET_ADDRSTRLEN];
printf("Addr: %s %08x Dest: %08x Mask: %08x\n", ast_inet_ntoa(iabuf, sizeof(iabuf), *them), remote_ip, dest, mask); }
#endif
/* Looks simple, but here is the magic */
if (((remote_ip & mask) ^ dest) == 0) {
res = ast_lookup_iface(iface,us);
break;
/* Looks simple, but here is the magic */
if (((remote_ip & mask) ^ dest) == 0) {
res = ast_lookup_iface(iface,us);
break;
}
}
}
fclose(PROC);

0
aescrypt.c Executable file → Normal file
View File

0
aeskey.c Executable file → Normal file
View File

10
aesopt.h Executable file → Normal file
View File

@@ -148,13 +148,19 @@
/* PLATFORM SPECIFIC INCLUDES */
#if defined( __FreeBSD__ ) || defined( __OpenBSD__ )
#if defined( __OpenBSD__ )
# include <machine/types.h>
# include <sys/endian.h>
#elif defined( BSD ) && ( BSD >= 199103 )
#elif defined( __FreeBSD__ ) || defined( __NetBSD__ )
# include <sys/types.h>
# include <sys/endian.h>
#elif defined( BSD ) && ( BSD >= 199103 ) || defined(__APPLE__)
# include <machine/endian.h>
#elif defined( __GNUC__ ) || defined( __GNU_LIBRARY__ )
# include <endian.h>
#if !defined(__APPLE__)
# include <byteswap.h>
#endif
#elif defined( linux )
# include <endian.h>
#endif

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

8
agi/Makefile Executable file → Normal file
View File

@@ -22,13 +22,13 @@ install: all
for x in $(AGIS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(AGI_DIR) ; done
eagi-test: eagi-test.o
$(CC) -o eagi-test eagi-test.o
$(CC) $(CFLAGS) -o eagi-test eagi-test.o
eagi-sphinx-test: eagi-sphinx-test.o
$(CC) -o eagi-sphinx-test eagi-sphinx-test.o
$(CC) $(CFLAGS) -o eagi-sphinx-test eagi-sphinx-test.o
clean:
rm -f *.so *.o look .depend
rm -f *.so *.o look .depend eagi-test eagi-sphinx-test
%.so : %.o
$(CC) -shared -Xlinker -x -o $@ $<

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

94
agi/fastagi-test Normal file
View File

@@ -0,0 +1,94 @@
#!/usr/bin/perl
use strict;
use Socket;
use Carp;
use IO::Handle;
my $port = 4573;
$|=1;
# Setup some variables
my %AGI; my $tests = 0; my $fail = 0; my $pass = 0;
sub checkresult {
my ($res) = @_;
my $retval;
$tests++;
chomp $res;
if ($res =~ /^200/) {
$res =~ /result=(-?\d+)/;
if (!length($1)) {
print STDERR "FAIL ($res)\n";
$fail++;
} else {
print STDERR "PASS ($1)\n";
$pass++;
}
} else {
print STDERR "FAIL (unexpected result '$res')\n";
$fail++;
}
}
socket(SERVER, PF_INET, SOCK_STREAM, 0);
setsockopt(SERVER, SOL_SOCKET, SO_REUSEADDR, pack("l", 1));
bind(SERVER, sockaddr_in($port, INADDR_ANY)) || die("can't bind\n");
listen(SERVER, SOMAXCONN);
for(;;) {
my $raddr = accept(CLIENT, SERVER);
my ($s, $p) = sockaddr_in($raddr);
CLIENT->autoflush(1);
while(<CLIENT>) {
chomp;
last unless length($_);
if (/^agi_(\w+)\:\s+(.*)$/) {
$AGI{$1} = $2;
}
}
print STDERR "AGI Environment Dump from $s:$p --\n";
foreach my $i (sort keys %AGI) {
print STDERR " -- $i = $AGI{$i}\n";
}
print STDERR "1. Testing 'sendfile'...";
print CLIENT "STREAM FILE beep \"\"\n";
my $result = <CLIENT>;
&checkresult($result);
print STDERR "2. Testing 'sendtext'...";
print CLIENT "SEND TEXT \"hello world\"\n";
my $result = <CLIENT>;
&checkresult($result);
print STDERR "3. Testing 'sendimage'...";
print CLIENT "SEND IMAGE asterisk-image\n";
my $result = <CLIENT>;
&checkresult($result);
print STDERR "4. Testing 'saynumber'...";
print CLIENT "SAY NUMBER 192837465 \"\"\n";
my $result = <CLIENT>;
&checkresult($result);
print STDERR "5. Testing 'waitdtmf'...";
print CLIENT "WAIT FOR DIGIT 1000\n";
my $result = <CLIENT>;
&checkresult($result);
print STDERR "6. Testing 'record'...";
print CLIENT "RECORD FILE testagi gsm 1234 3000\n";
my $result = <CLIENT>;
&checkresult($result);
print STDERR "6a. Testing 'record' playback...";
print CLIENT "STREAM FILE testagi \"\"\n";
my $result = <CLIENT>;
&checkresult($result);
close(CLIENT);
print STDERR "================== Complete ======================\n";
print STDERR "$tests tests completed, $pass passed, $fail failed\n";
print STDERR "==================================================\n";
}

0
agi/numeralize Executable file → Normal file
View File

0
alaw.c Executable file → Normal file
View File

722
app.c Executable file → Normal file
View File

@@ -1,11 +1,11 @@
/*
* Asterisk -- A telephony toolkit for Linux.
*
* Channel Management
* Convenient Application Routines
*
* Copyright (C) 1999, Mark Spencer
* Copyright (C) 1999-2004, Digium, Inc.
*
* Mark Spencer <markster@linux-support.net>
* Mark Spencer <markster@digium.com>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
@@ -13,7 +13,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <string.h>
#include <sys/time.h>
#include <signal.h>
@@ -27,15 +26,21 @@
#include <asterisk/dsp.h>
#include <asterisk/logger.h>
#include <asterisk/options.h>
#include <asterisk/utils.h>
#include <asterisk/lock.h>
#include "asterisk.h"
#include "astconf.h"
#define MAX_OTHER_FORMATS 10
/* set timeout to 0 for "standard" timeouts. Set timeout to -1 for
"ludicrous time" (essentially never times out) */
int ast_app_getdata(struct ast_channel *c, char *prompt, char *s, int maxlen, int timeout)
{
int res,to,fto;
/* XXX Merge with full version? XXX */
if (maxlen)
s[0] = '\0';
if (prompt) {
res = ast_streamfile(c, prompt, c->language);
if (res < 0)
@@ -153,14 +158,14 @@ int ast_app_has_voicemail(const char *mailbox)
char *context;
int ret;
/* If no mailbox, return immediately */
if (!strlen(mailbox))
if (ast_strlen_zero(mailbox))
return 0;
if (strchr(mailbox, ',')) {
strncpy(tmp, mailbox, sizeof(tmp));
strncpy(tmp, mailbox, sizeof(tmp) - 1);
mb = tmp;
ret = 0;
while((cur = strsep(&mb, ","))) {
if (strlen(cur)) {
if (!ast_strlen_zero(cur)) {
if (ast_app_has_voicemail(cur))
return 1;
}
@@ -202,15 +207,15 @@ int ast_app_messagecount(const char *mailbox, int *newmsgs, int *oldmsgs)
if (oldmsgs)
*oldmsgs = 0;
/* If no mailbox, return immediately */
if (!strlen(mailbox))
if (ast_strlen_zero(mailbox))
return 0;
if (strchr(mailbox, ',')) {
int tmpnew, tmpold;
strncpy(tmp, mailbox, sizeof(tmp));
strncpy(tmp, mailbox, sizeof(tmp) - 1);
mb = tmp;
ret = 0;
while((cur = strsep(&mb, ", "))) {
if (strlen(cur)) {
if (!ast_strlen_zero(cur)) {
if (ast_app_messagecount(cur, newmsgs ? &tmpnew : NULL, oldmsgs ? &tmpold : NULL))
return -1;
else {
@@ -258,3 +263,700 @@ int ast_app_messagecount(const char *mailbox, int *newmsgs, int *oldmsgs)
}
return 0;
}
int ast_dtmf_stream(struct ast_channel *chan,struct ast_channel *peer,char *digits,int between)
{
char *ptr=NULL;
int res=0;
struct ast_frame f;
if (!between)
between = 100;
if (peer)
res = ast_autoservice_start(peer);
if (!res) {
res = ast_waitfor(chan,100);
if (res > -1) {
for (ptr=digits;*ptr;*ptr++) {
if (*ptr == 'w') {
res = ast_safe_sleep(chan, 500);
if (res)
break;
continue;
}
memset(&f, 0, sizeof(f));
f.frametype = AST_FRAME_DTMF;
f.subclass = *ptr;
f.src = "ast_dtmf_stream";
if (strchr("0123456789*#abcdABCD",*ptr)==NULL) {
ast_log(LOG_WARNING, "Illegal DTMF character '%c' in string. (0-9*#aAbBcCdD allowed)\n",*ptr);
} else {
res = ast_write(chan, &f);
if (res)
break;
/* pause between digits */
res = ast_safe_sleep(chan,between);
if (res)
break;
}
}
}
if (peer)
res = ast_autoservice_stop(peer);
}
return res;
}
struct linear_state {
int fd;
int autoclose;
int allowoverride;
int origwfmt;
};
static void linear_release(struct ast_channel *chan, void *params)
{
struct linear_state *ls = params;
if (ls->origwfmt && ast_set_write_format(chan, ls->origwfmt)) {
ast_log(LOG_WARNING, "Unable to restore channel '%s' to format '%d'\n", chan->name, ls->origwfmt);
}
if (ls->autoclose)
close(ls->fd);
free(params);
}
static int linear_generator(struct ast_channel *chan, void *data, int len, int samples)
{
struct ast_frame f;
short buf[2048 + AST_FRIENDLY_OFFSET / 2];
struct linear_state *ls = data;
int res;
len = samples * 2;
if (len > sizeof(buf) - AST_FRIENDLY_OFFSET) {
ast_log(LOG_WARNING, "Can't generate %d bytes of data!\n" ,len);
len = sizeof(buf) - AST_FRIENDLY_OFFSET;
}
memset(&f, 0, sizeof(f));
res = read(ls->fd, buf + AST_FRIENDLY_OFFSET/2, len);
if (res > 0) {
f.frametype = AST_FRAME_VOICE;
f.subclass = AST_FORMAT_SLINEAR;
f.data = buf + AST_FRIENDLY_OFFSET/2;
f.datalen = res;
f.samples = res / 2;
f.offset = AST_FRIENDLY_OFFSET;
ast_write(chan, &f);
if (res == len)
return 0;
}
return -1;
}
static void *linear_alloc(struct ast_channel *chan, void *params)
{
struct linear_state *ls;
/* In this case, params is already malloc'd */
if (params) {
ls = params;
if (ls->allowoverride)
chan->writeinterrupt = 1;
else
chan->writeinterrupt = 0;
ls->origwfmt = chan->writeformat;
if (ast_set_write_format(chan, AST_FORMAT_SLINEAR)) {
ast_log(LOG_WARNING, "Unable to set '%s' to linear format (write)\n", chan->name);
free(ls);
ls = params = NULL;
}
}
return params;
}
static struct ast_generator linearstream =
{
alloc: linear_alloc,
release: linear_release,
generate: linear_generator,
};
int ast_linear_stream(struct ast_channel *chan, const char *filename, int fd, int allowoverride)
{
struct linear_state *lin;
char tmpf[256] = "";
int res = -1;
int autoclose = 0;
if (fd < 0) {
if (!filename || ast_strlen_zero(filename))
return -1;
autoclose = 1;
if (filename[0] == '/')
strncpy(tmpf, filename, sizeof(tmpf) - 1);
else
snprintf(tmpf, sizeof(tmpf), "%s/%s/%s", (char *)ast_config_AST_VAR_DIR, "sounds", filename);
fd = open(tmpf, O_RDONLY);
if (fd < 0){
ast_log(LOG_WARNING, "Unable to open file '%s': %s\n", tmpf, strerror(errno));
return -1;
}
}
lin = malloc(sizeof(struct linear_state));
if (lin) {
memset(lin, 0, sizeof(lin));
lin->fd = fd;
lin->allowoverride = allowoverride;
lin->autoclose = autoclose;
res = ast_activate_generator(chan, &linearstream, lin);
}
return res;
}
int ast_control_streamfile(struct ast_channel *chan, char *file, char *fwd, char *rev, char *stop, char *pause, int skipms)
{
struct timeval started, ended;
long elapsed = 0,last_elapsed =0;
char *breaks=NULL;
char *end=NULL;
int blen=2;
int res=0;
if (stop)
blen += strlen(stop);
if (pause)
blen += strlen(pause);
if (blen > 2) {
breaks = alloca(blen + 1);
breaks[0] = '\0';
strcat(breaks, stop);
strcat(breaks, pause);
}
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")) {
*end = '\0';
end++;
}
}
}
for (;;) {
gettimeofday(&started,NULL);
if (chan)
ast_stopstream(chan);
res = ast_streamfile(chan, file, chan->language);
if (!res) {
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;
}
if (res < 1)
break;
if (pause != NULL && strchr(pause, res)) {
gettimeofday(&ended, NULL);
elapsed = (((ended.tv_sec * 1000) + ended.tv_usec / 1000) - ((started.tv_sec * 1000) + started.tv_usec / 1000) + last_elapsed);
for(;;) {
if (chan)
ast_stopstream(chan);
res = ast_waitfordigit(chan, 1000);
if (res == 0)
continue;
else if (res == -1 || strchr(pause, res) || (stop && strchr(stop, res)))
break;
}
if (res == *pause) {
res = 0;
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; */
break;
}
}
if (chan)
ast_stopstream(chan);
return res;
}
int ast_play_and_wait(struct ast_channel *chan, char *fn)
{
int d;
d = ast_streamfile(chan, fn, chan->language);
if (d)
return d;
d = ast_waitstream(chan, AST_DIGIT_ANY);
ast_stopstream(chan);
return d;
}
static int global_silence_threshold = 128;
static int global_maxsilence = 0;
int ast_play_and_record(struct ast_channel *chan, char *playfile, char *recordfile, int maxtime, char *fmt, int *duration, int silencethreshold, int maxsilence)
{
char d, *fmts;
char comment[256];
int x, fmtcnt=1, res=-1,outmsg=0;
struct ast_frame *f;
struct ast_filestream *others[MAX_OTHER_FORMATS];
char *sfmt[MAX_OTHER_FORMATS];
char *stringp=NULL;
time_t start, end;
struct ast_dsp *sildet; /* silence detector dsp */
int totalsilence = 0;
int dspsilence = 0;
int gotsilence = 0; /* did we timeout for silence? */
int rfmt=0;
if (silencethreshold < 0)
silencethreshold = global_silence_threshold;
if (maxsilence < 0)
maxsilence = global_maxsilence;
/* barf if no pointer passed to store duration in */
if (duration == NULL) {
ast_log(LOG_WARNING, "Error play_and_record called without duration pointer\n");
return -1;
}
ast_log(LOG_DEBUG,"play_and_record: %s, %s, '%s'\n", playfile ? playfile : "<None>", recordfile, fmt);
snprintf(comment,sizeof(comment),"Playing %s, Recording to: %s on %s\n", playfile ? playfile : "<None>", recordfile, chan->name);
if (playfile) {
d = ast_play_and_wait(chan, playfile);
if (d > -1)
d = ast_streamfile(chan, "beep",chan->language);
if (!d)
d = ast_waitstream(chan,"");
if (d < 0)
return -1;
}
fmts = ast_strdupa(fmt);
stringp=fmts;
strsep(&stringp, "|");
ast_log(LOG_DEBUG,"Recording Formats: sfmts=%s\n", fmts);
sfmt[0] = ast_strdupa(fmts);
while((fmt = strsep(&stringp, "|"))) {
if (fmtcnt > MAX_OTHER_FORMATS - 1) {
ast_log(LOG_WARNING, "Please increase MAX_OTHER_FORMATS in app_voicemail.c\n");
break;
}
sfmt[fmtcnt++] = ast_strdupa(fmt);
}
time(&start);
end=start; /* pre-initialize end to be same as start in case we never get into loop */
for (x=0;x<fmtcnt;x++) {
others[x] = ast_writefile(recordfile, sfmt[x], comment, O_TRUNC, 0, 0700);
ast_verbose( VERBOSE_PREFIX_3 "x=%i, open writing: %s format: %s, %p\n", x, recordfile, sfmt[x], others[x]);
if (!others[x]) {
break;
}
}
sildet = ast_dsp_new(); /* Create the silence detector */
if (!sildet) {
ast_log(LOG_WARNING, "Unable to create silence detector :(\n");
return -1;
}
ast_dsp_set_threshold(sildet, silencethreshold);
if (maxsilence > 0) {
rfmt = chan->readformat;
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");
return -1;
}
}
if (x == fmtcnt) {
/* Loop forever, writing the packets we read to the writer(s), until
we read a # or get a hangup */
f = NULL;
for(;;) {
res = ast_waitfor(chan, 2000);
if (!res) {
ast_log(LOG_DEBUG, "One waitfor failed, trying another\n");
/* Try one more time in case of masq */
res = ast_waitfor(chan, 2000);
if (!res) {
ast_log(LOG_WARNING, "No audio available on %s??\n", chan->name);
res = -1;
}
}
if (res < 0) {
f = NULL;
break;
}
f = ast_read(chan);
if (!f)
break;
if (f->frametype == AST_FRAME_VOICE) {
/* write each format */
for (x=0;x<fmtcnt;x++) {
res = ast_writestream(others[x], f);
}
/* Silence Detection */
if (maxsilence > 0) {
dspsilence = 0;
ast_dsp_silence(sildet, f, &dspsilence);
if (dspsilence)
totalsilence = dspsilence;
else
totalsilence = 0;
if (totalsilence > maxsilence) {
/* Ended happily with silence */
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;
outmsg=2;
break;
}
}
/* Exit on any error */
if (res) {
ast_log(LOG_WARNING, "Error writing frame\n");
ast_frfree(f);
break;
}
} else if (f->frametype == AST_FRAME_VIDEO) {
/* Write only once */
ast_writestream(others[0], f);
} else if (f->frametype == AST_FRAME_DTMF) {
if (f->subclass == '#') {
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "User ended message by pressing %c\n", f->subclass);
res = '#';
outmsg = 2;
ast_frfree(f);
break;
}
}
if (f->subclass == '0') {
/* Check for a '0' during message recording also, in case caller wants operator */
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "User cancelled by pressing %c\n", f->subclass);
res = '0';
outmsg = 0;
ast_frfree(f);
break;
}
if (maxtime) {
time(&end);
if (maxtime < (end - start)) {
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "Took too long, cutting it short...\n");
outmsg = 2;
res = 't';
ast_frfree(f);
break;
}
}
ast_frfree(f);
}
if (end == start) time(&end);
if (!f) {
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "User hung up\n");
res = -1;
outmsg=1;
}
} else {
ast_log(LOG_WARNING, "Error creating writestream '%s', format '%s'\n", recordfile, sfmt[x]);
}
*duration = end - start;
for (x=0;x<fmtcnt;x++) {
if (!others[x])
break;
if (res > 0) {
if (totalsilence)
ast_stream_rewind(others[x], totalsilence-200);
else
ast_stream_rewind(others[x], 200);
}
ast_truncstream(others[x]);
ast_closestream(others[x]);
}
if (rfmt) {
if (ast_set_read_format(chan, rfmt)) {
ast_log(LOG_WARNING, "Unable to restore format %s to channel '%s'\n", ast_getformatname(rfmt), chan->name);
}
}
if (outmsg > 1) {
/* Let them know recording is stopped */
if(!ast_streamfile(chan, "auth-thankyou", chan->language))
ast_waitstream(chan, "");
}
return res;
}
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)
{
char d = 0, *fmts;
char comment[256];
int x, fmtcnt=1, res=-1,outmsg=0;
struct ast_frame *f;
struct ast_filestream *others[MAX_OTHER_FORMATS];
struct ast_filestream *realfiles[MAX_OTHER_FORMATS];
char *sfmt[MAX_OTHER_FORMATS];
char *stringp=NULL;
time_t start, end;
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];
if (silencethreshold < 0)
silencethreshold = global_silence_threshold;
if (maxsilence < 0)
maxsilence = global_maxsilence;
/* barf if no pointer passed to store duration in */
if (duration == NULL) {
ast_log(LOG_WARNING, "Error play_and_prepend called without duration pointer\n");
return -1;
}
ast_log(LOG_DEBUG,"play_and_prepend: %s, %s, '%s'\n", playfile ? playfile : "<None>", recordfile, fmt);
snprintf(comment,sizeof(comment),"Playing %s, Recording to: %s on %s\n", playfile ? playfile : "<None>", recordfile, chan->name);
if (playfile || beep) {
if (!beep)
d = ast_play_and_wait(chan, playfile);
if (d > -1)
d = ast_streamfile(chan, "beep",chan->language);
if (!d)
d = ast_waitstream(chan,"");
if (d < 0)
return -1;
}
strncpy(prependfile, recordfile, sizeof(prependfile) -1);
strncat(prependfile, "-prepend", sizeof(prependfile) - strlen(prependfile) - 1);
fmts = ast_strdupa(fmt);
stringp=fmts;
strsep(&stringp, "|");
ast_log(LOG_DEBUG,"Recording Formats: sfmts=%s\n", fmts);
sfmt[0] = ast_strdupa(fmts);
while((fmt = strsep(&stringp, "|"))) {
if (fmtcnt > MAX_OTHER_FORMATS - 1) {
ast_log(LOG_WARNING, "Please increase MAX_OTHER_FORMATS in app_voicemail.c\n");
break;
}
sfmt[fmtcnt++] = ast_strdupa(fmt);
}
time(&start);
end=start; /* pre-initialize end to be same as start in case we never get into loop */
for (x=0;x<fmtcnt;x++) {
others[x] = ast_writefile(prependfile, sfmt[x], comment, O_TRUNC, 0, 0700);
ast_verbose( VERBOSE_PREFIX_3 "x=%i, open writing: %s format: %s, %p\n", x, prependfile, sfmt[x], others[x]);
if (!others[x]) {
break;
}
}
sildet = ast_dsp_new(); /* Create the silence detector */
if (!sildet) {
ast_log(LOG_WARNING, "Unable to create silence detector :(\n");
return -1;
}
ast_dsp_set_threshold(sildet, silencethreshold);
if (maxsilence > 0) {
rfmt = chan->readformat;
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");
return -1;
}
}
if (x == fmtcnt) {
/* Loop forever, writing the packets we read to the writer(s), until
we read a # or get a hangup */
f = NULL;
for(;;) {
res = ast_waitfor(chan, 2000);
if (!res) {
ast_log(LOG_DEBUG, "One waitfor failed, trying another\n");
/* Try one more time in case of masq */
res = ast_waitfor(chan, 2000);
if (!res) {
ast_log(LOG_WARNING, "No audio available on %s??\n", chan->name);
res = -1;
}
}
if (res < 0) {
f = NULL;
break;
}
f = ast_read(chan);
if (!f)
break;
if (f->frametype == AST_FRAME_VOICE) {
/* write each format */
for (x=0;x<fmtcnt;x++) {
if (!others[x])
break;
res = ast_writestream(others[x], f);
}
/* Silence Detection */
if (maxsilence > 0) {
dspsilence = 0;
ast_dsp_silence(sildet, f, &dspsilence);
if (dspsilence)
totalsilence = dspsilence;
else
totalsilence = 0;
if (totalsilence > maxsilence) {
/* Ended happily with silence */
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;
outmsg=2;
break;
}
}
/* Exit on any error */
if (res) {
ast_log(LOG_WARNING, "Error writing frame\n");
ast_frfree(f);
break;
}
} else if (f->frametype == AST_FRAME_VIDEO) {
/* Write only once */
ast_writestream(others[0], f);
} else if (f->frametype == AST_FRAME_DTMF) {
/* stop recording with any digit */
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "User ended message by pressing %c\n", f->subclass);
res = 't';
outmsg = 2;
ast_frfree(f);
break;
}
if (maxtime) {
time(&end);
if (maxtime < (end - start)) {
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "Took too long, cutting it short...\n");
res = 't';
outmsg=2;
ast_frfree(f);
break;
}
}
ast_frfree(f);
}
if (end == start) time(&end);
if (!f) {
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "User hung up\n");
res = -1;
outmsg=1;
#if 0
/* delete all the prepend files */
for (x=0;x<fmtcnt;x++) {
if (!others[x])
break;
ast_closestream(others[x]);
ast_filedelete(prependfile, sfmt[x]);
}
#endif
}
} else {
ast_log(LOG_WARNING, "Error creating writestream '%s', format '%s'\n", prependfile, sfmt[x]);
}
*duration = end - start;
#if 0
if (outmsg > 1) {
#else
if (outmsg) {
#endif
struct ast_frame *fr;
for (x=0;x<fmtcnt;x++) {
snprintf(comment, sizeof(comment), "Opening the real file %s.%s\n", recordfile, sfmt[x]);
realfiles[x] = ast_readfile(recordfile, sfmt[x], comment, O_RDONLY, 0, 0);
if (!others[x] || !realfiles[x])
break;
if (totalsilence)
ast_stream_rewind(others[x], totalsilence-200);
else
ast_stream_rewind(others[x], 200);
ast_truncstream(others[x]);
/* add the original file too */
while ((fr = ast_readframe(realfiles[x]))) {
ast_writestream(others[x],fr);
}
ast_closestream(others[x]);
ast_closestream(realfiles[x]);
ast_filerename(prependfile, recordfile, sfmt[x]);
#if 0
ast_verbose("Recording Format: sfmts=%s, prependfile %s, recordfile %s\n", sfmt[x],prependfile,recordfile);
#endif
ast_filedelete(prependfile, sfmt[x]);
}
}
if (rfmt) {
if (ast_set_read_format(chan, rfmt)) {
ast_log(LOG_WARNING, "Unable to restore format %s to channel '%s'\n", ast_getformatname(rfmt), chan->name);
}
}
if (outmsg) {
if (outmsg > 1) {
/* Let them know it worked */
ast_streamfile(chan, "auth-thankyou", chan->language);
ast_waitstream(chan, "");
}
}
return res;
}

View File

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

26
apps/Makefile Executable file → Normal file
View File

@@ -17,15 +17,19 @@ USE_POSTGRES_VM_INTERFACE=0
#APPS=app_dial.so app_playback.so app_directory.so app_intercom.so app_mp3.so
APPS=app_dial.so app_playback.so app_voicemail.so app_directory.so app_mp3.so\
app_system.so app_echo.so app_record.so app_image.so app_url.so app_disa.so \
app_agi.so app_qcall.so app_adsiprog.so app_getcpeid.so app_milliwatt.so \
app_zapateller.so app_datetime.so app_setcallerid.so app_festival.so \
app_qcall.so app_adsiprog.so app_getcpeid.so app_milliwatt.so \
app_zapateller.so app_setcallerid.so app_festival.so \
app_queue.so app_senddtmf.so app_parkandannounce.so app_striplsd.so \
app_setcidname.so app_lookupcidname.so app_substring.so app_macro.so \
app_authenticate.so app_softhangup.so app_lookupblacklist.so \
app_waitforring.so app_privacy.so app_db.so app_chanisavail.so \
app_enumlookup.so app_transfer.so app_setcidnum.so app_cdr.so \
app_hasnewvoicemail.so app_sayunixtime.so app_cut.so app_read.so \
app_setcdruserfield.so app_random.so
app_setcdruserfield.so app_random.so app_ices.so app_eval.so \
app_nbscat.so app_sendtext.so app_exec.so app_sms.so \
app_groupcount.so app_txtcidname.so app_controlplayback.so \
app_talkdetect.so app_alarmreceiver.so app_userevent.so app_verbose.so \
app_test.so app_forkcdr.so
ifneq (${OSARCH},Darwin)
APPS+=app_intercom.so
@@ -33,9 +37,11 @@ endif
#APPS+=app_sql_postgres.so
#APPS+=app_sql_odbc.so
#APPS+=app_rpt.so
APPS+=$(shell if [ -f /usr/include/linux/zaptel.h ]; then echo "app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi)
#APPS+=$(shell if [ -f /usr/include/zap.h ]; then echo "app_rpt.so" ; fi)
APPS+=$(shell if [ -f /usr/local/include/zaptel.h ]; then echo "app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi)
APPS+=$(shell if [ -f /usr/include/osp/osp.h ]; then echo "app_osplookup.so" ; fi)
CFLAGS+=-fPIC
@@ -60,12 +66,7 @@ app_rpt.so : app_rpt.o
install: all
for x in $(APPS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
app_todd.o: app_todd.c
gcc -pipe -O6 -g -Iinclude -I../include -D_REENTRANT -march=i586 -DDO_CRASH -c -o app_todd.o app_todd.c
app_todd.so: app_todd.o
$(CC) $(SOLINK) -o $@ $< -L/usr/local/ssl/lib -lssl -lcrypto
rm -f $(DESTDIR)$(MODULES_DIR)/app_datetime.so
app_voicemail.so : app_voicemail.o
ifeq ($(USE_MYSQL_VM_INTERFACE),1)
@@ -88,7 +89,7 @@ app_sql_odbc.so: app_sql_odbc.o
$(CC) $(SOLINK) -o $@ $< -lodbc
look: look.c
gcc -pipe -O6 -g look.c -o look -lncurses
$(CC) -pipe -O6 -g look.c -o look -lncurses
ifneq ($(wildcard .depend),)
include .depend
@@ -98,3 +99,6 @@ depend: .depend
.depend:
../mkdep $(CFLAGS) `ls *.c`
env:
env

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

@@ -19,6 +19,8 @@
#include <asterisk/module.h>
#include <asterisk/adsi.h>
#include <asterisk/options.h>
#include <asterisk/utils.h>
#include <asterisk/lock.h>
#include <netinet/in.h>
#include <stdlib.h>
#include <unistd.h>
@@ -28,8 +30,6 @@
#include <stdio.h>
#include <errno.h>
#include <pthread.h>
#include "../asterisk.h"
#include "../astconf.h"
@@ -178,7 +178,7 @@ static int process_token(void *out, char *src, int maxlen, int argtype)
maxlen = strlen(src) - 1;
memcpy(out, src, maxlen);
((char *)out)[maxlen] = '\0';
} else if (strlen(src) && (src[0] == '\\')) {
} else if (!ast_strlen_zero(src) && (src[0] == '\\')) {
if (!(argtype & ARG_NUMBER))
return -1;
/* Octal value */
@@ -198,7 +198,7 @@ static int process_token(void *out, char *src, int maxlen, int argtype)
/* Convert */
*((unsigned int *)out) = htonl(*((unsigned int *)out));
}
} else if ((strlen(src) && isdigit(src[0]))) {
} else if ((!ast_strlen_zero(src) && isdigit(src[0]))) {
if (!(argtype & ARG_NUMBER))
return -1;
/* Hex value */
@@ -666,7 +666,7 @@ static int showdisplay(char *buf, char *name, int id, char *args, struct adsi_sc
}
buf[0] = id;
buf[1] = (cmd << 6) | (disp->id & 0x2f);
buf[1] = (cmd << 6) | (disp->id & 0x3f);
buf[2] = ((line & 0x1f) << 3) | (flag & 0x7);
return 3;
}
@@ -695,6 +695,18 @@ static int digitdirect(char *buf, char *name, int id, char *args, struct adsi_sc
return 2;
}
static int clearcbone(char *buf, char *name, int id, char *args, struct adsi_script *istate, char *script, int lineno)
{
char *tok;
tok = get_token(&args, script, lineno);
if (tok)
ast_log(LOG_WARNING, "CLEARCB1 requires no arguments ('%s') at line %d of %s\n", tok, lineno, script);
buf[0] = id;
buf[1] = 0;
return 2;
}
static int digitcollect(char *buf, char *name, int id, char *args, struct adsi_script *istate, char *script, int lineno)
{
char *tok;
@@ -831,6 +843,7 @@ static struct adsi_key_cmd kcmds[] = {
{ "VOICEMODE", 0x93 },
/* Display call buffer 'n' */
/* Clear call buffer 'n' */
{ "CLEARCB1", 0x95, clearcbone },
{ "DIGITCOLLECT", 0x96, digitcollect },
{ "DIGITDIRECT", 0x96, digitdirect },
{ "CLEAR", 0x97 },
@@ -1350,7 +1363,7 @@ static struct adsi_script *compile_script(char *script)
/* Strip comments */
if (c)
*c = '\0';
if (strlen(buf))
if (!ast_strlen_zero(buf))
adsi_process(scr, buf, script, lineno);
}
}
@@ -1435,7 +1448,7 @@ static int adsi_prog(struct ast_channel *chan, char *script)
bytes = 0;
/* Start with key definitions */
for (x=0;x<scr->numkeys;x++) {
if (bytes + scr->keys[x].retstrlen > 254) {
if (bytes + scr->keys[x].retstrlen > 253) {
/* Send what we've collected so far */
if (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
ast_log(LOG_WARNING, "Unable to send chunk ending at %d\n", x);
@@ -1459,7 +1472,7 @@ static int adsi_prog(struct ast_channel *chan, char *script)
bytes = 0;
/* Continue with the display messages */
for (x=0;x<scr->numdisplays;x++) {
if (bytes + scr->displays[x].datalen > 254) {
if (bytes + scr->displays[x].datalen > 253) {
/* Send what we've collected so far */
if (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
ast_log(LOG_WARNING, "Unable to send chunk ending at %d\n", x);
@@ -1483,7 +1496,7 @@ static int adsi_prog(struct ast_channel *chan, char *script)
bytes = 0;
/* Send subroutines */
for (x=0;x<scr->numsubs;x++) {
if (bytes + scr->subs[x].datalen > 254) {
if (bytes + scr->subs[x].datalen > 253) {
/* Send what we've collected so far */
if (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
ast_log(LOG_WARNING, "Unable to send chunk ending at %d\n", x);
@@ -1527,7 +1540,7 @@ static int adsi_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct localuser *u;
if (!data || !strlen(data))
if (!data || ast_strlen_zero(data))
data = "asterisk.adsi";
LOCAL_USER_ADD(u);
if (!adsi_available(chan)) {

858
apps/app_alarmreceiver.c Normal file
View File

@@ -0,0 +1,858 @@
/*
* Asterisk -- A telephony toolkit for Linux.
*
* Central Station Alarm receiver for Ademco Contact ID
*
* Copyright (C) 2004 Steve Rodgers
*
* Steve Rodgers <hwstar@rodgers.sdcoxmail.com>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
*
* *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING ***
*
* Use at your own risk. Please consult the GNU GPL license document included with Asterisk details. *
*
* *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING ***
*
*/
#include <asterisk/lock.h>
#include <asterisk/file.h>
#include <asterisk/logger.h>
#include <asterisk/channel.h>
#include <asterisk/pbx.h>
#include <asterisk/module.h>
#include <asterisk/translate.h>
#include <asterisk/ulaw.h>
#include <asterisk/options.h>
#include <asterisk/app.h>
#include <asterisk/dsp.h>
#include <asterisk/config.h>
#include <asterisk/localtime.h>
#include <asterisk/callerid.h>
#include <asterisk/astdb.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <sys/wait.h>
#include <unistd.h>
#include <sys/time.h>
#define ALMRCV_CONFIG "alarmreceiver.conf"
#define ADEMCO_CONTACT_ID "ADEMCO_CONTACT_ID"
struct event_node{
char data[17];
struct event_node *next;
};
typedef struct event_node event_node_t;
static char *tdesc = "Alarm Receiver for Asterisk";
static char *app = "AlarmReceiver";
static char *synopsis = "Provide support for receving alarm reports from a burglar or fire alarm panel";
static char *descrip =
"Alarm receiver application for Asterisk. Only 1 signalling format is supported at this time:\n"
"Ademco Contact ID. This application should be called whenever there is an alarm panel calling in\n"
"to dump its events. The application will handshake with the alarm panel, and receive events,\n"
"validate them, handshake them, and store them until the panel hangs up. Once the panel hangs up,\n"
"the application will run the command line specified by the eventcmd setting in alarmreceiver.conf\n"
"and pipe the events to the standard input of the application. Alarmreceiver.conf also contains settings\n"
"for DTMF timing, and for the loudness of the acknowledgement tones.\n";
/* Config Variables */
static int fdtimeout = 2000;
static int sdtimeout = 200;
static int toneloudness = 4096;
static int log_individual_events = 0;
static char event_spool_dir[128] = {'\0'};
static char event_app[128] = {'\0'};
static char db_family[128] = {'\0'};
static char time_stamp_format[128] = {"%a %b %d, %Y @ %H:%M:%S %Z"};
/* Misc variables */
static char event_file[14] = "/event-XXXXXX";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
/*
* Attempt to access a database variable and increment it,
* provided that the user defined db-family in alarmreceiver.conf
* The alarmreceiver app will write statistics to a few variables
* in this family if it is defined. If the new key doesn't exist in the
* family, then create it and set its value to 1.
*/
static void database_increment( char *key )
{
int res = 0;
unsigned v;
char value[16];
if(!strlen(db_family))
return; /* If not defined, don't do anything */
res = ast_db_get(db_family, key, value, sizeof(value) - 1);
if(res){
if(option_verbose >= 4)
ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: Creating database entry %s and setting to 1\n", key);
/* Guess we have to create it */
res = ast_db_put(db_family, key, "1");
return;
}
sscanf(value, "%u", &v);
v++;
if(option_verbose >= 4)
ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: New value for %s: %u\n", key, v);
snprintf(value, sizeof(value), "%u", v);
res = ast_db_put(db_family, key, value);
if((res)&&(option_verbose >= 4))
ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: database_increment write error");
return;
}
/*
* Build a MuLaw data block for a single frequency tone
*/
static void make_tone_burst(unsigned char *data, float freq, float loudness, int len, int *x)
{
int i;
float val;
for(i = 0; i < len; i++){
val = loudness * sin((freq * 2.0 * M_PI * (*x)++)/8000.0);
data[i] = AST_LIN2MU((int)val);
}
/* wrap back around from 8000 */
if (*x >= 8000) *x = 0;
return;
}
/*
* Send a single tone burst for a specifed duration and frequency.
* Returns 0 if successful
*/
static int send_tone_burst(struct ast_channel *chan, float freq, int duration, int tldn)
{
int res = 0;
int i = 0;
int x = 0;
struct ast_frame *f, wf;
struct {
unsigned char offset[AST_FRIENDLY_OFFSET];
unsigned char buf[640];
} tone_block;
for(;;)
{
if (ast_waitfor(chan, -1) < 0){
res = -1;
break;
}
f = ast_read(chan);
if (!f){
res = -1;
break;
}
if (f->frametype == AST_FRAME_VOICE) {
wf.frametype = AST_FRAME_VOICE;
wf.subclass = AST_FORMAT_ULAW;
wf.offset = AST_FRIENDLY_OFFSET;
wf.mallocd = 0;
wf.data = tone_block.buf;
wf.datalen = f->datalen;
wf.samples = wf.datalen;
make_tone_burst(tone_block.buf, freq, (float) tldn, wf.datalen, &x);
i += wf.datalen / 8;
if (i > duration) {
break;
}
if (ast_write(chan, &wf)){
if(option_verbose >= 4)
ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: Failed to write frame on %s\n", chan->name);
ast_log(LOG_WARNING, "AlarmReceiver Failed to write frame on %s\n",chan->name);
res = -1;
break;
}
}
ast_frfree(f);
}
return res;
}
/*
* Return the difference in milliseconds between two timeval structs
*/
static int ms_diff(struct timeval *tv1, struct timeval *tv2){
int ms;
ms = (tv1->tv_sec - tv2->tv_sec) * 1000;
ms += (tv1->tv_usec - tv2->tv_usec) / 1000;
return(ms);
}
/*
* Receive a string of DTMF digits where the length of the digit string is known in advance. Do not give preferential
* treatment to any digit value, and allow separate time out values to be specified for the first digit and all subsequent
* digits.
*
* Returns 0 if all digits successfully received.
* Returns 1 if a digit time out occurred
* Returns -1 if the caller hung up or there was a channel error.
*
*/
static int receive_dtmf_digits(struct ast_channel *chan, char *digit_string, int length, int fdto, int sdto)
{
int res = 0;
int i = 0;
int r;
struct ast_frame *f;
struct timeval now, lastdigittime;
gettimeofday(&lastdigittime,NULL);
for(;;){
gettimeofday(&now,NULL);
/* if outa time, leave */
if (ms_diff(&now,&lastdigittime) >
((i > 0) ? sdto : fdto)){
if(option_verbose >= 4)
ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: DTMF Digit Timeout on %s\n", chan->name);
ast_log(LOG_DEBUG,"AlarmReceiver: DTMF timeout on chan %s\n",chan->name);
res = 1;
break;
}
if ((r = ast_waitfor(chan, -1) < 0)) {
ast_log(LOG_DEBUG, "Waitfor returned %d\n", r);
continue;
}
f = ast_read(chan);
if (f == NULL){
res = -1;
break;
}
/* If they hung up, leave */
if ((f->frametype == AST_FRAME_CONTROL) &&
(f->subclass == AST_CONTROL_HANGUP)){
ast_frfree(f);
res = -1;
break;
}
/* if not DTMF, just do it again */
if (f->frametype != AST_FRAME_DTMF){
ast_frfree(f);
continue;
}
digit_string[i++] = f->subclass; /* save digit */
ast_frfree(f);
/* If we have all the digits we expect, leave */
if(i >= length)
break;
gettimeofday(&lastdigittime,NULL);
}
digit_string[i] = '\0'; /* Nul terminate the end of the digit string */
return res;
}
/*
* Write the metadata to the log file
*/
static int write_metadata( FILE *logfile, char *signalling_type, struct ast_channel *chan)
{
int res = 0;
time_t t;
struct tm now;
char *cl,*cn;
char workstring[80];
char timestamp[80];
/* Extract the caller ID location */
strncpy(workstring, chan->callerid, sizeof(workstring) - 1);
workstring[sizeof(workstring) - 1] = '\0';
ast_callerid_parse(workstring, &cn, &cl);
if (cl)
ast_shrink_phone_number(cl);
/* Get the current time */
time(&t);
ast_localtime(&t, &now, NULL);
/* Format the time */
strftime(timestamp, sizeof(timestamp), time_stamp_format, &now);
res = fprintf(logfile, "\n\n[metadata]\n\n");
if(res >= 0)
res = fprintf(logfile, "PROTOCOL=%s\n", signalling_type);
if(res >= 0)
res = fprintf(logfile, "CALLINGFROM=%s\n", (!cl) ? "<unknown>" : cl);
if(res >- 0)
res = fprintf(logfile, "CALLERNAME=%s\n", (!cn) ? "<unknown>" : cn);
if(res >= 0)
res = fprintf(logfile, "TIMESTAMP=%s\n\n", timestamp);
if(res >= 0)
res = fprintf(logfile, "[events]\n\n");
if(res < 0){
ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: can't write metadata\n");
ast_log(LOG_DEBUG,"AlarmReceiver: can't write metadata\n");
}
else
res = 0;
return res;
}
/*
* Write a single event to the log file
*/
static int write_event( FILE *logfile, event_node_t *event)
{
int res = 0;
if( fprintf(logfile, "%s\n", event->data) < 0)
res = -1;
return res;
}
/*
* If we are configured to log events, do so here.
*
*/
static int log_events(struct ast_channel *chan, char *signalling_type, event_node_t *event)
{
int res = 0;
char workstring[sizeof(event_spool_dir)+sizeof(event_file)] = "";
int fd;
FILE *logfile;
event_node_t *elp = event;
if(strlen(event_spool_dir)){
/* Make a template */
strncpy(workstring, event_spool_dir, sizeof(workstring) - 1);
strncat(workstring, event_file, sizeof(workstring) - strlen(workstring) - 1);
/* Make the temporary file */
fd = mkstemp(workstring);
if(fd == -1){
ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: can't make temporary file\n");
ast_log(LOG_DEBUG,"AlarmReceiver: can't make temporary file\n");
res = -1;
}
if(!res){
logfile = fdopen(fd, "w");
if(logfile){
/* Write the file */
res = write_metadata(logfile, signalling_type, chan);
if(!res)
while((!res) && (elp != NULL)){
res = write_event(logfile, elp);
elp = elp->next;
}
if(!res){
if(fflush(logfile) == EOF)
res = -1;
if(!res){
if(fclose(logfile) == EOF)
res = -1;
}
}
}
else
res = -1;
}
}
return res;
}
/*
* This function implements the logic to receive the Ademco contact ID format.
*
* The function will return 0 when the caller hangs up, else a -1 if there was a problem.
*/
static int receive_ademco_contact_id( struct ast_channel *chan, void *data, int fdto, int sdto, int tldn, event_node_t **ehead)
{
int i,j;
int res = 0;
int checksum;
char event[17];
event_node_t *enew, *elp;
int got_some_digits = 0;
int events_received = 0;
int ack_retries = 0;
static char digit_map[15] = "0123456789*#ABC";
static unsigned char digit_weights[15] = {10,1,2,3,4,5,6,7,8,9,11,12,13,14,15};
database_increment("calls-received");
/* Wait for first event */
if(option_verbose >= 4)
ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: Waiting for first event from panel\n");
while(res >= 0){
if(got_some_digits == 0){
/* Send ACK tone sequence */
if(option_verbose >= 4)
ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: Sending 1400Hz 100ms burst (ACK)\n");
res = send_tone_burst(chan, 1400.0, 100, tldn);
if(!res)
res = ast_safe_sleep(chan, 100);
if(!res){
if(option_verbose >= 4)
ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: Sending 2300Hz 100ms burst (ACK)\n");
res = send_tone_burst(chan, 2300.0, 100, tldn);
}
}
if( res >= 0)
res = receive_dtmf_digits(chan, event, sizeof(event) - 1, fdto, sdto);
if (res < 0){
if(events_received == 0)
/* Hangup with no events received should be logged in the DB */
database_increment("no-events-received");
else{
if(ack_retries){
if(option_verbose >= 4)
ast_verbose(VERBOSE_PREFIX_2 "AlarmReceiver: ACK retries during this call: %d\n", ack_retries);
database_increment("ack-retries");
}
}
if(option_verbose >= 4)
ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: App exiting...\n");
res = -1;
break;
}
if(res != 0){
/* Didn't get all of the digits */
if(option_verbose >= 2)
ast_verbose(VERBOSE_PREFIX_2 "AlarmReceiver: Incomplete string: %s, trying again...\n", event);
if(!got_some_digits){
got_some_digits = (strlen(event)) ? 1 : 0;
ack_retries++;
}
continue;
}
got_some_digits = 1;
if(option_verbose >= 2)
ast_verbose(VERBOSE_PREFIX_2 "AlarmReceiver: Received Event %s\n", event);
ast_log(LOG_DEBUG, "AlarmReceiver: Received event: %s\n", event);
/* Calculate checksum */
for(j = 0, checksum = 0; j < 16; j++){
for(i = 0 ; i < sizeof(digit_map) ; i++){
if(digit_map[i] == event[j])
break;
}
if(i == 16)
break;
checksum += digit_weights[i];
}
if(i == 16){
if(option_verbose >= 2)
ast_verbose(VERBOSE_PREFIX_2 "AlarmReceiver: Bad DTMF character %c, trying again\n", event[j]);
continue; /* Bad character */
}
/* Checksum is mod(15) of the total */
checksum = checksum % 15;
if(checksum){
database_increment("checksum-errors");
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 */
if(strncmp(event + 4, "18", 2)){
if(strncmp(event + 4, "98", 2)){
database_increment("format-errors");
if(option_verbose >= 2)
ast_verbose(VERBOSE_PREFIX_2 "AlarmReceiver: Wrong message type\n");
ast_log(LOG_DEBUG, "AlarmReceiver: Wrong message type\n");
continue;
}
}
events_received++;
/* Queue the Event */
if((enew = malloc(sizeof(event_node_t))) == NULL){
if(option_verbose >= 1)
ast_verbose(VERBOSE_PREFIX_1 "AlarmReceiver: Failed to allocate memory\n");
ast_log(LOG_WARNING, "AlarmReceiver Failed to allocate memory\n");
res = -1;
break;
}
memset(enew, 0, sizeof(event_node_t));
enew->next = NULL;
strncpy(enew->data, event, sizeof(enew->data) - 1);
/*
* Insert event onto end of list
*/
if(*ehead == NULL){
*ehead = enew;
}
else{
for(elp = *ehead; elp->next != NULL; elp = elp->next)
;
elp->next = enew;
}
if(res > 0)
res = 0;
/* Let the user have the option of logging the single event before sending the kissoff tone */
if((res == 0) && (log_individual_events))
res = log_events(chan, ADEMCO_CONTACT_ID, enew);
/* Wait 200 msec before sending kissoff */
if(res == 0)
res = ast_safe_sleep(chan, 200);
/* Send the kissoff tone */
if(res == 0)
res = send_tone_burst(chan, 1400.0, 900, tldn);
}
return res;
}
/*
* This is the main function called by Asterisk Core whenever the App is invoked in the extension logic.
* This function will always return 0.
*/
static int alarmreceiver_exec(struct ast_channel *chan, void *data)
{
int res = 0;
struct localuser *u;
event_node_t *elp, *efree;
char signalling_type[64] = "";
event_node_t *event_head = NULL;
LOCAL_USER_ADD(u);
/* Set write and read formats to ULAW */
if(option_verbose >= 4)
ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: Setting read and write formats to ULAW\n");
if (ast_set_write_format(chan,AST_FORMAT_ULAW)){
ast_log(LOG_WARNING, "AlarmReceiver: Unable to set write format to Mu-law on %s\n",chan->name);
return -1;
}
if (ast_set_read_format(chan,AST_FORMAT_ULAW)){
ast_log(LOG_WARNING, "AlarmReceiver: Unable to set read format to Mu-law on %s\n",chan->name);
return -1;
}
/* Set default values for this invokation of the application */
strncpy(signalling_type, ADEMCO_CONTACT_ID, sizeof(signalling_type) - 1);
/* Answer the channel if it is not already */
if(option_verbose >= 4)
ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: Answering channel\n");
if (chan->_state != AST_STATE_UP) {
res = ast_answer(chan);
if (res) {
LOCAL_USER_REMOVE(u);
return -1;
}
}
/* Wait for the connection to settle post-answer */
if(option_verbose >= 4)
ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: Waiting for connection to stabilize\n");
res = ast_safe_sleep(chan, 1250);
/* Attempt to receive the events */
if(!res){
/* Determine the protocol to receive in advance */
/* Note: Ademco contact is the only one supported at this time */
/* Others may be added later */
if(!strcmp(signalling_type, ADEMCO_CONTACT_ID))
receive_ademco_contact_id(chan, data, fdtimeout, sdtimeout, toneloudness, &event_head);
else
res = -1;
}
/* Events queued by receiver, write them all out here if so configured */
if((!res) && (log_individual_events == 0)){
res = log_events(chan, signalling_type, event_head);
}
/*
* Do we exec a command line at the end?
*/
if((!res) && (strlen(event_app)) && (event_head)){
ast_log(LOG_DEBUG,"Alarmreceiver: executing: %s\n", event_app);
ast_safe_system(event_app);
}
/*
* Free up the data allocated in our linked list
*/
for(elp = event_head; (elp != NULL);){
efree = elp;
elp = elp->next;
free(efree);
}
LOCAL_USER_REMOVE(u);
return 0;
}
/*
* Load the configuration from the configuration file
*/
static int load_config(void)
{
struct ast_config *cfg;
char *p;
/* Read in the config file */
cfg = ast_load(ALMRCV_CONFIG);
if(!cfg){
if(option_verbose >= 4)
ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: No config file\n");
}
else{
p = ast_variable_retrieve(cfg, "general", "eventcmd");
if(p){
strncpy(event_app, p, sizeof(event_app) - 1);
event_app[sizeof(event_app) - 1] = '\0';
}
p = ast_variable_retrieve(cfg, "general", "loudness");
if(p){
toneloudness = atoi(p);
if(toneloudness < 100)
toneloudness = 100;
if(toneloudness > 8192)
toneloudness = 8192;
}
p = ast_variable_retrieve(cfg, "general", "fdtimeout");
if(p){
fdtimeout = atoi(p);
if(fdtimeout < 1000)
fdtimeout = 1000;
if(fdtimeout > 10000)
fdtimeout = 10000;
}
p = ast_variable_retrieve(cfg, "general", "sdtimeout");
if(p){
sdtimeout = atoi(p);
if(sdtimeout < 110)
sdtimeout = 110;
if(sdtimeout > 4000)
sdtimeout = 4000;
}
p = ast_variable_retrieve(cfg, "general", "logindividualevents");
if(p){
log_individual_events = ast_true(p);
}
p = ast_variable_retrieve(cfg, "general", "eventspooldir");
if(p){
strncpy(event_spool_dir, p, sizeof(event_spool_dir) - 1);
event_spool_dir[sizeof(event_spool_dir) - 1] = '\0';
}
p = ast_variable_retrieve(cfg, "general", "timestampformat");
if(p){
strncpy(time_stamp_format, p, sizeof(time_stamp_format) - 1);
time_stamp_format[sizeof(time_stamp_format) - 1] = '\0';
}
p = ast_variable_retrieve(cfg, "general", "db-family");
if(p){
strncpy(db_family, p, sizeof(db_family) - 1);
db_family[sizeof(db_family) - 1] = '\0';
}
ast_destroy(cfg);
}
return 0;
}
/*
* These functions are required to implement an Asterisk App.
*/
int unload_module(void)
{
STANDARD_HANGUP_LOCALUSERS;
return ast_unregister_application(app);
}
int load_module(void)
{
load_config();
return ast_register_application(app, alarmreceiver_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

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

@@ -19,14 +19,13 @@
#include <asterisk/module.h>
#include <asterisk/app.h>
#include <asterisk/astdb.h>
#include <asterisk/utils.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <pthread.h>
static char *tdesc = "Authentication Application";
@@ -63,7 +62,7 @@ static int auth_exec(struct ast_channel *chan, void *data)
char passwd[256];
char *opts;
char *prompt;
if (!data || !strlen(data)) {
if (!data || ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "Authenticate requires an argument(password)\n");
return -1;
}
@@ -108,14 +107,14 @@ static int auth_exec(struct ast_channel *chan, void *data)
char buf[256] = "";
while(!feof(f)) {
fgets(buf, sizeof(buf), f);
if (!feof(f) && strlen(buf)) {
if (!feof(f) && !ast_strlen_zero(buf)) {
buf[strlen(buf) - 1] = '\0';
if (strlen(buf) && !strcmp(passwd, buf))
if (!ast_strlen_zero(buf) && !strcmp(passwd, buf))
break;
}
}
fclose(f);
if (strlen(buf) && !strcmp(passwd, buf))
if (!ast_strlen_zero(buf) && !strcmp(passwd, buf))
break;
} else
ast_log(LOG_WARNING, "Unable to open file '%s' for authentication: %s\n", password, strerror(errno));

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

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

@@ -27,8 +27,6 @@
#include <stdlib.h>
#include <sys/ioctl.h>
#include <pthread.h>
static char *tdesc = "Check if channel is available";
static char *app = "ChanIsAvail";
@@ -38,12 +36,14 @@ static char *synopsis = "Check if channel is available";
static char *descrip =
" ChanIsAvail(Technology/resource[&Technology2/resource2...]): \n"
"Checks is any of the requested channels are available. If none\n"
"of the requested channels are available the new priority will\n"
"be n+101 (unless such a priority does not exist, in which case\n"
"ChanIsAvail will return -1. If any of the requested channels\n"
"are available, the next priority will be n+1, the channel variable\n"
"${AVAILCHAN} will be set to the name of the available channel and\n"
"the ChanIsAvail app will return 0.\n";
"of the requested channels are available the new priority will be\n"
"n+101 (unless such a priority does not exist or on error, in which\n"
"case ChanIsAvail will return -1).\n"
"If any of the requested channels are available, the next priority will be n+1,\n"
"the channel variable ${AVAILCHAN} will be set to the name of the available channel\n"
"and the ChanIsAvail app will return 0.\n"
"${AVAILORIGCHAN} is the canonical channel name that was used to create the channel.\n"
"${AVAILSTATUS} is the status code for the channel.\n";
STANDARD_LOCAL_USER;
@@ -53,7 +53,7 @@ static int chanavail_exec(struct ast_channel *chan, void *data)
{
int res=-1;
struct localuser *u;
char info[256], *peers, *tech, *number, *rest, *cur;
char info[512], tmp[512], *peers, *tech, *number, *rest, *cur;
struct ast_channel *tempchan;
if (!data) {
@@ -62,7 +62,7 @@ static int chanavail_exec(struct ast_channel *chan, void *data)
}
LOCAL_USER_ADD(u);
strncpy(info, (char *)data, strlen((char *)data) + AST_MAX_EXTENSION-1);
strncpy(info, (char *)data, sizeof(info)-1);
peers = info;
if (peers) {
cur = peers;
@@ -76,13 +76,16 @@ static int chanavail_exec(struct ast_channel *chan, void *data)
tech = cur;
number = strchr(tech, '/');
if (!number) {
ast_log(LOG_WARNING, "ChanIsAvail argument takes format (Zap/[device])\n");
continue;
ast_log(LOG_WARNING, "ChanIsAvail argument takes format ([technology]/[device])\n");
return -1;
}
*number = '\0';
number++;
if ((tempchan = ast_request(tech, chan->nativeformats, number))) {
pbx_builtin_setvar_helper(chan, "AVAILCHAN", tempchan->name);
/* Store the originally used channel too */
snprintf(tmp, sizeof(tmp), "%s/%s", tech, number);
pbx_builtin_setvar_helper(chan, "AVAILORIGCHAN", tmp);
ast_hangup(tempchan);
tempchan = NULL;
res = 1;
@@ -94,6 +97,7 @@ static int chanavail_exec(struct ast_channel *chan, void *data)
if (res < 1) {
pbx_builtin_setvar_helper(chan, "AVAILCHAN", "");
pbx_builtin_setvar_helper(chan, "AVAILORIGCHAN", "");
if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 101, chan->callerid))
chan->priority+=100;
else

143
apps/app_controlplayback.c Normal file
View File

@@ -0,0 +1,143 @@
/*
* Asterisk -- A telephony toolkit for Linux.
*
* Trivial application to control playback a sound file
*
* Copyright (C) 1999, Mark Spencer
*
* Mark Spencer <markster@linux-support.net>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
*/
#include <asterisk/lock.h>
#include <asterisk/file.h>
#include <asterisk/logger.h>
#include <asterisk/channel.h>
#include <asterisk/pbx.h>
#include <asterisk/app.h>
#include <asterisk/module.h>
#include <asterisk/translate.h>
#include <asterisk/utils.h>
#include <string.h>
#include <stdlib.h>
static char *tdesc = "Control Playback Application";
static char *app = "ControlPlayback";
static char *synopsis = "Play a file with fast forward and rewind";
static char *descrip =
"ControlPlayback(filename[|skipms[|ffchar[|rewchar[|stopchar[|pausechr]]]]]):\n"
" Plays back a given filename (do not put extension). Options may also\n"
" be included following a pipe symbol. You can use * and # to rewind and\n"
" fast forward the playback specified. If 'stopchar' is added the file will\n"
" terminate playback when 'stopchar' is pressed. Returns -1 if the channel\n"
" was hung up, or if the file does not exist. Returns 0 otherwise.\n\n"
" Example: exten => 1234,1,ControlPlayback(file|4000|*|#|1|0)\n\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int is_on_phonepad(char key)
{
return (key == 35 || key == 42 || (key >= 48 && key <= 57)) ? 1 : 0;
}
static int controlplayback_exec(struct ast_channel *chan, void *data)
{
int res = 0;
int skipms = 0;
struct localuser *u;
char tmp[256];
char *skip = NULL, *fwd = NULL, *rev = NULL, *stop = NULL, *pause = NULL, *file = NULL;
if (!data || ast_strlen_zero((char *)data)) {
ast_log(LOG_WARNING, "ControlPlayback requires an argument (filename)\n");
return -1;
}
strncpy(tmp, (char *)data, sizeof(tmp)-1);
file = tmp;
if ((skip=strchr(tmp,'|'))) {
*skip = '\0';
*skip++;
fwd=strchr(skip,'|');
if (fwd) {
*fwd = '\0';
*fwd++;
rev = strchr(fwd,'|');
if (rev) {
*rev = '\0';
*rev++;
stop = strchr(rev,'|');
if (stop) {
*stop = '\0';
*stop++;
pause = strchr(stop,'|');
if (pause) {
*pause = '\0';
*pause++;
}
}
}
}
}
skipms = skip ? atoi(skip) : 3000;
if (!skipms)
skipms = 3000;
if (!fwd || !is_on_phonepad(*fwd))
fwd = "#";
if (!rev || !is_on_phonepad(*rev))
rev = "*";
if (stop && !is_on_phonepad(*stop))
stop = NULL;
if (pause && !is_on_phonepad(*pause))
pause = NULL;
LOCAL_USER_ADD(u);
res = ast_control_streamfile(chan, file, fwd, rev, stop, pause, skipms);
LOCAL_USER_REMOVE(u);
/* If we stopped on one of our stop keys, return 0 */
if(stop && strchr(stop, res))
res = 0;
return res;
}
int unload_module(void)
{
STANDARD_HANGUP_LOCALUSERS;
return ast_unregister_application(app);
}
int load_module(void)
{
return ast_register_application(app, controlplayback_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

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

@@ -5,7 +5,7 @@
*
* Copyright (c) 2003 Tilghman Lesher. All rights reserved.
*
* Tilghman Lesher <app_cut__v002@the-tilghman.com>
* Tilghman Lesher <app_cut__v003@the-tilghman.com>
*
* $Id$
*
@@ -82,14 +82,14 @@ static int cut_exec(struct ast_channel *chan, void *data)
if (args_okay) {
char d, ds[2];
char *tmp = alloca(strlen(varname) + 4);
char *tmp2 = alloca(MAXRESULT);
char varvalue[MAXRESULT], *tmp2=varvalue;
char retstring[MAXRESULT];
memset(retstring, 0, MAXRESULT);
if (tmp && tmp2) {
if (tmp) {
snprintf(tmp, strlen(varname) + 4, "${%s}", varname);
memset(tmp2, 0, sizeof(tmp2));
memset(varvalue, 0, sizeof(varvalue));
} else {
ast_log(LOG_ERROR, "Out of memory");
return -1;
@@ -101,7 +101,7 @@ static int cut_exec(struct ast_channel *chan, void *data)
d = '-';
/* String form of the delimiter, for use with strsep(3) */
sprintf(ds,"%c",d);
snprintf(ds, sizeof(ds), "%c", d);
pbx_substitute_variables_helper(chan, tmp, tmp2, MAXRESULT - 1);

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

@@ -23,9 +23,6 @@
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
static char *tdesc = "Date and Time";
static char *app = "DateTime";

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

@@ -20,33 +20,31 @@
#include <asterisk/channel.h>
#include <asterisk/pbx.h>
#include <asterisk/module.h>
#include <asterisk/pbx.h>
#include <asterisk/astdb.h>
#include <asterisk/lock.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
static char *tdesc = "Database access functions for Asterisk extension logic";
static char *g_descrip =
" DBget(varname=family/key): Retrieves a value from the Asterisk\n"
"database and stores it in the given variable. Always returns 0. If the\n"
"requested key is not found, jumps to priority n+101 if available.\n";
" DBget(varname=family/key): Retrieves a value from the Asterisk\n"
"database and stores it in the given variable. Always returns 0. If the\n"
"requested key is not found, jumps to priority n+101 if available.\n";
static char *p_descrip =
" DBput(family/key=value): Stores the given value in the Asterisk\n"
"database. Always returns 0.\n";
" DBput(family/key=value): Stores the given value in the Asterisk\n"
"database. Always returns 0.\n";
static char *d_descrip =
" DBdel(family/key): Deletes a key from the Asterisk database. Always\n"
"returns 0.\n";
" DBdel(family/key): Deletes a key from the Asterisk database. Always\n"
"returns 0.\n";
static char *dt_descrip =
" DBdeltree(family[/keytree]): Deletes a family or keytree from the Asterisk\n"
"database. Always returns 0.\n";
" DBdeltree(family[/keytree]): Deletes a family or keytree from the Asterisk\n"
"database. Always returns 0.\n";
static char *g_app = "DBget";
static char *p_app = "DBput";
@@ -62,255 +60,196 @@ STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int
deltree_exec (struct ast_channel *chan, void *data)
static int deltree_exec (struct ast_channel *chan, void *data)
{
int arglen;
char *argv, *family, *keytree;
int arglen;
char *argv, *family, *keytree;
arglen = strlen (data);
argv = alloca (arglen + 1);
if (!argv) /* Why would this fail? */
{
ast_log (LOG_DEBUG, "Memory allocation failed\n");
return 0;
}
memcpy (argv, data, arglen + 1);
if (strchr (argv, '/')) {
{
family = strsep (&argv, "/");
keytree = strsep (&argv, "\0");
if (!family || !keytree)
{
ast_log (LOG_DEBUG, "Ignoring; Syntax error in argument\n");
return 0;
arglen = strlen (data);
argv = alloca (arglen + 1);
if (!argv) { /* Why would this fail? */
ast_log (LOG_DEBUG, "Memory allocation failed\n");
return 0;
}
if (!strlen (keytree))
keytree = 0;
}
} else
{
family = argv;
keytree = 0;
}
memcpy (argv, data, arglen + 1);
if (option_verbose > 2)
{
if (keytree)
ast_verbose (VERBOSE_PREFIX_3 "DBdeltree: family=%s, keytree=%s\n",
family, keytree);
else
ast_verbose (VERBOSE_PREFIX_3 "DBdeltree: family=%s\n", family);
}
if (ast_db_deltree (family, keytree))
{
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_3
"DBdeltree: Error deleting key from database.\n");
}
return 0;
}
static int
del_exec (struct ast_channel *chan, void *data)
{
int arglen;
char *argv, *family, *key;
arglen = strlen (data);
argv = alloca (arglen + 1);
if (!argv) /* Why would this fail? */
{
ast_log (LOG_DEBUG, "Memory allocation failed\n");
return 0;
}
memcpy (argv, data, arglen + 1);
if (strchr (argv, '/'))
{
family = strsep (&argv, "/");
key = strsep (&argv, "\0");
if (!family || !key)
{
ast_log (LOG_DEBUG, "Ignoring; Syntax error in argument\n");
return 0;
}
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_3
"DBdel: family=%s, key=%s\n", family, key);
if (ast_db_del (family, key))
{
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_3
"DBdel: Error deleting key from database.\n");
}
}
else
{
ast_log (LOG_DEBUG, "Ignoring, no parameters\n");
}
return 0;
}
static int
put_exec (struct ast_channel *chan, void *data)
{
int arglen;
char *argv, *value, *family, *key;
arglen = strlen (data);
argv = alloca (arglen + 1);
if (!argv) /* Why would this fail? */
{
ast_log (LOG_DEBUG, "Memory allocation failed\n");
return 0;
}
memcpy (argv, data, arglen + 1);
if (strchr (argv, '/') && strchr (argv, '='))
{
family = strsep (&argv, "/");
key = strsep (&argv, "=");
value = strsep (&argv, "\0");
if (!value || !family || !key)
{
ast_log (LOG_DEBUG, "Ignoring; Syntax error in argument\n");
return 0;
}
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_3
"DBput: family=%s, key=%s, value=%s\n", family, key,
value);
if (ast_db_put (family, key, value))
{
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_3
"DBput: Error writing value to database.\n");
if (strchr (argv, '/')) {
family = strsep (&argv, "/");
keytree = strsep (&argv, "\0");
if (!family || !keytree) {
ast_log (LOG_DEBUG, "Ignoring; Syntax error in argument\n");
return 0;
}
if (!strlen (keytree))
keytree = 0;
} else {
family = argv;
keytree = 0;
}
}
else
{
ast_log (LOG_DEBUG, "Ignoring, no parameters\n");
}
return 0;
}
static int
get_exec (struct ast_channel *chan, void *data)
{
int arglen;
char *argv, *varname, *family, *key;
char dbresult[256];
arglen = strlen (data);
argv = alloca (arglen + 1);
if (!argv) /* Why would this fail? */
{
ast_log (LOG_DEBUG, "Memory allocation failed\n");
return 0;
}
memcpy (argv, data, arglen + 1);
if (strchr (argv, '=') && strchr (argv, '/'))
{
varname = strsep (&argv, "=");
family = strsep (&argv, "/");
key = strsep (&argv, "\0");
if (!varname || !family || !key)
{
ast_log (LOG_DEBUG, "Ignoring; Syntax error in argument\n");
return 0;
}
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_3
"DBget: varname=%s, family=%s, key=%s\n", varname,
family, key);
if (!ast_db_get (family, key, dbresult, sizeof (dbresult) - 1))
{
pbx_builtin_setvar_helper (chan, varname, dbresult);
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_3
"DBget: set variable %s to %s\n", varname, dbresult);
}
else
{
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_3
"DBget: Value not found in database.\n");
/* Send the call to n+101 priority, where n is the current priority */
if (ast_exists_extension
(chan, chan->context, chan->exten, chan->priority + 101,
chan->callerid))
chan->priority += 100;
if (option_verbose > 2) {
if (keytree)
ast_verbose (VERBOSE_PREFIX_3 "DBdeltree: family=%s, keytree=%s\n", family, keytree);
else
ast_verbose (VERBOSE_PREFIX_3 "DBdeltree: family=%s\n", family);
}
}
else
{
ast_log (LOG_DEBUG, "Ignoring, no parameters\n");
}
if (ast_db_deltree (family, keytree)) {
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_3 "DBdeltree: Error deleting key from database.\n");
}
return 0;
return 0;
}
int
unload_module (void)
static int del_exec (struct ast_channel *chan, void *data)
{
int retval;
int arglen;
char *argv, *family, *key;
STANDARD_HANGUP_LOCALUSERS;
retval = ast_unregister_application (dt_app);
retval |= ast_unregister_application (d_app);
retval |= ast_unregister_application (p_app);
retval |= ast_unregister_application (g_app);
arglen = strlen (data);
argv = alloca (arglen + 1);
if (!argv) { /* Why would this fail? */
ast_log (LOG_DEBUG, "Memory allocation failed\n");
return 0;
}
memcpy (argv, data, arglen + 1);
return retval;
if (strchr (argv, '/')) {
family = strsep (&argv, "/");
key = strsep (&argv, "\0");
if (!family || !key) {
ast_log (LOG_DEBUG, "Ignoring; Syntax error in argument\n");
return 0;
}
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_3 "DBdel: family=%s, key=%s\n", family, key);
if (ast_db_del (family, key)) {
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_3 "DBdel: Error deleting key from database.\n");
}
} else {
ast_log (LOG_DEBUG, "Ignoring, no parameters\n");
}
return 0;
}
int
load_module (void)
static int put_exec (struct ast_channel *chan, void *data)
{
int retval;
int arglen;
char *argv, *value, *family, *key;
retval = ast_register_application (g_app, get_exec, g_synopsis, g_descrip);
if (!retval)
retval =
ast_register_application (p_app, put_exec, p_synopsis, p_descrip);
if (!retval)
retval =
ast_register_application (d_app, del_exec, d_synopsis, d_descrip);
if (!retval)
retval =
ast_register_application (dt_app, deltree_exec, dt_synopsis,
dt_descrip);
arglen = strlen (data);
argv = alloca (arglen + 1);
if (!argv) { /* Why would this fail? */
ast_log (LOG_DEBUG, "Memory allocation failed\n");
return 0;
}
memcpy (argv, data, arglen + 1);
return retval;
if (strchr (argv, '/') && strchr (argv, '=')) {
family = strsep (&argv, "/");
key = strsep (&argv, "=");
value = strsep (&argv, "\0");
if (!value || !family || !key) {
ast_log (LOG_DEBUG, "Ignoring; Syntax error in argument\n");
return 0;
}
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_3 "DBput: family=%s, key=%s, value=%s\n", family, key, value);
if (ast_db_put (family, key, value)) {
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_3 "DBput: Error writing value to database.\n");
}
} else {
ast_log (LOG_DEBUG, "Ignoring, no parameters\n");
}
return 0;
}
char *
description (void)
static int get_exec (struct ast_channel *chan, void *data)
{
return tdesc;
int arglen;
char *argv, *varname, *family, *key;
char dbresult[256];
arglen = strlen (data);
argv = alloca (arglen + 1);
if (!argv) { /* Why would this fail? */
ast_log (LOG_DEBUG, "Memory allocation failed\n");
return 0;
}
memcpy (argv, data, arglen + 1);
if (strchr (argv, '=') && strchr (argv, '/')) {
varname = strsep (&argv, "=");
family = strsep (&argv, "/");
key = strsep (&argv, "\0");
if (!varname || !family || !key) {
ast_log (LOG_DEBUG, "Ignoring; Syntax error in argument\n");
return 0;
}
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_3 "DBget: varname=%s, family=%s, key=%s\n", varname, family, key);
if (!ast_db_get (family, key, dbresult, sizeof (dbresult) - 1)) {
pbx_builtin_setvar_helper (chan, varname, dbresult);
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_3 "DBget: set variable %s to %s\n", varname, dbresult);
} else {
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_3 "DBget: Value not found in database.\n");
/* Send the call to n+101 priority, where n is the current priority */
if (ast_exists_extension (chan, chan->context, chan->exten, chan->priority + 101, chan->callerid))
chan->priority += 100;
}
} else {
ast_log (LOG_DEBUG, "Ignoring, no parameters\n");
}
return 0;
}
int
usecount (void)
int unload_module (void)
{
int res;
STANDARD_USECOUNT (res);
return res;
int retval;
STANDARD_HANGUP_LOCALUSERS;
retval = ast_unregister_application (dt_app);
retval |= ast_unregister_application (d_app);
retval |= ast_unregister_application (p_app);
retval |= ast_unregister_application (g_app);
return retval;
}
char *
key ()
int load_module (void)
{
return ASTERISK_GPL_KEY;
int retval;
retval = ast_register_application (g_app, get_exec, g_synopsis, g_descrip);
if (!retval)
retval = ast_register_application (p_app, put_exec, p_synopsis, p_descrip);
if (!retval)
retval = ast_register_application (d_app, del_exec, d_synopsis, d_descrip);
if (!retval)
retval = ast_register_application (dt_app, deltree_exec, dt_synopsis, dt_descrip);
return retval;
}
char *description (void)
{
return tdesc;
}
int usecount (void)
{
int res;
STANDARD_USECOUNT (res);
return res;
}
char *key ()
{
return ASTERISK_GPL_KEY;
}

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

@@ -3,9 +3,9 @@
*
* Trivial application to dial a channel and send an URL on answer
*
* Copyright (C) 1999, Mark Spencer
* Copyright (C) 1999-2004, Digium, Inc.
*
* Mark Spencer <markster@linux-support.net>
* Mark Spencer <markster@digium.com>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
@@ -20,9 +20,12 @@
#include <asterisk/module.h>
#include <asterisk/translate.h>
#include <asterisk/say.h>
#include <asterisk/parking.h>
#include <asterisk/config.h>
#include <asterisk/features.h>
#include <asterisk/musiconhold.h>
#include <asterisk/callerid.h>
#include <asterisk/utils.h>
#include <asterisk/app.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
@@ -33,8 +36,6 @@
#include <sys/signal.h>
#include <netinet/in.h>
#include <pthread.h>
static char *tdesc = "Dialing Application";
static char *app = "Dial";
@@ -49,28 +50,54 @@ static char *descrip =
"which first answered. All other calls placed by the Dial app will be hung up\n"
"If a timeout is not specified, the Dial application will wait indefinitely\n"
"until either one of the called channels answers, the user hangs up, or all\n"
"channels return busy or error. In general, the dialler will return 0 if it\n"
"channels return busy or error. In general, the dialer will return 0 if it\n"
"was unable to place the call, or the timeout expired. However, if all\n"
"channels were busy, and there exists an extension with priority n+101 (where\n"
"n is the priority of the dialler instance), then it will be the next\n"
"n is the priority of the dialer instance), then it will be the next\n"
"executed extension (this allows you to setup different behavior on busy from\n"
"no-answer).\n"
" This application returns -1 if the originating channel hangs up, or if the\n"
"call is bridged and either of the parties in the bridge terminate the call.\n"
"The option string may contain zero or more of the following characters:\n"
" 't' -- allow the called user transfer the calling user\n"
" 'T' -- to allow the calling user to transfer the call.\n"
" 't' -- allow the called user transfer the calling user by hitting #.\n"
" 'T' -- allow the calling user to transfer the call by hitting #.\n"
" 'f' -- Forces callerid to be set as the extension of the line \n"
" making/redirecting the outgoing call. For example, some PSTNs\n"
" don't allow callerids from other extensions then the ones\n"
" that are assigned to you.\n"
" 'r' -- indicate ringing to the calling party, pass no audio until answered.\n"
" 'm' -- provide hold music to the calling party until answered.\n"
" 'M(x) -- Executes the macro (x) upon connect of the call\n"
" 'h' -- allow callee to hang up by hitting *.\n"
" 'H' -- allow caller to hang up by hitting *.\n"
" 'C' -- reset call detail record for this call.\n"
" 'P[(x)]' -- privacy mode, using 'x' as database if provided.\n"
" 'g' -- goes on in context if the destination channel hangs up\n"
" 'A(x)' -- play an announcement to the called party, using x as file\n"
" 'S(x)' -- hangup the call after x seconds AFTER called party picked up\n"
" 'D([digits])' -- Send DTMF digit string *after* called party has answered\n"
" but before the bridge. (w=500ms sec pause)\n"
" 'L(x[:y][:z])' -- Limit the call to 'x' ms warning when 'y' ms are left\n"
" repeated every 'z' ms) Only 'x' is required, 'y' and 'z' are optional.\n"
" The following special variables are optional:\n"
" * LIMIT_PLAYAUDIO_CALLER yes|no (default yes)\n"
" Play sounds to the caller.\n"
" * LIMIT_PLAYAUDIO_CALLEE yes|no\n"
" Play sounds to the callee.\n"
" * LIMIT_TIMEOUT_FILE File to play when time is up.\n"
" * LIMIT_CONNECT_FILE File to play when call begins.\n"
" * LIMIT_WARNING_FILE File to play as warning if 'y' is defined.\n"
" 'timeleft' is a special sound macro to auto-say the time \n"
" left and is the default.\n\n"
" In addition to transferring the call, a call may be parked and then picked\n"
"up by another user.\n"
" The optionnal URL will be sent to the called party if the channel supports\n"
"it.\n";
" The optional URL will be sent to the called party if the channel supports it.\n"
" This application sets the following channel variables upon completion:\n"
" DIALEDTIME Time from dial to answer\n"
" ANSWEREDTIME Time for actual call\n"
" DIALSTATUS The status of the call as a text string, one of\n"
" CHANUNAVAIL | CONGESTION | NOANSWER | BUSY | ANSWER | CANCEL\n"
"";
/* We define a customer "local user" structure because we
use it not only for keeping track of what is in use but
@@ -83,7 +110,9 @@ struct localuser {
int allowredirect_out;
int ringbackonly;
int musiconhold;
int allowdisconnect;
int allowdisconnect_in;
int allowdisconnect_out;
int forcecallerid;
struct localuser *next;
};
@@ -103,43 +132,33 @@ static void hanguptree(struct localuser *outgoing, struct ast_channel *exception
}
}
#define MAX 256
#define AST_MAX_WATCHERS 256
static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localuser *outgoing, int *to, int *allowredir_in, int *allowredir_out, int *allowdisconnect)
static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localuser *outgoing, int *to, int *allowredir_in, int *allowredir_out, int *allowdisconnect_in, int *allowdisconnect_out, int *sentringing, char *status, size_t statussize)
{
struct localuser *o;
int found;
int numlines;
int sentringing = 0;
int numbusies = 0;
int numbusy = 0;
int numcongestion = 0;
int numnochan = 0;
int orig = *to;
struct ast_frame *f;
struct ast_channel *peer = NULL;
struct ast_channel *watchers[MAX];
struct ast_channel *watchers[AST_MAX_WATCHERS];
int pos;
int single;
int moh=0;
int ringind=0;
struct ast_channel *winner;
single = (outgoing && !outgoing->next && !outgoing->musiconhold && !outgoing->ringbackonly);
if (single) {
/* Turn off hold music, etc */
ast_indicate(in, -1);
ast_deactivate_generator(in);
/* If we are calling a single channel, make them compatible for in-band tone purpose */
ast_channel_make_compatible(outgoing->chan, in);
}
if (outgoing) {
moh = outgoing->musiconhold;
ringind = outgoing->ringbackonly;
if (outgoing->musiconhold) {
ast_moh_start(in, NULL);
} else if (outgoing->ringbackonly) {
ast_indicate(in, AST_CONTROL_RINGING);
}
}
while(*to && !peer) {
o = outgoing;
@@ -157,9 +176,15 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
numlines++;
}
if (found < 0) {
if (numlines == numbusies) {
if (numlines == (numbusy + numcongestion + numnochan)) {
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_2 "Everyone is busy at this time\n");
ast_verbose( VERBOSE_PREFIX_2 "Everyone is busy/congested at this time\n");
if (numbusy)
strncpy(status, "BUSY", statussize - 1);
else if (numcongestion)
strncpy(status, "CONGESTION", statussize - 1);
else if (numnochan)
strncpy(status, "CHANUNAVAIL", statussize - 1);
/* See if there is a special busy message */
if (ast_exists_extension(in, in->context, in->exten, in->priority + 101, in->callerid))
in->priority+=100;
@@ -168,12 +193,6 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
ast_verbose( VERBOSE_PREFIX_2 "No one is available to answer at this time\n");
}
*to = 0;
/* if no one available we'd better stop MOH/ringing to */
if (moh) {
ast_moh_stop(in);
} else if (ringind) {
ast_indicate(in, -1);
}
return NULL;
}
winner = ast_waitfor_n(watchers, pos, to);
@@ -186,43 +205,89 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
peer = o->chan;
*allowredir_in = o->allowredirect_in;
*allowredir_out = o->allowredirect_out;
*allowdisconnect = o->allowdisconnect;
*allowdisconnect_in = o->allowdisconnect_in;
*allowdisconnect_out = o->allowdisconnect_out;
}
} else if (o->chan && (o->chan == winner)) {
if (strlen(o->chan->call_forward)) {
char tmpchan[256];
if (!ast_strlen_zero(o->chan->call_forward)) {
char tmpchan[256]="";
char *stuff;
char *tech;
strncpy(tmpchan, o->chan->call_forward, sizeof(tmpchan) - 1);
if ((stuff = strchr(tmpchan, '/'))) {
*stuff = '\0';
stuff++;
tech = tmpchan;
} else {
snprintf(tmpchan, sizeof(tmpchan), "%s@%s", o->chan->call_forward, o->chan->context);
stuff = tmpchan;
tech = "Local";
}
/* Before processing channel, go ahead and check for forwarding */
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Now forwarding %s to '%s@%s' (thanks to %s)\n", in->name, o->chan->call_forward, o->chan->context, o->chan->name);
ast_verbose(VERBOSE_PREFIX_3 "Now forwarding %s to '%s/%s' (thanks to %s)\n", in->name, tech, stuff, o->chan->name);
/* Setup parameters */
snprintf(tmpchan, sizeof(tmpchan),"%s@%s", o->chan->call_forward, o->chan->context);
ast_hangup(o->chan);
o->chan = ast_request("Local", in->nativeformats, tmpchan);
o->chan = ast_request(tech, in->nativeformats, stuff);
if (!o->chan) {
ast_log(LOG_NOTICE, "Unable to create local channel for call forward to '%s'\n", tmpchan);
ast_log(LOG_NOTICE, "Unable to create local channel for call forward to '%s/%s'\n", tech, stuff);
o->stillgoing = 0;
numbusies++;
numnochan++;
} else {
if (in->callerid) {
if (o->chan->callerid)
free(o->chan->callerid);
o->chan->callerid = malloc(strlen(in->callerid) + 1);
strncpy(o->chan->callerid, in->callerid, strlen(in->callerid) + 1);
if (o->chan->callerid)
free(o->chan->callerid);
o->chan->callerid = NULL;
if (o->forcecallerid) {
char *newcid = NULL;
if (strlen(in->macroexten))
newcid = in->macroexten;
else
newcid = in->exten;
o->chan->callerid = strdup(newcid);
strncpy(o->chan->accountcode, winner->accountcode, sizeof(o->chan->accountcode) - 1);
o->chan->cdrflags = winner->cdrflags;
if (!o->chan->callerid)
ast_log(LOG_WARNING, "Out of memory\n");
} else {
if (in->callerid) {
o->chan->callerid = strdup(in->callerid);
if (!o->chan->callerid)
ast_log(LOG_WARNING, "Out of memory\n");
}
strncpy(o->chan->accountcode, in->accountcode, sizeof(o->chan->accountcode) - 1);
o->chan->cdrflags = in->cdrflags;
}
if (in->ani) {
if (o->chan->ani)
free(o->chan->ani);
o->chan->ani = malloc(strlen(in->ani) + 1);
strncpy(o->chan->ani, in->ani, strlen(in->ani) + 1);
if (o->chan->ani)
strncpy(o->chan->ani, in->ani, strlen(in->ani));
else
ast_log(LOG_WARNING, "Out of memory\n");
}
if (o->chan->rdnis)
free(o->chan->rdnis);
if (!ast_strlen_zero(in->macroexten))
o->chan->rdnis = strdup(in->macroexten);
else
o->chan->rdnis = strdup(in->exten);
if (ast_call(o->chan, tmpchan, 0)) {
ast_log(LOG_NOTICE, "Failed to dial on local channel for call forward to '%s'\n", tmpchan);
o->stillgoing = 0;
ast_hangup(o->chan);
o->chan = NULL;
numbusies++;
numnochan++;
} else {
/* After calling, set callerid to extension */
ast_set_callerid(o->chan, ast_strlen_zero(in->macroexten) ? in->exten : in->macroexten, 0);
}
}
/* Hangup the original channel now, in case we needed it */
ast_hangup(winner);
continue;
}
f = ast_read(winner);
@@ -237,7 +302,8 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
peer = o->chan;
*allowredir_in = o->allowredirect_in;
*allowredir_out = o->allowredirect_out;
*allowdisconnect = o->allowdisconnect;
*allowdisconnect_in = o->allowdisconnect_in;
*allowdisconnect_out = o->allowdisconnect_out;
}
break;
case AST_CONTROL_BUSY:
@@ -249,7 +315,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
o->stillgoing = 0;
if (in->cdr)
ast_cdr_busy(in->cdr);
numbusies++;
numbusy++;
break;
case AST_CONTROL_CONGESTION:
if (option_verbose > 2)
@@ -260,29 +326,32 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
o->stillgoing = 0;
if (in->cdr)
ast_cdr_busy(in->cdr);
numbusies++;
numcongestion++;
break;
case AST_CONTROL_RINGING:
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "%s is ringing\n", o->chan->name);
if (!sentringing && !moh) {
if (!(*sentringing) && !outgoing->musiconhold) {
ast_indicate(in, AST_CONTROL_RINGING);
sentringing++;
ringind++;
(*sentringing)++;
}
break;
case AST_CONTROL_PROGRESS:
if (option_verbose > 2)
ast_verbose ( VERBOSE_PREFIX_3 "%s is making progress passing it to %s\n", o->chan->name,in->name);
ast_indicate(in, AST_CONTROL_PROGRESS);
if (!outgoing->ringbackonly)
ast_indicate(in, AST_CONTROL_PROGRESS);
break;
case AST_CONTROL_OFFHOOK:
/* Ignore going off hook */
break;
case -1:
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "%s stopped sounds\n", o->chan->name);
ast_indicate(in, -1);
if (!outgoing->ringbackonly && !outgoing->musiconhold) {
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "%s stopped sounds\n", o->chan->name);
ast_indicate(in, -1);
(*sentringing) = 0;
}
break;
default:
ast_log(LOG_DEBUG, "Dunno what to do with control type %d\n", f->subclass);
@@ -317,13 +386,18 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
if (!f || ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_HANGUP))) {
/* Got hung up */
*to=-1;
strncpy(status, "CANCEL", statussize - 1);
if (f)
ast_frfree(f);
return NULL;
}
if (f && (f->frametype == AST_FRAME_DTMF) && *allowdisconnect &&
if (f && (f->frametype == AST_FRAME_DTMF) && *allowdisconnect_out &&
(f->subclass == '*')) {
if (option_verbose > 3)
ast_verbose(VERBOSE_PREFIX_3 "User hit %c to disconnect call.\n", f->subclass);
*to=0;
strcpy(status, "CANCEL");
ast_frfree(f);
return NULL;
}
if (single && ((f->frametype == AST_FRAME_VOICE) || (f->frametype == AST_FRAME_DTMF))) {
@@ -335,11 +409,6 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
if (!*to && (option_verbose > 2))
ast_verbose( VERBOSE_PREFIX_3 "Nobody picked up in %d ms\n", orig);
}
if (moh) {
ast_moh_stop(in);
} else if (ringind) {
ast_indicate(in, -1);
}
return peer;
@@ -349,7 +418,7 @@ static int dial_exec(struct ast_channel *chan, void *data)
{
int res=-1;
struct localuser *u;
char info[256], *peers, *timeout, *tech, *number, *rest, *cur;
char *info, *peers, *timeout, *tech, *number, *rest, *cur;
char privdb[256] = "", *s;
char announcemsg[256] = "", *ann;
struct localuser *outgoing=NULL, *tmp;
@@ -357,7 +426,9 @@ static int dial_exec(struct ast_channel *chan, void *data)
int to;
int allowredir_in=0;
int allowredir_out=0;
int allowdisconnect=0;
int allowdisconnect_in=0;
int allowdisconnect_out=0;
int hasmacro = 0;
int privacy=0;
int announce=0;
int resetcdr=0;
@@ -365,23 +436,49 @@ static int dial_exec(struct ast_channel *chan, void *data)
char restofit[AST_MAX_EXTENSION];
char *transfer = NULL;
char *newnum;
char callerid[256], *l, *n;
char callerid[256] = "", *l, *n;
char *url=NULL; /* JDG */
struct ast_var_t *current;
struct varshead *headp, *newheadp;
struct ast_var_t *newvar;
int go_on=0;
unsigned int calldurationlimit=0;
char *cdl;
time_t now;
struct ast_bridge_config config;
long timelimit = 0;
long play_warning = 0;
long warning_freq=0;
char *warning_sound=NULL;
char *end_sound=NULL;
char *start_sound=NULL;
char *limitptr;
char limitdata[256];
char *sdtmfptr;
char sdtmfdata[256] = "";
char *stack,*var;
char *mac = NULL, macroname[256] = "";
char status[256]="";
char toast[80];
int play_to_caller=0,play_to_callee=0;
int playargs=0, sentringing=0, moh=0;
int digit = 0;
time_t start_time, answer_time, end_time;
if (!data) {
ast_log(LOG_WARNING, "Dial requires an argument (technology1/number1&technology2/number2...|optional timeout)\n");
ast_log(LOG_WARNING, "Dial requires an argument (technology1/number1&technology2/number2...|optional timeout|options)\n");
return -1;
}
if (!(info = ast_strdupa(data))) {
ast_log(LOG_WARNING, "Unable to dupe data :(\n");
return -1;
}
LOCAL_USER_ADD(u);
strncpy(info, (char *)data, sizeof(info) - 1);
peers = info;
if (peers) {
timeout = strchr(info, '|');
if (timeout) {
*timeout = '\0';
@@ -403,13 +500,111 @@ static int dial_exec(struct ast_channel *chan, void *data)
}
} else
timeout = NULL;
if (!peers || !strlen(peers)) {
if (!peers || ast_strlen_zero(peers)) {
ast_log(LOG_WARNING, "Dial argument takes format (technology1/number1&technology2/number2...|optional timeout)\n");
goto out;
}
if (transfer) {
/* Extract call duration limit */
if ((cdl = strstr(transfer, "S("))) {
calldurationlimit=atoi(cdl+2);
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Setting call duration limit to %i seconds.\n",calldurationlimit);
}
/* DTMF SCRIPT*/
if ((sdtmfptr = strstr(transfer, "D("))) {
strncpy(sdtmfdata, sdtmfptr + 2, sizeof(sdtmfdata) - 1);
/* Overwrite with X's what was the sdtmf info */
while (*sdtmfptr && (*sdtmfptr != ')'))
*(sdtmfptr++) = 'X';
if (*sdtmfptr)
*sdtmfptr = 'X';
/* Now find the end */
sdtmfptr = strchr(sdtmfdata, ')');
if (sdtmfptr)
*sdtmfptr = '\0';
else
ast_log(LOG_WARNING, "D( Data lacking trailing ')'\n");
}
/* XXX LIMIT SUPPORT */
if ((limitptr = strstr(transfer, "L("))) {
strncpy(limitdata, limitptr + 2, sizeof(limitdata) - 1);
/* Overwrite with X's what was the limit info */
while(*limitptr && (*limitptr != ')'))
*(limitptr++) = 'X';
if (*limitptr)
*limitptr = 'X';
/* Now find the end */
limitptr = strchr(limitdata, ')');
if (limitptr)
*limitptr = '\0';
else
ast_log(LOG_WARNING, "Limit Data lacking trailing ')'\n");
var = pbx_builtin_getvar_helper(chan,"LIMIT_PLAYAUDIO_CALLER");
play_to_caller = var ? ast_true(var) : 1;
var = pbx_builtin_getvar_helper(chan,"LIMIT_PLAYAUDIO_CALLEE");
play_to_callee = var ? ast_true(var) : 0;
if (!play_to_caller && !play_to_callee)
play_to_caller=1;
var = pbx_builtin_getvar_helper(chan,"LIMIT_WARNING_FILE");
warning_sound = var ? var : "timeleft";
var = pbx_builtin_getvar_helper(chan,"LIMIT_TIMEOUT_FILE");
end_sound = var ? var : NULL;
var = pbx_builtin_getvar_helper(chan,"LIMIT_CONNECT_FILE");
start_sound = var ? var : NULL;
var=stack=limitdata;
var = strsep(&stack, ":");
if (var) {
timelimit = atol(var);
playargs++;
var = strsep(&stack, ":");
if (var) {
play_warning = atol(var);
playargs++;
var = strsep(&stack, ":");
if(var) {
warning_freq = atol(var);
playargs++;
}
}
}
if (!timelimit) {
timelimit=play_to_caller=play_to_callee=play_warning=warning_freq=0;
warning_sound=NULL;
}
/* undo effect of S(x) in case they are both used */
calldurationlimit=0;
/* more efficient do it like S(x) does since no advanced opts*/
if (!play_warning && !start_sound && !end_sound && timelimit) {
calldurationlimit=timelimit/1000;
timelimit=play_to_caller=play_to_callee=play_warning=warning_freq=0;
} else if (option_verbose > 2) {
ast_verbose(VERBOSE_PREFIX_3"Limit Data:\n");
ast_verbose(VERBOSE_PREFIX_3"timelimit=%ld\n",timelimit);
ast_verbose(VERBOSE_PREFIX_3"play_warning=%ld\n",play_warning);
ast_verbose(VERBOSE_PREFIX_3"play_to_caller=%s\n",play_to_caller ? "yes" : "no");
ast_verbose(VERBOSE_PREFIX_3"play_to_callee=%s\n",play_to_callee ? "yes" : "no");
ast_verbose(VERBOSE_PREFIX_3"warning_freq=%ld\n",warning_freq);
ast_verbose(VERBOSE_PREFIX_3"start_sound=%s\n",start_sound ? start_sound : "UNDEF");
ast_verbose(VERBOSE_PREFIX_3"warning_sound=%s\n",warning_sound ? warning_sound : "UNDEF");
ast_verbose(VERBOSE_PREFIX_3"end_sound=%s\n",end_sound ? end_sound : "UNDEF");
}
}
/* XXX ANNOUNCE SUPPORT */
if ((ann = strstr(transfer, "A("))) {
announce = 1;
@@ -428,6 +623,27 @@ static int dial_exec(struct ast_channel *chan, void *data)
announce = 0;
}
}
/* Get the macroname from the dial option string */
if ((mac = strstr(transfer, "M("))) {
hasmacro = 1;
strncpy(macroname, mac + 2, sizeof(macroname) - 1);
while (*mac && (*mac != ')'))
*(mac++) = 'X';
if (*mac)
*mac = 'X';
else {
ast_log(LOG_WARNING, "Could not find macro to which we should jump.\n");
hasmacro = 0;
}
mac = strchr(macroname, ')');
if (mac)
*mac = '\0';
else {
ast_log(LOG_WARNING, "Macro flag set without trailing ')'\n");
hasmacro = 0;
}
}
/* Extract privacy info from transfer */
if ((s = strstr(transfer, "P("))) {
privacy = 1;
@@ -454,15 +670,15 @@ static int dial_exec(struct ast_channel *chan, void *data)
}
if (resetcdr && chan->cdr)
ast_cdr_reset(chan->cdr, 0);
if (!strlen(privdb) && privacy) {
if (ast_strlen_zero(privdb) && privacy) {
/* If privdb is not specified and we are using privacy, copy from extension */
strncpy(privdb, chan->exten, sizeof(privdb) - 1);
}
if (privacy) {
if (chan->callerid)
strncpy(callerid, chan->callerid, sizeof(callerid));
strncpy(callerid, chan->callerid, sizeof(callerid) - 1);
else
strcpy(callerid, "");
callerid[0] = '\0';
ast_callerid_parse(callerid, &n, &l);
if (l) {
ast_shrink_phone_number(l);
@@ -507,10 +723,16 @@ static int dial_exec(struct ast_channel *chan, void *data)
tmp->musiconhold = 1;
else tmp->musiconhold = 0;
if (strchr(transfer, 'H'))
allowdisconnect = tmp->allowdisconnect = 1;
else allowdisconnect = tmp->allowdisconnect = 0;
allowdisconnect_out = tmp->allowdisconnect_out = 1;
else allowdisconnect_out = tmp->allowdisconnect_out = 0;
if(strchr(transfer, 'h'))
allowdisconnect_in = tmp->allowdisconnect_in = 1;
else allowdisconnect_in = tmp->allowdisconnect_in = 0;
if(strchr(transfer, 'g'))
go_on=1;
if (strchr(transfer, 'f'))
tmp->forcecallerid = 1;
else tmp->forcecallerid = 0;
}
strncpy(numsubst, number, sizeof(numsubst)-1);
/* If we're dialing by extension, look at the extension to know what to dial */
@@ -531,15 +753,28 @@ static int dial_exec(struct ast_channel *chan, void *data)
cur = rest;
continue;
}
if (strlen(tmp->chan->call_forward)) {
char tmpchan[256];
if (!ast_strlen_zero(tmp->chan->call_forward)) {
char tmpchan[256]="";
char *stuff;
char *tech;
strncpy(tmpchan, tmp->chan->call_forward, sizeof(tmpchan) - 1);
if ((stuff = strchr(tmpchan, '/'))) {
*stuff = '\0';
stuff++;
tech = tmpchan;
} else {
snprintf(tmpchan, sizeof(tmpchan), "%s@%s", tmp->chan->call_forward, tmp->chan->context);
stuff = tmpchan;
tech = "Local";
}
/* Before processing channel, go ahead and check for forwarding */
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Forwarding call to '%s@%s'\n", tmp->chan->call_forward, tmp->chan->context);
snprintf(tmpchan, sizeof(tmpchan),"%s@%s", tmp->chan->call_forward, tmp->chan->context);
ast_verbose(VERBOSE_PREFIX_3 "Forwarding %s to '%s/%s' (thanks to %s)\n", chan->name, tech, stuff, tmp->chan->name);
/* Setup parameters */
ast_hangup(tmp->chan);
tmp->chan = ast_request("Local", chan->nativeformats, tmpchan);
tmp->chan = ast_request(tech, chan->nativeformats, stuff);
if (!tmp->chan) {
ast_log(LOG_NOTICE, "Unable to create local channel for call forward to '%s'\n", tmpchan);
ast_log(LOG_NOTICE, "Unable to create local channel for call forward to '%s/%s'\n", tech, stuff);
free(tmp);
cur = rest;
continue;
@@ -548,36 +783,21 @@ static int dial_exec(struct ast_channel *chan, void *data)
/* If creating a SIP channel, look for a variable called */
/* VXML_URL in the calling channel and copy it to the */
/* new channel. */
if (strcasecmp(tech,"SIP")==0)
{
headp=&chan->varshead;
AST_LIST_TRAVERSE(headp,current,entries) {
if (strcasecmp(ast_var_name(current),"VXML_URL")==0)
{
newvar=ast_var_assign(ast_var_name(current),ast_var_value(current));
newheadp=&tmp->chan->varshead;
AST_LIST_INSERT_HEAD(newheadp,newvar,entries);
break;
}
}
}
/* Check for ALERT_INFO in the SetVar list. This is for */
/* SIP distinctive ring as per the RFC. For Cisco 7960s, */
/* SetVar(ALERT_INFO=<x>) where x is an integer value 1-5. */
/* However, the RFC says it should be a URL. -km- */
if (strcasecmp(tech,"SIP")==0)
{
headp=&chan->varshead;
AST_LIST_TRAVERSE(headp,current,entries) {
/* Search for ALERT_INFO */
if (strcasecmp(ast_var_name(current),"ALERT_INFO")==0)
{
newvar=ast_var_assign(ast_var_name(current),ast_var_value(current));
newheadp=&tmp->chan->varshead;
AST_LIST_INSERT_HEAD(newheadp,newvar,entries);
break;
}
headp=&chan->varshead;
AST_LIST_TRAVERSE(headp,current,entries) {
if (!strcasecmp(ast_var_name(current),"VXML_URL") ||
!strcasecmp(ast_var_name(current), "ALERT_INFO") ||
!strcasecmp(ast_var_name(current), "OSPTOKEN") ||
!strcasecmp(ast_var_name(current), "OSPHANDLE"))
{
newvar=ast_var_assign(ast_var_name(current),ast_var_value(current));
newheadp=&tmp->chan->varshead;
AST_LIST_INSERT_HEAD(newheadp,newvar,entries);
}
}
@@ -593,8 +813,10 @@ static int dial_exec(struct ast_channel *chan, void *data)
else
tmp->chan->callerid = NULL;
/* Copy language from incoming to outgoing */
strcpy(tmp->chan->language, chan->language);
if (!strlen(tmp->chan->musicclass))
strncpy(tmp->chan->language, chan->language, sizeof(tmp->chan->language) - 1);
strncpy(tmp->chan->accountcode, chan->accountcode, sizeof(tmp->chan->accountcode) - 1);
tmp->chan->cdrflags = chan->cdrflags;
if (ast_strlen_zero(tmp->chan->musicclass))
strncpy(tmp->chan->musicclass, chan->musicclass, sizeof(tmp->chan->musicclass) - 1);
if (chan->ani)
tmp->chan->ani = strdup(chan->ani);
@@ -615,7 +837,7 @@ static int dial_exec(struct ast_channel *chan, void *data)
if (chan->cdr)
ast_cdr_setdestchan(chan->cdr, tmp->chan->name);
/* check the restuls of ast_call */
/* check the results of ast_call */
if (res) {
/* Again, keep going even if there's an error */
if (option_debug)
@@ -626,9 +848,11 @@ static int dial_exec(struct ast_channel *chan, void *data)
free(tmp);
cur = rest;
continue;
} else
} else {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Called %s\n", numsubst);
ast_set_callerid(tmp->chan, ast_strlen_zero(chan->macroexten) ? chan->exten : chan->macroexten, 0);
}
/* Put them in the list of outgoing thingies... We're ready now.
XXX If we're forcibly removed, these outgoing calls won't get
hung up XXX */
@@ -641,11 +865,31 @@ static int dial_exec(struct ast_channel *chan, void *data)
cur = rest;
} while(cur);
if (timeout && strlen(timeout))
to = atoi(timeout) * 1000;
else
if (timeout && !ast_strlen_zero(timeout)) {
to = atoi(timeout);
if (to > 0)
to *= 1000;
else
ast_log(LOG_WARNING, "Invalid timeout specified: '%s'\n", timeout);
} else
to = -1;
peer = wait_for_answer(chan, outgoing, &to, &allowredir_in, &allowredir_out, &allowdisconnect);
if (outgoing) {
/* Our status will at least be NOANSWER */
strncpy(status, "NOANSWER", sizeof(status) - 1);
if (outgoing->musiconhold) {
moh=1;
ast_moh_start(chan, NULL);
} else if (outgoing->ringbackonly) {
ast_indicate(chan, AST_CONTROL_RINGING);
sentringing++;
}
} else
strncpy(status, "CHANUNAVAIL", sizeof(status) - 1);
time(&start_time);
peer = wait_for_answer(chan, outgoing, &to, &allowredir_in, &allowredir_out, &allowdisconnect_in, &allowdisconnect_out, &sentringing, status, sizeof(status));
if (!peer) {
if (to)
/* Musta gotten hung up */
@@ -657,6 +901,12 @@ static int dial_exec(struct ast_channel *chan, void *data)
goto out;
}
if (peer) {
time(&answer_time);
#ifdef OSP_SUPPORT
/* Once call is answered, ditch the OSP Handle */
pbx_builtin_setvar_helper(chan, "OSPHANDLE", "");
#endif
strncpy(status, "ANSWER", sizeof(status) - 1);
/* Ah ha! Someone answered within the desired timeframe. Of course after this
we will always return with -1 so that it is hung up properly after the
conversation. */
@@ -669,38 +919,123 @@ static int dial_exec(struct ast_channel *chan, void *data)
pbx_builtin_setvar_helper(chan, "DIALEDPEERNAME", peer->name);
if (numsubst)
pbx_builtin_setvar_helper(chan, "DIALEDPEERNUMBER", numsubst);
/* Make sure channels are compatible */
res = ast_channel_make_compatible(chan, peer);
if (res < 0) {
ast_log(LOG_WARNING, "Had to drop call because I couldn't make %s compatible with %s\n", chan->name, peer->name);
ast_hangup(peer);
return -1;
}
/* JDG: sendurl */
if( url && strlen(url) && ast_channel_supports_html(peer) ) {
if( url && !ast_strlen_zero(url) && ast_channel_supports_html(peer) ) {
ast_log(LOG_DEBUG, "app_dial: sendurl=%s.\n", url);
ast_channel_sendurl( peer, url );
} /* /JDG */
if (announce && announcemsg)
{
int res2;
if (announce && announcemsg) {
// Start autoservice on the other chan
res2 = ast_autoservice_start(chan);
res = ast_autoservice_start(chan);
// Now Stream the File
if (!res2)
res2 = ast_streamfile(peer,announcemsg,peer->language);
if (!res2)
res2 = ast_waitstream(peer,"");
if (!res)
res = ast_streamfile(peer,announcemsg,peer->language);
if (!res) {
digit = ast_waitstream(peer, AST_DIGIT_ANY);
}
// Ok, done. stop autoservice
res2 = ast_autoservice_stop(chan);
}
res = ast_bridge_call(chan, peer, allowredir_in, allowredir_out, allowdisconnect);
res = ast_autoservice_stop(chan);
if (digit > 0 && !res)
res = ast_senddigit(chan, digit);
else
res = digit;
if (res != AST_PBX_NO_HANGUP_PEER)
} else
res = 0;
if (hasmacro && macroname) {
void *app = NULL;
res = ast_autoservice_start(chan);
if (res) {
ast_log(LOG_ERROR, "Unable to start autoservice on calling channel\n");
res = -1;
}
app = pbx_findapp("Macro");
if (app && !res) {
res = pbx_exec(peer, app, macroname, 1);
ast_log(LOG_DEBUG, "Macro exited with status %d\n", res);
res = 0;
} else {
ast_log(LOG_ERROR, "Could not find application Macro\n");
res = -1;
}
if (ast_autoservice_stop(chan) < 0) {
ast_log(LOG_ERROR, "Could not stop autoservice on calling channel\n");
res = -1;
}
}
if (!res) {
if (calldurationlimit > 0) {
time(&now);
chan->whentohangup = now + calldurationlimit;
}
if (!ast_strlen_zero(sdtmfdata))
res = ast_dtmf_stream(peer,chan,sdtmfdata,250);
}
if (!res) {
memset(&config,0,sizeof(struct ast_bridge_config));
config.play_to_caller=play_to_caller;
config.play_to_callee=play_to_callee;
config.allowredirect_in = allowredir_in;
config.allowredirect_out = allowredir_out;
config.allowdisconnect_in = allowdisconnect_in;
config.allowdisconnect_out = allowdisconnect_out;
config.timelimit = timelimit;
config.play_warning = play_warning;
config.warning_freq = warning_freq;
config.warning_sound = warning_sound;
config.end_sound = end_sound;
config.start_sound = start_sound;
if (moh) {
moh = 0;
ast_moh_stop(chan);
} else if (sentringing) {
sentringing = 0;
ast_indicate(chan, -1);
}
/* Be sure no generators are left on it */
ast_deactivate_generator(chan);
/* Make sure channels are compatible */
res = ast_channel_make_compatible(chan, peer);
if (res < 0) {
ast_log(LOG_WARNING, "Had to drop call because I couldn't make %s compatible with %s\n", chan->name, peer->name);
ast_hangup(peer);
return -1;
}
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
res = -1;
if (res != AST_PBX_NO_HANGUP_PEER) {
if (!chan->_softhangup)
chan->hangupcause = peer->hangupcause;
ast_hangup(peer);
}
}
out:
if (moh) {
moh = 0;
ast_moh_stop(chan);
} else if (sentringing) {
sentringing = 0;
ast_indicate(chan, -1);
}
hanguptree(outgoing, NULL);
pbx_builtin_setvar_helper(chan, "DIALSTATUS", status);
ast_log(LOG_DEBUG, "Exiting with DIALSTATUS=%s.\n", status);
LOCAL_USER_REMOVE(u);
if((go_on>0) && (!chan->_softhangup))

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

@@ -19,10 +19,10 @@
#include <asterisk/module.h>
#include <asterisk/config.h>
#include <asterisk/say.h>
#include <asterisk/utils.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <pthread.h>
#include <stdio.h>
#include "../asterisk.h"
#include "../astconf.h"
@@ -32,12 +32,15 @@ static char *app = "Directory";
static char *synopsis = "Provide directory of voicemail extensions";
static char *descrip =
" Directory(context): Presents the user with a directory of extensions from\n"
"which they may select by name. The list of names and extensions is\n"
"discovered from voicemail.conf. The context argument is required, and\n"
"specifies the context in which to interpret the extensions. Returns 0\n"
"unless the user hangs up. It also sets up the channel on exit to enter the\n"
"extension the user selected.\n";
" Directory(vm-context[|dial-context[|options]]): Presents the user with a directory\n"
"of extensions from which they may select by name. The list of names \n"
"and extensions is discovered from voicemail.conf. The vm-context argument\n"
"is required, and specifies the context of voicemail.conf to use. The\n"
"dial-context is the context to use for dialing the users, and defaults to\n"
"the vm-context if unspecified. The 'f' option causes the directory to match\n"
"based on the first name in voicemail.conf instead of the last name.\n"
"Returns 0 unless the user hangs up. It also sets up the channel on exit\n"
"to enter the extension the user selected.\n";
/* For simplicity, I'm keeping the format compatible with the voicemail config,
but i'm open to suggestions for isolating it */
@@ -120,18 +123,108 @@ static char *convert(char *lastname)
return tmp;
}
static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char *context, char digit)
/* play name of mailbox owner.
* returns: -1 for bad or missing extension
* '1' for selected entry from directory
* '*' for skipped entry from directory
*/
static int play_mailbox_owner(struct ast_channel *chan, char *context, char *dialcontext, char *ext, char *name) {
int res = 0;
int loop = 3;
char fn[256];
char fn2[256];
/* Check for the VoiceMail2 greeting first */
snprintf(fn, sizeof(fn), "%s/voicemail/%s/%s/greet",
(char *)ast_config_AST_SPOOL_DIR, context, ext);
/* Otherwise, check for an old-style Voicemail greeting */
snprintf(fn2, sizeof(fn2), "%s/vm/%s/greet",
(char *)ast_config_AST_SPOOL_DIR, ext);
if (ast_fileexists(fn, NULL, chan->language) > 0) {
res = ast_streamfile(chan, fn, chan->language);
if (!res) {
res = ast_waitstream(chan, AST_DIGIT_ANY);
}
ast_stopstream(chan);
} else if (ast_fileexists(fn2, NULL, chan->language) > 0) {
res = ast_streamfile(chan, fn2, chan->language);
if (!res) {
res = ast_waitstream(chan, AST_DIGIT_ANY);
}
ast_stopstream(chan);
} else {
res = ast_say_character_str(chan, !ast_strlen_zero(name) ? name : ext,
AST_DIGIT_ANY, chan->language);
}
while (loop) {
if (!res) {
res = ast_streamfile(chan, "dir-instr", chan->language);
}
if (!res) {
res = ast_waitstream(chan, AST_DIGIT_ANY);
}
if (!res) {
res = ast_waitfordigit(chan, 3000);
}
ast_stopstream(chan);
if (res > -1) {
switch (res) {
case '1':
/* Name selected */
loop = 0;
if (ast_exists_extension(chan,dialcontext,ext,1,chan->callerid)) {
strncpy(chan->exten, ext, sizeof(chan->exten)-1);
chan->priority = 0;
strncpy(chan->context, dialcontext, sizeof(chan->context)-1);
} else {
ast_log(LOG_WARNING,
"Can't find extension '%s' in context '%s'. "
"Did you pass the wrong context to Directory?\n",
ext, dialcontext);
res = -1;
}
break;
case '*':
/* Skip to next match in list */
loop = 0;
break;
default:
/* Not '1', or '*', so decrement number of tries */
res = 0;
loop--;
break;
} /* end switch */
} /* end if */
else {
/* User hungup, so jump out now */
loop = 0;
}
} /* end while */
return(res);
}
static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char *context, char *dialcontext, char digit, int last)
{
/* Read in the first three digits.. "digit" is the first digit, already read */
char ext[NUMDIGITS + 1];
char name[80] = "";
struct ast_variable *v;
int res;
int found=0;
int lastuserchoice = 0;
char *start, *pos, *conv,*stringp=NULL;
char fn[256];
char fn2[256];
if (!context || !strlen(context)) {
ast_log(LOG_WARNING, "Directory must be called with an argument (context in which to interpret extensions)\n");
if (!context || ast_strlen_zero(context)) {
ast_log(LOG_WARNING,
"Directory must be called with an argument "
"(context in which to interpret extensions)\n");
return -1;
}
memset(ext, 0, sizeof(ext));
@@ -151,8 +244,9 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char *
strsep(&stringp, ",");
pos = strsep(&stringp, ",");
if (pos) {
strncpy(name, pos, sizeof(name) - 1);
/* Grab the last name */
if (strrchr(pos, ' '))
if (last && strrchr(pos,' '))
pos = strrchr(pos, ' ') + 1;
conv = convert(pos);
if (conv) {
@@ -170,59 +264,46 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char *
}
v = v->next;
}
if (v) {
/* We have a match -- play a greeting if they have it */
/* Check for the VoiceMail2 greeting first */
snprintf(fn, sizeof(fn), "%s/voicemail/%s/%s/greet", (char *)ast_config_AST_SPOOL_DIR, context, v->name);
/* Otherwise, check for an old-style Voicemail greeting */
snprintf(fn2, sizeof(fn2), "%s/vm/%s/greet", (char *)ast_config_AST_SPOOL_DIR, v->name);
if (ast_fileexists(fn, NULL, chan->language) > 0) {
res = ast_streamfile(chan, fn, chan->language);
if (!res)
res = ast_waitstream(chan, AST_DIGIT_ANY);
ast_stopstream(chan);
} else if (ast_fileexists(fn2, NULL, chan->language) > 0) {
res = ast_streamfile(chan, fn2, chan->language);
if (!res)
res = ast_waitstream(chan, AST_DIGIT_ANY);
ast_stopstream(chan);
} else {
res = ast_say_digit_str(chan, v->name, AST_DIGIT_ANY, chan->language);
}
ahem:
if (!res)
res = ast_streamfile(chan, "dir-instr", chan->language);
if (!res)
res = ast_waitstream(chan, AST_DIGIT_ANY);
if (!res)
res = ast_waitfordigit(chan, 3000);
ast_stopstream(chan);
if (res > -1) {
if (res == '1') {
strncpy(chan->exten, v->name, sizeof(chan->exten)-1);
res = play_mailbox_owner(chan, context, dialcontext, v->name, name);
switch (res) {
case -1:
/* user pressed '1' but extension does not exist, or
* user hungup
*/
lastuserchoice = 0;
break;
case '1':
/* user pressed '1' and extensions exists */
lastuserchoice = res;
strncpy(chan->context, dialcontext, sizeof(chan->context) - 1);
strncpy(chan->exten, v->name, sizeof(chan->exten) - 1);
chan->priority = 0;
strncpy(chan->context, context, sizeof(chan->context)-1);
break;
case '*':
/* user pressed '*' to skip something found */
lastuserchoice = res;
res = 0;
break;
} else if (res == '*') {
res = 0;
v = v->next;
} else {
res = 0;
goto ahem;
}
default:
break;
}
} else {
if (found)
res = ast_streamfile(chan, "dir-nomore", chan->language);
else
res = ast_streamfile(chan, "dir-nomatch", chan->language);
if (!res)
res = 1;
return res;
v = v->next;
}
}
if (lastuserchoice != '1') {
if (found)
res = ast_streamfile(chan, "dir-nomore", chan->language);
else
res = ast_streamfile(chan, "dir-nomatch", chan->language);
if (!res)
res = 1;
return res;
}
return 0;
}
return res;
}
@@ -232,8 +313,11 @@ static int directory_exec(struct ast_channel *chan, void *data)
int res = 0;
struct localuser *u;
struct ast_config *cfg;
int last = 1;
char *context, *dialcontext, *dirintro, *options;
if (!data) {
ast_log(LOG_WARNING, "directory requires an argument (context)\n");
ast_log(LOG_WARNING, "directory requires an argument (context[,dialcontext])\n");
return -1;
}
cfg = ast_load(DIRECTORY_CONFIG);
@@ -243,17 +327,40 @@ static int directory_exec(struct ast_channel *chan, void *data)
}
LOCAL_USER_ADD(u);
top:
context = ast_strdupa(data);
dialcontext = strchr(context, '|');
if (dialcontext) {
*dialcontext = '\0';
dialcontext++;
options = strchr(dialcontext, '|');
if (options) {
*options = '\0';
options++;
if (strchr(options, 'f'))
last = 0;
}
} else
dialcontext = context;
dirintro = ast_variable_retrieve(cfg, context, "directoryintro");
if (!dirintro || ast_strlen_zero(dirintro))
dirintro = ast_variable_retrieve(cfg, "general", "directoryintro");
if (!dirintro || ast_strlen_zero(dirintro)) {
if (last)
dirintro = "dir-intro";
else
dirintro = "dir-intro-fn";
}
if (chan->_state != AST_STATE_UP)
res = ast_answer(chan);
if (!res)
res = ast_streamfile(chan, "dir-intro", chan->language);
res = ast_streamfile(chan, dirintro, chan->language);
if (!res)
res = ast_waitstream(chan, AST_DIGIT_ANY);
ast_stopstream(chan);
if (!res)
res = ast_waitfordigit(chan, 5000);
if (res > 0) {
res = do_directory(chan, cfg, (char *)data, res);
res = do_directory(chan, cfg, context, dialcontext, res, last);
if (res > 0) {
res = ast_waitstream(chan, AST_DIGIT_ANY);
ast_stopstream(chan);

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

@@ -17,6 +17,7 @@
#include <asterisk/file.h>
#include <asterisk/logger.h>
#include <asterisk/channel.h>
#include <asterisk/indications.h>
#include <asterisk/pbx.h>
#include <asterisk/module.h>
#include <asterisk/translate.h>
@@ -25,12 +26,8 @@
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <pthread.h>
#include <sys/time.h>
/*
#define TONE_BLOCK_SIZE 320
*/
static char *tdesc = "DISA (Direct Inward System Access) Application";
@@ -83,27 +80,9 @@ STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static float loudness=4096.0;
static int firstdigittimeout = 20000; /* 20 seconds first digit timeout */
static int digittimeout = 10000; /* 10 seconds subsequent digit timeout */
static void make_tone_block(unsigned char *data, float f1, float f2, int len, int *x)
{
int i;
float val;
for(i = 0; i < len; i++)
{
val = loudness * sin((f1 * 2.0 * M_PI * (*x))/8000.0);
val += loudness * sin((f2 * 2.0 * M_PI * (*x)++)/8000.0);
data[i] = AST_LIN2MU((int)val);
}
/* wrap back around from 8000 */
if (*x >= 8000) *x = 0;
return;
}
static int ms_diff(struct timeval *tv1, struct timeval *tv2)
{
int ms;
@@ -113,19 +92,26 @@ int ms;
return(ms);
}
static void play_dialtone(struct ast_channel *chan)
{
const struct tone_zone_sound *ts = NULL;
ts = ast_get_indication_tone(chan->zone, "dial");
if (ts)
ast_playtones_start(chan, 0, ts->data, 0);
else
ast_tonepair_start(chan, 350, 440, 0, 0);
}
static int disa_exec(struct ast_channel *chan, void *data)
{
int i,j,k,x;
int i,j,k,x,did_ignore;
struct localuser *u;
char tmp[256],arg2[256],exten[AST_MAX_EXTENSION],acctcode[20];
struct {
unsigned char offset[AST_FRIENDLY_OFFSET];
unsigned char buf[640];
} tone_block;
char tmp[256],arg2[256]="",exten[AST_MAX_EXTENSION],acctcode[20]="";
char *ourcontext,*ourcallerid;
struct ast_frame *f,wf;
struct ast_frame *f;
struct timeval lastout, now, lastdigittime;
int res;
time_t rstart;
FILE *fp;
char *stringp=NULL;
@@ -150,7 +136,7 @@ static int disa_exec(struct ast_channel *chan, void *data)
ourcontext = strsep(&stringp, "|");
/* if context specified, save 2nd arg and parse third */
if (ourcontext) {
strcpy(arg2,ourcontext);
strncpy(arg2,ourcontext, sizeof(arg2) - 1);
ourcallerid = strsep(&stringp,"|");
}
/* if context not specified, use "disa" */
@@ -166,15 +152,22 @@ static int disa_exec(struct ast_channel *chan, void *data)
ast_answer(chan);
}
i = k = x = 0; /* k is 0 for pswd entry, 1 for ext entry */
did_ignore = 0;
exten[0] = 0;
acctcode[0] = 0;
/* can we access DISA without password? */
ast_log(LOG_DEBUG, "Context: %s\n",ourcontext);
if (!strcasecmp(tmp, "no-password"))
{;
k = 1;
ast_log(LOG_DEBUG, "DISA no-password login success\n");
}
gettimeofday(&lastdigittime,NULL);
play_dialtone(chan);
for(;;)
{
gettimeofday(&now,NULL);
@@ -205,24 +198,7 @@ static int disa_exec(struct ast_channel *chan, void *data)
return -1;
}
if (f->frametype == AST_FRAME_VOICE) {
if (!i || (ast_ignore_pattern(ourcontext, exten) && k)) {
wf.frametype = AST_FRAME_VOICE;
wf.subclass = AST_FORMAT_ULAW;
wf.offset = AST_FRIENDLY_OFFSET;
wf.mallocd = 0;
wf.data = tone_block.buf;
wf.datalen = f->datalen;
make_tone_block(tone_block.buf, 350, 440, f->datalen, &x);
wf.samples = wf.datalen;
ast_frfree(f);
if (ast_write(chan, &wf))
{
ast_log(LOG_WARNING, "DISA Failed to write frame on %s\n",chan->name);
LOCAL_USER_REMOVE(u);
return -1;
}
} else
ast_frfree(f);
ast_frfree(f);
continue;
}
/* if not DTMF, just do it again */
@@ -234,7 +210,9 @@ static int disa_exec(struct ast_channel *chan, void *data)
j = f->subclass; /* save digit */
ast_frfree(f);
if (i == 0)
ast_playtones_stop(chan);
gettimeofday(&lastdigittime,NULL);
/* got a DTMF tone */
if (i < AST_MAX_EXTENSION) /* if still valid number of digits */
@@ -287,38 +265,52 @@ static int disa_exec(struct ast_channel *chan, void *data)
}
/* password good, set to dial state */
ast_log(LOG_WARNING,"DISA on chan %s password is good\n",chan->name);
ast_log(LOG_DEBUG,"DISA on chan %s password is good\n",chan->name);
play_dialtone(chan);
k = 1;
i = 0; /* re-set buffer pointer */
exten[sizeof(acctcode)] = 0;
strcpy(acctcode,exten);
strncpy(acctcode,exten, sizeof(acctcode) - 1);
exten[0] = 0;
ast_log(LOG_DEBUG,"Successful DISA log-in on chan %s\n",chan->name);
continue;
}
}
exten[i++] = j; /* save digit */
exten[i] = 0;
if (!k) continue; /* if getting password, continue doing it */
/* if this exists */
if (ast_ignore_pattern(ourcontext, exten)) {
play_dialtone(chan);
did_ignore = 1;
} else
if (did_ignore) {
ast_playtones_stop(chan);
did_ignore = 0;
}
/* if can do some more, do it */
if (!ast_matchmore_extension(chan,ourcontext,exten,1, chan->callerid))
if (!ast_matchmore_extension(chan,ourcontext,exten,1, chan->callerid)) {
break;
}
}
}
if (k && ast_exists_extension(chan,ourcontext,exten,1, chan->callerid))
{
ast_playtones_stop(chan);
/* We're authenticated and have a valid extension */
if (ourcallerid && *ourcallerid)
{
if (chan->callerid) free(chan->callerid);
chan->callerid = strdup(ourcallerid);
}
strcpy(chan->exten,exten);
strcpy(chan->context,ourcontext);
strcpy(chan->accountcode,acctcode);
strncpy(chan->exten, exten, sizeof(chan->exten) - 1);
strncpy(chan->context, ourcontext, sizeof(chan->context) - 1);
strncpy(chan->accountcode, acctcode, sizeof(chan->accountcode) - 1);
chan->priority = 0;
ast_cdr_init(chan->cdr,chan);
LOCAL_USER_REMOVE(u);
@@ -326,44 +318,20 @@ static int disa_exec(struct ast_channel *chan, void *data)
}
reorder:
/* something is invalid, give em reorder forever */
x = 0;
k = 0; /* k = 0 means busy tone, k = 1 means silence) */
i = 0; /* Number of samples we've done */
for(;;)
ast_indicate(chan,AST_CONTROL_CONGESTION);
/* something is invalid, give em reorder for several seconds */
time(&rstart);
while(time(NULL) < rstart + 10)
{
if (ast_waitfor(chan, -1) < 0)
break;
f = ast_read(chan);
if (!f)
break;
if (f->frametype == AST_FRAME_VOICE) {
wf.frametype = AST_FRAME_VOICE;
wf.subclass = AST_FORMAT_ULAW;
wf.offset = AST_FRIENDLY_OFFSET;
wf.mallocd = 0;
wf.data = tone_block.buf;
wf.datalen = f->datalen;
wf.samples = wf.datalen;
if (k)
memset(tone_block.buf, 0x7f, wf.datalen);
else
make_tone_block(tone_block.buf,480.0, 620.0,wf.datalen, &x);
i += wf.datalen / 8;
if (i > 250) {
i = 0;
k = !k;
}
if (ast_write(chan, &wf))
{
ast_log(LOG_WARNING, "DISA Failed to write frame on %s\n",chan->name);
LOCAL_USER_REMOVE(u);
return -1;
}
}
ast_frfree(f);
}
ast_playtones_stop(chan);
LOCAL_USER_REMOVE(u);
return -1;
}

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

@@ -22,9 +22,6 @@
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
static char *tdesc = "Simple Echo Application";
static char *app = "Echo";
@@ -52,6 +49,8 @@ static int echo_exec(struct ast_channel *chan, void *data)
f = ast_read(chan);
if (!f)
break;
f->delivery.tv_sec = 0;
f->delivery.tv_usec = 0;
if (f->frametype == AST_FRAME_VOICE) {
if (ast_write(chan, f))
break;

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

@@ -20,15 +20,13 @@
#include <asterisk/config.h>
#include <asterisk/module.h>
#include <asterisk/enum.h>
#include <asterisk/utils.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <pthread.h>
static char *tdesc = "ENUM Lookup";
static char *app = "EnumLookup";
@@ -49,7 +47,7 @@ static char *descrip =
#define ENUM_CONFIG "enum.conf"
static char h323driver[80];
static char h323driver[80] = "";
#define H323DRIVERDEFAULT "H323"
STANDARD_LOCAL_USER;
@@ -64,7 +62,7 @@ static int enumlookup_exec(struct ast_channel *chan, void *data)
char tmp[256];
char *c,*t;
struct localuser *u;
if (!data || !strlen(data)) {
if (!data || ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "EnumLookup requires an argument (extension)\n");
res = 1;
}
@@ -128,7 +126,7 @@ static int enumlookup_exec(struct ast_channel *chan, void *data)
else
res = 0;
}
} else if (strlen(tech)) {
} else if (!ast_strlen_zero(tech)) {
ast_log(LOG_NOTICE, "Don't know how to handle technology '%s'\n", tech);
res = 0;
}
@@ -150,9 +148,9 @@ static int load_config(void)
cfg = ast_load(ENUM_CONFIG);
if (cfg) {
if (!(s=ast_variable_retrieve(cfg, "general", "h323driver"))) {
strcpy(h323driver, H323DRIVERDEFAULT);
strncpy(h323driver, H323DRIVERDEFAULT, sizeof(h323driver) - 1);
} else {
strcpy(h323driver, s);
strncpy(h323driver, s, sizeof(h323driver) - 1);
}
ast_destroy(cfg);
return 0;

101
apps/app_eval.c Normal file
View File

@@ -0,0 +1,101 @@
/*
* Asterisk -- A telephony toolkit for Linux.
*
* Eval application
*
* Copyright (c) 2004 Tilghman Lesher. All rights reserved.
*
* Tilghman Lesher <app_eval__v001@the-tilghman.com>
*
* $Id$
*
* This code is released by the author with no restrictions on usage.
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <asterisk/file.h>
#include <asterisk/logger.h>
#include <asterisk/options.h>
#include <asterisk/channel.h>
#include <asterisk/pbx.h>
#include <asterisk/module.h>
/* Maximum length of any variable */
#define MAXRESULT 1024
static char *tdesc = "Reevaluates strings";
static char *app_eval = "Eval";
static char *eval_synopsis = "Eval(newvar=somestring)";
static char *eval_descrip =
"Eval(newvar=somestring)\n"
" Normally Asterisk evaluates variables inline. But what if you want to\n"
"store variable offsets in a database, to be evaluated later? Eval is\n"
"the answer, by allowing a string to be evaluated twice in the dialplan,\n"
"the first time as part of the normal dialplan, and the second using Eval.\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int eval_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct localuser *u;
char *s, *newvar=NULL, tmp[MAXRESULT];
LOCAL_USER_ADD(u);
/* Check and parse arguments */
if (data) {
s = ast_strdupa((char *)data);
if (s) {
newvar = strsep(&s, "=");
if (newvar && (newvar[0] != '\0')) {
memset(tmp, 0, MAXRESULT);
pbx_substitute_variables_helper(chan, s, tmp, MAXRESULT - 1);
pbx_builtin_setvar_helper(chan, newvar, tmp);
}
} else {
ast_log(LOG_ERROR, "Out of memory\n");
res = -1;
}
}
LOCAL_USER_REMOVE(u);
return res;
}
int unload_module(void)
{
STANDARD_HANGUP_LOCALUSERS;
return ast_unregister_application(app_eval);
}
int load_module(void)
{
return ast_register_application(app_eval, eval_exec, eval_synopsis, eval_descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

113
apps/app_exec.c Normal file
View File

@@ -0,0 +1,113 @@
/*
* Asterisk -- A telephony toolkit for Linux.
*
* Exec application
*
* Copyright (c) 2004 Tilghman Lesher. All rights reserved.
*
* Tilghman Lesher <app_exec__v001@the-tilghman.com>
*
* $Id$
*
* This code is released by the author with no restrictions on usage.
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <asterisk/file.h>
#include <asterisk/logger.h>
#include <asterisk/options.h>
#include <asterisk/channel.h>
#include <asterisk/pbx.h>
#include <asterisk/module.h>
/* Maximum length of any variable */
#define MAXRESULT 1024
static char *tdesc = "Executes applications";
static char *app_exec = "Exec";
static char *exec_synopsis = "Exec(Appname(arguments))";
static char *exec_descrip =
"Exec(appname(arguments))\n"
" Allows an arbitrary application to be invoked even when not\n"
"hardcoded into the dialplan. Returns whatever value the\n"
"app returns or -2 when the app cannot be found.\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int exec_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct localuser *u;
char *s, *appname, *endargs, args[MAXRESULT];
struct ast_app *app;
LOCAL_USER_ADD(u);
memset(args, 0, MAXRESULT);
/* Check and parse arguments */
if (data) {
s = ast_strdupa((char *)data);
if (s) {
appname = strsep(&s, "(");
if (s) {
endargs = strrchr(s, ')');
if (endargs)
*endargs = '\0';
pbx_substitute_variables_helper(chan, s, args, MAXRESULT - 1);
}
if (appname) {
app = pbx_findapp(appname);
if (app) {
res = pbx_exec(chan, app, args, 1);
} else {
ast_log(LOG_WARNING, "Could not find application (%s)\n", appname);
res = -2;
}
}
} else {
ast_log(LOG_ERROR, "Out of memory\n");
res = -1;
}
}
LOCAL_USER_REMOVE(u);
return res;
}
int unload_module(void)
{
STANDARD_HANGUP_LOCALUSERS;
return ast_unregister_application(app_exec);
}
int load_module(void)
{
return ast_register_application(app_exec, exec_exec, exec_synopsis, exec_descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

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

@@ -5,7 +5,7 @@
*
* Copyright (C) 2002, Christos Ricudis
*
* Christos Ricudis <ricudis@paiko.gr>
* Christos Ricudis <ricudis@itc.auth.gr>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
@@ -19,6 +19,8 @@
#include <asterisk/module.h>
#include <asterisk/md5.h>
#include <asterisk/config.h>
#include <asterisk/utils.h>
#include <asterisk/lock.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
@@ -34,7 +36,6 @@
#include <unistd.h>
#include <fcntl.h>
#include <ctype.h>
#include <pthread.h>
#define FESTIVAL_CONFIG "festival.conf"
@@ -155,6 +156,9 @@ static int send_waveform_to_channel(struct ast_channel *chan, char *waveform, in
return -1;
}
/* Answer if it's not already going */
if (chan->_state != AST_STATE_UP)
ast_answer(chan);
ast_stopstream(chan);
owriteformat = chan->writeformat;
@@ -195,7 +199,7 @@ static int send_waveform_to_channel(struct ast_channel *chan, char *waveform, in
needed = f->samples * 2;
if (needed > sizeof(myf.frdata)) {
ast_log(LOG_WARNING, "Only able to deliver %d of %d requested samples\n",
sizeof(myf.frdata) / 2, needed/2);
(int)sizeof(myf.frdata) / 2, needed/2);
needed = sizeof(myf.frdata);
}
res = read(fds[0], myf.frdata, needed);
@@ -247,6 +251,7 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
struct localuser *u;
struct sockaddr_in serv_addr;
struct hostent *serverhost;
struct ast_hostent ahp;
int fd;
FILE *fs;
char *host;
@@ -263,9 +268,9 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
int i;
struct MD5Context md5ctx;
unsigned char MD5Res[16];
char MD5Hex[33];
char koko[4];
char cachefile[MAXFESTLEN];
char MD5Hex[33] = "";
char koko[4] = "";
char cachefile[MAXFESTLEN]="";
int readcache=0;
int writecache=0;
int strln;
@@ -300,11 +305,9 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
if (!(festivalcommand = ast_variable_retrieve(cfg, "general", "festivalcommand"))) {
festivalcommand = "(tts_textasterisk \"%s\" 'file)(quit)\n";
}
if (!vdata || !strlen(vdata)) {
if (!vdata || ast_strlen_zero(vdata)) {
ast_log(LOG_WARNING, "festival requires an argument (text)\n");
ast_destroy(cfg);
return -1;
}
strncpy(data, vdata, sizeof(data) - 1);
@@ -322,14 +325,16 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
if (fd < 0) {
ast_log(LOG_WARNING,"festival_client: can't get socket\n");
ast_destroy(cfg);
return -1;
}
memset(&serv_addr, 0, sizeof(serv_addr));
if ((serv_addr.sin_addr.s_addr = inet_addr(host)) == -1) {
/* its a name rather than an ipnum */
serverhost = gethostbyname(host);
serverhost = ast_gethostbyname(host, &ahp);
if (serverhost == (struct hostent *)0) {
ast_log(LOG_WARNING,"festival_client: gethostbyname failed\n");
ast_destroy(cfg);
return -1;
}
memmove(&serv_addr.sin_addr,serverhost->h_addr, serverhost->h_length);
@@ -339,6 +344,7 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
if (connect(fd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) != 0) {
ast_log(LOG_WARNING,"festival_client: connect to server failed\n");
ast_destroy(cfg);
return -1;
}
@@ -346,21 +352,21 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
MD5Init(&md5ctx);
MD5Update(&md5ctx,(unsigned char const *)data,strlen(data));
MD5Final(MD5Res,&md5ctx);
strcpy(MD5Hex,"");
MD5Hex[0] = '\0';
/* Convert to HEX and look if there is any matching file in the cache
directory */
for (i=0;i<16;i++) {
sprintf(koko,"%X",MD5Res[i]);
strcat(MD5Hex,koko);
snprintf(koko, sizeof(koko), "%X",MD5Res[i]);
strncat(MD5Hex, koko, sizeof(MD5Hex) - strlen(MD5Hex) - 1);
}
readcache=0;
writecache=0;
if (strlen(cachedir)+strlen(MD5Hex)+1<=MAXFESTLEN && (usecache==-1)) {
sprintf(cachefile,"%s/%s",cachedir,MD5Hex);
snprintf(cachefile, sizeof(cachefile), "%s/%s", cachedir, MD5Hex);
fdesc=open(cachefile,O_RDWR);
if (fdesc==-1) {
fdesc=open(cachefile,O_CREAT|O_RDWR,0);
fdesc=open(cachefile,O_CREAT|O_RDWR,0777);
if (fdesc!=-1) {
writecache=1;
strln=strlen((char *)data);
@@ -372,11 +378,12 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
}
} else {
read(fdesc,&strln,sizeof(int));
ast_log(LOG_DEBUG,"Cache file exists, strln=%d, strlen=%d\n",strln,strlen((char *)data));
ast_log(LOG_DEBUG,"Cache file exists, strln=%d, strlen=%d\n",strln,(int)strlen((char *)data));
if (strlen((char *)data)==strln) {
ast_log(LOG_DEBUG,"Size OK\n");
read(fdesc,&bigstring,strln);
if (strcmp(bigstring,data)==0) {
bigstring[strln] = 0;
if (strcmp(bigstring,data)==0) {
readcache=1;
} else {
ast_log(LOG_WARNING,"Strings do not match\n");
@@ -440,6 +447,7 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
}
} while (strcmp(ack,"OK\n") != 0);
close(fd);
ast_destroy(cfg);
LOCAL_USER_REMOVE(u);
return res;

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

@@ -21,11 +21,14 @@
#include <asterisk/image.h>
#include <asterisk/options.h>
#include <sys/ioctl.h>
#ifdef __linux__
#include <linux/zaptel.h>
#else
#include <zaptel.h>
#endif /* __linux__ */
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <pthread.h>
static char *tdesc = "Flash zap trunk application";

90
apps/app_forkcdr.c Normal file
View File

@@ -0,0 +1,90 @@
/*
* Asterisk -- A telephony toolkit for Linux.
*
* Fork CDR application
* Copyright Anthony Minessale anthmct@yahoo.com
* Development of this app Sponsered/Funded by TAAN Softworks Corp
*
* This program is free software, distributed under the terms of
* the GNU General Public License
*/
#include <asterisk/file.h>
#include <asterisk/logger.h>
#include <asterisk/channel.h>
#include <asterisk/pbx.h>
#include <asterisk/cdr.h>
#include <asterisk/module.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <pthread.h>
static char *tdesc = "Fork The CDR into 2 seperate entities.";
static char *app = "ForkCDR";
static char *synopsis =
"Forks the Call Data Record";
static char *descrip =
" ForkCDR(): Causes the Call Data Record to fork an additional\n"
"cdr record starting from the time of the fork call\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static void ast_cdr_clone(struct ast_cdr *cdr) {
struct ast_cdr *newcdr = ast_cdr_alloc();
memcpy(newcdr,cdr,sizeof(struct ast_cdr));
ast_cdr_append(cdr,newcdr);
gettimeofday(&newcdr->start, NULL);
memset(&newcdr->answer, 0, sizeof(newcdr->answer));
ast_cdr_add_flag(cdr,AST_CDR_FLAG_CHILD|AST_CDR_FLAG_LOCKED);
}
static void ast_cdr_fork(struct ast_channel *chan) {
if(chan && chan->cdr) {
ast_cdr_clone(chan->cdr);
}
}
static int forkcdr_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct localuser *u;
LOCAL_USER_ADD(u);
ast_cdr_fork(chan);
LOCAL_USER_REMOVE(u);
return res;
}
int unload_module(void)
{
STANDARD_HANGUP_LOCALUSERS;
return ast_unregister_application(app);
}
int load_module(void)
{
return ast_register_application(app, forkcdr_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

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

@@ -3,9 +3,9 @@
*
* Execute arbitrary system commands
*
* Copyright (C) 1999, Mark Spencer
* Copyright (C) 1999-2005, Digium
*
* Mark Spencer <markster@linux-support.net>
* Mark Spencer <markster@digium.com>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
@@ -24,9 +24,6 @@
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
static char *tdesc = "Get ADSI CPE ID";
static char *app = "GetCPEID";
@@ -34,9 +31,9 @@ static char *app = "GetCPEID";
static char *synopsis = "Get ADSI CPE ID";
static char *descrip =
" GetCPEID: Obtains and displays CPE ID and other information in order to\n"
"properly setup zapata.conf for on-hook operations. Returns -1 on hanup\n"
"only.";
" GetCPEID: Obtains and displays ADSI CPE ID and other information in order\n"
"to properly setup zapata.conf for on-hook operations.\n"
"Returns -1 on hangup only.\n";
STANDARD_LOCAL_USER;
@@ -70,9 +67,9 @@ static int cpeid_exec(struct ast_channel *chan, void *idata)
stuff[2] = data[2];
stuff[3] = data[3];
memset(data, 0, sizeof(data));
strcpy(stuff[0], "** CPE Info **");
strcpy(stuff[1], "Identifying CPE...");
strcpy(stuff[2], "Please wait...");
strncpy(stuff[0], "** CPE Info **", sizeof(data[0]) - 1);
strncpy(stuff[1], "Identifying CPE...", sizeof(data[1]) - 1);
strncpy(stuff[2], "Please wait...", sizeof(data[2]) - 1);
res = adsi_load_session(chan, NULL, 0, 1);
if (res > 0) {
cpeid_setstatus(chan, stuff, 0);
@@ -83,8 +80,8 @@ static int cpeid_exec(struct ast_channel *chan, void *idata)
ast_verbose(VERBOSE_PREFIX_3 "Got CPEID of '%02x:%02x:%02x:%02x' on '%s'\n", cpeid[0], cpeid[1], cpeid[2], cpeid[3], chan->name);
}
if (res > -1) {
strcpy(stuff[1], "Measuring CPE...");
strcpy(stuff[2], "Please wait...");
strncpy(stuff[1], "Measuring CPE...", sizeof(data[1]) - 1);
strncpy(stuff[2], "Please wait...", sizeof(data[2]) - 1);
cpeid_setstatus(chan, stuff, 0);
res = adsi_get_cpeinfo(chan, &width, &height, &buttons, 0);
if (res > -1) {
@@ -95,14 +92,14 @@ static int cpeid_exec(struct ast_channel *chan, void *idata)
}
if (res > -1) {
if (gotcpeid)
sprintf(stuff[1], "CPEID: %02x:%02x:%02x:%02x", cpeid[0], cpeid[1], cpeid[2], cpeid[3]);
snprintf(stuff[1], sizeof(data[1]), "CPEID: %02x:%02x:%02x:%02x", cpeid[0], cpeid[1], cpeid[2], cpeid[3]);
else
strcpy(stuff[1], "CPEID Unknown");
strncpy(stuff[1], "CPEID Unknown", sizeof(data[1]) - 1);
if (gotgeometry)
sprintf(stuff[2], "Geom: %dx%d, %d buttons", width, height, buttons);
snprintf(stuff[2], sizeof(data[2]), "Geom: %dx%d, %d buttons", width, height, buttons);
else
strcpy(stuff[2], "Geometry unknown");
strcpy(stuff[3], "Press # to exit");
strncpy(stuff[2], "Geometry unknown", sizeof(data[2]) - 1);
strncpy(stuff[3], "Press # to exit", sizeof(data[3]) - 1);
cpeid_setstatus(chan, stuff, 1);
for(;;) {
res = ast_waitfordigit(chan, 1000);

224
apps/app_groupcount.c Normal file
View File

@@ -0,0 +1,224 @@
/*
* Asterisk -- A telephony toolkit for Linux.
*
* Group Manipulation Applications
*
* Copyright (c) 2004 Digium
*
* Mark Spencer <markster@digium.com>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <asterisk/file.h>
#include <asterisk/logger.h>
#include <asterisk/options.h>
#include <asterisk/channel.h>
#include <asterisk/pbx.h>
#include <asterisk/module.h>
#include <asterisk/utils.h>
static char *tdesc = "Group Management Routines";
static char *app_group_count = "GetGroupCount";
static char *app_group_set = "SetGroup";
static char *app_group_check = "CheckGroup";
static char *group_count_synopsis = "GetGroupCount([groupname][@category])";
static char *group_set_synopsis = "SetGroup(groupname[@category])";
static char *group_check_synopsis = "CheckGroup(max[@category])";
static char *group_count_descrip =
"GetGroupCount([group][@category])\n"
" 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. Always returns 0.\n";
static char *group_set_descrip =
"SetGroup(group)\n"
" Sets the channel group to the specified value. Equivalent to\n"
"SetVar(GROUP=group). Always returns 0.\n";
static char *group_check_descrip =
"CheckGroup(max)\n"
" Checks that the current number of total channels in the\n"
"current channel's group does not exceed 'max'. If the number\n"
"does not exceed 'max', we continue to the next step. If the\n"
"number does in fact exceed max, if priority n+101 exists, then\n"
"execution continues at that step, otherwise -1 is returned.\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
#define DEFAULT_CATEGORY "GROUP"
static int group_get_count(char *group, char *category)
{
struct ast_channel *chan;
int count = 0;
char *test;
if (group && !ast_strlen_zero(group)) {
chan = ast_channel_walk_locked(NULL);
while(chan) {
test = pbx_builtin_getvar_helper(chan, category);
if (test && !strcasecmp(test, group))
count++;
ast_mutex_unlock(&chan->lock);
chan = ast_channel_walk_locked(chan);
}
}
return count;
}
static int group_count_exec(struct ast_channel *chan, void *data)
{
int res=0;
int count;
struct localuser *u;
char *group=NULL;
char *cat = NULL;
char ret[80]="";
char tmp[256]="";
LOCAL_USER_ADD(u);
/* Check and parse arguments */
if (data && !ast_strlen_zero(data)) {
strncpy(tmp, data, sizeof(tmp) - 1);
group = tmp;
cat = strchr(tmp, '@');
if (cat) {
*cat = '\0';
cat++;
}
}
if (cat)
snprintf(ret, sizeof(ret), "GROUP_%s", cat);
else
strncpy(ret, DEFAULT_CATEGORY, sizeof(ret) - 1);
if (!group || ast_strlen_zero(group)) {
group = pbx_builtin_getvar_helper(chan, ret);
}
count = group_get_count(group, ret);
snprintf(ret, sizeof(ret), "%d", count);
pbx_builtin_setvar_helper(chan, "GROUPCOUNT", ret);
LOCAL_USER_REMOVE(u);
return res;
}
static int group_set_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct localuser *u;
char ret[80] = "";
char tmp[256] = "";
char *cat=NULL, *group=NULL;
LOCAL_USER_ADD(u);
/* Check and parse arguments */
if (data && !ast_strlen_zero(data)) {
strncpy(tmp, data, sizeof(tmp) - 1);
group = tmp;
cat = strchr(tmp, '@');
if (cat) {
*cat = '\0';
cat++;
}
}
if (cat)
snprintf(ret, sizeof(ret), "GROUP_%s", cat);
else
strncpy(ret, DEFAULT_CATEGORY, sizeof(ret) - 1);
if (group && !ast_strlen_zero(group)) {
pbx_builtin_setvar_helper(chan, ret, group);
} else
ast_log(LOG_WARNING, "SetGroup requires an argument (group name)\n");
LOCAL_USER_REMOVE(u);
return res;
}
static int group_check_exec(struct ast_channel *chan, void *data)
{
int res=0;
int max, count;
struct localuser *u;
char ret[80] = "";
char tmp[256] = "";
char *cat, *group;
LOCAL_USER_ADD(u);
if (data && !ast_strlen_zero(data)) {
strncpy(tmp, data, sizeof(tmp) - 1);
group = tmp;
cat = strchr(tmp, '@');
if (cat) {
*cat = '\0';
cat++;
}
if ((sscanf((char *)tmp, "%i", &max) == 1) && (max > -1)) {
if (cat)
snprintf(ret, sizeof(ret), "GROUP_%s", cat);
else
strncpy(ret, DEFAULT_CATEGORY, sizeof(ret) - 1);
count = group_get_count(pbx_builtin_getvar_helper(chan, ret), ret);
if (count > max) {
if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 101, chan->callerid))
chan->priority += 100;
else
res = -1;
}
} else
ast_log(LOG_WARNING, "CheckGroup requires a positive integer argument (max)\n");
} else
ast_log(LOG_WARNING, "CheckGroup requires an argument(max)\n");
LOCAL_USER_REMOVE(u);
return res;
}
int unload_module(void)
{
int res;
STANDARD_HANGUP_LOCALUSERS;
res = ast_unregister_application(app_group_count);
res |= ast_unregister_application(app_group_set);
res |= ast_unregister_application(app_group_check);
return res;
}
int load_module(void)
{
int res;
res = ast_register_application(app_group_count, group_count_exec, group_count_synopsis, group_count_descrip);
res |= ast_register_application(app_group_set, group_set_exec, group_set_synopsis, group_set_descrip);
res |= ast_register_application(app_group_check, group_check_exec, group_check_synopsis, group_check_descrip);
return res;
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

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

@@ -1,8 +1,11 @@
/*
* Asterisk -- A telephony toolkit for Linux.
*
* HasNewVoicemail application
*
* HasVoicemail application
* Changes Copyright (c) 2004 Todd Freeman <freeman@andrews.edu>
*
* 95% based on HasNewVoicemail by:
*
* Copyright (c) 2003 Tilghman Lesher. All rights reserved.
*
* Tilghman Lesher <asterisk-hasnewvoicemail-app@the-tilghman.com>
@@ -34,56 +37,71 @@
#include <asterisk/channel.h>
#include <asterisk/pbx.h>
#include <asterisk/module.h>
#include <asterisk/lock.h>
#include <asterisk/utils.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <dirent.h>
#include <pthread.h>
#include "../astconf.h"
static char *tdesc = "Indicator for whether a voice mailbox has new messages.";
static char *tdesc = "Indicator for whether a voice mailbox has messages in a given folder.";
static char *app_hasvoicemail = "HasVoicemail";
static char *hasvoicemail_synopsis = "Conditionally branches to priority + 101";
static char *hasvoicemail_descrip =
"HasVoicemail(vmbox[@context][:folder][|varname])\n"
" Branches to priority + 101, if there is voicemail in folder indicated."
" Optionally sets <varname> to the number of messages in that folder."
" Assumes folder of INBOX if not specified.\n";
static char *app_hasnewvoicemail = "HasNewVoicemail";
static char *hasnewvoicemail_synopsis = "Conditionally branches to priority + 101";
static char *hasnewvoicemail_descrip =
"HasNewVoicemail(vmbox[@context][|varname])\n"
" Branches to priority + 101, if there is new voicemail"
" Optionally sets <varname> to the number of new messages.\n";
" Branches to priority + 101, if there is voicemail in folder INBOX."
" Optionally sets <varname> to the number of messages in that folder.\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int hasnewvoicemail_exec(struct ast_channel *chan, void *data)
static int hasvoicemail_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct localuser *u;
char vmpath[256], *input, *varname = NULL, *vmbox, *context = "default";
char vmpath[256], *temps, *input, *varname = NULL, *vmbox, *vmfolder = "INBOX", *context = "default";
DIR *vmdir;
struct dirent *vment;
int vmcount = 0;
if (!data) {
ast_log(LOG_WARNING, "HasNewVoicemail requires an argument (vm-box[@context]|varname)\n");
ast_log(LOG_WARNING, "HasVoicemail requires an argument (vm-box[@context][:folder]|varname)\n");
return -1;
}
LOCAL_USER_ADD(u);
input = ast_strdupa((char *)data);
if (input) {
if ((vmbox = strsep(&input,"|")))
varname = input;
else
temps = input;
if ((temps = strsep(&input, "|"))) {
if (input && !ast_strlen_zero(input))
varname = input;
input = temps;
}
if ((temps = strsep(&input, ":"))) {
if (input && !ast_strlen_zero(input))
vmfolder = input;
input = temps;
}
if ((vmbox = strsep(&input, "@")))
if (input && !ast_strlen_zero(input))
context = input;
if (!vmbox)
vmbox = input;
if (index(vmbox,'@')) {
context = vmbox;
vmbox = strsep(&context,"@");
}
snprintf(vmpath,sizeof(vmpath), "%s/voicemail/%s/%s/INBOX", (char *)ast_config_AST_SPOOL_DIR, context, vmbox);
snprintf(vmpath,sizeof(vmpath), "%s/voicemail/%s/%s/%s", (char *)ast_config_AST_SPOOL_DIR, context, vmbox, vmfolder);
if (!(vmdir = opendir(vmpath))) {
ast_log(LOG_NOTICE, "Voice mailbox %s at %s does not exist\n", vmbox, vmpath);
} else {
@@ -97,7 +115,7 @@ static int hasnewvoicemail_exec(struct ast_channel *chan, void *data)
/* Set the count in the channel variable */
if (varname) {
char tmp[12];
snprintf(tmp, sizeof(tmp) - 1, "%d", vmcount);
snprintf(tmp, sizeof(tmp), "%d", vmcount);
pbx_builtin_setvar_helper(chan, varname, tmp);
}
@@ -118,13 +136,19 @@ static int hasnewvoicemail_exec(struct ast_channel *chan, void *data)
int unload_module(void)
{
int res;
STANDARD_HANGUP_LOCALUSERS;
return ast_unregister_application(app_hasnewvoicemail);
res = ast_unregister_application(app_hasvoicemail);
res |= ast_unregister_application(app_hasnewvoicemail);
return res;
}
int load_module(void)
{
return ast_register_application(app_hasnewvoicemail, hasnewvoicemail_exec, hasnewvoicemail_synopsis, hasnewvoicemail_descrip);
int res;
res = ast_register_application(app_hasvoicemail, hasvoicemail_exec, hasvoicemail_synopsis, hasvoicemail_descrip);
res |= ast_register_application(app_hasnewvoicemail, hasvoicemail_exec, hasnewvoicemail_synopsis, hasnewvoicemail_descrip);
return res;
}
char *description(void)

196
apps/app_ices.c Normal file
View File

@@ -0,0 +1,196 @@
/*
* Asterisk -- A telephony toolkit for Linux.
*
* Stream to an icecast server via ICES (see contrib/asterisk-ices.xml)
*
* Copyright (C) 1999, Mark Spencer
*
* Mark Spencer <markster@linux-support.net>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
*/
#include <asterisk/lock.h>
#include <asterisk/file.h>
#include <asterisk/logger.h>
#include <asterisk/channel.h>
#include <asterisk/frame.h>
#include <asterisk/pbx.h>
#include <asterisk/module.h>
#include <asterisk/translate.h>
#include <string.h>
#include <stdio.h>
#include <signal.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/time.h>
#include <errno.h>
#include "../astconf.h"
#define ICES "/usr/bin/ices"
#define LOCAL_ICES "/usr/local/bin/ices"
static char *tdesc = "Encode and Stream via icecast and ices";
static char *app = "ICES";
static char *synopsis = "Encode and stream using 'ices'";
static char *descrip =
" ICES(config.xml) Streams to an icecast server using ices\n"
"(available separately). A configuration file must be supplied\n"
"for ices (see examples/asterisk-ices.conf). Returns -1 on\n"
"hangup or 0 otherwise.\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int icesencode(char *filename, int fd)
{
int res;
int x;
res = fork();
if (res < 0)
ast_log(LOG_WARNING, "Fork failed\n");
if (res)
return res;
dup2(fd, STDIN_FILENO);
for (x=STDERR_FILENO + 1;x<256;x++) {
if ((x != STDIN_FILENO) && (x != STDOUT_FILENO))
close(x);
}
/* Most commonly installed in /usr/local/bin */
execl(ICES, "ices", filename, (char *)NULL);
/* But many places has it in /usr/bin */
execl(LOCAL_ICES, "ices", filename, (char *)NULL);
/* As a last-ditch effort, try to use PATH */
execlp("ices", "ices", filename, (char *)NULL);
ast_log(LOG_WARNING, "Execute of ices failed\n");
return -1;
}
static int ices_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct localuser *u;
int fds[2];
int ms = -1;
int pid = -1;
int flags;
int oreadformat;
struct timeval last;
struct ast_frame *f;
char filename[256]="";
char *c;
last.tv_usec = 0;
last.tv_sec = 0;
if (!data || !strlen(data)) {
ast_log(LOG_WARNING, "ICES requires an argument (configfile.xml)\n");
return -1;
}
if (pipe(fds)) {
ast_log(LOG_WARNING, "Unable to create pipe\n");
return -1;
}
flags = fcntl(fds[1], F_GETFL);
fcntl(fds[1], F_SETFL, flags | O_NONBLOCK);
LOCAL_USER_ADD(u);
ast_stopstream(chan);
if (chan->_state != AST_STATE_UP)
res = ast_answer(chan);
if (res) {
close(fds[0]);
close(fds[1]);
ast_log(LOG_WARNING, "Answer failed!\n");
return -1;
}
oreadformat = chan->readformat;
res = ast_set_read_format(chan, AST_FORMAT_SLINEAR);
if (res < 0) {
close(fds[0]);
close(fds[1]);
ast_log(LOG_WARNING, "Unable to set write format to signed linear\n");
return -1;
}
if (((char *)data)[0] == '/')
strncpy(filename, (char *)data, sizeof(filename) - 1);
else
snprintf(filename, sizeof(filename), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, (char *)data);
/* Placeholder for options */
c = strchr(filename, '|');
if (c)
*c = '\0';
res = icesencode(filename, fds[0]);
close(fds[0]);
if (res >= 0) {
pid = res;
for (;;) {
/* Wait for audio, and stream */
ms = ast_waitfor(chan, -1);
if (ms < 0) {
ast_log(LOG_DEBUG, "Hangup detected\n");
res = -1;
break;
}
f = ast_read(chan);
if (!f) {
ast_log(LOG_DEBUG, "Null frame == hangup() detected\n");
res = -1;
break;
}
if (f->frametype == AST_FRAME_VOICE) {
res = write(fds[1], f->data, f->datalen);
if (res < 0) {
if (errno != EAGAIN) {
ast_log(LOG_WARNING, "Write failed to pipe: %s\n", strerror(errno));
res = -1;
break;
}
}
}
ast_frfree(f);
}
}
close(fds[1]);
LOCAL_USER_REMOVE(u);
if (pid > -1)
kill(pid, SIGKILL);
if (!res && oreadformat)
ast_set_read_format(chan, oreadformat);
return res;
}
int unload_module(void)
{
STANDARD_HANGUP_LOCALUSERS;
return ast_unregister_application(app);
}
int load_module(void)
{
return ast_register_application(app, ices_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

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

@@ -21,7 +21,6 @@
#include <asterisk/image.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
static char *tdesc = "Image Transmission Application";

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

@@ -24,16 +24,16 @@
#include <sys/ioctl.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
#include <sys/time.h>
#ifdef __linux__
#include <netinet/in.h>
#if defined(__linux__)
#include <linux/soundcard.h>
#elif defined(__FreeBSD__)
#include <machine/soundcard.h>
#include <sys/soundcard.h>
#else
#include <soundcard.h>
#endif
#include <netinet/in.h>
#ifdef __OpenBSD__
#define DEV_DSP "/dev/audio"
@@ -58,7 +58,7 @@ STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static ast_mutex_t sound_lock = AST_MUTEX_INITIALIZER;
AST_MUTEX_DEFINE_STATIC(sound_lock);
static int sound = -1;
static int write_audio(short *data, int len)

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

@@ -24,7 +24,6 @@
#include <asterisk/astdb.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
static char *tdesc = "Look up Caller*ID name/number from blacklist database";

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

@@ -24,7 +24,6 @@
#include <asterisk/astdb.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
static char *tdesc = "Look up CallerID Name from local database";

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

@@ -18,13 +18,13 @@
#include <asterisk/pbx.h>
#include <asterisk/module.h>
#include <asterisk/options.h>
#include <asterisk/utils.h>
#include <asterisk/lock.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
#define MAX_ARGS 80
static char *tdesc = "Extension Macros";
@@ -73,14 +73,14 @@ static int macro_exec(struct ast_channel *chan, void *data)
char *save_macro_priority;
char *save_macro_offset;
if (!data || !strlen(data)) {
if (!data || ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "Invalid Macro incantation\n");
return 0;
}
strncpy(tmp, data, sizeof(tmp) - 1);
rest = tmp;
macro = strsep(&rest, "|");
if (!macro || !strlen(macro)) {
if (!macro || ast_strlen_zero(macro)) {
ast_log(LOG_WARNING, "Invalid macro name specified\n");
return 0;
}
@@ -96,7 +96,7 @@ static int macro_exec(struct ast_channel *chan, void *data)
oldpriority = chan->priority;
strncpy(oldexten, chan->exten, sizeof(oldexten) - 1);
strncpy(oldcontext, chan->context, sizeof(oldcontext) - 1);
if (!strlen(chan->macrocontext)) {
if (ast_strlen_zero(chan->macrocontext)) {
strncpy(chan->macrocontext, chan->context, sizeof(chan->macrocontext) - 1);
strncpy(chan->macroexten, chan->exten, sizeof(chan->macroexten) - 1);
chan->macropriority = chan->priority;
@@ -122,8 +122,9 @@ static int macro_exec(struct ast_channel *chan, void *data)
pbx_builtin_setvar_helper(chan, "MACRO_OFFSET", NULL);
/* Setup environment for new run */
strcpy(chan->exten, "s");
strncpy(chan->context, fullmacro, sizeof(chan->context));
chan->exten[0] = 's';
chan->exten[1] = '\0';
strncpy(chan->context, fullmacro, sizeof(chan->context) - 1);
chan->priority = 1;
while((cur = strsep(&rest, "|")) && (argc < MAX_ARGS)) {
@@ -139,7 +140,8 @@ static int macro_exec(struct ast_channel *chan, void *data)
while(ast_exists_extension(chan, chan->context, chan->exten, chan->priority, chan->callerid)) {
if ((res = ast_spawn_extension(chan, chan->context, chan->exten, chan->priority, chan->callerid))) {
/* Something bad happened, or a hangup has been requested. */
if (((res >= '0') && (res <= '9')) || ((res >= 'A') && (res <= 'F'))) {
if (((res >= '0') && (res <= '9')) || ((res >= 'A') && (res <= 'F')) ||
(res == '*') || (res == '#')) {
/* Just return result as to the previous application as if it had been dialed */
ast_log(LOG_DEBUG, "Oooh, got something to jump out with ('%c')!\n", res);
break;
@@ -193,8 +195,8 @@ out:
pbx_builtin_setvar_helper(chan, "MACRO_PRIORITY", save_macro_priority);
if (save_macro_priority) free(save_macro_priority);
if (setmacrocontext) {
strcpy(chan->macrocontext, "");
strcpy(chan->macroexten, "");
chan->macrocontext[0] = '\0';
chan->macroexten[0] = '\0';
chan->macropriority = 0;
}
@@ -202,7 +204,7 @@ out:
/* If we're leaving the macro normally, restore original information */
chan->priority = oldpriority;
strncpy(chan->context, oldcontext, sizeof(chan->context) - 1);
if (!chan->_softhangup) {
if (!(chan->_softhangup & AST_SOFTHANGUP_ASYNCGOTO)) {
/* Copy the extension, so long as we're not in softhangup, where we could be given an asyncgoto */
strncpy(chan->exten, oldexten, sizeof(chan->exten) - 1);
if ((offsets = pbx_builtin_getvar_helper(chan, "MACRO_OFFSET"))) {

1228
apps/app_meetme.c Executable file → Normal file

File diff suppressed because it is too large Load Diff

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

@@ -23,8 +23,6 @@
#include <stdlib.h>
#include <errno.h>
#include <pthread.h>
static char *tdesc = "Digital Milliwatt (mu-law) Test Application";
static char *app = "Milliwatt";
@@ -64,7 +62,7 @@ static int milliwatt_generate(struct ast_channel *chan, void *data, int len, int
if (len > sizeof(buf))
{
ast_log(LOG_WARNING,"Only doing %d bytes (%d bytes requested)\n",sizeof(buf),len);
ast_log(LOG_WARNING,"Only doing %d bytes (%d bytes requested)\n",(int)sizeof(buf),len);
len = sizeof(buf);
}
waste[0] = 0; /* make compiler happy */
@@ -76,6 +74,8 @@ static int milliwatt_generate(struct ast_channel *chan, void *data, int len, int
wf.datalen = len;
wf.samples = wf.datalen;
wf.src = "app_milliwatt";
wf.delivery.tv_sec = 0;
wf.delivery.tv_usec = 0;
/* create a buffer containing the digital milliwatt pattern */
for(i = 0; i < len; i++)
{

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

@@ -3,9 +3,9 @@
*
* Silly application to play an MP3 file -- uses mpg123
*
* Copyright (C) 1999, Mark Spencer
* Copyright (C) 1999-2004, Digium, Inc.
*
* Mark Spencer <markster@linux-support.net>
* Mark Spencer <markster@digium.com>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
@@ -25,7 +25,6 @@
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <pthread.h>
#include <sys/time.h>
#define LOCAL_MPG_123 "/usr/local/bin/mpg123"
@@ -61,36 +60,35 @@ static int mp3play(char *filename, int fd)
close(x);
}
/* Execute mpg123, but buffer if it's a net connection */
if (strncmp(filename, "http://", 7)) {
if (!strncasecmp(filename, "http://", 7)) {
/* Most commonly installed in /usr/local/bin */
execl(LOCAL_MPG_123, "mpg123", "-q", "-s", "-b", "1024", "--mono", "-r", "8000", filename, (char *)NULL);
execl(LOCAL_MPG_123, "mpg123", "-q", "-s", "-b", "1024", "-f", "8192", "--mono", "-r", "8000", filename, (char *)NULL);
/* But many places has it in /usr/bin */
execl(MPG_123, "mpg123", "-q", "-s", "-b", "1024", "--mono", "-r", "8000", filename, (char *)NULL);
execl(MPG_123, "mpg123", "-q", "-s", "-b", "1024","-f", "8192", "--mono", "-r", "8000", filename, (char *)NULL);
/* As a last-ditch effort, try to use PATH */
execlp("mpg123", "mpg123", "-q", "-s", "-b", "1024", "--mono", "-r", "8000", filename, (char *)NULL);
execlp("mpg123", "mpg123", "-q", "-s", "-b", "1024", "-f", "8192", "--mono", "-r", "8000", filename, (char *)NULL);
}
else {
/* Most commonly installed in /usr/local/bin */
execl(MPG_123, "mpg123", "-q", "-s", "--mono", "-r", "8000", filename, (char *)NULL);
execl(MPG_123, "mpg123", "-q", "-s", "-f", "8192", "--mono", "-r", "8000", filename, (char *)NULL);
/* But many places has it in /usr/bin */
execl(LOCAL_MPG_123, "mpg123", "-q", "-s", "--mono", "-r", "8000", filename, (char *)NULL);
execl(LOCAL_MPG_123, "mpg123", "-q", "-s", "-f", "8192", "--mono", "-r", "8000", filename, (char *)NULL);
/* As a last-ditch effort, try to use PATH */
execlp("mpg123", "mpg123", "-q", "-s", "--mono", "-r", "8000", filename, (char *)NULL);
execlp("mpg123", "mpg123", "-q", "-s", "-f", "8192", "--mono", "-r", "8000", filename, (char *)NULL);
}
ast_log(LOG_WARNING, "Execute of mpg123 failed\n");
return -1;
}
static int timed_read(int fd, void *data, int datalen)
static int timed_read(int fd, void *data, int datalen, int timeout)
{
int res;
fd_set fds;
struct timeval tv = { 2, 0 }; /* Wait no more than 2 seconds */
FD_ZERO(&fds);
FD_SET(fd, &fds);
res = ast_select(fd + 1, &fds, NULL, NULL, &tv);
struct pollfd fds[1];
fds[0].fd = fd;
fds[0].events = POLLIN;
res = poll(fds, 1, timeout);
if (res < 1) {
ast_log(LOG_NOTICE, "Selected timed out/errored out with %d\n", res);
ast_log(LOG_NOTICE, "Poll timed out/errored out with %d\n", res);
return -1;
}
return read(fd, data, datalen);
@@ -105,15 +103,14 @@ static int mp3_exec(struct ast_channel *chan, void *data)
int ms = -1;
int pid = -1;
int owriteformat;
struct timeval last;
int timeout = 2000;
struct timeval now, next;
struct ast_frame *f;
struct myframe {
struct ast_frame f;
char offset[AST_FRIENDLY_OFFSET];
short frdata[160];
} myf;
last.tv_usec = 0;
last.tv_sec = 0;
if (!data) {
ast_log(LOG_WARNING, "MP3 Playback requires an argument (filename)\n");
return -1;
@@ -132,36 +129,36 @@ static int mp3_exec(struct ast_channel *chan, void *data)
return -1;
}
gettimeofday(&now, NULL);
res = mp3play((char *)data, fds[1]);
if (!strncasecmp((char *)data, "http://", 7)) {
timeout = 10000;
}
/* Wait 1000 ms first */
ms = 1000;
next = now;
next.tv_sec += 1;
if (res >= 0) {
pid = res;
/* Order is important -- there's almost always going to be mp3... we want to prioritize the
user */
for (;;) {
ms = ast_waitfor(chan, ms);
if (ms < 0) {
ast_log(LOG_DEBUG, "Hangup detected\n");
res = -1;
break;
}
if (ms) {
f = ast_read(chan);
if (!f) {
ast_log(LOG_DEBUG, "Null frame == hangup() detected\n");
res = -1;
break;
gettimeofday(&now, NULL);
ms = (next.tv_sec - now.tv_sec) * 1000;
ms += (next.tv_usec - now.tv_usec) / 1000;
#if 0
printf("ms: %d\n", ms);
#endif
if (ms <= 0) {
#if 0
{
static struct timeval last;
struct timeval tv;
gettimeofday(&tv, NULL);
printf("Since last: %ld\n", (tv.tv_sec - last.tv_sec) * 1000 + (tv.tv_usec - last.tv_usec) / 1000);
last = tv;
}
if (f->frametype == AST_FRAME_DTMF) {
ast_log(LOG_DEBUG, "User pressed a key\n");
ast_frfree(f);
res = 0;
break;
}
ast_frfree(f);
} else {
res = timed_read(fds[0], myf.frdata, sizeof(myf.frdata));
#endif
res = timed_read(fds[0], myf.frdata, sizeof(myf.frdata), timeout);
if (res > 0) {
myf.f.frametype = AST_FRAME_VOICE;
myf.f.subclass = AST_FORMAT_SLINEAR;
@@ -170,6 +167,8 @@ static int mp3_exec(struct ast_channel *chan, void *data)
myf.f.mallocd = 0;
myf.f.offset = AST_FRIENDLY_OFFSET;
myf.f.src = __PRETTY_FUNCTION__;
myf.f.delivery.tv_sec = 0;
myf.f.delivery.tv_usec = 0;
myf.f.data = myf.frdata;
if (ast_write(chan, &myf.f) < 0) {
res = -1;
@@ -180,7 +179,36 @@ static int mp3_exec(struct ast_channel *chan, void *data)
res = 0;
break;
}
ms = res / 16;
next.tv_usec += res / 2 * 125;
if (next.tv_usec >= 1000000) {
next.tv_usec -= 1000000;
next.tv_sec++;
}
#if 0
printf("Next: %d\n", ms);
#endif
} else {
ms = ast_waitfor(chan, ms);
if (ms < 0) {
ast_log(LOG_DEBUG, "Hangup detected\n");
res = -1;
break;
}
if (ms) {
f = ast_read(chan);
if (!f) {
ast_log(LOG_DEBUG, "Null frame == hangup() detected\n");
res = -1;
break;
}
if (f->frametype == AST_FRAME_DTMF) {
ast_log(LOG_DEBUG, "User pressed a key\n");
ast_frfree(f);
res = 0;
break;
}
ast_frfree(f);
}
}
}
}

229
apps/app_nbscat.c Normal file
View File

@@ -0,0 +1,229 @@
/*
* Asterisk -- A telephony toolkit for Linux.
*
* Silly application to play an NBScat file -- uses nbscat8k
*
* Copyright (C) 1999, Mark Spencer
*
* Mark Spencer <markster@linux-support.net>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
*/
#include <asterisk/lock.h>
#include <asterisk/file.h>
#include <asterisk/logger.h>
#include <asterisk/channel.h>
#include <asterisk/frame.h>
#include <asterisk/pbx.h>
#include <asterisk/module.h>
#include <asterisk/translate.h>
#include <string.h>
#include <stdio.h>
#include <signal.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/time.h>
#include <sys/socket.h>
#define LOCAL_NBSCAT "/usr/local/bin/nbscat8k"
#define NBSCAT "/usr/bin/nbscat8k"
static char *tdesc = "Silly NBS Stream Application";
static char *app = "NBScat";
static char *synopsis = "Play an NBS local stream";
static char *descrip =
" NBScat: Executes nbscat to listen to the local NBS stream.\n"
"Returns -1 on\n hangup or 0 otherwise. User can exit by \n"
"pressing any key\n.";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int NBScatplay(int fd)
{
int res;
int x;
res = fork();
if (res < 0)
ast_log(LOG_WARNING, "Fork failed\n");
if (res)
return res;
dup2(fd, STDOUT_FILENO);
for (x=0;x<256;x++) {
if (x != STDOUT_FILENO)
close(x);
}
/* Most commonly installed in /usr/local/bin */
execl(NBSCAT, "nbscat8k", "-d", (char *)NULL);
execl(LOCAL_NBSCAT, "nbscat8k", "-d", (char *)NULL);
ast_log(LOG_WARNING, "Execute of nbscat8k failed\n");
return -1;
}
static int timed_read(int fd, void *data, int datalen)
{
int res;
struct pollfd fds[1];
fds[0].fd = fd;
fds[0].events = POLLIN;
res = poll(fds, 1, 2000);
if (res < 1) {
ast_log(LOG_NOTICE, "Selected timed out/errored out with %d\n", res);
return -1;
}
return read(fd, data, datalen);
}
static int NBScat_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct localuser *u;
int fds[2];
int ms = -1;
int pid = -1;
int owriteformat;
struct timeval now, next;
struct ast_frame *f;
struct myframe {
struct ast_frame f;
char offset[AST_FRIENDLY_OFFSET];
short frdata[160];
} myf;
if (socketpair(AF_LOCAL, SOCK_STREAM, 0, fds)) {
ast_log(LOG_WARNING, "Unable to create socketpair\n");
return -1;
}
LOCAL_USER_ADD(u);
ast_stopstream(chan);
owriteformat = chan->writeformat;
res = ast_set_write_format(chan, AST_FORMAT_SLINEAR);
if (res < 0) {
ast_log(LOG_WARNING, "Unable to set write format to signed linear\n");
return -1;
}
res = NBScatplay(fds[1]);
/* Wait 1000 ms first */
next = now;
next.tv_sec += 1;
if (res >= 0) {
pid = res;
/* Order is important -- there's almost always going to be mp3... we want to prioritize the
user */
for (;;) {
gettimeofday(&now, NULL);
ms = (next.tv_sec - now.tv_sec) * 1000;
ms += (next.tv_usec - now.tv_usec) / 1000;
#if 0
printf("ms: %d\n", ms);
#endif
if (ms <= 0) {
#if 0
{
static struct timeval last;
struct timeval tv;
gettimeofday(&tv, NULL);
printf("Since last: %ld\n", (tv.tv_sec - last.tv_sec) * 1000 + (tv.tv_usec - last.tv_usec) / 1000);
last = tv;
}
#endif
res = timed_read(fds[0], myf.frdata, sizeof(myf.frdata));
if (res > 0) {
myf.f.frametype = AST_FRAME_VOICE;
myf.f.subclass = AST_FORMAT_SLINEAR;
myf.f.datalen = res;
myf.f.samples = res / 2;
myf.f.mallocd = 0;
myf.f.offset = AST_FRIENDLY_OFFSET;
myf.f.src = __PRETTY_FUNCTION__;
myf.f.delivery.tv_sec = 0;
myf.f.delivery.tv_usec = 0;
myf.f.data = myf.frdata;
if (ast_write(chan, &myf.f) < 0) {
res = -1;
break;
}
} else {
ast_log(LOG_DEBUG, "No more mp3\n");
res = 0;
break;
}
next.tv_usec += res / 2 * 125;
if (next.tv_usec >= 1000000) {
next.tv_usec -= 1000000;
next.tv_sec++;
}
#if 0
printf("Next: %d\n", ms);
#endif
} else {
ms = ast_waitfor(chan, ms);
if (ms < 0) {
ast_log(LOG_DEBUG, "Hangup detected\n");
res = -1;
break;
}
if (ms) {
f = ast_read(chan);
if (!f) {
ast_log(LOG_DEBUG, "Null frame == hangup() detected\n");
res = -1;
break;
}
if (f->frametype == AST_FRAME_DTMF) {
ast_log(LOG_DEBUG, "User pressed a key\n");
ast_frfree(f);
res = 0;
break;
}
ast_frfree(f);
}
}
}
}
close(fds[0]);
close(fds[1]);
LOCAL_USER_REMOVE(u);
if (pid > -1)
kill(pid, SIGKILL);
if (!res && owriteformat)
ast_set_write_format(chan, owriteformat);
return res;
}
int unload_module(void)
{
STANDARD_HANGUP_LOCALUSERS;
return ast_unregister_application(app);
}
int load_module(void)
{
return ast_register_application(app, NBScat_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

277
apps/app_osplookup.c Normal file
View File

@@ -0,0 +1,277 @@
/*
* Asterisk -- A telephony toolkit for Linux.
*
* Time of day - Report the time of day
*
* Copyright (C) 1999, Mark Spencer
*
* Mark Spencer <markster@linux-support.net>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
*/
#include <asterisk/lock.h>
#include <asterisk/file.h>
#include <asterisk/logger.h>
#include <asterisk/channel.h>
#include <asterisk/pbx.h>
#include <asterisk/options.h>
#include <asterisk/config.h>
#include <asterisk/module.h>
#include <asterisk/utils.h>
#include <asterisk/causes.h>
#include <asterisk/astosp.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
static char *tdesc = "OSP Lookup";
static char *app = "OSPLookup";
static char *app2 = "OSPNext";
static char *app3 = "OSPFinish";
static char *synopsis = "Lookup number in OSP";
static char *synopsis2 = "Lookup next OSP entry";
static char *synopsis3 = "Record OSP entry";
static char *descrip =
" OSPLookup(exten[|provider[|options]]): Looks up an extension via OSP and sets\n"
"the variables, where 'n' is the number of the result beginning with 1:\n"
" ${OSPTECH}: The technology to use for the call\n"
" ${OSPDEST}: The destination to use for the call\n"
" ${OSPTOKEN}: The actual OSP token as a string\n"
" ${OSPHANDLE}: The OSP Handle for anything remaining\n"
" ${OSPRESULTS}: The number of OSP results total remaining\n"
"\n"
"If the lookup was *not* successful and there exists a priority n + 101,\n"
"then that priority will be taken next.\n" ;
static char *descrip2 =
" OSPNext: Looks up the next OSP Destination for ${OSPHANDLE}\n"
"See OSPLookup for more information\n"
"\n"
"If the lookup was *not* successful and there exists a priority n + 101,\n"
"then that priority will be taken next.\n" ;
static char *descrip3 =
" OSPFinish(status): Records call state for ${OSPHANDLE}, according to\n"
"status, which should be one of BUSY, CONGESTION, ANSWER, NOANSWER, or NOCHANAVAIL\n"
"or coincidentally, just what the Dial application stores in its ${DIALSTATUS}\n"
"\n"
"If the finishing was *not* successful and there exists a priority n + 101,\n"
"then that priority will be taken next.\n" ;
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int str2cause(char *cause)
{
if (!strcasecmp(cause, "BUSY"))
return AST_CAUSE_BUSY;
if (!strcasecmp(cause, "CONGESTION"))
return AST_CAUSE_CONGESTION;
if (!strcasecmp(cause, "ANSWER"))
return AST_CAUSE_NORMAL;
if (!strcasecmp(cause, "CANCEL"))
return AST_CAUSE_NORMAL;
if (!strcasecmp(cause, "NOANSWER"))
return AST_CAUSE_NOANSWER;
if (!strcasecmp(cause, "NOCHANAVAIL"))
return AST_CAUSE_CONGESTION;
ast_log(LOG_WARNING, "Unknown cause '%s', using NORMAL\n", cause);
return AST_CAUSE_NORMAL;
}
static int osplookup_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct localuser *u;
char *temp;
char *provider, *opts=NULL;
struct ast_osp_result result;
if (!data || ast_strlen_zero(data) || !(temp = ast_strdupa(data))) {
ast_log(LOG_WARNING, "OSPLookup requires an argument (extension)\n");
return -1;
}
provider = strchr(temp, '|');
if (provider) {
*provider = '\0';
provider++;
opts = strchr(provider, '|');
if (opts) {
*opts = '\0';
opts++;
}
}
LOCAL_USER_ADD(u);
ast_log(LOG_DEBUG, "Whoo hoo, looking up OSP on '%s' via '%s'\n", temp, provider ? provider : "<default>");
if ((res = ast_osp_lookup(chan, provider, temp, chan->callerid, &result)) > 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);
} else {
if (!res)
ast_log(LOG_NOTICE, "OSP Lookup failed for '%s' (provider '%s')\n", temp, provider ? provider : "<default>");
else
ast_log(LOG_DEBUG, "Got hangup on '%s' while doing OSP Lookup for '%s' (provider '%s')!\n", chan->name, temp, provider ? provider : "<default>" );
}
if (!res) {
/* Look for a "busy" place */
if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 101, chan->callerid))
chan->priority += 100;
} else if (res > 0)
res = 0;
LOCAL_USER_REMOVE(u);
return res;
}
static int ospnext_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct localuser *u;
char *temp;
int cause;
struct ast_osp_result result;
if (!data || ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "OSPNext should have an argument (cause)\n");
}
LOCAL_USER_ADD(u);
cause = str2cause((char *)data);
temp = pbx_builtin_getvar_helper(chan, "OSPHANDLE");
result.handle = -1;
if (temp && strlen(temp) && (sscanf(temp, "%i", &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);
}
} 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");
} else
ast_log(LOG_DEBUG, "Got hangup on '%s' while doing OSP Next!\n", chan->name);
}
if (!res) {
/* Look for a "busy" place */
if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 101, chan->callerid))
chan->priority += 100;
} else if (res > 0)
res = 0;
LOCAL_USER_REMOVE(u);
return res;
}
static int ospfinished_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct localuser *u;
char *temp;
int cause;
time_t start=0, duration=0;
struct ast_osp_result result;
if (!data || ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "OSPFinish should have an argument (cause)\n");
}
if (chan->cdr) {
start = chan->cdr->answer.tv_sec;
if (start)
duration = time(NULL) - start;
else
duration = 0;
} else
ast_log(LOG_WARNING, "OSPFinish called on channel '%s' with no CDR!\n", chan->name);
LOCAL_USER_ADD(u);
cause = str2cause((char *)data);
temp = pbx_builtin_getvar_helper(chan, "OSPHANDLE");
result.handle = -1;
if (temp && strlen(temp) && (sscanf(temp, "%i", &result.handle) == 1) && (result.handle > -1)) {
if (!ast_osp_terminate(result.handle, cause, start, duration)) {
pbx_builtin_setvar_helper(chan, "OSPHANDLE", "");
res = 1;
}
} else {
if (!res) {
if (result.handle > -1)
ast_log(LOG_NOTICE, "OSP Finish failed for handle '%d'\n", result.handle);
else
ast_log(LOG_DEBUG, "No OSP handle specified\n");
} else
ast_log(LOG_DEBUG, "Got hangup on '%s' while doing OSP Terminate!\n", chan->name);
}
if (!res) {
/* Look for a "busy" place */
if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 101, chan->callerid))
chan->priority += 100;
} else if (res > 0)
res = 0;
LOCAL_USER_REMOVE(u);
return res;
}
int unload_module(void)
{
int res;
STANDARD_HANGUP_LOCALUSERS;
res = ast_unregister_application(app3);
res |= ast_unregister_application(app2);
res |= ast_unregister_application(app);
return res;
}
int load_module(void)
{
int res;
res = ast_register_application(app, osplookup_exec, synopsis, descrip);
if (res)
return(res);
res = ast_register_application(app2, ospnext_exec, synopsis2, descrip2);
if (res)
return(res);
res = ast_register_application(app3, ospfinished_exec, synopsis3, descrip3);
if (res)
return(res);
return(0);
}
int reload(void)
{
return 0;
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

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

@@ -21,18 +21,17 @@
#include <asterisk/channel_pvt.h>
#include <asterisk/pbx.h>
#include <asterisk/module.h>
#include <asterisk/parking.h>
#include <asterisk/features.h>
#include <asterisk/options.h>
#include <asterisk/logger.h>
#include <asterisk/say.h>
#include <asterisk/lock.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
static char *tdesc = "Call Parking and Announce Application";
static char *app = "ParkAndAnnounce";
@@ -55,170 +54,171 @@ LOCAL_USER_DECL;
static int parkandannounce_exec(struct ast_channel *chan, void *data)
{
int res=0;
char *return_context;
int l, lot, timeout, dres;
char *working, *context, *exten, *priority, *dial, *dialtech, *dialstr;
char *template, *tpl_working, *tpl_current;
char *tmp[100];
int looptemp=0,i=0;
char *s,*orig_s;
int res=0;
char *return_context;
int l, lot, timeout = 0, dres;
char *working, *context, *exten, *priority, *dial, *dialtech, *dialstr;
char *template, *tpl_working, *tpl_current;
char *tmp[100];
int looptemp=0,i=0;
char *s,*orig_s;
struct ast_channel *dchan;
int outstate;
struct ast_channel *dchan;
int outstate;
struct localuser *u;
if (!data) {
ast_log(LOG_WARNING, "Park requires an argument (parkinglot)\n");
return -1;
}
struct localuser *u;
if(!data || (data && !strlen(data))) {
ast_log(LOG_WARNING, "ParkAndAnnounce requires arguments: (announce:template|timeout|dial|[return_context])\n");
return -1;
}
l=strlen(data)+2;
orig_s=malloc(l);
s=orig_s;
strncpy(s,data,l);
l=strlen(data)+2;
orig_s=malloc(l);
if(!orig_s) {
ast_log(LOG_WARNING, "Out of memory\n");
return -1;
}
s=orig_s;
strncpy(s,data,l);
template=strsep(&s,"|");
if (! template) {
ast_log(LOG_WARNING, "PARK: An announce template must be defined\n");
free(orig_s);
return -1;
}
template=strsep(&s,"|");
if(! template) {
ast_log(LOG_WARNING, "PARK: An announce template must be defined\n");
free(orig_s);
return -1;
}
timeout = atoi(strsep(&s, "|"));
timeout *= 1000;
if(s) {
timeout = atoi(strsep(&s, "|"));
timeout *= 1000;
}
dial=strsep(&s, "|");
if(!dial) {
ast_log(LOG_WARNING, "PARK: A dial resource must be specified i.e: Console/dsp or Zap/g1/5551212\n");
free(orig_s);
return -1;
} else {
dialtech=strsep(&dial, "/");
dialstr=dial;
ast_verbose( VERBOSE_PREFIX_3 "Dial Tech,String: (%s,%s)\n", dialtech,dialstr);
}
dial=strsep(&s, "|");
if (! dial) {
ast_log(LOG_WARNING, "PARK: A dial resouce must be specified i.e: Console/dsp or Zap/g1/5551212\n");
free(orig_s);
return -1;
}
else {
dialtech=strsep(&dial, "/");
dialstr=dial;
ast_verbose( VERBOSE_PREFIX_3 "Dial Tech,String: (%s,%s)\n", dialtech,dialstr);
}
return_context = s;
return_context = s;
if (return_context != NULL) {
/* set the return context. Code borrowed from the Goto builtin */
if(return_context != NULL) {
/* set the return context. Code borrowed from the Goto builtin */
working = return_context;
context = strsep(&working, "|");
exten = strsep(&working, "|");
if (!exten) {
/* Only a priority in this one */
priority = context;
exten = NULL;
context = NULL;
} else {
priority = strsep(&working, "|");
if (!priority) {
/* Only an extension and priority in this one */
priority = exten;
exten = context;
context = NULL;
}
}
if (atoi(priority) < 0) {
ast_log(LOG_WARNING, "Priority '%s' must be a number > 0\n", priority);
free(orig_s);
return -1;
}
/* At this point we have a priority and maybe an extension and a context */
chan->priority = atoi(priority);
if (exten && strcasecmp(exten, "BYEXTENSION"))
strncpy(chan->exten, exten, sizeof(chan->exten)-1);
if (context)
strncpy(chan->context, context, sizeof(chan->context)-1);
}
else { /* increment the priority by default*/
chan->priority++;
}
working = return_context;
context = strsep(&working, "|");
exten = strsep(&working, "|");
if(!exten) {
/* Only a priority in this one */
priority = context;
exten = NULL;
context = NULL;
} else {
priority = strsep(&working, "|");
if(!priority) {
/* Only an extension and priority in this one */
priority = exten;
exten = context;
context = NULL;
}
}
if(atoi(priority) < 0) {
ast_log(LOG_WARNING, "Priority '%s' must be a number > 0\n", priority);
free(orig_s);
return -1;
}
/* At this point we have a priority and maybe an extension and a context */
chan->priority = atoi(priority);
if(exten && strcasecmp(exten, "BYEXTENSION"))
strncpy(chan->exten, exten, sizeof(chan->exten)-1);
if(context)
strncpy(chan->context, context, sizeof(chan->context)-1);
} else { /* increment the priority by default*/
chan->priority++;
}
if (option_verbose > 2) {
ast_verbose( VERBOSE_PREFIX_3 "Return Context: (%s,%s,%d) ID: %s\n", chan->context,chan->exten, chan->priority, chan->callerid);
if (!ast_exists_extension(chan, chan->context, chan->exten, chan->priority, chan->callerid)) {
ast_verbose( VERBOSE_PREFIX_3 "Warning: Return Context Invalid, call will return to default|s\n");
}
}
if(option_verbose > 2) {
ast_verbose( VERBOSE_PREFIX_3 "Return Context: (%s,%s,%d) ID: %s\n", chan->context,chan->exten, chan->priority, chan->callerid);
if(!ast_exists_extension(chan, chan->context, chan->exten, chan->priority, chan->callerid)) {
ast_verbose( VERBOSE_PREFIX_3 "Warning: Return Context Invalid, call will return to default|s\n");
}
}
LOCAL_USER_ADD(u);
LOCAL_USER_ADD(u);
/* we are using masq_park here to protect * from touching the channel once we park it. If the channel comes out of timeout
before we are done announcing and the channel is messed with, Kablooeee. So we use Masq to prevent this. */
/* we are using masq_park here to protect * from touching the channel once we park it. If the channel comes out of timeout
before we are done announcing and the channel is messed with, Kablooeee. So we use Masq to prevent this. */
ast_masq_park_call(chan, NULL, timeout, &lot);
ast_masq_park_call(chan, NULL, timeout, &lot);
res=-1;
res=-1;
ast_verbose( VERBOSE_PREFIX_3 "Call Parking Called, lot: %d, timeout: %d, context: %s\n", lot, timeout, return_context);
ast_verbose( VERBOSE_PREFIX_3 "Call Parking Called, lot: %d, timeout: %d, context: %s\n", lot, timeout, return_context);
/* Now place the call to the extention */
/* Now place the call to the extention */
dchan = ast_request_and_dial(dialtech, AST_FORMAT_SLINEAR, dialstr,30000, &outstate, chan->callerid);
dchan = ast_request_and_dial(dialtech, AST_FORMAT_SLINEAR, dialstr,30000, &outstate, chan->callerid);
if (dchan) {
if (dchan->_state == AST_STATE_UP) {
if (option_verbose > 3)
ast_verbose(VERBOSE_PREFIX_4 "Channel %s was answered.\n", dchan->name);
} else {
if (option_verbose > 3)
ast_verbose(VERBOSE_PREFIX_4 "Channel %s was never answered.\n", dchan->name);
ast_log(LOG_WARNING, "PARK: Channel %s was never answered for the announce.\n", dchan->name);
ast_hangup(dchan);
free(orig_s);
LOCAL_USER_REMOVE(u);
return -1;
}
}
else {
ast_log(LOG_WARNING, "PARK: Unable to allocate announce channel.\n");
free(orig_s);
LOCAL_USER_REMOVE(u);
return -1;
}
if(dchan) {
if(dchan->_state == AST_STATE_UP) {
if(option_verbose > 3)
ast_verbose(VERBOSE_PREFIX_4 "Channel %s was answered.\n", dchan->name);
} else {
if(option_verbose > 3)
ast_verbose(VERBOSE_PREFIX_4 "Channel %s was never answered.\n", dchan->name);
ast_log(LOG_WARNING, "PARK: Channel %s was never answered for the announce.\n", dchan->name);
ast_hangup(dchan);
free(orig_s);
LOCAL_USER_REMOVE(u);
return -1;
}
} else {
ast_log(LOG_WARNING, "PARK: Unable to allocate announce channel.\n");
free(orig_s);
LOCAL_USER_REMOVE(u);
return -1;
}
ast_stopstream(dchan);
ast_stopstream(dchan);
/* now we have the call placed and are ready to play stuff to it */
/* now we have the call placed and are ready to play stuff to it */
ast_verbose(VERBOSE_PREFIX_4 "Announce Template:%s\n", template);
ast_verbose(VERBOSE_PREFIX_4 "Announce Template:%s\n", template);
tpl_working = template;
tpl_current=strsep(&tpl_working, ":");
tpl_working = template;
tpl_current=strsep(&tpl_working, ":");
while ( tpl_current && looptemp < sizeof(tmp)) {
tmp[looptemp]=tpl_current;
looptemp++;
tpl_current=strsep(&tpl_working,":");
}
while(tpl_current && looptemp < sizeof(tmp)) {
tmp[looptemp]=tpl_current;
looptemp++;
tpl_current=strsep(&tpl_working,":");
}
for(i=0; i<looptemp; i++) {
ast_verbose(VERBOSE_PREFIX_4 "Announce:%s\n", tmp[i]);
if (!strcmp(tmp[i], "PARKED")) {
ast_say_digits(dchan, lot, "", dchan->language);
}
else {
dres = ast_streamfile(dchan, tmp[i], dchan->language);
if (!dres)
dres = ast_waitstream(dchan, "");
else {
ast_log(LOG_WARNING, "ast_streamfile of %s failed on %s\n", tmp[i], dchan->name);
dres = 0;
}
}
}
for(i=0; i<looptemp; i++) {
ast_verbose(VERBOSE_PREFIX_4 "Announce:%s\n", tmp[i]);
if(!strcmp(tmp[i], "PARKED")) {
ast_say_digits(dchan, lot, "", dchan->language);
} else {
dres = ast_streamfile(dchan, tmp[i], dchan->language);
if(!dres) {
dres = ast_waitstream(dchan, "");
} else {
ast_log(LOG_WARNING, "ast_streamfile of %s failed on %s\n", tmp[i], dchan->name);
dres = 0;
}
}
}
ast_stopstream(dchan);
ast_hangup(dchan);
ast_stopstream(dchan);
ast_hangup(dchan);
LOCAL_USER_REMOVE(u);
free(orig_s);
return res;
LOCAL_USER_REMOVE(u);
free(orig_s);
return res;
}
@@ -231,8 +231,8 @@ int unload_module(void)
int load_module(void)
{
/* return ast_register_application(app, park_exec); */
return ast_register_application(app, parkandannounce_exec, synopsis, descrip);
/* return ast_register_application(app, park_exec); */
return ast_register_application(app, parkandannounce_exec, synopsis, descrip);
}
char *description(void)

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

@@ -18,9 +18,9 @@
#include <asterisk/pbx.h>
#include <asterisk/module.h>
#include <asterisk/translate.h>
#include <asterisk/utils.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
static char *tdesc = "Trivial Playback Application";
@@ -30,14 +30,14 @@ static char *synopsis = "Play a file";
static char *descrip =
" Playback(filename[|option]): Plays back a given filename (do not put\n"
"extension). Options may also be included following a pipe symbol. The only\n"
"defined option at this time is 'skip', which causes the playback of the\n"
"message to be skipped if the channel is not in the 'up' state (i.e. it\n"
"hasn't been answered yet. If 'skip' is specified, the application will\n"
"return immediately should the channel not be off hook. Otherwise, unless\n"
"'noanswer' is specified, the channel channel will be answered before the sound\n"
"is played. Not all channels support playing messages while on hook. Returns -1\n"
"if the channel was hung up, or if the file does not exist. Returns 0 otherwise.\n";
"extension). Options may also be included following a pipe symbol. The 'skip'\n"
"option causes the playback of the message to be skipped if the channel\n"
"is not in the 'up' state (i.e. it hasn't been answered yet. If 'skip' is \n"
"specified, the application will return immediately should the channel not be\n"
"off hook. Otherwise, unless 'noanswer' is specified, the channel channel will\n"
"be answered before the sound is played. Not all channels support playing\n"
"messages while still hook. Returns -1 if the channel was hung up, or if the\n"
"file does not exist. Returns 0 otherwise.\n";
STANDARD_LOCAL_USER;
@@ -52,7 +52,7 @@ static int playback_exec(struct ast_channel *chan, void *data)
int option_skip=0;
int option_noanswer = 0;
char *stringp;
if (!data || !strlen((char *)data)) {
if (!data || ast_strlen_zero((char *)data)) {
ast_log(LOG_WARNING, "Playback requires an argument (filename)\n");
return -1;
}

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

@@ -25,7 +25,6 @@
#include <asterisk/config.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
#define PRIV_CONFIG "privacy.conf"

44
apps/app_qcall.c Executable file → Normal file
View File

@@ -51,6 +51,7 @@
*/
#include <asterisk/lock.h>
#include <asterisk/utils.h>
#include <asterisk/file.h>
#include <asterisk/logger.h>
#include <asterisk/channel.h>
@@ -62,7 +63,6 @@
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
@@ -123,7 +123,7 @@ pthread_attr_t attr;
while((dp = readdir(dirp)) != NULL)
{
if (dp->d_name[0] == '.') continue;
sprintf(fname,"%s/%s",qdir,dp->d_name);
snprintf(fname, sizeof(fname), "%s/%s", qdir, dp->d_name);
if (stat(fname,&mystat) == -1)
{
perror("app_qcall:stat");
@@ -157,7 +157,7 @@ pthread_attr_t attr;
arg = (void *) strdup(fname);
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
if (pthread_create(&dialer_thread,&attr,qcall_do,arg) == -1)
if (ast_pthread_create(&dialer_thread,&attr,qcall_do,arg) == -1)
{
perror("qcall: Cannot create thread");
continue;
@@ -172,15 +172,20 @@ pthread_attr_t attr;
/* single thread with one file (request) to dial */
static void *qcall_do(void *arg)
{
char fname[300],dialstr[300],extstr[300],ident[300],reqinp[300],buf[300];
char clid[300],*tele,*context;
FILE *fp;
int ms = MAXWAITFORANSWER,maxsecs;
struct ast_channel *channel;
time_t t;
char fname[300] = "";
char dialstr[300];
char extstr[300];
char ident[300] = "";
char reqinp[300] = "";
char buf[300];
char clid[300],*tele,*context;
FILE *fp;
int ms = MAXWAITFORANSWER,maxsecs;
struct ast_channel *channel;
time_t t;
/* get the filename from the arg */
strcpy(fname,(char *)arg);
strncpy(fname,(char *)arg, sizeof(fname) - 1);
free(arg);
time(&t);
fp = fopen(fname,"r");
@@ -198,8 +203,11 @@ time_t t;
fprintf(stderr,"%s\n",fname);
pthread_exit(NULL);
}
strcpy(reqinp,"1"); /* default required input for acknowledgement */
strcpy(ident, ""); /* default no ident */
/* default required input for acknowledgement */
reqinp[0] = '1';
reqinp[1] = '\0';
/* default no ident */
ident[0] = '\0'; /* default no ident */
if (fscanf(fp,"%s %s %s %d %s %s",dialstr,clid,
extstr,&maxsecs,ident,reqinp) < 4)
{
@@ -308,7 +316,7 @@ time_t t;
ast_verbose(VERBOSE_PREFIX_3 "Qcall got accept, now putting through to %s@%s on %s\n",
extstr,context,channel->name);
if (strlen(ident)) {
strcat(ident,"-ok");
strncat(ident,"-ok", sizeof(ident) - strlen(ident) - 1);
/* if file existant, play it */
if (!ast_streamfile(channel,ident,0))
{
@@ -326,7 +334,7 @@ time_t t;
channel->amaflags = AMAFLAGS;
#endif
#ifdef ACCTCODE
strcpy(channel->accountcode,ACCTCODE);
strncpy(channel->accountcode, ACCTCODE, sizeof(chan->accountcode) - 1);
#else
channel->accountcode[0] = 0;
#endif
@@ -335,8 +343,8 @@ time_t t;
time(&channel->whentohangup);
channel->whentohangup += maxsecs;
}
strcpy(channel->exten,extstr);
strcpy(channel->context,context);
strncpy(channel->exten, extstr, sizeof(channel->exten) - 1);
strncpy(channel->context, context, sizeof(channel->context) - 1);
channel->priority = 1;
if(debug) printf("Caller ID is %s\n", channel->callerid);
ast_pbx_run(channel);
@@ -362,9 +370,9 @@ int unload_module(void)
int load_module(void)
{
snprintf((char *)qdir,sizeof(qdir)-1,"%s/%s",(char *)ast_config_AST_SPOOL_DIR,"qcall");
snprintf(qdir, sizeof(qdir), "%s/%s", ast_config_AST_SPOOL_DIR, "qcall");
mkdir(qdir,0760);
pthread_create(&qcall_thread,NULL,qcall,NULL);
ast_pthread_create(&qcall_thread,NULL,qcall,NULL);
return 0;
}

1361
apps/app_queue.c Executable file → Normal file

File diff suppressed because it is too large Load Diff

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

@@ -42,7 +42,7 @@ static int random_exec(struct ast_channel *chan, void *data)
int res=0;
struct localuser *u;
char *s, *ts;
char *s;
char *exten, *pri, *context;
char *prob;
int probint, priorityint;
@@ -54,7 +54,7 @@ static int random_exec(struct ast_channel *chan, void *data)
LOCAL_USER_ADD(u);
s = ast_strdupa((void *) data);
prob = strsep(&ts,":");
prob = strsep(&s,":");
if ((!prob) || (sscanf(prob, "%d", &probint) != 1))
probint = 0;

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

@@ -20,9 +20,9 @@
#include <asterisk/module.h>
#include <asterisk/translate.h>
#include <asterisk/options.h>
#include <asterisk/utils.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
static char *tdesc = "Read Variable Application";
@@ -31,9 +31,17 @@ static char *app = "Read";
static char *synopsis = "Read a variable";
static char *descrip =
" Read(variable[|filename]): Reads a '#' terminated string of digits from\n"
"the user, optionally playing a given filename first. Returns -1 on hangup or\n"
"error and 0 otherwise.\n";
" Read(variable[|filename][|maxdigits][|option])\n\n"
"Reads a #-terminated string of digits from the user in to the given variable,\n"
"optionally playing a given filename first.\n"
" maxdigits -- maximum acceptable number of digits. Stops reading after\n"
" maxdigits have been entered (without requiring the user to\n"
" press the '#' key).\n"
" Defaults to 0 - no limit - wait for the user press the '#' key.\n"
" Any value below 0 means the same. Max accepted value is 255.\n"
" option -- may be 'skip' to return immediately if the line is not up,\n"
" or 'noanswer' to read digits even if the line is not up.\n\n"
"Returns -1 on hangup or error and 0 otherwise.\n";
STANDARD_LOCAL_USER;
@@ -44,32 +52,64 @@ static int read_exec(struct ast_channel *chan, void *data)
int res = 0;
struct localuser *u;
char tmp[256];
char tmp2[128]="";
char argdata[256] = "";
char *varname;
char *filename;
char *stringp;
if (!data || !strlen((char *)data)) {
char *maxdigitstr;
char *options;
int option_skip = 0;
int option_noanswer = 0;
int maxdigits=255;
if (!data || ast_strlen_zero((char *)data)) {
ast_log(LOG_WARNING, "Read requires an argument (variable)\n");
return -1;
}
strncpy(tmp, (char *)data, sizeof(tmp)-1);
stringp=tmp;
strsep(&stringp, "|");
strncpy(argdata, (char *)data, sizeof(argdata)-1);
stringp=argdata;
varname = strsep(&stringp, "|");
filename = strsep(&stringp, "|");
if (!strlen(tmp)) {
maxdigitstr = strsep(&stringp,"|");
options = strsep(&stringp, "|");
if (options && !strcasecmp(options, "skip"))
option_skip = 1;
if (options && !strcasecmp(options, "noanswer"))
option_noanswer = 1;
if (!(filename) || ast_strlen_zero(filename))
filename = NULL;
if (maxdigitstr) {
maxdigits = atoi(maxdigitstr);
if ((maxdigits<1) || (maxdigits>255)) {
maxdigits = 255;
} else
ast_verbose(VERBOSE_PREFIX_3 "Accepting a maximum of %i digits.\n", maxdigits);
}
if (!(varname) || ast_strlen_zero(varname)) {
ast_log(LOG_WARNING, "Read requires an variable name\n");
return -1;
}
LOCAL_USER_ADD(u);
if (chan->_state != AST_STATE_UP) {
/* Answer if the line isn't up. */
res = ast_answer(chan);
if (option_skip) {
/* At the user's option, skip if the line is not up */
pbx_builtin_setvar_helper(chan, varname, "\0");
LOCAL_USER_REMOVE(u);
return 0;
} else if (!option_noanswer) {
/* Otherwise answer unless we're supposed to read while on-hook */
res = ast_answer(chan);
}
}
if (!res) {
ast_stopstream(chan);
res = ast_app_getdata(chan, filename, tmp2, sizeof(tmp2) - 1, 0);
if (!res)
pbx_builtin_setvar_helper(chan, tmp, tmp2);
ast_verbose(VERBOSE_PREFIX_3 "User entered '%s'\n", tmp2);
res = ast_app_getdata(chan, filename, tmp, maxdigits, 0);
if (res > -1) {
pbx_builtin_setvar_helper(chan, varname, tmp);
ast_verbose(VERBOSE_PREFIX_3 "User entered '%s'\n", tmp);
res = 0;
} else {
ast_verbose(VERBOSE_PREFIX_3 "User disconnected\n");
}
}
LOCAL_USER_REMOVE(u);
return res;

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

@@ -21,7 +21,6 @@
#include <asterisk/dsp.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
static char *tdesc = "Trivial Record Application";
@@ -30,13 +29,19 @@ static char *app = "Record";
static char *synopsis = "Record to a file";
static char *descrip =
" Record(filename:extension|silence): Records from the channel into a given\n"
"filename. If the file exists it will be overwritten. \n"
"- 'extension' is the extension of the file type to be recorded (wav, gsm, etc).\n"
"- 'silence' is the number of seconds of silence to allow before returning.\n\n"
" Record(filename:format|silence[|maxduration][|option])\n\n"
"Records from the channel into a given filename. If the file exists it will\n"
"be overwritten.\n"
"- 'format' is the format of the file type to be recorded (wav, gsm, etc).\n"
"- 'silence' is the number of seconds of silence to allow before returning.\n"
"- 'maxduration' is the maximum recording duration in seconds. If missing\n"
"or 0 there is no maximum.\n"
"- 'option' may be 'skip' to return immediately if the line is not up,\n"
"or 'noanswer' to attempt to record even if the line is not up.\n\n"
"If filename contains '%d', these characters will be replaced with a number\n"
"incremented by one each time the file is recorded. \n\n"
"Extensions: g723, g729, gsm, h263, ulaw, alaw, vox, wav, WAV\n\n"
"Formats: g723, g729, gsm, h263, ulaw, alaw, vox, wav, WAV\n\n"
"User can press '#' to terminate the recording and continue to the next priority.\n\n"
"Returns -1 when the user hangs up.\n";
STANDARD_LOCAL_USER;
@@ -51,7 +56,7 @@ static int record_exec(struct ast_channel *chan, void *data)
char fil[256];
char tmp[256];
char ext[10];
char * vdata; /* Used so I don't have to typecast every use of *data */
char *vdata;
int i = 0;
int j = 0;
@@ -65,64 +70,128 @@ static int record_exec(struct ast_channel *chan, void *data)
int silence = 0; /* amount of silence to allow */
int gotsilence = 0; /* did we timeout for silence? */
char silencestr[5];
int k = 0;
char durationstr[8];
int maxduration = 0; /* max duration of recording */
int gottimeout = 0; /* did we timeout for maxduration exceeded? */
time_t timeout = 0;
char option[16];
int option_skip = 0;
int option_noanswer = 0;
int rfmt = 0;
int flags;
char *end=NULL;
char *p=NULL;
vdata = data; /* explained above */
/* The next few lines of code parse out the filename and header from the input string */
if (!vdata) { /* no data implies no filename or anything is present */
if (!data) { /* no data implies no filename or anything is present */
ast_log(LOG_WARNING, "Record requires an argument (filename)\n");
return -1;
}
vdata = ast_strdupa(data);
p = vdata;
while(p && (p=strchr(p,':'))) {
end=p;
if(!strcasecmp(end,":end")) {
*end='\0';
end++;
break;
}
p++;
end=NULL;
}
for (; vdata[i] && (vdata[i] != ':') && (vdata[i] != '|'); i++ ) {
if ((vdata[i] == '%') && (vdata[i+1] == 'd')) {
percentflag = 1; /* the wildcard is used */
}
if (i == strlen(vdata) ) {
ast_log(LOG_WARNING, "No extension found\n");
return -1;
}
fil[i] = vdata[i];
if (j < sizeof(fil) - 1)
fil[j++] = vdata[i];
}
fil[i++] = '\0';
fil[j] = '\0';
for (; j < 10 && i < strlen(data) && (vdata[i] != '|'); i++, j++)
ext[j] = vdata[i];
if (vdata[i] != ':') {
ast_log(LOG_WARNING, "No extension found\n");
return -1;
}
i++;
j = 0;
for (; vdata[i] && (vdata[i] != '|'); i++)
if (j < sizeof(ext) - 1)
ext[j++] = vdata[i];
ext[j] = '\0';
if (vdata[i] && (vdata[i] == '|')) i++;
for (; vdata[i] && (vdata[i] != '|') && (k < 3) && i < strlen(data); i++, k++)
silencestr[k] = vdata[i];
silencestr[k] = '\0';
if (vdata[i] == '|')
i++;
if (silencestr) {
j = 0;
for (; vdata[i] && (vdata[i] != '|'); i++)
if (j < sizeof(silencestr) - 1)
silencestr[j++] = vdata[i];
silencestr[j] = '\0';
if (j > 0) {
silence = atoi(silencestr);
if (silence > 0)
silence *= 1000;
}
if (vdata[i] == '|')
i++;
j = 0;
for (; vdata[i] && (vdata[i] != '|'); i++)
if (j < sizeof(durationstr) - 1)
durationstr[j++] = vdata[i];
durationstr[j] = '\0';
if (j > 0)
maxduration = atoi(durationstr);
if (vdata[i] == '|')
i++;
j = 0;
for (; vdata[i] && (vdata[i] != '|'); i++)
if (j < sizeof(option) - 1)
option[j++] = vdata[i];
option[j] = '\0';
if (!strcasecmp(option, "skip"))
option_skip = 1;
if (!strcasecmp(option, "noanswer"))
option_noanswer = 1;
/* done parsing */
/* these are to allow the use of the %d in the config file for a wild card of sort to
create a new file with the inputed name scheme */
if (percentflag) {
do {
snprintf(tmp, 256, fil, count);
snprintf(tmp, sizeof(tmp), fil, count);
count++;
} while ( ast_fileexists(tmp, ext, chan->language) != -1 );
pbx_builtin_setvar_helper(chan, "RECORDED_FILE", tmp);
} else
strncpy(tmp, fil, 256-1);
strncpy(tmp, fil, sizeof(tmp)-1);
/* end of routine mentioned */
LOCAL_USER_ADD(u);
if (chan->_state != AST_STATE_UP) {
res = ast_answer(chan); /* Shouldn't need this, but checking to see if channel is already answered
* Theoretically asterisk should already have answered before running the app */
if (option_skip) {
/* At the user's option, skip if the line is not up */
LOCAL_USER_REMOVE(u);
return 0;
} else if (!option_noanswer) {
/* Otherwise answer unless we're supposed to record while on-hook */
res = ast_answer(chan);
}
}
if (!res) {
@@ -153,10 +222,21 @@ static int record_exec(struct ast_channel *chan, void *data)
ast_dsp_set_threshold(sildet, 256);
}
s = ast_writefile( tmp, ext, NULL, O_CREAT|O_TRUNC|O_WRONLY , 0, 0644);
flags = end ? O_CREAT|O_APPEND|O_WRONLY : O_CREAT|O_TRUNC|O_WRONLY;
s = ast_writefile( tmp, ext, NULL, flags , 0, 0644);
if (s) {
if (maxduration > 0)
timeout = time(NULL) + (time_t)maxduration;
while (ast_waitfor(chan, -1) > -1) {
if (maxduration > 0 && time(NULL) > timeout) {
gottimeout = 1;
break;
}
f = ast_read(chan);
if (!f) {
res = -1;
@@ -209,7 +289,7 @@ static int record_exec(struct ast_channel *chan, void *data)
if (gotsilence) {
ast_stream_rewind(s, silence-1000);
ast_truncstream(s);
} else {
} else if (!gottimeout) {
/* Strip off the last 1/4 second of it */
ast_stream_rewind(s, 250);
ast_truncstream(s);
@@ -221,7 +301,7 @@ static int record_exec(struct ast_channel *chan, void *data)
ast_log(LOG_WARNING, "Could not answer channel '%s'\n", chan->name);
LOCAL_USER_REMOVE(u);
if (silence > 0) {
if ((silence > 0) && rfmt) {
res = ast_set_read_format(chan, rfmt);
if (res)
ast_log(LOG_WARNING, "Unable to restore read format on '%s'\n", chan->name);

3857
apps/app_rpt.c Executable file → Normal file

File diff suppressed because it is too large Load Diff

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

@@ -27,6 +27,7 @@
static char *tdesc = "Say time";
static char *app_sayunixtime = "SayUnixTime";
static char *app_datetime = "DateTime";
static char *sayunixtime_synopsis = "Says a specified time in a custom format";
@@ -39,6 +40,15 @@ static char *sayunixtime_descrip =
" format: a format the time is to be said in. See voicemail.conf.\n"
" defaults to \"ABdY 'digits/at' IMp\"\n"
" Returns 0 or -1 on hangup.\n";
static char *datetime_descrip =
"DateTime([unixtime][|[timezone][|format]])\n"
" unixtime: time, in seconds since Jan 1, 1970. May be negative.\n"
" defaults to now.\n"
" timezone: timezone, see /usr/share/zoneinfo for a list.\n"
" defaults to machine default.\n"
" format: a format the time is to be said in. See voicemail.conf.\n"
" defaults to \"ABdY 'digits/at' IMp\"\n"
" Returns 0 or -1 on hangup.\n";
STANDARD_LOCAL_USER;
@@ -94,13 +104,23 @@ static int sayunixtime_exec(struct ast_channel *chan, void *data)
int unload_module(void)
{
int res;
STANDARD_HANGUP_LOCALUSERS;
return ast_unregister_application(app_sayunixtime);
res = ast_unregister_application(app_sayunixtime);
if (! res)
return ast_unregister_application(app_datetime);
else
return res;
}
int load_module(void)
{
return ast_register_application(app_sayunixtime, sayunixtime_exec, sayunixtime_synopsis, sayunixtime_descrip);
int res;
res = ast_register_application(app_sayunixtime, sayunixtime_exec, sayunixtime_synopsis, sayunixtime_descrip);
if (! res)
return ast_register_application(app_datetime, sayunixtime_exec, sayunixtime_synopsis, datetime_descrip);
else
return res;
}
char *description(void)

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

@@ -19,9 +19,10 @@
#include <asterisk/module.h>
#include <asterisk/translate.h>
#include <asterisk/options.h>
#include <asterisk/utils.h>
#include <asterisk/app.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
static char *tdesc = "Send DTMF digits Application";
@@ -30,8 +31,9 @@ static char *app = "SendDTMF";
static char *synopsis = "Sends arbitrary DTMF digits";
static char *descrip =
" SendDTMF(digits): Sends DTMF digits on a channel. Returns 0 on success"
"or -1 on a hangup.\n";
" SendDTMF(digits): Sends DTMF digits on a channel. \n"
" Accepted digits: 0-9, *#abcd\n"
" Returns 0 on success or -1 on a hangup.\n";
STANDARD_LOCAL_USER;
@@ -42,30 +44,13 @@ static int senddtmf_exec(struct ast_channel *chan, void *data)
int res = 0;
struct localuser *u;
char *digits = data;
struct ast_frame f;
int x;
if (!digits || !strlen(digits)) {
ast_log(LOG_WARNING, "SendDTMF requires an argument (digits)\n");
if (!digits || ast_strlen_zero(digits)) {
ast_log(LOG_WARNING, "SendDTMF requires an argument (digits or *#aAbBcCdD)\n");
return -1;
}
LOCAL_USER_ADD(u);
for (x=0;x<strlen(digits);x++) {
memset(&f, 0, sizeof(f));
f.frametype = AST_FRAME_DTMF;
f.subclass = digits[x];
f.src = "app_senddtmf";
res = ast_write(chan, &f);
if (res)
break;
/* Wait 250ms */
res = ast_safe_sleep(chan, 250);
if (res)
break;
}
if (!res)
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Sent digit string '%s' on %s\n", digits, chan->name);
res = ast_dtmf_stream(chan,NULL,digits,250);
LOCAL_USER_REMOVE(u);
return res;
}

94
apps/app_sendtext.c Normal file
View File

@@ -0,0 +1,94 @@
/*
* Asterisk -- A telephony toolkit for Linux.
*
* App to transmit a text message
*
* Copyright (C) 1999, Mark Spencer
*
* Mark Spencer <markster@linux-support.net>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
*/
#include <asterisk/lock.h>
#include <asterisk/file.h>
#include <asterisk/logger.h>
#include <asterisk/channel.h>
#include <asterisk/channel_pvt.h>
#include <asterisk/pbx.h>
#include <asterisk/module.h>
#include <asterisk/translate.h>
#include <asterisk/image.h>
#include <string.h>
#include <stdlib.h>
static char *tdesc = "Send Text Applications";
static char *app = "SendText";
static char *synopsis = "Send a Text Message";
static char *descrip =
" SendText(text): Sends text to client. If the client\n"
"does not support text transport, and there exists a step with\n"
"priority n + 101, then execution will continue at that step.\n"
"Otherwise, execution will continue at the next priority level.\n"
"SendText only returns 0 if the text was sent correctly or if\n"
"the channel does not support text transport, and -1 otherwise.\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int sendtext_exec(struct ast_channel *chan, void *data)
{
int res = 0;
struct localuser *u;
if (!data || !strlen((char *)data)) {
ast_log(LOG_WARNING, "SendText requires an argument (text)\n");
return -1;
}
LOCAL_USER_ADD(u);
ast_mutex_lock(&chan->lock);
if (!chan->pvt->send_text) {
ast_mutex_unlock(&chan->lock);
/* Does not support transport */
if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 101, chan->callerid))
chan->priority += 100;
LOCAL_USER_REMOVE(u);
return 0;
}
ast_mutex_unlock(&chan->lock);
res = ast_sendtext(chan, (char *)data);
LOCAL_USER_REMOVE(u);
return res;
}
int unload_module(void)
{
STANDARD_HANGUP_LOCALUSERS;
return ast_unregister_application(app);
}
int load_module(void)
{
return ast_register_application(app, sendtext_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

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

@@ -19,9 +19,82 @@
#include <asterisk/module.h>
#include <asterisk/translate.h>
#include <asterisk/image.h>
#include <asterisk/callerid.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
static char *app2 = "SetCallerPres";
static char *synopsis2 = "Set CallerID Presentation";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static struct {
int val;
char *name;
} preses[] = {
{ AST_PRES_ALLOWED_USER_NUMBER_NOT_SCREENED, "allowed_not_screened" },
{ AST_PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN, "allowed_passed_screen" },
{ AST_PRES_ALLOWED_USER_NUMBER_FAILED_SCREEN, "allowed_failed_screen" },
{ AST_PRES_ALLOWED_NETWORK_NUMBER, "allowed" },
{ AST_PRES_PROHIB_USER_NUMBER_NOT_SCREENED , "prohib_not_screened" },
{ AST_PRES_PROHIB_USER_NUMBER_PASSED_SCREEN, "prohib_passed_screen" },
{ AST_PRES_PROHIB_USER_NUMBER_FAILED_SCREEN, "prohib_failed_screen" },
{ AST_PRES_PROHIB_NETWORK_NUMBER, "prohib" },
{ AST_PRES_NUMBER_NOT_AVAILABLE, "unavailable" },
};
static char *descrip2 =
" SetCallerPres(presentation): Set Caller*ID presentation on\n"
"a call to a new value. Sets ANI as well if a flag is used.\n"
"Always returns 0. Valid presentations are:\n"
"\n"
" allowed_not_screened : Presentation Allowed, Not Screened\n"
" allowed_passed_screen : Presentation Allowed, Passed Screen\n"
" allowed_failed_screen : Presentation Allowed, Failed Screen\n"
" allowed : Presentation Allowed, Network Number\n"
" prohib_not_screened : Presentation Prohibited, Not Screened\n"
" prohib_passed_screen : Presentation Prohibited, Passed Screen\n"
" prohib_failed_screen : Presentation Prohibited, Failed Screen\n"
" prohib : Presentation Prohibited, Network Number\n"
" unavailable : Number Unavailable\n"
"\n"
;
static int setcallerid_pres_exec(struct ast_channel *chan, void *data)
{
int res = 0;
char tmp[256] = "";
struct localuser *u;
int x;
char *opts;
int pres = -1;
if (data)
strncpy(tmp, (char *)data, sizeof(tmp) - 1);
opts = strchr(tmp, '|');
if (opts) {
*opts = '\0';
opts++;
}
for (x=0;x<sizeof(preses) / sizeof(preses[0]);x++) {
if (!strcasecmp(preses[x].name, tmp)) {
pres = preses[x].val;
break;
}
}
if (pres < 0) {
ast_log(LOG_WARNING, "'%s' is not a valid presentation (see 'show application SetCallerPres')\n", tmp);
return 0;
}
LOCAL_USER_ADD(u);
chan->callingpres = pres;
LOCAL_USER_REMOVE(u);
return res;
}
static char *tdesc = "Set CallerID Application";
@@ -33,10 +106,6 @@ static char *descrip =
" SetCallerID(clid[|a]): Set Caller*ID on a call to a new\n"
"value. Sets ANI as well if a flag is used. Always returns 0\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int setcallerid_exec(struct ast_channel *chan, void *data)
{
int res = 0;
@@ -62,11 +131,13 @@ static int setcallerid_exec(struct ast_channel *chan, void *data)
int unload_module(void)
{
STANDARD_HANGUP_LOCALUSERS;
ast_unregister_application(app2);
return ast_unregister_application(app);
}
int load_module(void)
{
ast_register_application(app2, setcallerid_pres_exec, synopsis2, descrip2);
return ast_register_application(app, setcallerid_exec, synopsis, descrip);
}

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

@@ -17,7 +17,9 @@
#include <asterisk/module.h>
#include <asterisk/pbx.h>
#include <asterisk/logger.h>
#include <asterisk/config.h>
#include <asterisk/manager.h>
#include <asterisk/utils.h>
#include <stdlib.h>
#include <string.h>
@@ -59,6 +61,41 @@ STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int action_setcdruserfield(struct mansession *s, struct message *m)
{
struct ast_channel *c = NULL;
char *userfield = astman_get_header(m, "UserField");
char *channel = astman_get_header(m, "Channel");
char *append = astman_get_header(m, "Append");
if (ast_strlen_zero(channel)) {
astman_send_error(s, m, "No Channel specified");
return 0;
}
if (ast_strlen_zero(userfield)) {
astman_send_error(s, m, "No UserField specified");
return 0;
}
c = ast_channel_walk_locked(NULL);
while (c) {
if (!strcasecmp(c->name, channel))
break;
ast_mutex_unlock(&c->lock);
c = ast_channel_walk_locked(c);
}
if (!c) {
astman_send_error(s, m, "No such channel");
return 0;
}
if (ast_true(append))
ast_cdr_appenduserfield(c, userfield);
else
ast_cdr_setuserfield(c, userfield);
ast_mutex_unlock(&c->lock);
astman_send_ack(s, m, "CDR Userfield Set");
return 0;
}
static int setcdruserfield_exec(struct ast_channel *chan, void *data)
{
struct localuser *u;
@@ -97,6 +134,7 @@ int unload_module(void)
STANDARD_HANGUP_LOCALUSERS;
res = ast_unregister_application(setcdruserfield_app);
res |= ast_unregister_application(appendcdruserfield_app);
ast_manager_unregister("SetCDRUserField");
return res;
}
@@ -105,7 +143,7 @@ int load_module(void)
int res;
res = ast_register_application(setcdruserfield_app, setcdruserfield_exec, setcdruserfield_synopsis, setcdruserfield_descrip);
res |= ast_register_application(appendcdruserfield_app, appendcdruserfield_exec, appendcdruserfield_synopsis, appendcdruserfield_descrip);
ast_manager_register("SetCDRUserField", EVENT_FLAG_CALL, action_setcdruserfield, "Set the CDR UserField");
return res;
}

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

@@ -20,9 +20,9 @@
#include <asterisk/translate.h>
#include <asterisk/image.h>
#include <asterisk/callerid.h>
#include <asterisk/utils.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
static char *tdesc = "Set CallerID Name";
@@ -63,17 +63,17 @@ static int setcallerid_exec(struct ast_channel *chan, void *data)
strncpy(oldcid, chan->callerid, sizeof(oldcid) - 1);
ast_callerid_parse(oldcid, &n, &l);
n = tmp;
if (strlen(n)) {
if (l && strlen(l))
if (!ast_strlen_zero(n)) {
if (l && !ast_strlen_zero(l))
snprintf(newcid, sizeof(newcid), "\"%s\" <%s>", n, l);
else
strncpy(newcid, tmp, sizeof(newcid) - 1);
} else if (l && strlen(l)) {
} else if (l && !ast_strlen_zero(l)) {
strncpy(newcid, l, sizeof(newcid) - 1);
}
} else
strncpy(newcid, tmp, sizeof(newcid));
ast_set_callerid(chan, strlen(newcid) ? newcid : NULL, anitoo);
strncpy(newcid, tmp, sizeof(newcid) - 1);
ast_set_callerid(chan, !ast_strlen_zero(newcid) ? newcid : NULL, anitoo);
LOCAL_USER_REMOVE(u);
return res;
}

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

@@ -21,9 +21,9 @@
#include <asterisk/translate.h>
#include <asterisk/image.h>
#include <asterisk/callerid.h>
#include <asterisk/utils.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
static char *tdesc = "Set CallerID Number";
@@ -64,17 +64,17 @@ static int setcallerid_exec(struct ast_channel *chan, void *data)
strncpy(oldcid, chan->callerid, sizeof(oldcid) - 1);
ast_callerid_parse(oldcid, &n, &l);
l = tmp;
if (strlen(l)) {
if (n && strlen(n))
if (!ast_strlen_zero(l)) {
if (n && !ast_strlen_zero(n))
snprintf(newcid, sizeof(newcid), "\"%s\" <%s>", n, l);
else
strncpy(newcid, tmp, sizeof(newcid) - 1);
} else if (n && strlen(n)) {
} else if (n && !ast_strlen_zero(n)) {
strncpy(newcid, n, sizeof(newcid) - 1);
}
} else
strncpy(newcid, tmp, sizeof(newcid));
ast_set_callerid(chan, strlen(newcid) ? newcid : NULL, anitoo);
strncpy(newcid, tmp, sizeof(newcid) - 1);
ast_set_callerid(chan, !ast_strlen_zero(newcid) ? newcid : NULL, anitoo);
LOCAL_USER_REMOVE(u);
return res;
}

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

@@ -16,10 +16,10 @@
#include <asterisk/channel.h>
#include <asterisk/pbx.h>
#include <asterisk/module.h>
#include <asterisk/lock.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <pthread.h>
static char *tdesc = "Trivial skeleton Application";
static char *app = "skel";

1235
apps/app_sms.c Normal file

File diff suppressed because it is too large Load Diff

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

@@ -17,14 +17,12 @@
#include <asterisk/channel.h>
#include <asterisk/pbx.h>
#include <asterisk/module.h>
#include <asterisk/lock.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
static char *synopsis = "Soft Hangup Application";
static char *tdesc = "Hangs up the requested channel";
@@ -47,13 +45,15 @@ static int softhangup_exec(struct ast_channel *chan, void *data)
return 0;
}
LOCAL_USER_ADD(u);
c = ast_channel_walk(NULL);
c = ast_channel_walk_locked(NULL);
while (c) {
if (!strcasecmp(c->name, data)) {
ast_softhangup(c, AST_SOFTHANGUP_EXPLICIT);
ast_mutex_unlock(&c->lock);
break;
}
c = ast_channel_walk(c);
ast_mutex_unlock(&c->lock);
c = ast_channel_walk_locked(c);
}
LOCAL_USER_REMOVE(u);

126
apps/app_sql_postgres.c Executable file → Normal file
View File

@@ -5,7 +5,7 @@
*
* Copyright (C) 2002, Christos Ricudis
*
* Christos Ricudis <ricudis@paiko.gr>
* Christos Ricudis <ricudis@itc.auth.gr>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
@@ -26,10 +26,9 @@
#include <sys/types.h>
#include <stdio.h>
#include <unistd.h>
#include <pthread.h>
#include "libpq-fe.h"
#define EXTRA_LOG 0
static char *tdesc = "Simple PostgreSQL Interface";
@@ -39,57 +38,67 @@ static char *app = "PGSQL";
static char *synopsis = "Do several SQLy things";
static char *descrip =
" PGSQL(): Do several SQLy things\n";
"PGSQL(): Do several SQLy things\n"
"Syntax:\n"
" PGSQL(Connect var option-string)\n"
" Connects to a database. Option string contains standard PostgreSQL\n"
" parameters like host=, dbname=, user=. Connection identifer returned\n"
" in ${var}\n"
" PGSQL(Query var ${connection_identifier} query-string)\n"
" Executes standard SQL query contained in query-string using established\n"
" connection identified by ${connection_identifier}. Reseult of query is\n"
" is stored in ${var}.\n"
" PGSQL(Fetch statusvar ${result_identifier} var1 var2 ... varn)\n"
" Fetches a single row from a result set contained in ${result_identifier}.\n"
" Assigns returned fields to ${var1} ... ${varn}. ${statusvar} is set TRUE\n"
" if additional rows exist in reseult set.\n"
" PGSQL(Clear ${result_identifier})\n"
" Frees memory and datastructures associated with result set.\n"
" PGSQL(Disconnect ${connection_identifier})\n"
" Disconnects from named connection to PostgreSQL.\n" ;
/*
Syntax of SQL commands :
Connect #var option-string
Connect var option-string
Connects to a database using the option-string and stores the
connection identifier in $var
connection identifier in ${var}
Query var connection-identifier query-string
Query var ${connection_identifier} query-string
Submits query-string to database backend and stores the result
identifier in ${var}
Fetch statusvar result-identifier var1 var2 var3 ... varn
Fetch statusvar ${result_identifier} var1 var2 var3 ... varn
Fetches a row from the query and stores end-of-table status in
${statusvar} and columns in ${var1}..${varn}
Clear result-identifier
Clear ${result_identifier}
Clears data structures associated with result-identifier
Clears data structures associated with ${result_identifier}
Disconnect connection-identifier
Disconnect ${connection_identifier}
Disconnects from named connection
EXAMPLES OF USE :
(
$2 = Connection Identifier
$3 = Result Identifier
$4 = Fetch Status Identifier (0 = no more rows)
$5, $6 = Data variables
)
exten => s,2,PGSQL,"Connect connid host=localhost user=asterisk dbname=credit";
exten => s,3,PGSQL,"Query resultid ${connid} SELECT username,credit FROM credit WHERE callerid=${callerid}";
exten => s,4,PGSQL,"Fetch fetchid ${resultid} datavar1 datavar2";
exten => s,5,GotoIf,"${fetchid}=1?s|6:s|8";
exten => s,6,blablabla ${datavar1} ${datavar2} (does blablabla, datavar1 = username, datavar2 = credit);
exten => s,7,Goto,s|4
exten => s,8,PGSQL,"Clear ${resultid}";
exten => s,9,PGSQL,"Disconnect ${connid}";
exten => s,2,PGSQL(Connect connid host=localhost user=asterisk dbname=credit)
exten => s,3,PGSQL(Query resultid ${connid} SELECT username,credit FROM credit WHERE callerid=${CALLERIDNUM})
exten => s,4,PGSQL(Fetch fetchid ${resultid} datavar1 datavar2)
exten => s,5,GotoIf(${fetchid}?6:8)
exten => s,6,Festival("User ${datavar1} currently has credit balance of ${datavar2} dollars.")
exten => s,7,Goto(s,4)
exten => s,8,PGSQL(Clear ${resultid})
exten => s,9,PGSQL(Disconnect ${connid})
*/
@@ -201,8 +210,8 @@ static int del_identifier(int identifier,int identifier_type) {
static int aPGSQL_connect(struct ast_channel *chan, void *data) {
char *s1,*s4;
char s[100];
char *s1;
char s[100] = "";
char *optionstring;
char *var;
int l;
@@ -215,7 +224,7 @@ static int aPGSQL_connect(struct ast_channel *chan, void *data) {
res=0;
l=strlen(data)+2;
s1=malloc(l);
strncpy(s1,data,l);
strncpy(s1, data, l -1);
stringp=s1;
strsep(&stringp," "); // eat the first token, we already know it :P
var=strsep(&stringp," ");
@@ -229,8 +238,7 @@ static int aPGSQL_connect(struct ast_channel *chan, void *data) {
} else {
ast_log(LOG_WARNING,"adding identifier\n");
id=add_identifier(AST_PGSQL_ID_CONNID,karoto);
s4=&s[0];
sprintf(s4,"%d",id);
snprintf(s, sizeof(s), "%d", id);
pbx_builtin_setvar_helper(chan,var,s);
}
@@ -240,8 +248,9 @@ static int aPGSQL_connect(struct ast_channel *chan, void *data) {
static int aPGSQL_query(struct ast_channel *chan, void *data) {
char *s1,*s2,*s3,*s4,*s5;
char s[100];
char *s1,*s2,*s3,*s4;
char s[100] = "";
char *querystring;
char *var;
int l;
@@ -256,7 +265,7 @@ static int aPGSQL_query(struct ast_channel *chan, void *data) {
l=strlen(data)+2;
s1=malloc(l);
s2=malloc(l);
strcpy(s1,data);
strncpy(s1, data, l - 1);
stringp=s1;
strsep(&stringp," "); // eat the first token, we already know it :P
s3=strsep(&stringp," ");
@@ -285,21 +294,21 @@ static int aPGSQL_query(struct ast_channel *chan, void *data) {
}
nres=PQnfields(PGSQLres);
id1=add_identifier(AST_PGSQL_ID_RESID,PGSQLres);
s5=&s[0];
sprintf(s5,"%d",id1);
snprintf(s, sizeof(s), "%d", id1);
pbx_builtin_setvar_helper(chan,var,s);
break;
}
free(s1);
free(s2);
return(res);
}
static int aPGSQL_fetch(struct ast_channel *chan, void *data) {
char *s1,*s2,*s3,*s4,*s5,*s6,*s7;
char *s1,*s2,*fetchid_var,*s4,*s5,*s6,*s7;
char s[100];
char *var;
int l;
@@ -319,16 +328,16 @@ static int aPGSQL_fetch(struct ast_channel *chan, void *data) {
s7=NULL;
s1=malloc(l);
s2=malloc(l);
strcpy(s1,data);
strncpy(s1, data, l - 1);
stringp=s1;
strsep(&stringp," "); // eat the first token, we already know it :P
s3=strsep(&stringp," ");
fetchid_var=strsep(&stringp," ");
while (1) { // ugly trick to make branches with break;
var=s3; // fetchid
var=fetchid_var; // fetchid
fnd=0;
AST_LIST_TRAVERSE(headp,variables,entries) {
if (strncasecmp(ast_var_name(variables),s3,strlen(s3))==0) {
if (strncasecmp(ast_var_name(variables),fetchid_var,strlen(fetchid_var))==0) {
s7=ast_var_value(variables);
fnd=1;
break;
@@ -337,7 +346,7 @@ static int aPGSQL_fetch(struct ast_channel *chan, void *data) {
if (fnd==0) {
s7="0";
pbx_builtin_setvar_helper(chan,s3,s7);
pbx_builtin_setvar_helper(chan,fetchid_var,s7);
}
s4=strsep(&stringp," ");
@@ -349,12 +358,14 @@ static int aPGSQL_fetch(struct ast_channel *chan, void *data) {
}
id=atoi(s7); //fetchid
if ((lalares=find_identifier(id,AST_PGSQL_ID_FETCHID))==NULL) {
i=0;
i=0; // fetching the very first row
} else {
i=*lalares;
free(lalares);
del_identifier(id,AST_PGSQL_ID_FETCHID);
del_identifier(id,AST_PGSQL_ID_FETCHID); // will re-add it a bit later
}
if (i<PQntuples(PGSQLres)) {
nres=PQnfields(PGSQLres);
ast_log(LOG_WARNING,"ast_PGSQL_fetch : nres = %d i = %d ;\n",nres,i);
for (j=0;j<nres;j++) {
@@ -363,7 +374,6 @@ static int aPGSQL_fetch(struct ast_channel *chan, void *data) {
ast_log(LOG_WARNING,"ast_PGSQL_fetch : More tuples (%d) than variables (%d)\n",nres,j);
break;
}
s6=PQgetvalue(PGSQLres,i,j);
if (s6==NULL) {
ast_log(LOG_WARNING,"PWgetvalue(res,%d,%d) returned NULL in ast_PGSQL_fetch\n",i,j);
@@ -372,18 +382,16 @@ static int aPGSQL_fetch(struct ast_channel *chan, void *data) {
ast_log(LOG_WARNING,"===setting variable '%s' to '%s'\n",s5,s6);
pbx_builtin_setvar_helper(chan,s5,s6);
}
i++;
if (i<PQntuples(PGSQLres)) {
lalares=malloc(sizeof(int));
*lalares=i;
id1=add_identifier(AST_PGSQL_ID_FETCHID,lalares);
*lalares = ++i; // advance to the next row
id1 = add_identifier(AST_PGSQL_ID_FETCHID,lalares);
} else {
id1=0;
ast_log(LOG_WARNING,"ast_PGSQL_fetch : EOF\n");
id1 = 0; // no more rows
}
s5=&s[0];
sprintf(s5,"%d",id1);
ast_log(LOG_WARNING,"Setting var '%s' to value '%s'\n",s3,s);
pbx_builtin_setvar_helper(chan,s3,s);
snprintf(s, sizeof(s), "%d", id1);
ast_log(LOG_WARNING,"Setting var '%s' to value '%s'\n",fetchid_var,s);
pbx_builtin_setvar_helper(chan,fetchid_var,s);
break;
}
@@ -403,7 +411,7 @@ static int aPGSQL_reset(struct ast_channel *chan, void *data) {
l=strlen(data)+2;
s1=malloc(l);
strcpy(s1,data);
strncpy(s1, data, l - 1);
stringp=s1;
strsep(&stringp," "); // eat the first token, we already know it :P
s3=strsep(&stringp," ");
@@ -429,7 +437,7 @@ static int aPGSQL_clear(struct ast_channel *chan, void *data) {
l=strlen(data)+2;
s1=malloc(l);
strcpy(s1,data);
strncpy(s1, data, l - 1);
stringp=s1;
strsep(&stringp," "); // eat the first token, we already know it :P
s3=strsep(&stringp," ");
@@ -459,7 +467,7 @@ static int aPGSQL_disconnect(struct ast_channel *chan, void *data) {
l=strlen(data)+2;
s1=malloc(l);
strcpy(s1,data);
strncpy(s1, data, l - 1);
stringp=s1;
strsep(&stringp," "); // eat the first token, we already know it :P
s3=strsep(&stringp," ");
@@ -487,6 +495,10 @@ static int PGSQL_exec(struct ast_channel *chan, void *data)
struct localuser *u;
int result;
#if EXTRA_LOG
printf("PRSQL_exec: data=%s\n",(char*)data);
#endif
if (!data) {
ast_log(LOG_WARNING, "APP_PGSQL requires an argument (see manual)\n");
return -1;

35
apps/app_striplsd.c Executable file → Normal file
View File

@@ -17,14 +17,12 @@
#include <asterisk/channel.h>
#include <asterisk/pbx.h>
#include <asterisk/module.h>
#include <asterisk/lock.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
static char *tdesc = "Strip trailing digits";
static char *descrip =
@@ -47,16 +45,27 @@ LOCAL_USER_DECL;
static int striplsd_exec(struct ast_channel *chan, void *data)
{
char newexten[AST_MAX_EXTENSION] = "";
if (!data || !atoi(data)) {
ast_log(LOG_DEBUG, "Ignoring, since number of digits to strip is 0\n");
return 0;
}
if (strlen(chan->exten) > atoi(data)) {
strncpy(newexten, chan->exten, strlen(chan->exten)-atoi(data));
}
strncpy(chan->exten, newexten, sizeof(chan->exten)-1);
return 0;
char newexten[AST_MAX_EXTENSION] = "";
int maxbytes = 0;
int stripcount = 0;
int extlen = strlen(chan->exten);
maxbytes = sizeof(newexten) - 1;
if (data) {
stripcount = atoi(data);
}
if (!stripcount) {
ast_log(LOG_DEBUG, "Ignoring, since number of digits to strip is 0\n");
return 0;
}
if (extlen > stripcount) {
if (extlen - stripcount <= maxbytes) {
maxbytes = extlen - stripcount;
}
strncpy(newexten, chan->exten, maxbytes);
}
strncpy(chan->exten, newexten, sizeof(chan->exten)-1);
return 0;
}
int unload_module(void)

13
apps/app_substring.c Executable file → Normal file
View File

@@ -18,17 +18,17 @@
#include <asterisk/pbx.h>
#include <asterisk/module.h>
#include <asterisk/pbx.h>
#include <asterisk/lock.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
static char *tdesc = "Save substring digits in a given variable";
static char *tdesc = "(Deprecated) Save substring digits in a given variable";
static char *descrip =
" (Deprecated, use ${variable:a:b} instead)\n"
"\n"
" SubString(variable=string_of_digits|count1|count2): Assigns the substring\n"
"of string_of_digits to a given variable. Parameter count1 may be positive\n"
"or negative. If it's positive then we skip the first count1 digits from the\n"
@@ -48,7 +48,7 @@ static char *descrip =
static char *app = "SubString";
static char *synopsis = "Save substring digits in a given variable";
static char *synopsis = "(Deprecated) Save substring digits in a given variable";
STANDARD_LOCAL_USER;
@@ -59,9 +59,10 @@ static int substring_exec(struct ast_channel *chan, void *data)
char newexten[AST_MAX_EXTENSION] = "";
char *count1, *count2;
char *first, *second, *stringp;
stringp=alloca(strlen(data)+1);
ast_log(LOG_WARNING, "The use of Substring application is deprecated. Please use ${variable:a:b} instead\n");
strncpy(stringp,data,strlen(data)+1);
strncpy(stringp,data,strlen(data));
if (strchr(stringp,'|')&&strchr(stringp,'=')) {
int icount1,icount2;
first=strsep(&stringp,"=");

46
apps/app_system.c Executable file → Normal file
View File

@@ -3,9 +3,9 @@
*
* Execute arbitrary system commands
*
* Copyright (C) 1999, Mark Spencer
* Copyright (C) 1999-2004, Digium, Inc.
*
* Mark Spencer <markster@linux-support.net>
* Mark Spencer <markster@digium.com>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
@@ -17,20 +17,23 @@
#include <asterisk/channel.h>
#include <asterisk/pbx.h>
#include <asterisk/module.h>
#include <asterisk/app.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
#include <errno.h>
static char *tdesc = "Generic System() application";
static char *app = "System";
static char *app2 = "TrySystem";
static char *synopsis = "Execute a system command";
static char *synopsis2 = "Try executing a system command";
static char *descrip =
" System(command): Executes a command by using system(). Returns -1 on\n"
"failure to execute the specified command. If the command itself executes\n"
@@ -38,28 +41,37 @@ static char *descrip =
"priority of the current instance, then the channel will be setup to\n"
"continue at that priority level. Otherwise, System returns 0.\n";
static char *descrip2 =
" TrySystem(command): Executes a command by using system(). Returns 0\n"
"on any situation. If the command itself executes but is in error, and if\n"
"there exists a priority n + 101, where 'n' is the priority of the current\n"
"instance, then the channel will be setup to continue at that\n"
"priority level. Otherwise, System returns 0.\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int system_exec(struct ast_channel *chan, void *data)
static int system_exec_helper(struct ast_channel *chan, void *data, int failmode)
{
int res=0;
struct localuser *u;
if (!data) {
ast_log(LOG_WARNING, "System requires an argument(command)\n");
return -1;
return failmode;
}
LOCAL_USER_ADD(u);
/* Do our thing here */
res = system((char *)data);
if (res < 0) {
res = ast_safe_system((char *)data);
if ((res < 0) && (errno != ECHILD)) {
ast_log(LOG_WARNING, "Unable to execute '%s'\n", (char *)data);
res = -1;
res = failmode;
} else if (res == 127) {
ast_log(LOG_WARNING, "Unable to execute '%s'\n", (char *)data);
res = -1;
res = failmode;
} else {
if (res < 0)
res = 0;
if (res && ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 101, chan->callerid))
chan->priority+=100;
res = 0;
@@ -68,14 +80,26 @@ static int system_exec(struct ast_channel *chan, void *data)
return res;
}
static int system_exec(struct ast_channel *chan, void *data)
{
return system_exec_helper(chan, data, -1);
}
static int trysystem_exec(struct ast_channel *chan, void *data)
{
return system_exec_helper(chan, data, 0);
}
int unload_module(void)
{
STANDARD_HANGUP_LOCALUSERS;
ast_unregister_application(app2);
return ast_unregister_application(app);
}
int load_module(void)
{
ast_register_application(app2, trysystem_exec, synopsis2, descrip2);
return ast_register_application(app, system_exec, synopsis, descrip);
}

218
apps/app_talkdetect.c Normal file
View File

@@ -0,0 +1,218 @@
/*
* Asterisk -- A telephony toolkit for Linux.
*
* Playback a file with audio detect
*
* Copyright (C) 2004, Digium, Inc.
*
* Mark Spencer <markster@digium.com>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
*/
#include <asterisk/lock.h>
#include <asterisk/file.h>
#include <asterisk/logger.h>
#include <asterisk/channel.h>
#include <asterisk/pbx.h>
#include <asterisk/module.h>
#include <asterisk/translate.h>
#include <asterisk/utils.h>
#include <asterisk/dsp.h>
#include <string.h>
#include <stdlib.h>
static char *tdesc = "Playback with Talk Detection";
static char *app = "BackgroundDetect";
static char *synopsis = "Background a file with talk detect";
static char *descrip =
" BackgroundDetect(filename[|sil[|min|[max]]]): Plays back a given\n"
"filename, waiting for interruption from a given digit (the digit must\n"
"start the beginning of a valid extension, or it will be ignored).\n"
"During the playback of the file, audio is monitored in the receive\n"
"direction, and if a period of non-silence which is greater than 'min' ms\n"
"yet less than 'max' ms is followed by silence for at least 'sil' ms then\n"
"the audio playback is aborted and processing jumps to the 'talk' extension\n"
"if available. If unspecified, sil, min, and max default to 1000, 100, and\n"
"infinity respectively. Returns -1 on hangup, and 0 on successful playback\n"
"completion with no exit conditions.\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int background_detect_exec(struct ast_channel *chan, void *data)
{
int res = 0;
struct localuser *u;
char tmp[256];
char *options;
char *stringp;
struct ast_frame *fr;
int notsilent=0;
struct timeval start = { 0, 0}, end = {0, 0};
int sil = 1000;
int min = 100;
int max = -1;
int x;
int origrformat=0;
struct ast_dsp *dsp;
if (!data || ast_strlen_zero((char *)data)) {
ast_log(LOG_WARNING, "BackgroundDetect requires an argument (filename)\n");
return -1;
}
strncpy(tmp, (char *)data, sizeof(tmp)-1);
stringp=tmp;
strsep(&stringp, "|");
options = strsep(&stringp, "|");
if (options) {
if ((sscanf(options, "%d", &x) == 1) && (x > 0))
sil = x;
options = strsep(&stringp, "|");
if (options) {
if ((sscanf(options, "%d", &x) == 1) && (x > 0))
min = x;
options = strsep(&stringp, "|");
if (options) {
if ((sscanf(options, "%d", &x) == 1) && (x > 0))
max = x;
}
}
}
ast_log(LOG_DEBUG, "Preparing detect of '%s', sil=%d,min=%d,max=%d\n",
tmp, sil, min, max);
LOCAL_USER_ADD(u);
if (chan->_state != AST_STATE_UP) {
/* Otherwise answer unless we're supposed to send this while on-hook */
res = ast_answer(chan);
}
if (!res) {
origrformat = chan->readformat;
if ((res = ast_set_read_format(chan, AST_FORMAT_SLINEAR)))
ast_log(LOG_WARNING, "Unable to set read format to linear!\n");
}
if (!(dsp = ast_dsp_new())) {
ast_log(LOG_WARNING, "Unable to allocate DSP!\n");
res = -1;
}
if (!res) {
ast_stopstream(chan);
res = ast_streamfile(chan, tmp, chan->language);
if (!res) {
while(chan->stream) {
res = ast_sched_wait(chan->sched);
if ((res < 0) && !chan->timingfunc) {
res = 0;
break;
}
if (res < 0)
res = 1000;
res = ast_waitfor(chan, res);
if (res < 0) {
ast_log(LOG_WARNING, "Waitfor failed on %s\n", chan->name);
break;
} else if (res > 0) {
fr = ast_read(chan);
if (!fr) {
res = -1;
break;
} else if (fr->frametype == AST_FRAME_DTMF) {
char t[2];
t[0] = fr->subclass;
t[1] = '\0';
if (ast_canmatch_extension(chan, chan->context, t, 1, chan->callerid)) {
/* They entered a valid extension, or might be anyhow */
res = fr->subclass;
ast_frfree(fr);
break;
}
} else if ((fr->frametype == AST_FRAME_VOICE) && (fr->subclass == AST_FORMAT_SLINEAR)) {
int totalsilence;
int ms;
res = ast_dsp_silence(dsp, fr, &totalsilence);
if (res && (totalsilence > sil)) {
/* We've been quiet a little while */
if (notsilent) {
/* We had heard some talking */
gettimeofday(&end, NULL);
ms = (end.tv_sec - start.tv_sec) * 1000;
ms += (end.tv_usec - start.tv_usec) / 1000;
ms -= sil;
if (ms < 0)
ms = 0;
if ((ms > min) && ((max < 0) || (ms < max))) {
ast_log(LOG_DEBUG, "Found qualified token of %d ms\n", ms);
if (ast_exists_extension(chan, chan->context, "talk", 1, chan->callerid)) {
strncpy(chan->exten, "talk", sizeof(chan->exten) -1 );
chan->priority = 0;
}
res = 0;
ast_frfree(fr);
break;
} else
ast_log(LOG_DEBUG, "Found unqualified token of %d ms\n", ms);
notsilent = 0;
}
} else {
if (!notsilent) {
/* Heard some audio, mark the begining of the token */
gettimeofday(&start, NULL);
ast_log(LOG_DEBUG, "Start of voice token!\n");
notsilent = 1;
}
}
}
ast_frfree(fr);
}
ast_sched_runq(chan->sched);
}
ast_stopstream(chan);
} else {
ast_log(LOG_WARNING, "ast_streamfile failed on %s for %s\n", chan->name, (char *)data);
res = 0;
}
}
if (res > -1) {
if (origrformat && ast_set_read_format(chan, origrformat)) {
ast_log(LOG_WARNING, "Failed to restore read format for %s to %s\n",
chan->name, ast_getformatname(origrformat));
}
}
if (dsp)
ast_dsp_free(dsp);
LOCAL_USER_REMOVE(u);
return res;
}
int unload_module(void)
{
STANDARD_HANGUP_LOCALUSERS;
return ast_unregister_application(app);
}
int load_module(void)
{
return ast_register_application(app, background_detect_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

473
apps/app_test.c Normal file
View File

@@ -0,0 +1,473 @@
/*
* Asterisk -- A telephony toolkit for Linux.
*
* Applications to test connection and produce report in text file
*
* Copyright (C) 2004, Digium, Inc.
*
* Mark Spencer <markster@digium.com>
* Russell Bryant <russelb@clemson.edu>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
*/
#include <sys/types.h>
#include <asterisk/channel.h>
#include <asterisk/options.h>
#include <asterisk/module.h>
#include <asterisk/logger.h>
#include <asterisk/lock.h>
#include <asterisk/app.h>
#include <asterisk/pbx.h>
#include <asterisk/utils.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include "../astconf.h"
static char *tdesc = "Interface Test Application";
static char *tests_descrip =
"TestServer(): Perform test server function and write call report.\n"
"Results stored in /var/log/asterisk/testreports/<testid>-server.txt";
static char *tests_app = "TestServer";
static char *tests_synopsis = "Execute Interface Test Server";
static char *testc_descrip =
"TestClient(testid): Executes test client with given testid.\n"
"Results stored in /var/log/asterisk/testreports/<testid>-client.txt";
static char *testc_app = "TestClient";
static char *testc_synopsis = "Execute Interface Test Client";
static int measurenoise(struct ast_channel *chan, int ms, char *who)
{
int res=0;
int mssofar;
int noise=0;
int samples=0;
int x;
short *foo;
struct timeval start, tv;
struct ast_frame *f;
int rformat;
rformat = chan->readformat;
if (ast_set_read_format(chan, AST_FORMAT_SLINEAR)) {
ast_log(LOG_NOTICE, "Unable to set to linear mode!\n");
return -1;
}
gettimeofday(&start, NULL);
for(;;) {
gettimeofday(&tv, NULL);
mssofar = (tv.tv_sec - start.tv_sec) * 1000;
mssofar += (tv.tv_usec - start.tv_usec) / 1000;
if (mssofar > ms)
break;
res = ast_waitfor(chan, ms - mssofar);
if (res < 1)
break;
f = ast_read(chan);
if (!f) {
res = -1;
break;
}
if ((f->frametype == AST_FRAME_VOICE) && (f->subclass == AST_FORMAT_SLINEAR)) {
foo = (short *)f->data;
for (x=0;x<f->samples;x++) {
noise += abs(foo[x]);
samples++;
}
}
}
if (rformat) {
if (ast_set_read_format(chan, rformat)) {
ast_log(LOG_NOTICE, "Unable to restore original format!\n");
return -1;
}
}
if (res < 0)
return res;
if (!samples) {
ast_log(LOG_NOTICE, "No samples were received from the other side!\n");
return -1;
}
ast_log(LOG_DEBUG, "%s: Noise: %d, samples: %d, avg: %d\n", who, noise, samples, noise / samples);
return (noise / samples);
}
static int sendnoise(struct ast_channel *chan, int ms)
{
int res;
res = ast_tonepair_start(chan, 1537, 2195, ms, 8192);
if (!res) {
res = ast_waitfordigit(chan, ms);
ast_tonepair_stop(chan);
}
return res;
}
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int testclient_exec(struct ast_channel *chan, void *data)
{
struct localuser *u;
int res = 0;
char *testid=data;
char fn[80];
char serverver[80];
FILE *f;
LOCAL_USER_ADD(u);
/* Check for test id */
if (!testid || ast_strlen_zero(testid)) {
ast_log(LOG_WARNING, "TestClient requires an argument - the test id\n");
return -1;
}
if (chan->_state != AST_STATE_UP)
res = ast_answer(chan);
/* Wait a few just to be sure things get started */
res = ast_safe_sleep(chan, 3000);
/* Transmit client version */
if (!res)
res = ast_dtmf_stream(chan, NULL, "8378*1#", 0);
ast_log(LOG_DEBUG, "Transmit client version\n");
/* Read server version */
ast_log(LOG_DEBUG, "Read server version\n");
if (!res)
res = ast_app_getdata(chan, NULL, serverver, sizeof(serverver) - 1, 0);
if (res > 0)
res = 0;
ast_log(LOG_DEBUG, "server version: %s\n", serverver);
if (res > 0)
res = 0;
if (!res)
res = ast_safe_sleep(chan, 1000);
/* Send test id */
if (!res)
res = ast_dtmf_stream(chan, NULL, testid, 0);
if (!res)
res = ast_dtmf_stream(chan, NULL, "#", 0);
ast_log(LOG_DEBUG, "send test identifier: %s\n", testid);
if ((res >=0) && (!ast_strlen_zero(testid))) {
/* Make the directory to hold the test results in case it's not there */
snprintf(fn, sizeof(fn), "%s/testresults", ast_config_AST_LOG_DIR);
mkdir(fn, 0777);
snprintf(fn, sizeof(fn), "%s/testresults/%s-client.txt", ast_config_AST_LOG_DIR, testid);
if ((f = fopen(fn, "w+"))) {
setlinebuf(f);
fprintf(f, "CLIENTCHAN: %s\n", chan->name);
fprintf(f, "CLIENTTEST ID: %s\n", testid);
fprintf(f, "ANSWER: PASS\n");
res = 0;
if (!res) {
/* Step 1: Wait for "1" */
ast_log(LOG_DEBUG, "TestClient: 2. Wait DTMF 1\n");
res = ast_waitfordigit(chan, 3000);
fprintf(f, "WAIT DTMF 1: %s\n", (res != '1') ? "FAIL" : "PASS");
if (res == '1')
res = 0;
else
res = -1;
}
if (!res)
res = ast_safe_sleep(chan, 1000);
if (!res) {
/* Step 2: Send "2" */
ast_log(LOG_DEBUG, "TestClient: 2. Send DTMF 2\n");
res = ast_dtmf_stream(chan, NULL, "2", 0);
fprintf(f, "SEND DTMF 2: %s\n", (res < 0) ? "FAIL" : "PASS");
if (res > 0)
res = 0;
}
if (!res) {
/* Step 3: Wait one second */
ast_log(LOG_DEBUG, "TestClient: 3. Wait one second\n");
res = ast_safe_sleep(chan, 1000);
fprintf(f, "WAIT 1 SEC: %s\n", (res < 0) ? "FAIL" : "PASS");
if (res > 0)
res = 0;
}
if (!res) {
/* Step 4: Measure noise */
ast_log(LOG_DEBUG, "TestClient: 4. Measure noise\n");
res = measurenoise(chan, 5000, "TestClient");
fprintf(f, "MEASURENOISE: %s (%d)\n", (res < 0) ? "FAIL" : "PASS", res);
if (res > 0)
res = 0;
}
if (!res) {
/* Step 5: Wait for "4" */
ast_log(LOG_DEBUG, "TestClient: 5. Wait DTMF 4\n");
res = ast_waitfordigit(chan, 3000);
fprintf(f, "WAIT DTMF 4: %s\n", (res != '4') ? "FAIL" : "PASS");
if (res == '4')
res = 0;
else
res = -1;
}
if (!res) {
/* Step 6: Transmit tone noise */
ast_log(LOG_DEBUG, "TestClient: 6. Transmit tone\n");
res = sendnoise(chan, 6000);
fprintf(f, "SENDTONE: %s\n", (res < 0) ? "FAIL" : "PASS");
}
if (!res || (res == '5')) {
/* Step 7: Wait for "5" */
ast_log(LOG_DEBUG, "TestClient: 7. Wait DTMF 5\n");
if (!res)
res = ast_waitfordigit(chan, 3000);
fprintf(f, "WAIT DTMF 5: %s\n", (res != '5') ? "FAIL" : "PASS");
if (res == '5')
res = 0;
else
res = -1;
}
if (!res) {
/* Step 8: Wait one second */
ast_log(LOG_DEBUG, "TestClient: 8. Wait one second\n");
res = ast_safe_sleep(chan, 1000);
fprintf(f, "WAIT 1 SEC: %s\n", (res < 0) ? "FAIL" : "PASS");
if (res > 0)
res = 0;
}
if (!res) {
/* Step 9: Measure noise */
ast_log(LOG_DEBUG, "TestClient: 6. Measure tone\n");
res = measurenoise(chan, 4000, "TestClient");
fprintf(f, "MEASURETONE: %s (%d)\n", (res < 0) ? "FAIL" : "PASS", res);
if (res > 0)
res = 0;
}
if (!res) {
/* Step 10: Send "7" */
ast_log(LOG_DEBUG, "TestClient: 7. Send DTMF 7\n");
res = ast_dtmf_stream(chan, NULL, "7", 0);
fprintf(f, "SEND DTMF 7: %s\n", (res < 0) ? "FAIL" : "PASS");
if (res > 0)
res =0;
}
if (!res) {
/* Step 11: Wait for "8" */
ast_log(LOG_DEBUG, "TestClient: 11. Wait DTMF 8\n");
res = ast_waitfordigit(chan, 3000);
fprintf(f, "WAIT DTMF 8: %s\n", (res != '8') ? "FAIL" : "PASS");
if (res == '8')
res = 0;
else
res = -1;
}
if (!res) {
/* Step 12: Hangup! */
ast_log(LOG_DEBUG, "TestClient: 12. Hangup\n");
}
ast_log(LOG_DEBUG, "-- TEST COMPLETE--\n");
fprintf(f, "-- END TEST--\n");
fclose(f);
res = -1;
} else
res = -1;
} else {
ast_log(LOG_NOTICE, "Did not read a test ID on '%s'\n", chan->name);
res = -1;
}
LOCAL_USER_REMOVE(u);
return res;
}
static int testserver_exec(struct ast_channel *chan, void *data)
{
struct localuser *u;
int res = 0;
char testid[80]="";
char fn[80];
FILE *f;
LOCAL_USER_ADD(u);
if (chan->_state != AST_STATE_UP)
res = ast_answer(chan);
/* Read version */
ast_log(LOG_DEBUG, "Read client version\n");
if (!res)
res = ast_app_getdata(chan, NULL, testid, sizeof(testid) - 1, 0);
if (res > 0)
res = 0;
ast_log(LOG_DEBUG, "client version: %s\n", testid);
ast_log(LOG_DEBUG, "Transmit server version\n");
res = ast_safe_sleep(chan, 1000);
if (!res)
res = ast_dtmf_stream(chan, NULL, "8378*1#", 0);
if (res > 0)
res = 0;
if (!res)
res = ast_app_getdata(chan, NULL, testid, sizeof(testid) - 1, 0);
ast_log(LOG_DEBUG, "read test identifier: %s\n", testid);
/* Check for sneakyness */
if (strchr(testid, '/'))
res = -1;
if ((res >=0) && (!ast_strlen_zero(testid))) {
/* Got a Test ID! Whoo hoo! */
/* Make the directory to hold the test results in case it's not there */
snprintf(fn, sizeof(fn), "%s/testresults", ast_config_AST_LOG_DIR);
mkdir(fn, 0777);
snprintf(fn, sizeof(fn), "%s/testresults/%s-server.txt", ast_config_AST_LOG_DIR, testid);
if ((f = fopen(fn, "w+"))) {
setlinebuf(f);
fprintf(f, "SERVERCHAN: %s\n", chan->name);
fprintf(f, "SERVERTEST ID: %s\n", testid);
fprintf(f, "ANSWER: PASS\n");
ast_log(LOG_DEBUG, "Processing Test ID '%s'\n", testid);
res = ast_safe_sleep(chan, 1000);
if (!res) {
/* Step 1: Send "1" */
ast_log(LOG_DEBUG, "TestServer: 1. Send DTMF 1\n");
res = ast_dtmf_stream(chan, NULL, "1", 0);
fprintf(f, "SEND DTMF 1: %s\n", (res < 0) ? "FAIL" : "PASS");
if (res > 0)
res = 0;
}
if (!res) {
/* Step 2: Wait for "2" */
ast_log(LOG_DEBUG, "TestServer: 2. Wait DTMF 2\n");
res = ast_waitfordigit(chan, 3000);
fprintf(f, "WAIT DTMF 2: %s\n", (res != '2') ? "FAIL" : "PASS");
if (res == '2')
res = 0;
else
res = -1;
}
if (!res) {
/* Step 3: Measure noise */
ast_log(LOG_DEBUG, "TestServer: 3. Measure noise\n");
res = measurenoise(chan, 6000, "TestServer");
fprintf(f, "MEASURENOISE: %s (%d)\n", (res < 0) ? "FAIL" : "PASS", res);
if (res > 0)
res = 0;
}
if (!res) {
/* Step 4: Send "4" */
ast_log(LOG_DEBUG, "TestServer: 4. Send DTMF 4\n");
res = ast_dtmf_stream(chan, NULL, "4", 0);
fprintf(f, "SEND DTMF 4: %s\n", (res < 0) ? "FAIL" : "PASS");
if (res > 0)
res = 0;
}
if (!res) {
/* Step 5: Wait one second */
ast_log(LOG_DEBUG, "TestServer: 5. Wait one second\n");
res = ast_safe_sleep(chan, 1000);
fprintf(f, "WAIT 1 SEC: %s\n", (res < 0) ? "FAIL" : "PASS");
if (res > 0)
res = 0;
}
if (!res) {
/* Step 6: Measure noise */
ast_log(LOG_DEBUG, "TestServer: 6. Measure tone\n");
res = measurenoise(chan, 4000, "TestServer");
fprintf(f, "MEASURETONE: %s (%d)\n", (res < 0) ? "FAIL" : "PASS", res);
if (res > 0)
res = 0;
}
if (!res) {
/* Step 7: Send "5" */
ast_log(LOG_DEBUG, "TestServer: 7. Send DTMF 5\n");
res = ast_dtmf_stream(chan, NULL, "5", 0);
fprintf(f, "SEND DTMF 5: %s\n", (res < 0) ? "FAIL" : "PASS");
if (res > 0)
res = 0;
}
if (!res) {
/* Step 8: Transmit tone noise */
ast_log(LOG_DEBUG, "TestServer: 8. Transmit tone\n");
res = sendnoise(chan, 6000);
fprintf(f, "SENDTONE: %s\n", (res < 0) ? "FAIL" : "PASS");
}
if (!res || (res == '7')) {
/* Step 9: Wait for "7" */
ast_log(LOG_DEBUG, "TestServer: 9. Wait DTMF 7\n");
if (!res)
res = ast_waitfordigit(chan, 3000);
fprintf(f, "WAIT DTMF 7: %s\n", (res != '7') ? "FAIL" : "PASS");
if (res == '7')
res = 0;
else
res = -1;
}
if (!res)
res = ast_safe_sleep(chan, 1000);
if (!res) {
/* Step 10: Send "8" */
ast_log(LOG_DEBUG, "TestServer: 10. Send DTMF 8\n");
res = ast_dtmf_stream(chan, NULL, "8", 0);
fprintf(f, "SEND DTMF 8: %s\n", (res < 0) ? "FAIL" : "PASS");
if (res > 0)
res = 0;
}
if (!res) {
/* Step 11: Wait for hangup to arrive! */
ast_log(LOG_DEBUG, "TestServer: 11. Waiting for hangup\n");
res = ast_safe_sleep(chan, 10000);
fprintf(f, "WAIT HANGUP: %s\n", (res < 0) ? "PASS" : "FAIL");
}
ast_log(LOG_DEBUG, "-- TEST COMPLETE--\n");
fprintf(f, "-- END TEST--\n");
fclose(f);
res = -1;
} else
res = -1;
} else {
ast_log(LOG_NOTICE, "Did not read a test ID on '%s'\n", chan->name);
res = -1;
}
LOCAL_USER_REMOVE(u);
return res;
}
int unload_module(void)
{
STANDARD_HANGUP_LOCALUSERS;
ast_unregister_application(testc_app);
return ast_unregister_application(tests_app);
}
int load_module(void)
{
ast_register_application(testc_app, testclient_exec, testc_synopsis, testc_descrip);
return ast_register_application(tests_app, testserver_exec, tests_synopsis, tests_descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key(void)
{
return ASTERISK_GPL_KEY;
}

5
apps/app_transfer.c Executable file → Normal file
View File

@@ -1,7 +1,7 @@
/*
* Asterisk -- A telephony toolkit for Linux.
*
* Time of day - Report the time of day
* Transfer a caller
*
* Copyright (C) 1999, Mark Spencer
*
@@ -22,9 +22,6 @@
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
static char *tdesc = "Transfer";
static char *app = "Transfer";

145
apps/app_txtcidname.c Normal file
View File

@@ -0,0 +1,145 @@
/*
* Asterisk -- A telephony toolkit for Linux.
*
* Caller*id name lookup - Look up the caller's name via DNS
*
* Copyright (C) 1999-2004, Digium
*
* Mark Spencer <markster@linux-support.net>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
*/
#include <asterisk/lock.h>
#include <asterisk/file.h>
#include <asterisk/logger.h>
#include <asterisk/channel.h>
#include <asterisk/pbx.h>
#include <asterisk/options.h>
#include <asterisk/config.h>
#include <asterisk/module.h>
#include <asterisk/enum.h>
#include <asterisk/utils.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
static char *tdesc = "TXTCIDName";
static char *app = "TXTCIDName";
static char *synopsis = "Lookup caller name from TXT record";
static char *descrip =
" TXTLookup(CallerID): Looks up a Caller Name via DNS and sets\n"
"the variable 'TXTCIDNAME'. TXTCIDName will either be blank\n"
"or return the value found in the TXT record in DNS.\n" ;
#define ENUM_CONFIG "enum.conf"
static char h323driver[80] = "";
#define H323DRIVERDEFAULT "H323"
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int txtcidname_exec(struct ast_channel *chan, void *data)
{
int res=0;
char tech[80];
char txt[256] = "";
char dest[80];
struct localuser *u;
if (!data || !strlen(data)) {
ast_log(LOG_WARNING, "TXTCIDName requires an argument (extension)\n");
res = 1;
}
LOCAL_USER_ADD(u);
if (!res) {
res = ast_get_txt(chan, data, dest, sizeof(dest), tech, sizeof(tech), txt, sizeof(txt));
}
LOCAL_USER_REMOVE(u);
/* Parse it out */
if (res > 0) {
if (!ast_strlen_zero(txt)) {
pbx_builtin_setvar_helper(chan, "TXTCIDNAME", txt);
#if 0
ast_log(LOG_DEBUG, "TXTCIDNAME got '%s'\n", txt);
#endif
}
}
if (!res) {
/* Look for a "busy" place */
if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 101, chan->callerid))
chan->priority += 100;
} else if (res > 0)
res = 0;
return res;
}
static int load_config(void)
{
struct ast_config *cfg;
char *s;
cfg = ast_load(ENUM_CONFIG);
if (cfg) {
if (!(s=ast_variable_retrieve(cfg, "general", "h323driver"))) {
strncpy(h323driver, H323DRIVERDEFAULT, sizeof(h323driver) - 1);
} else {
strncpy(h323driver, s, sizeof(h323driver) - 1);
}
ast_destroy(cfg);
return 0;
}
ast_log(LOG_NOTICE, "No ENUM Config file, using defaults\n");
return 0;
}
int unload_module(void)
{
STANDARD_HANGUP_LOCALUSERS;
return ast_unregister_application(app);
}
int load_module(void)
{
int res;
res = ast_register_application(app, txtcidname_exec, synopsis, descrip);
if (res)
return(res);
if ((res=load_config())) {
return(res);
}
return(0);
}
int reload(void)
{
return(load_config());
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

1
apps/app_url.c Executable file → Normal file
View File

@@ -21,7 +21,6 @@
#include <asterisk/image.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
static char *tdesc = "Send URL Applications";

106
apps/app_userevent.c Normal file
View File

@@ -0,0 +1,106 @@
/*
* Asterisk -- A telephony toolkit for Linux.
*
* UserEvent application -- send manager event
*
*
* This program is free software, distributed under the terms of
* the GNU General Public License
*/
#include <asterisk/lock.h>
#include <asterisk/file.h>
#include <asterisk/logger.h>
#include <asterisk/channel.h>
#include <asterisk/pbx.h>
#include <asterisk/module.h>
#include <asterisk/manager.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
static char *tdesc = "Custom User Event Application";
static char *app = "UserEvent";
static char *synopsis = "Send an arbitrary event to the manager interface";
static char *descrip =
" UserEvent(eventname[|body]): Sends an arbitrary event to the\n"
"manager interface, with an optional body representing additional\n"
"arguments. The format of the event will be:\n"
" Event: UserEvent<specified event name>\n"
" Channel: <channel name>\n"
" Uniqueid: <call uniqueid>\n"
" [body]\n"
"If the body is not specified, only Event, Channel, and Uniqueid fields\n"
"will be present. Returns 0.";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int userevent_exec(struct ast_channel *chan, void *data)
{
struct localuser *u;
char info[512];
char eventname[512];
char *eventbody;
if (!data || !strlen(data)) {
ast_log(LOG_WARNING, "UserEvent requires an argument (eventname|optional event body)\n");
return -1;
}
strncpy(info, (char *)data, strlen((char *)data) + AST_MAX_EXTENSION-1);
snprintf(eventname, sizeof(eventname), "UserEvent%s", info);
eventbody = strchr(eventname, '|');
if (eventbody) {
*eventbody = '\0';
eventbody++;
}
LOCAL_USER_ADD(u);
if(eventbody) {
ast_log(LOG_DEBUG, "Sending user event: %s, %s\n", eventname, eventbody);
manager_event(EVENT_FLAG_CALL, eventname,
"Channel: %s\r\nUniqueid: %s\r\n%s\r\n",
chan->name, chan->uniqueid, eventbody);
} else {
ast_log(LOG_DEBUG, "Sending user event: %s\n", eventname);
manager_event(EVENT_FLAG_CALL, eventname,
"Channel: %s\r\nUniqueid: %s\r\n", chan->name, chan->uniqueid);
}
LOCAL_USER_REMOVE(u);
return 0;
}
int unload_module(void)
{
STANDARD_HANGUP_LOCALUSERS;
return ast_unregister_application(app);
}
int load_module(void)
{
return ast_register_application(app, userevent_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

110
apps/app_verbose.c Normal file
View File

@@ -0,0 +1,110 @@
/*
* Asterisk -- A telephony toolkit for Linux.
*
* Verbose application
*
* Copyright (c) 2004 Tilghman Lesher. All rights reserved.
*
* Tilghman Lesher <app_verbose_v001@the-tilghman.com>
*
* This code is released by the author with no restrictions on usage.
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <asterisk/options.h>
#include <asterisk/logger.h>
#include <asterisk/channel.h>
#include <asterisk/pbx.h>
#include <asterisk/module.h>
static char *tdesc = "Send verbose output";
static char *app_verbose = "Verbose";
static char *verbose_synopsis = "Send arbitrary text to verbose output";
static char *verbose_descrip =
"Verbose([<level>|]<message>)\n"
" level must be an integer value. If not specified, defaults to 0."
" Always returns 0.\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int verbose_exec(struct ast_channel *chan, void *data)
{
char *vtext;
int vsize;
if (data) {
vtext = ast_strdupa((char *)data);
if (vtext) {
char *tmp = strsep(&vtext, "|,");
if (vtext) {
if (sscanf(tmp, "%d", &vsize) != 1) {
vsize = 0;
ast_log(LOG_WARNING, "'%s' is not a verboser number\n", vtext);
}
} else {
vtext = tmp;
vsize = 0;
}
if (option_verbose >= vsize) {
switch (vsize) {
case 0:
ast_verbose("%s\n", vtext);
break;
case 1:
ast_verbose(VERBOSE_PREFIX_1 "%s\n", vtext);
break;
case 2:
ast_verbose(VERBOSE_PREFIX_2 "%s\n", vtext);
break;
case 3:
ast_verbose(VERBOSE_PREFIX_3 "%s\n", vtext);
break;
default:
ast_verbose(VERBOSE_PREFIX_4 "%s\n", vtext);
}
}
} else {
ast_log(LOG_ERROR, "Out of memory\n");
}
}
return 0;
}
int unload_module(void)
{
STANDARD_HANGUP_LOCALUSERS;
return ast_unregister_application(app_verbose);
}
int load_module(void)
{
return ast_register_application(app_verbose, verbose_exec, verbose_synopsis, verbose_descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

3481
apps/app_voicemail.c Executable file → Normal file

File diff suppressed because it is too large Load Diff

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

@@ -18,14 +18,12 @@
#include <asterisk/pbx.h>
#include <asterisk/module.h>
#include <asterisk/options.h>
#include <asterisk/lock.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
static char *synopsis = "Wait for Ring Application";
static char *tdesc = "Waits until first ring after time";
@@ -48,7 +46,7 @@ static int waitforring_exec(struct ast_channel *chan, void *data)
int res = 0;
int ms;
if (!data || (sscanf(data, "%d", &ms) != 1)) {
ast_log(LOG_WARNING, "SoftHangup requires an argument (minimum seconds)\n");
ast_log(LOG_WARNING, "WaitForRing requires an argument (minimum seconds)\n");
return 0;
}
ms *= 1000;

1
apps/app_zapateller.c Executable file → Normal file
View File

@@ -20,7 +20,6 @@
#include <asterisk/translate.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
static char *tdesc = "Block Telemarketers with Special Information Tone";

13
apps/app_zapbarge.c Executable file → Normal file
View File

@@ -25,6 +25,7 @@
#include <asterisk/options.h>
#include <asterisk/cli.h>
#include <asterisk/say.h>
#include <asterisk/utils.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
@@ -32,8 +33,12 @@
#include <stdlib.h>
#include <sys/ioctl.h>
#include <pthread.h>
#ifdef __linux__
#include <linux/zaptel.h>
#else
#include <zaptel.h>
#endif /* __linux__ */
static char *tdesc = "Barge in on Zap channel application";
static char *app = "ZapBarge";
@@ -244,9 +249,9 @@ static int conf_exec(struct ast_channel *chan, void *data)
int retrycnt = 0;
int confflags = 0;
int confno = 0;
char confstr[80];
char confstr[80] = "";
if (data && strlen(data)) {
if (data && !ast_strlen_zero(data)) {
if ((sscanf(data, "Zap/%d", &confno) != 1) &&
(sscanf(data, "%d", &confno) != 1)) {
ast_log(LOG_WARNING, "ZapBarge Argument (if specified) must be a channel number, not '%s'\n", (char *)data);
@@ -259,7 +264,7 @@ static int conf_exec(struct ast_channel *chan, void *data)
while(!confno && (++retrycnt < 4)) {
/* Prompt user for conference number */
strcpy(confstr, "");
confstr[0] = '\0';
res = ast_app_getdata(chan, "conf-getchannel",confstr, sizeof(confstr) - 1, 0);
if (res <0) goto out;
if (sscanf(confstr, "%d", &confno) != 1)

12
apps/app_zapras.c Executable file → Normal file
View File

@@ -20,7 +20,11 @@
#include <asterisk/options.h>
#include <sys/ioctl.h>
#include <sys/wait.h>
#ifdef __linux__
#include <sys/signal.h>
#else
#include <signal.h>
#endif /* __linux__ */
#include <stdlib.h>
#include <unistd.h>
@@ -30,10 +34,12 @@
#include <stdio.h>
#include <fcntl.h>
#include <pthread.h>
/* Need some zaptel help here */
#ifdef __linux__
#include <linux/zaptel.h>
#else
#include <zaptel.h>
#endif /* __linux__ */
static char *tdesc = "Zap RAS Application";
@@ -44,7 +50,7 @@ static char *synopsis = "Executes Zaptel ISDN RAS application";
static char *descrip =
" ZapRAS(args): Executes a RAS server using pppd on the given channel.\n"
"The channel must be a clear channel (i.e. PRI source) and a Zaptel\n"
"channel to be able to use this function (No modem emulcation is included).\n"
"channel to be able to use this function (No modem emulation is included).\n"
"Your pppd must be patched to be zaptel aware. Arguments should be\n"
"separated by | characters. Always returns -1.\n";

116
apps/app_zapscan.c Executable file → Normal file
View File

@@ -34,8 +34,12 @@
#include <stdlib.h>
#include <sys/ioctl.h>
#include <pthread.h>
#ifdef __linux__
#include <linux/zaptel.h>
#else
#include <zaptel.h>
#endif /* __linux__ */
static char *tdesc = "Scan Zap channels application";
static char *app = "ZapScan";
@@ -43,8 +47,8 @@ static char *app = "ZapScan";
static char *synopsis = "Scan Zap channels to monitor calls";
static char *descrip =
" ZapScan allows a call center manager to monitor\n"
"phone conversations in a convenient way.";
" ZapScan allows a call center manager to monitor Zap channels in\n"
"a convenient way. Use '#' to select the next channel and use '*' to exit\n";
STANDARD_LOCAL_USER;
@@ -54,6 +58,22 @@ LOCAL_USER_DECL;
#define CONF_SIZE 160
static struct ast_channel *get_zap_channel_locked(int num) {
struct ast_channel *c=NULL;
char name[80];
snprintf(name,sizeof(name),"Zap/%d-1",num);
c = ast_channel_walk_locked(NULL);
while(c) {
if (!strcasecmp(c->name, name)) {
break;
}
ast_mutex_unlock(&c->lock);
c = ast_channel_walk_locked(c);
}
return c;
}
static int careful_write(int fd, unsigned char *data, int len)
{
int res;
@@ -87,6 +107,8 @@ static int conf_run(struct ast_channel *chan, int confno, int confflags)
int retryzap;
int origfd;
int ret = -1;
char input[4];
int ic=0;
ZT_BUFFERINFO bi;
char __buf[CONF_SIZE + AST_FRIENDLY_OFFSET];
@@ -188,11 +210,30 @@ zapretry:
f = ast_read(c);
if (!f)
break;
if ((f->frametype == AST_FRAME_DTMF) && (f->subclass == '#')) {
ret = 0;
if(f->frametype == AST_FRAME_DTMF) {
if(f->subclass == '#') {
ret = 0;
break;
} else if (fd != chan->fds[0]) {
if (f->frametype == AST_FRAME_VOICE) {
}
else if (f->subclass == '*') {
ret = -1;
break;
}
else {
input[ic++] = f->subclass;
}
if(ic == 3) {
input[ic++] = '\0';
ic=0;
ret = atoi(input);
ast_verbose(VERBOSE_PREFIX_3 "Zapscan: change channel to %d\n",ret);
break;
}
}
if (fd != chan->fds[0]) {
if (f->frametype == AST_FRAME_VOICE) {
if (f->subclass == AST_FORMAT_ULAW) {
/* Carefully write */
careful_write(fd, f->data, f->datalen);
@@ -243,33 +284,56 @@ static int conf_exec(struct ast_channel *chan, void *data)
struct localuser *u;
int confflags = 0;
int confno = 0;
char confstr[80], *tmp;
struct ast_channel *tempchan = NULL, *lastchan = NULL;
char confstr[80] = "", *tmp;
struct ast_channel *tempchan = NULL, *lastchan = NULL,*ichan = NULL;
struct ast_frame *f;
int input=0;
LOCAL_USER_ADD(u);
if (chan->_state != AST_STATE_UP)
ast_answer(chan);
for (;;) {
tempchan = ast_channel_walk(tempchan);
if ( !tempchan && !lastchan )
break;
if ( tempchan && (!strcmp(tempchan->type, "Zap")) && (tempchan != chan) ) {
ast_verbose(VERBOSE_PREFIX_3 "Zap channel %s is in-use, monitoring...\n", tempchan->name);
strcpy(confstr, tempchan->name);
if ((tmp = strchr(confstr,'-'))) {
*tmp = '\0';
if (ast_waitfor(chan, 100) < 0)
break;
f = ast_read(chan);
if (!f)
break;
if ((f->frametype == AST_FRAME_DTMF) && (f->subclass == '*')) {
ast_frfree(f);
break;
}
confno = atoi(strchr(confstr,'/') + 1);
ast_stopstream(chan);
ast_say_number(chan, confno, AST_DIGIT_ANY, chan->language);
res = conf_run(chan, confno, confflags);
if (res<0) break;
ast_frfree(f);
ichan = NULL;
if(input) {
ichan = get_zap_channel_locked(input);
input = 0;
}
tempchan = ichan ? ichan : ast_channel_walk_locked(tempchan);
if ( !tempchan && !lastchan )
break;
if ( tempchan && tempchan->type && (!strcmp(tempchan->type, "Zap")) && (tempchan != chan) ) {
ast_verbose(VERBOSE_PREFIX_3 "Zap channel %s is in-use, monitoring...\n", tempchan->name);
strncpy(confstr, tempchan->name, sizeof(confstr) - 1);
ast_mutex_unlock(&tempchan->lock);
if ((tmp = strchr(confstr,'-'))) {
*tmp = '\0';
}
confno = atoi(strchr(confstr,'/') + 1);
ast_stopstream(chan);
ast_say_number(chan, confno, AST_DIGIT_ANY, chan->language, (char *) NULL);
res = conf_run(chan, confno, confflags);
if (res<0) break;
input = res;
} else if (tempchan)
ast_mutex_unlock(&tempchan->lock);
lastchan = tempchan;
}
lastchan = tempchan;
}
LOCAL_USER_REMOVE(u);
return res;
}

0
apps/enter.h Executable file → Normal file
View File

0
apps/leave.h Executable file → Normal file
View File

BIN
apps/rpt_flow.pdf Normal file

Binary file not shown.

257
ast_expr.y Executable file → Normal file
View File

@@ -20,6 +20,13 @@
#include <asterisk/ast_expr.h>
#include <asterisk/logger.h>
#ifdef LONG_LONG_MIN
#define QUAD_MIN LONG_LONG_MIN
#endif
#ifdef LONG_LONG_MAX
#define QUAD_MAX LONG_LONG_MAX
#endif
# if ! defined(QUAD_MIN)
# define QUAD_MIN (-0x7fffffffffffffffL-1)
# endif
@@ -48,6 +55,7 @@ struct val {
struct parser_control {
struct val *result;
int pipa;
char *arg_orig;
char *argv;
char *ptrptr;
int firsttoken;
@@ -78,10 +86,30 @@ static struct val *op_rem __P((struct val *, struct val *));
static struct val *op_times __P((struct val *, struct val *));
static quad_t to_integer __P((struct val *));
static void to_string __P((struct val *));
static int ast_yyerror __P((const char *));
/* uh, if I want to predeclare yylex with a YYLTYPE, I have to predeclare the yyltype... sigh */
typedef struct yyltype
{
int first_line;
int first_column;
int last_line;
int last_column;
} yyltype;
# define YYLTYPE yyltype
# define YYLTYPE_IS_TRIVIAL 1
static int ast_yyerror __P((const char *,YYLTYPE *, struct parser_control *));
#define ast_yyerror(x) ast_yyerror(x,&yyloc,kota)
%}
%pure-parser
%locations
/* %debug for when you are having big problems */
/* %name-prefix="ast_yy" */
%union
@@ -90,7 +118,7 @@ static int ast_yyerror __P((const char *));
}
%{
static int ast_yylex __P((YYSTYPE *, struct parser_control *));
static int ast_yylex __P((YYSTYPE *, YYLTYPE *, struct parser_control *));
%}
@@ -110,21 +138,21 @@ start: expr { ((struct parser_control *)kota)->result = $$; }
;
expr: TOKEN
| '(' expr ')' { $$ = $2; }
| expr '|' expr { $$ = op_or ($1, $3); }
| expr '&' expr { $$ = op_and ($1, $3); }
| expr '=' expr { $$ = op_eq ($1, $3); }
| expr '>' expr { $$ = op_gt ($1, $3); }
| expr '<' expr { $$ = op_lt ($1, $3); }
| expr GE expr { $$ = op_ge ($1, $3); }
| expr LE expr { $$ = op_le ($1, $3); }
| expr NE expr { $$ = op_ne ($1, $3); }
| expr '+' expr { $$ = op_plus ($1, $3); }
| expr '-' expr { $$ = op_minus ($1, $3); }
| expr '*' expr { $$ = op_times ($1, $3); }
| expr '/' expr { $$ = op_div ($1, $3); }
| expr '%' expr { $$ = op_rem ($1, $3); }
| expr ':' expr { $$ = op_colon ($1, $3); }
| '(' expr ')' { $$ = $2; @$.first_column = @1.first_column; @$.last_column = @3.last_column; @$.first_line=0; @$.last_line=0;}
| expr '|' expr { $$ = op_or ($1, $3); @$.first_column = @1.first_column; @$.last_column = @3.last_column; @$.first_line=0; @$.last_line=0;}
| expr '&' expr { $$ = op_and ($1, $3); @$.first_column = @1.first_column; @$.last_column = @3.last_column; @$.first_line=0; @$.last_line=0;}
| expr '=' expr { $$ = op_eq ($1, $3); @$.first_column = @1.first_column; @$.last_column = @3.last_column; @$.first_line=0; @$.last_line=0;}
| expr '>' expr { $$ = op_gt ($1, $3); @$.first_column = @1.first_column; @$.last_column = @3.last_column; @$.first_line=0; @$.last_line=0;}
| expr '<' expr { $$ = op_lt ($1, $3); @$.first_column = @1.first_column; @$.last_column = @3.last_column; @$.first_line=0; @$.last_line=0;}
| expr GE expr { $$ = op_ge ($1, $3); @$.first_column = @1.first_column; @$.last_column = @3.last_column; @$.first_line=0; @$.last_line=0;}
| expr LE expr { $$ = op_le ($1, $3); @$.first_column = @1.first_column; @$.last_column = @3.last_column; @$.first_line=0; @$.last_line=0;}
| expr NE expr { $$ = op_ne ($1, $3); @$.first_column = @1.first_column; @$.last_column = @3.last_column; @$.first_line=0; @$.last_line=0;}
| expr '+' expr { $$ = op_plus ($1, $3); @$.first_column = @1.first_column; @$.last_column = @3.last_column; @$.first_line=0; @$.last_line=0;}
| expr '-' expr { $$ = op_minus ($1, $3); @$.first_column = @1.first_column; @$.last_column = @3.last_column; @$.first_line=0; @$.last_line=0;}
| expr '*' expr { $$ = op_times ($1, $3); @$.first_column = @1.first_column; @$.last_column = @3.last_column; @$.first_line=0; @$.last_line=0;}
| expr '/' expr { $$ = op_div ($1, $3); @$.first_column = @1.first_column; @$.last_column = @3.last_column; @$.first_line=0; @$.last_line=0;}
| expr '%' expr { $$ = op_rem ($1, $3); @$.first_column = @1.first_column; @$.last_column = @3.last_column; @$.first_line=0; @$.last_line=0;}
| expr ':' expr { $$ = op_colon ($1, $3); @$.first_column = @1.first_column; @$.last_column = @3.last_column; @$.first_line=0; @$.last_line=0;}
;
@@ -187,6 +215,7 @@ struct val *vp;
}
if (vp->type == string || vp->type == numeric_string)
free (vp->u.s);
free (vp);
}
@@ -250,19 +279,92 @@ struct val *vp;
return (vp->type == string);
}
static int
ast_yylex (YYSTYPE *lvalp, struct parser_control *karoto)
ast_yylex (YYSTYPE *lvalp, YYLTYPE *yylloc, struct parser_control *karoto)
{
char *p;
char *p=0;
char *t1=0;
char savep = 0;
char *savepp = 0;
if (karoto->firsttoken==1) {
p=strtok_r(karoto->argv," ",&(karoto->ptrptr));
karoto->firsttoken=0;
t1 = karoto->argv;
karoto->firsttoken = 0;
} else {
p=strtok_r(NULL," ",&(karoto->ptrptr));
t1 = karoto->ptrptr;
}
while(*t1 && *t1 == ' ' ) /* we can remove worries about leading/multiple spaces being present */
t1++;
karoto->ptrptr = t1;
yylloc->first_column = t1 - karoto->argv;
while( *t1 && *t1 != ' ' && *t1 != '"') /* find the next space or quote */
t1++;
if( *t1 == ' ' )
{
*t1 = 0;
p = karoto->ptrptr;
karoto->ptrptr = t1+1;
yylloc->last_column = t1 - karoto->argv;
}
else if (*t1 == '"' )
{
/* opening quote. find the closing quote */
char *t2=t1+1;
while( *t2 && *t2 != '"')
t2++;
if( *t2 == '"' )
{
if( *(t2+1) == ' ' || *(t2+1) == 0 )
{
if( *(t2+1) )
{
*(t2+1) = 0;
karoto->ptrptr = t2+2;
}
else
{
karoto->ptrptr = t2+1;
}
}
else
{
/* hmmm. what if another token is here? */
/* maybe we can insert a space? */
savep = *(t2+1);
savepp = t2+1;
*(t2+1) = 0;
karoto->ptrptr = t2+1;
}
p = t1;
}
else
{
/* NOT GOOD -- no closing quote! */
p = t1;
karoto->ptrptr = t2;
}
yylloc->last_column = t2 - karoto->argv;
}
else if( *t1 == 0 )
{
if( t1 != karoto->ptrptr )
{
/* this is the last token */
p = karoto->ptrptr;
karoto->ptrptr = t1;
}
else
{
/* we are done. That was quick */
p = karoto->ptrptr;
yylloc->last_column = t1 - karoto->argv;
}
}
if( *p == 0 )
p = 0;
if (p==NULL) {
return (0);
}
@@ -280,6 +382,12 @@ ast_yylex (YYSTYPE *lvalp, struct parser_control *karoto)
}
lvalp->val = make_str (p);
if( savep )
{
*savepp = savep; /* restore the null terminated string */
savepp = 0;
savep = 0;
}
return (TOKEN);
}
@@ -306,7 +414,9 @@ char *ast_expr (char *arg)
karoto.result = NULL;
karoto.firsttoken=1;
karoto.argv=kota;
karoto.arg_orig = arg;
/* ast_yydebug = 1; */
ast_yyparse ((void *)&karoto);
free(kota);
@@ -339,11 +449,31 @@ int main(int argc,char **argv) {
#endif
#undef ast_yyerror
#define ast_yyerror(x) ast_yyerror(x, YYLTYPE *yylloc, struct parser_control *karoto)
static int
ast_yyerror (s)
const char *s;
ast_yyerror (const char *s)
{
ast_log(LOG_WARNING,"ast_yyerror(): syntax error: %s\n",s);
char spacebuf[8000]; /* best safe than sorry */
char spacebuf2[8000]; /* best safe than sorry */
int i=0;
spacebuf[0] = 0;
if( yylloc->first_column > 7990 ) /* if things get out of whack, why crash? */
yylloc->first_column = 7990;
if( yylloc->last_column > 7990 )
yylloc->last_column = 7990;
for(i=0;i<yylloc->first_column;i++) spacebuf[i] = ' ';
for( ;i<yylloc->last_column;i++) spacebuf[i] = '^';
spacebuf[i] = 0;
for(i=0;i<karoto->ptrptr-karoto->argv;i++) spacebuf2[i] = ' ';
spacebuf2[i++]='^';
spacebuf2[i]= 0;
ast_log(LOG_WARNING,"ast_yyerror(): syntax error: %s; Input:\n%s\n%s\n%s\n",s,
karoto->arg_orig,spacebuf,spacebuf2);
return(0);
}
@@ -521,19 +651,24 @@ struct val *a, *b;
{
struct val *r;
if (!to_integer (a) || !to_integer (b)) {
if (!to_integer (a)) {
ast_log(LOG_WARNING,"non-numeric argument\n");
free_value(a);
if (!to_integer (b)) {
free_value(a);
free_value(b);
return make_integer(0);
} else {
free_value(a);
return (b);
}
} else if (!to_integer(b)) {
free_value(b);
return(NULL);
return (a);
}
r = make_integer (/*(quad_t)*/(a->u.i + b->u.i));
if (chk_plus (a->u.i, b->u.i, r->u.i)) {
ast_log(LOG_WARNING,"overflow\n");
free_value(a);
free_value(b);
return(NULL);
}
free_value (a);
free_value (b);
@@ -561,19 +696,27 @@ struct val *a, *b;
{
struct val *r;
if (!to_integer (a) || !to_integer (b)) {
free_value(a);
free_value(b);
if (!to_integer (a)) {
ast_log(LOG_WARNING, "non-numeric argument\n");
return(NULL);
if (!to_integer (b)) {
free_value(a);
free_value(b);
return make_integer(0);
} else {
r = make_integer(0 - b->u.i);
free_value(a);
free_value(b);
return (r);
}
} else if (!to_integer(b)) {
ast_log(LOG_WARNING, "non-numeric argument\n");
free_value(b);
return (a);
}
r = make_integer (/*(quad_t)*/(a->u.i - b->u.i));
if (chk_minus (a->u.i, b->u.i, r->u.i)) {
free_value(a);
free_value(b);
ast_log(LOG_WARNING, "overload\n");
return(NULL);
ast_log(LOG_WARNING, "overflow\n");
}
free_value (a);
free_value (b);
@@ -603,15 +746,12 @@ struct val *a, *b;
free_value(a);
free_value(b);
ast_log(LOG_WARNING, "non-numeric argument\n");
return(NULL);
return(make_integer(0));
}
r = make_integer (/*(quad_t)*/(a->u.i * b->u.i));
if (chk_times (a->u.i, b->u.i, r->u.i)) {
ast_log(LOG_WARNING, "overflow\n");
free_value(a);
free_value(b);
return(NULL);
}
free_value (a);
free_value (b);
@@ -636,26 +776,28 @@ struct val *a, *b;
{
struct val *r;
if (!to_integer (a) || !to_integer (b)) {
if (!to_integer (a)) {
free_value(a);
free_value(b);
ast_log(LOG_WARNING, "non-numeric argument\n");
return(NULL);
return make_integer(0);
} else if (!to_integer (b)) {
free_value(a);
free_value(b);
ast_log(LOG_WARNING, "non-numeric argument\n");
return make_integer(INT_MAX);
}
if (b->u.i == 0) {
ast_log(LOG_WARNING, "division by zero\n");
free_value(a);
free_value(b);
return(NULL);
return make_integer(INT_MAX);
}
r = make_integer (/*(quad_t)*/(a->u.i / b->u.i));
if (chk_div (a->u.i, b->u.i)) {
ast_log(LOG_WARNING, "overflow\n");
free_value(a);
free_value(b);
return(NULL);
}
free_value (a);
free_value (b);
@@ -672,14 +814,13 @@ struct val *a, *b;
ast_log(LOG_WARNING, "non-numeric argument\n");
free_value(a);
free_value(b);
return(NULL);
return make_integer(0);
}
if (b->u.i == 0) {
ast_log(LOG_WARNING, "div by zero\n");
free_value(a);
free_value(b);
return(NULL);
return (b);
}
r = make_integer (/*(quad_t)*/(a->u.i % b->u.i));
@@ -704,12 +845,12 @@ struct val *a, *b;
to_string(b);
/* compile regular expression */
if ((eval = regcomp (&rp, b->u.s, 0)) != 0) {
if ((eval = regcomp (&rp, b->u.s, REG_EXTENDED)) != 0) {
regerror (eval, &rp, errbuf, sizeof(errbuf));
ast_log(LOG_WARNING,"regcomp() error : %s",errbuf);
free_value(a);
free_value(b);
return(NULL);
return make_str("");
}
/* compare string against pattern */

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