Compare commits

..

891 Commits

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.2.25-netsec@212958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-18 20:42:51 +00:00
Russell Bryant
5162e5d425 importing files for 1.2.25-netsec release
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.2.25-netsec@90179 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-29 21:41:32 +00:00
Russell Bryant
c247ee8720 Creating tag for the release of asterisk-1.2.25-netsec
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.2.25-netsec@90178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-29 21:40:33 +00:00
Russell Bryant
ca81e571ae sync with 1.2 branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@90175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-29 21:36:31 +00:00
Automerge script
c357e38925 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@82455 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-14 21:21:56 +00:00
Automerge Script
a97c27fc27 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@78412 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-07 18:44:16 +00:00
Automerge Script
53e28cba18 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@77992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-02 20:11:13 +00:00
Automerge Script
09d0b6be60 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@77937 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-02 16:03:57 +00:00
Automerge Script
220d01134a automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@76982 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-25 00:09:53 +00:00
Automerge Script
611c08e453 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@76957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-24 22:22:33 +00:00
Automerge Script
08e42004f4 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@76850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-24 17:27:41 +00:00
Automerge Script
46cb5961ea automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@76702 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 19:30:11 +00:00
Automerge Script
307d4cea91 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@76609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 15:30:57 +00:00
Automerge Script
6f745b034e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@76456 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-22 22:29:15 +00:00
Automerge Script
8915e3a3af automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@76277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-21 06:32:33 +00:00
Automerge Script
ad320254c8 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@76101 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-20 17:26:48 +00:00
Automerge Script
98e4e37123 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@75976 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-19 16:29:34 +00:00
Automerge Script
51c1456d6b automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@75797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 21:29:47 +00:00
Automerge Script
309f89e5cb automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@75704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 18:32:40 +00:00
Russell Bryant
40ef94cfe6 get branch up to date to include ASA fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@75462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17 21:09:39 +00:00
Automerge Script
6f0882b296 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@75350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-16 21:30:49 +00:00
Automerge Script
0b7104eaa0 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@75303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-16 19:33:26 +00:00
Automerge Script
8872e64252 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@75155 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-13 21:29:00 +00:00
Automerge Script
28c632b1c4 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@75106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-13 20:29:46 +00:00
Automerge Script
3c7d002b0b automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@74863 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-12 16:27:50 +00:00
Automerge Script
6cf12e669e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@74811 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-11 23:27:32 +00:00
Automerge Script
e5bf71bed5 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@74742 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-11 21:24:40 +00:00
Automerge Script
c6fa0ff3f4 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@74702 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-11 19:31:14 +00:00
Automerge Script
14dd3b2f1a automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@74615 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-11 17:31:25 +00:00
Automerge Script
15355af8ac automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@74473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-10 20:30:13 +00:00
Automerge Script
88ef48486e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@74424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-10 19:32:41 +00:00
Russell Bryant
bb95ee53b0 sync with 1.2 branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@74320 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-10 15:45:46 +00:00
Automerge Script
9419406541 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@74312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-10 15:28:47 +00:00
Automerge Script
e3388c0ac3 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@74210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-09 21:28:52 +00:00
Automerge Script
9f83205714 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@73812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-06 23:26:12 +00:00
Automerge Script
ff0b4e97a1 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@73725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-06 16:27:34 +00:00
Automerge Script
badfa8a03e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@73597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-05 23:27:07 +00:00
Automerge Script
6aa25ce9bc automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@73511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-05 20:27:16 +00:00
Automerge Script
bd82c72a14 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@73366 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-05 14:26:28 +00:00
Automerge Script
2e87b185eb automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@73296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-04 15:25:49 +00:00
Automerge Script
471f3c9d00 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@73251 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-04 09:25:30 +00:00
Automerge Script
e50a47efdb automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@73096 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-03 13:26:27 +00:00
Automerge Script
1379057370 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@73051 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-03 12:24:58 +00:00
Automerge Script
09213b43a2 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@72983 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-02 22:28:05 +00:00
Automerge Script
3c25796afa automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@72847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-02 00:29:41 +00:00
Automerge Script
09088bc7cc automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@72662 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-29 17:17:36 +00:00
Automerge Script
38b6686e31 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@72596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-29 14:10:42 +00:00
Automerge Script
15c88aba92 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@72380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 23:25:08 +00:00
Automerge Script
df950e24ee automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@72303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 21:27:00 +00:00
Automerge Script
bd917ea9f4 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@72231 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 19:25:45 +00:00
Automerge Script
ba8c3da0bc automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@72110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 14:10:46 +00:00
Automerge Script
bf645cc37f automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@72098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 10:10:30 +00:00
Automerge Script
d52d223fa4 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@72073 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 08:19:10 +00:00
Automerge Script
ecf72b84c8 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@71875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-26 18:18:19 +00:00
Automerge Script
70c1717a10 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@71795 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-26 13:26:53 +00:00
Automerge Script
c3c2b96ef7 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@71703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-25 19:27:59 +00:00
Automerge Script
3b367afabf automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@71462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-25 01:26:23 +00:00
Automerge Script
c887c5bad7 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@71370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-24 20:09:44 +00:00
Automerge Script
586aa67aff automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@71337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-24 18:26:00 +00:00
Automerge Script
61f0a56fb9 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@71173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-22 16:27:30 +00:00
Automerge Script
8cec922b04 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@71119 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-22 15:27:54 +00:00
Automerge Script
891600bfdf automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@70998 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-21 23:25:50 +00:00
Automerge Script
0efd501d6b automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@70946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-21 22:25:55 +00:00
Automerge Script
3519216fb1 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@70805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-21 19:13:44 +00:00
Automerge Script
f64c485a1c automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@70675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-21 13:12:43 +00:00
Automerge Script
4a623ce514 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@70609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20 23:26:55 +00:00
Automerge Script
a65fcc6950 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@70492 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20 20:26:16 +00:00
Automerge Script
d391cd13e9 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@70443 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20 19:25:30 +00:00
Automerge Script
8cd0f0afe1 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@70353 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20 16:10:16 +00:00
Automerge Script
632070eda1 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@70340 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20 15:18:19 +00:00
Automerge Script
aae179ee5f automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@70061 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-19 18:12:44 +00:00
Automerge Script
dd4f8ab9bd automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@70043 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-19 17:29:28 +00:00
Automerge Script
abe5474fae automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@69941 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-19 14:25:35 +00:00
Automerge Script
a06cd4d098 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@69893 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-19 13:25:59 +00:00
Automerge Script
4cd913f575 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@69793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-18 18:27:36 +00:00
Automerge Script
d36f734cca automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@69515 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-15 00:25:07 +00:00
Automerge Script
91a9884b7a automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@69391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14 21:30:45 +00:00
Automerge Script
db56721c38 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@69307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14 16:34:48 +00:00
Automerge Script
42e9e81c21 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@69180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-13 19:28:07 +00:00
Automerge Script
e956a271f4 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@69065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-13 10:10:30 +00:00
Automerge Script
d839836db9 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@68969 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-12 15:27:09 +00:00
Automerge Script
b9eb88b5f1 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@68899 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-12 09:10:08 +00:00
Automerge Script
eec5ae4566 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@68886 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-12 08:10:38 +00:00
Automerge Script
ec4df45550 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@68773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-11 17:23:01 +00:00
Automerge Script
b1e34e49e1 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@68731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-11 15:25:48 +00:00
Automerge Script
ebfa098f5e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@68643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-11 10:10:21 +00:00
Automerge Script
a7efc714a3 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@68574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-08 23:25:52 +00:00
Automerge Script
513c40ddc1 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@68419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-08 00:25:46 +00:00
Automerge Script
1f30a0a0f2 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@68367 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-07 23:20:58 +00:00
Automerge Script
3fb70a640c automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@68252 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-07 20:26:12 +00:00
Automerge Script
d5fd3ada2e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@68117 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-07 15:25:21 +00:00
Automerge Script
39f997c3b6 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@67969 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-07 00:26:56 +00:00
Automerge Script
4a5df3824d automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@67769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06 17:27:55 +00:00
Automerge Script
56944e5dfc automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@67696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06 14:25:31 +00:00
Automerge Script
d3a4f7091a automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@67648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06 13:26:20 +00:00
Automerge Script
8e9529a8ac automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@67358 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-05 16:25:27 +00:00
Automerge Script
4797a33efc automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@67269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-05 12:17:36 +00:00
Automerge Script
6e2816fbea automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@67238 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-05 11:17:13 +00:00
Automerge Script
7699bb25d7 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@67208 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-05 00:24:22 +00:00
Automerge Script
8120d0bb68 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@67118 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-04 22:28:38 +00:00
Automerge Script
5645d79958 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@66767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-31 16:14:18 +00:00
Automerge Script
4e357e2d87 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@66584 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-29 22:24:55 +00:00
Automerge Script
114c74d647 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@66362 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-29 08:10:24 +00:00
Automerge Script
67ae4be5de automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@66156 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-25 14:16:47 +00:00
Automerge Script
f008f7914d automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@65900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-24 15:24:07 +00:00
Automerge Script
f370c578e7 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@65813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-24 10:23:53 +00:00
Automerge Script
43d3d20de0 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@65730 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-23 21:23:10 +00:00
Automerge Script
ded0401bdf automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@65636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-23 14:22:34 +00:00
Automerge Script
7aa91a5a20 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@65393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-22 13:09:03 +00:00
Automerge Script
3588aa6808 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@65341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-22 08:08:59 +00:00
Automerge Script
e94c895d68 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@65199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-18 21:14:50 +00:00
Automerge Script
30a1360663 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@65167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-18 19:21:46 +00:00
Automerge Script
133c75b2c7 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@65120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-18 16:24:42 +00:00
Automerge Script
b44549660f automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@65038 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-18 12:19:14 +00:00
Automerge Script
e6e9e6d65a automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@64950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-18 09:24:59 +00:00
Automerge Script
244d4723de automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@64867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-17 22:22:24 +00:00
Automerge Script
468bc9d600 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@64807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-17 17:23:29 +00:00
Automerge Script
05330a8979 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@64648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-16 11:21:30 +00:00
Automerge Script
cc9be2b488 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@64562 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-16 09:22:26 +00:00
Automerge Script
7198591adf automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@64321 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-14 19:20:38 +00:00
Automerge Script
5f242f10f3 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@63945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-11 17:19:05 +00:00
Automerge Script
9898fcd5b8 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@63836 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-10 23:19:20 +00:00
Automerge Script
97762cc682 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@63791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-10 21:28:39 +00:00
Automerge Script
7afe67bd95 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@63696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-09 18:18:21 +00:00
Automerge Script
ce63f274ae automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@63652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-09 17:18:48 +00:00
Automerge Script
af42b7d2ed automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@63607 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-09 15:17:30 +00:00
Automerge Script
e2b988cb13 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@63531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-09 12:05:41 +00:00
Automerge Script
ff4fd44751 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@63518 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-08 23:17:50 +00:00
Automerge Script
e567c36080 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@63444 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-08 16:19:14 +00:00
Automerge Script
5518268ad7 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@63399 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-08 07:17:28 +00:00
Automerge Script
948f8837ce automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@63328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-07 22:18:20 +00:00
Automerge Script
34a23ed281 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@63223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-07 15:12:42 +00:00
Automerge Script
328f25d8df automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@63029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-03 17:17:45 +00:00
Automerge Script
790e031070 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@62985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-03 16:17:41 +00:00
Automerge Script
cf88fd1109 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@62910 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-03 14:11:27 +00:00
Automerge Script
c45d0c0b54 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@62882 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-03 01:17:11 +00:00
Automerge Script
2b4aac55ff automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@62840 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-03 00:18:05 +00:00
Automerge Script
6d9fe8c8a5 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@62782 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-02 21:18:33 +00:00
Automerge Script
fa0aba61e8 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@62733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-02 18:18:44 +00:00
Automerge Script
da66cc3c63 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@62592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-01 22:18:10 +00:00
Automerge Script
76291fdcfe automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@62538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-01 17:18:36 +00:00
Automerge Script
9d01c89d54 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@62461 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-30 16:18:42 +00:00
Automerge Script
99c9f6c477 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@62413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-30 15:18:32 +00:00
Automerge Script
aef2e33196 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@62216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-27 17:18:32 +00:00
Automerge Script
7a793c9201 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@62139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-27 14:05:20 +00:00
Automerge Script
0ce8de0404 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@62081 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-26 17:21:20 +00:00
Automerge Script
57f9282134 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@62004 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-26 02:17:37 +00:00
Automerge Script
c1c3b2d9f2 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@61957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-26 00:18:36 +00:00
Automerge Script
09bf2e006f automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@61912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-25 22:18:28 +00:00
Automerge Script
969e276b1e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@61861 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-25 20:26:05 +00:00
Automerge Script
a66029756b automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@61752 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-21 14:23:55 +00:00
Automerge Script
0c81d2e046 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@61521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-11 16:56:45 +00:00
Automerge Script
9c2c0004a8 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@61475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-11 15:56:57 +00:00
Automerge Script
242a90d01f automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@61425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-11 14:58:05 +00:00
Automerge Script
b850893d6c automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@61371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-11 12:40:12 +00:00
Automerge Script
31a1692162 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@61182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-10 12:38:39 +00:00
Automerge Script
0401150187 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@61069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-09 19:52:12 +00:00
Automerge Script
e278c92503 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@60983 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-09 17:54:55 +00:00
Automerge Script
d691fa4d17 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@60897 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-09 03:54:41 +00:00
Automerge Script
d5b4a6c3c0 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@60845 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-09 01:54:24 +00:00
Automerge Script
2f76122f9a automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@60761 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-08 14:54:53 +00:00
Automerge Script
6e2e94e498 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@60708 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-08 02:56:53 +00:00
Automerge Script
dc14a89f78 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@60483 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-06 17:44:10 +00:00
Automerge Script
3dbf6e09a7 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@60447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-06 15:54:39 +00:00
Automerge Script
bf5b3a7fca automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@60318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-05 16:53:46 +00:00
Automerge Script
4f9d0e28e4 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@60261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-05 13:54:18 +00:00
Automerge Script
aca1adfe03 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@60166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-04 17:53:11 +00:00
Automerge Script
6e8d96fcd1 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@60117 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-04 16:51:41 +00:00
Automerge Script
e70e937cb1 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@60062 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-03 23:52:51 +00:00
Automerge Script
7a1390a0c6 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@59989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-03 19:53:08 +00:00
Automerge Script
624988bd1e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@59935 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-03 18:53:24 +00:00
Automerge Script
e668aad746 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@59850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-03 11:52:19 +00:00
Automerge Script
48e2d876ff automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@59802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-03 10:38:41 +00:00
Automerge Script
5901452ecb automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@59771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-02 19:53:36 +00:00
Automerge Script
5b029cfcb6 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@59653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-02 12:38:35 +00:00
Automerge Script
faa652eeb4 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@59638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-02 07:38:38 +00:00
Automerge Script
e421382a07 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@59622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-01 23:39:01 +00:00
Automerge Script
f309e69638 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@59413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-29 18:54:38 +00:00
Automerge Script
c23816ba19 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@59354 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-29 17:04:00 +00:00
Automerge Script
58500a4c7f automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@59137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-21 21:56:42 +00:00
Automerge Script
28d60b864c automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@59007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-16 16:22:58 +00:00
Automerge Script
70c96b9bc6 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@58603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-09 20:59:16 +00:00
Automerge Script
f525f6de36 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@58571 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-09 14:55:56 +00:00
Automerge Script
902b16bdda automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@58432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-08 17:06:27 +00:00
Automerge Script
3951e4addf automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@58284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-07 19:05:38 +00:00
Automerge Script
c52232f4f4 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@58207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-07 01:05:32 +00:00
Automerge Script
be2a021189 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@58118 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-06 22:54:26 +00:00
Automerge Script
39605fc510 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@58095 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-06 21:05:51 +00:00
Automerge Script
c590b397ea automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@58022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-06 15:54:14 +00:00
Automerge Script
b7f5c1ddf4 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@57976 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-05 23:54:12 +00:00
Automerge Script
b38e464dd3 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@57913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-05 19:05:34 +00:00
Automerge Script
97942ba44c automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@57867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-05 16:07:47 +00:00
Automerge Script
2673fcd2d2 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@57767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-04 10:54:07 +00:00
Automerge Script
224316634a automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@57690 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-03 07:05:14 +00:00
Automerge Script
a85da9ebec automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@57552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-02 19:00:51 +00:00
Automerge Script
44ebb34bee automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@57522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-02 18:06:59 +00:00
Automerge Script
4423ae672e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@57472 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-02 16:54:02 +00:00
Automerge Script
c3a5b0d8e1 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@57362 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-01 23:07:54 +00:00
Automerge Script
3f98583e26 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@57138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-28 19:22:31 +00:00
Automerge Script
df5009b564 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@57048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-28 17:11:28 +00:00
Automerge Script
e16cd7369d automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@56883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-26 20:21:25 +00:00
Automerge Script
3b6d2f2633 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@56777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-26 01:20:36 +00:00
Automerge Script
c31b4a6a2e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@56728 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-25 15:21:12 +00:00
Automerge Script
518d9c6dd1 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@56547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-24 00:20:55 +00:00
Automerge Script
131fcf61e6 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@56455 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-23 21:26:04 +00:00
Automerge Script
2954de75bb automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@56322 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-23 00:21:13 +00:00
Automerge Script
33ec4fecf5 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@56275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-22 19:21:50 +00:00
Automerge Script
870af81ca1 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@56054 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-22 01:23:41 +00:00
Automerge Script
17679c25cf automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@56003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-21 21:22:51 +00:00
Automerge Script
96300341b9 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@55913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-21 15:21:36 +00:00
Automerge Script
229aed7457 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@55796 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-21 01:21:39 +00:00
Automerge Script
48b43e1a92 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@55715 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-20 23:21:22 +00:00
Automerge Script
dc1836f854 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@55633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-20 20:22:54 +00:00
Automerge Script
b507853850 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@55478 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-19 19:22:08 +00:00
Automerge Script
a7bd9aec9c automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@55322 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-18 13:20:26 +00:00
Automerge Script
7c6c6a0d7b automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@55273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-18 11:12:51 +00:00
Automerge Script
23c17817ae automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@55196 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-17 04:19:41 +00:00
Automerge Script
57122c46c5 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@55085 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-17 01:15:23 +00:00
Automerge Script
b7765f3783 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@55049 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-16 23:21:15 +00:00
Automerge Script
c1063541e5 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@55001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-16 22:14:32 +00:00
Automerge Script
be9e3c0778 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@54968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-16 21:07:50 +00:00
Automerge Script
93d501e3b3 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@54821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-16 12:21:47 +00:00
Automerge Script
d55ae8cc0e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@54671 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-15 17:21:50 +00:00
Automerge Script
6bfe3a4244 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@54463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-14 19:12:21 +00:00
Automerge Script
a88490a68c automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@54422 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-14 17:23:39 +00:00
Automerge Script
155aee0b84 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@54203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-13 19:37:42 +00:00
Kevin P. Fleming
dd0edc0f9c merge up to branch 1.2 and re-enable automerge
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@53671 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-08 22:48:47 +00:00
Automerge Script
03161d7a82 automerge cancel
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@53199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-05 21:53:01 +00:00
Automerge Script
e9b9632fef automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@52995 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-30 20:13:10 +00:00
Automerge Script
1308ebf409 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@52949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-30 18:14:52 +00:00
Automerge Script
20b69b892a automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@52902 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-30 16:13:24 +00:00
Automerge Script
f29eee96ec automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@52855 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-30 14:59:43 +00:00
Automerge Script
ff730c46b0 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@52806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-30 01:13:13 +00:00
Automerge Script
33228042e7 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@52761 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-30 00:13:10 +00:00
Automerge Script
c58c4e83a2 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@52521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-29 17:02:13 +00:00
Automerge Script
2911d1ab26 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@52459 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-27 03:17:51 +00:00
Automerge Script
263d1100fd automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@52369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-27 00:07:40 +00:00
Automerge Script
fb41b21e01 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@52307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-25 20:17:14 +00:00
Automerge Script
29a132d611 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@52202 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-25 02:15:23 +00:00
Automerge Script
1c9163443a automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@52157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-25 01:04:30 +00:00
Automerge Script
3f1a198f45 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@52048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-24 18:19:06 +00:00
Automerge Script
ff2ae14a9b automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@51978 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-24 11:00:29 +00:00
Automerge Script
260eccbb03 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@51880 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-24 01:19:59 +00:00
Automerge Script
a94d625209 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@51557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-23 02:12:58 +00:00
Automerge Script
5030563084 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@51455 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-22 20:27:07 +00:00
Automerge Script
a4e9dffea0 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@51403 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-22 17:22:37 +00:00
Automerge Script
ab1111631a automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@51118 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-16 06:09:57 +00:00
Automerge Script
80da8dcaac automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@51029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-16 00:11:13 +00:00
Automerge Script
a552b8298c automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@50956 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-15 21:00:41 +00:00
Automerge Script
f80eaea4ee automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@50819 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-14 06:13:36 +00:00
Automerge Script
075c32cbb9 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@50599 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-12 15:18:07 +00:00
Automerge Script
a05d42a3ef automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@50529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-11 19:00:39 +00:00
Automerge Script
0517ed834e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@50516 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-11 14:59:58 +00:00
Automerge Script
fa061fa339 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@50505 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-11 14:00:15 +00:00
Automerge Script
a20330b393 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@50345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-10 10:02:43 +00:00
Automerge Script
b8612623a2 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@50330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-10 05:10:20 +00:00
Automerge Script
28de5dbaa9 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@50265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-10 03:10:55 +00:00
Automerge Script
97f57029d5 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@50185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-09 14:09:37 +00:00
Automerge Script
272ff651de automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@49944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-08 09:04:16 +00:00
Automerge Script
325d362076 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@49921 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-08 06:08:16 +00:00
Automerge Script
ac96ab8b01 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@49865 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-07 22:09:13 +00:00
Automerge Script
f7e49a14fd automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@49667 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-05 18:09:06 +00:00
Automerge Script
b99c6b0329 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@49456 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-04 17:58:59 +00:00
Automerge Script
8672b596af automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@49446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-04 17:09:25 +00:00
Automerge Script
e42fdeeea1 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@49387 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-04 00:09:00 +00:00
Automerge Script
84041c2b8b automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@49312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-03 08:58:33 +00:00
Automerge Script
9dbe6ac46e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@49144 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-02 10:59:16 +00:00
Automerge Script
6459d34ade automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@49131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-02 01:15:10 +00:00
Automerge Script
8866f912c1 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@48812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-21 21:14:02 +00:00
Automerge Script
8e36da5699 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@48657 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-20 20:11:07 +00:00
Kevin P. Fleming
32ef26d652 manual update
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@48469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-14 13:18:15 +00:00
Kevin P. Fleming
05f6188c69 manual update, since automerge is not running at this time
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@48421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-12 22:58:49 +00:00
Automerge script
3bb733a7c7 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@46990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 18:05:19 +00:00
Automerge script
74c70148ac automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@46927 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 16:03:21 +00:00
Automerge script
e993f73211 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@46882 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 14:01:53 +00:00
Automerge script
ace0f74f27 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@46844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-01 22:01:12 +00:00
Automerge script
30448e4bac automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@46821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-01 20:03:05 +00:00
Automerge script
e41860927e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@46800 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-01 19:03:30 +00:00
Automerge script
830d07c933 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@46680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 16:02:51 +00:00
Automerge script
9a6cfc6866 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@46627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 10:21:42 +00:00
Automerge script
026b3a3fc7 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@46602 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 09:04:28 +00:00
Automerge script
088684b275 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@46581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 07:03:05 +00:00
Automerge script
4a00839358 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@46456 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-30 17:05:38 +00:00
Automerge script
5c99f456a9 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@46427 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-30 15:03:50 +00:00
Automerge script
cc1353522f automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@46274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-25 20:02:43 +00:00
Automerge script
5d49b657f6 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@46232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-25 16:02:50 +00:00
Automerge script
bea7528f5e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@46182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-25 09:02:09 +00:00
Automerge script
d7a7695b91 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@45944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-23 01:04:59 +00:00
Automerge script
ab1188c1f2 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@45814 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-21 13:01:41 +00:00
Automerge script
2a0b7672d2 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@45711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-19 18:02:35 +00:00
Automerge script
6c4758530a automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@45397 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 21:02:28 +00:00
Automerge script
83852bc8c1 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@45350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 18:02:33 +00:00
Automerge script
225c4931fa automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@45312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 16:01:39 +00:00
Automerge script
e3a3e8377d automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@45279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-16 20:04:13 +00:00
Automerge script
1a0892dbeb automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@45139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-14 01:00:59 +00:00
Automerge script
2489f46365 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@45124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-13 23:01:13 +00:00
Automerge script
dfafe2f958 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@45102 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-13 20:02:02 +00:00
Automerge script
0485f6b149 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@45065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-13 17:02:15 +00:00
Automerge script
2097c7e87d automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@45046 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-13 16:02:27 +00:00
Automerge script
eacb11ad56 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@45025 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-13 14:01:03 +00:00
Automerge script
d70d558bef automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@44999 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-13 08:02:20 +00:00
Automerge script
bf9aaf7beb automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@44970 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-12 19:02:56 +00:00
Automerge script
2c9a7acf54 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@44804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-10 16:03:06 +00:00
Automerge script
3dfd319062 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@44594 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-06 17:02:27 +00:00
Automerge script
d2cbfe3d21 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@44515 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-05 20:02:26 +00:00
Automerge script
b45cbc48f2 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@44464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-05 11:00:47 +00:00
Automerge script
213c6afa9b automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@44449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-05 02:02:12 +00:00
Automerge script
50841b3a96 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@44406 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-04 22:02:08 +00:00
Automerge script
029b67fd32 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@44351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-04 16:05:59 +00:00
Automerge script
41c63cf7f5 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@44311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-03 21:02:12 +00:00
Automerge script
e1fbeb0c7f automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@44230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-02 21:02:14 +00:00
Automerge script
e609b4070c automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@44212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-02 20:02:11 +00:00
Automerge script
1db6355b21 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@44184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-02 18:01:57 +00:00
Automerge script
b628bed1c3 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@44165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-02 17:05:27 +00:00
Automerge script
d81ec738b2 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@44124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-01 16:01:57 +00:00
Automerge script
b2d3f68e87 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@43991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-29 14:01:57 +00:00
Automerge script
ae1a27ae61 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@43931 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-28 18:01:52 +00:00
Automerge script
93efe68235 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@43911 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-28 17:01:35 +00:00
Automerge script
3da0f0e59d automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@43887 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-28 16:01:36 +00:00
Automerge script
2b76e9e216 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@43826 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-27 21:01:34 +00:00
Automerge script
854e0369df automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@43813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-27 20:01:41 +00:00
Automerge script
97834bbed9 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@43791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-27 17:02:12 +00:00
Automerge script
7502860910 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@43773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-27 13:01:41 +00:00
Automerge script
4c6fb3dd37 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@43720 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-26 21:01:50 +00:00
Automerge script
1de86fd7fc automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@43639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-25 22:00:50 +00:00
Automerge script
d4026a11b1 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@43563 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-24 14:01:51 +00:00
Automerge script
c5056e1736 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@43516 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-22 22:01:20 +00:00
Automerge script
bb63a367e3 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@43421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21 17:01:53 +00:00
Automerge script
24279ed40d automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@43321 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 06:01:11 +00:00
Automerge script
e2354a5244 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@43280 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 17:01:01 +00:00
Automerge script
9ae33412c5 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@43255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 13:01:18 +00:00
Automerge script
daeb228bb3 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@43229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 21:00:57 +00:00
Automerge script
8911aced89 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@43181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 16:02:39 +00:00
Automerge script
1e4fd6f9b5 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@43087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-17 14:02:31 +00:00
Automerge script
60b84e7a31 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@43023 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-16 08:01:02 +00:00
Automerge script
0d4e8df3d6 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@43007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-16 05:00:50 +00:00
Automerge script
0eb84ea1b0 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@42963 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-14 23:03:37 +00:00
Automerge script
3f4ef02de2 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@42909 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-13 20:02:40 +00:00
Automerge script
cb1e08addc automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@42787 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 22:00:50 +00:00
Automerge script
e1f5e8e583 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@42736 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 17:02:51 +00:00
Automerge script
a270e65e11 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@42714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 15:02:39 +00:00
Automerge script
b2b2ea5901 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@42620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-09 21:02:51 +00:00
Automerge script
558c7ade17 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@42554 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-09 13:03:03 +00:00
Automerge script
380d8d80ba automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@42470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-08 19:02:43 +00:00
Automerge script
1134ad9412 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@42440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-08 17:03:06 +00:00
Automerge script
0b7de19b00 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@42419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-08 05:02:32 +00:00
Automerge script
6f41dcb8a3 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@42372 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-08 00:02:42 +00:00
Automerge script
67f0bd0d79 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@42282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-07 17:03:13 +00:00
Automerge script
fe6193c75b automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@42207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-07 03:00:58 +00:00
Automerge script
8bb17660d7 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@42169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-06 21:03:10 +00:00
Automerge script
cfb503c6a7 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@42147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-06 19:02:18 +00:00
Automerge script
a4beaa7dc7 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@42132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-06 18:03:25 +00:00
Automerge script
942974c8df automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@42107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-06 16:06:48 +00:00
Joshua Colp
6480d28862 Merged revisions 41768,41827,41830,41880,41882,41989,42014,42054 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r41768 | file | 2006-09-01 18:49:07 -0400 (Fri, 01 Sep 2006) | 2 lines

Only wipe the redirected audio & video IP/port if it's specified, and trigger a reinvite.

........
r41827 | bweschke | 2006-09-03 10:16:08 -0400 (Sun, 03 Sep 2006) | 3 lines

 Setting a retry of 0 is generally not a good idea and shouldn't be allowed. (#7574 - reported by regin)


........
r41830 | bweschke | 2006-09-03 10:50:59 -0400 (Sun, 03 Sep 2006) | 3 lines

 Let's NOT spy on Zap/psuedo channels, mmmmmmmmk? 


........
r41880 | bweschke | 2006-09-03 13:13:38 -0400 (Sun, 03 Sep 2006) | 3 lines

 Don't keep trying the same member in certain strategies when members of the queue are unavailable (#7278 - diLLec reported and patched) - This should have been patched here first and then merged into /trunk. My bad!


........
r41882 | bweschke | 2006-09-03 13:38:22 -0400 (Sun, 03 Sep 2006) | 3 lines

 Make sure the forwarded channel inherits variables appropriately when we receive a call forward in the queue. (#7867 - raarts reported and patched)


........
r41989 | oej | 2006-09-04 11:46:07 -0400 (Mon, 04 Sep 2006) | 2 lines

Don't kill the pvt before we have sent ACK on CANCEL (needs more testing before making a release)

........
r42014 | qwell | 2006-09-05 12:27:46 -0400 (Tue, 05 Sep 2006) | 4 lines

Small typo in zapata.conf.sample

Reported by ppyy in 7881

........
r42054 | file | 2006-09-05 16:02:48 -0400 (Tue, 05 Sep 2006) | 2 lines

Merge in last round of spy fixes. This should hopefully eliminate all the issues people have been seeing by distinctly separating what each component (core/spy) is responsible for. Core is responsible for adding a spy to a channel, feeding frames to the spy, removing the spy from a channel, and telling the spy to stop. Spy is responsible for reading frames in, and cleaning up after itself.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@42081 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-05 23:48:48 +00:00
Automerge script
e9cce1551a automerge cancel
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@41787 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-01 23:03:07 +00:00
Automerge script
aee92d097a automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@41734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-01 18:02:51 +00:00
Automerge script
ecfce7b643 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@41714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-01 17:03:18 +00:00
Automerge script
aada1f902b automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@41432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 19:03:07 +00:00
Automerge script
008cf36d00 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@41410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 18:03:00 +00:00
Automerge script
5d95ba629c automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@41356 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 15:03:12 +00:00
Automerge script
37f7d1e3f0 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@41301 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 00:03:06 +00:00
Automerge script
d4b10c9036 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@41266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-29 06:00:50 +00:00
Automerge script
a37739a0d9 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@41258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-28 21:02:56 +00:00
Automerge script
53a30e84eb automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@41085 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-25 16:02:33 +00:00
Automerge script
a8350ac22f automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@41003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-24 20:01:23 +00:00
Automerge script
26eba15ec8 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@40987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-24 18:01:06 +00:00
Automerge script
38990b3d2c automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@40978 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-24 17:01:04 +00:00
Automerge script
c05bc793fe automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@40920 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-23 17:06:32 +00:00
Automerge script
65d8d50962 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@40825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-22 03:00:53 +00:00
Automerge script
e51b44628a automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@40806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 23:01:24 +00:00
Automerge script
672df19a39 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@40720 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-20 23:04:09 +00:00
Automerge script
d8220c853c automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@40629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-20 05:04:37 +00:00
Automerge script
38504cba52 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@40451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-19 01:04:07 +00:00
Automerge script
c45aa02c13 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@40423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-18 20:04:23 +00:00
Automerge script
3e1daa8f94 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@40332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 22:04:22 +00:00
Automerge script
1e38d97c40 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@40253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 17:04:18 +00:00
Automerge script
e6906d738b automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@40083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-16 19:04:10 +00:00
Automerge script
8c1e784711 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@39962 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-15 23:04:36 +00:00
Automerge script
02e6c4f9f3 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@39397 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-08 19:02:51 +00:00
Automerge script
e7e8d3d4a2 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@39377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-08 18:03:57 +00:00
Automerge script
e4c08a03c8 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@39104 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07 02:03:39 +00:00
Automerge script
3cafe77949 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@39080 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07 01:03:45 +00:00
Automerge script
76f5300793 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@38995 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-05 09:03:31 +00:00
Automerge script
d5061be770 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@38971 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-05 08:04:05 +00:00
Automerge script
e91c55a99d automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@38949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-05 07:03:24 +00:00
Automerge script
ee2918d783 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@38927 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-05 06:04:09 +00:00
Automerge script
06352345c1 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@38849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-03 20:03:36 +00:00
Automerge script
03a63f510a automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@38784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-03 06:03:31 +00:00
Automerge script
809a32c851 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@38754 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-02 20:04:16 +00:00
Automerge script
561838ab6a automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@38709 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-02 00:03:25 +00:00
Automerge script
c535882053 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@38675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-01 20:03:13 +00:00
Automerge script
1f18490cdd automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@38631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-31 22:03:05 +00:00
Automerge script
3a4688c5ba automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@38605 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-31 18:03:36 +00:00
Automerge script
6088318e55 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@38568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-31 05:02:43 +00:00
Automerge script
0e601bac9b automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@38520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-30 00:02:52 +00:00
Automerge script
ac9938f84a automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@38438 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-28 19:02:55 +00:00
Automerge script
e076d9d41f automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@38388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27 23:02:39 +00:00
Automerge script
109237c04f automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@38364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27 16:02:48 +00:00
Automerge script
4dc5c42b30 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@38346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27 05:02:49 +00:00
Automerge script
0375e58b2f automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@38327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27 03:02:35 +00:00
Automerge script
f8bb8d5eab automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@38307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27 02:03:01 +00:00
Automerge script
7211dd853e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@38249 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-26 16:03:00 +00:00
Automerge script
6342e0c54a automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@38215 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-25 20:02:30 +00:00
Automerge script
38b6e7dd94 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@38185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-24 18:02:36 +00:00
Automerge script
ebdb3d95b2 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@37972 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 18:03:16 +00:00
Automerge script
2d035ab9a4 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@37875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-18 01:02:23 +00:00
Automerge script
861ecb091a automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@37851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-18 00:02:33 +00:00
Automerge script
7d70ecfe81 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@37826 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-17 23:02:47 +00:00
Automerge script
95e2fd1571 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@37783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-17 16:02:46 +00:00
Automerge script
0b482e3f1c automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@37714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-16 00:02:36 +00:00
Automerge script
0aaae9f118 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@37628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-14 14:02:33 +00:00
Automerge script
a2be0f0c4a automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@37585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13 22:02:15 +00:00
Automerge script
25ba50fb8f automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@37560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13 19:02:05 +00:00
Automerge script
4469bcc1a2 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@37545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13 17:02:17 +00:00
Automerge script
13c52205fb automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@37530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13 16:02:53 +00:00
Automerge script
51c1fc4c90 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@37472 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 19:02:06 +00:00
Automerge script
afb25c2c40 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@37455 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 16:02:19 +00:00
Automerge script
94755549d7 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@37432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 14:02:32 +00:00
Automerge script
fac0ba002f automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@37416 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 04:02:08 +00:00
Automerge script
9fe475f0df automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@37395 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-11 20:02:43 +00:00
Automerge script
36f56a5e9e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@37375 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-10 22:02:08 +00:00
Automerge script
424b3fd4eb automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@37317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-08 00:01:47 +00:00
Automerge script
a07938ea7e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@37253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06 22:04:42 +00:00
Automerge script
da8d720b2a automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@37221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06 21:01:31 +00:00
Automerge script
2fb94832b5 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@37200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06 16:04:31 +00:00
Automerge script
e11ef6ebe9 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@37170 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06 14:04:30 +00:00
Automerge script
aa3c2d5acb automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@37026 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-05 16:04:30 +00:00
Automerge script
c6e79104a3 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@36939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-04 15:04:52 +00:00
Automerge script
0fb5b6dcf2 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@36863 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03 16:04:11 +00:00
Automerge script
b051dd6899 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@36776 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03 06:03:44 +00:00
Automerge script
fd757fcf51 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@36750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03 05:04:12 +00:00
Automerge script
ec42b4f2b1 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@36724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03 04:04:11 +00:00
Automerge script
77d5bacce8 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@36405 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-30 15:04:39 +00:00
Automerge script
603eaab120 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@36297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-29 20:01:30 +00:00
Automerge script
402cef20d8 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@36283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-29 08:04:58 +00:00
Automerge script
d7b1425124 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@36225 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-28 20:05:10 +00:00
Automerge script
47b80cf742 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@36108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-26 18:04:18 +00:00
Automerge script
6f9b26b7e3 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@36050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-26 16:01:40 +00:00
Automerge script
5a25b96143 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@35942 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-25 16:04:25 +00:00
Automerge script
031b53f451 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@35695 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-23 12:04:14 +00:00
Automerge script
12ebb1d7b4 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@35364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-21 20:04:35 +00:00
Automerge script
59a4279fb5 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@35158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-20 16:05:25 +00:00
Automerge script
e1583210e7 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@35092 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-20 11:05:33 +00:00
Automerge script
1386fb291b automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@34950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-19 21:05:53 +00:00
Automerge script
d9cfa818c4 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@34909 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-19 19:04:53 +00:00
Automerge script
0af302cf60 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@34661 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-18 21:04:55 +00:00
Automerge script
5b7b71ebc9 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@34432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-16 04:07:04 +00:00
Automerge script
c6323087fc automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@34336 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-15 15:04:55 +00:00
Automerge script
a98f0bf56d automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@34304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-15 14:04:55 +00:00
Automerge script
36fbb43884 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@34273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-15 13:05:40 +00:00
Automerge script
4d1ed8bde0 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@34192 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-14 23:11:07 +00:00
Automerge script
05c3bd0de5 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@34125 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-14 15:06:38 +00:00
Automerge script
36cacf788f automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@34021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-14 03:04:51 +00:00
Automerge script
641ab6d1bc automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@33868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-13 14:03:54 +00:00
Automerge script
c364c5efdd automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@33840 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-13 13:04:08 +00:00
Automerge script
279b842888 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@33812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-13 05:04:22 +00:00
Automerge script
e7648cca42 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@33780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-13 04:03:56 +00:00
Automerge script
449c9c191f automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@33750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12 22:04:00 +00:00
Automerge script
bfae89ea9e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@33723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12 21:04:26 +00:00
Automerge script
20fe40f872 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@33642 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12 16:04:02 +00:00
Automerge script
8aa9a0e17f automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@33575 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 22:04:09 +00:00
Automerge script
9de1f31bbc automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@33544 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 21:04:25 +00:00
Automerge script
fae968612e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@33509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 16:04:09 +00:00
Automerge script
d21d275cc3 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@33478 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 15:04:26 +00:00
Automerge script
62866c9fda automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@33327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 19:04:18 +00:00
Automerge script
f6a39fbcc2 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@33292 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 17:04:09 +00:00
Automerge script
e7e0030d6b automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@33262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 16:04:26 +00:00
Automerge script
6fcb0a1a43 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@33062 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08 17:04:02 +00:00
Automerge script
ec8919adcf automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@32844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 18:04:56 +00:00
Automerge script
cbf462c3c7 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@32632 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 17:05:29 +00:00
Automerge script
e89976c879 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@32595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 16:05:13 +00:00
Automerge script
bc79efe36f automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@32400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-05 20:04:59 +00:00
Automerge script
b54594651c automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@31951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 04:05:13 +00:00
Automerge script
e655848772 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@31807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 18:05:16 +00:00
Automerge script
0de3815b2a automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@31769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 15:05:26 +00:00
Automerge script
214df108f8 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@31585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 22:05:50 +00:00
Automerge script
e5d6dfc0b9 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@31551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 21:05:20 +00:00
Automerge script
6b24a23364 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@31352 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 13:05:15 +00:00
Automerge script
fc18e3a448 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@31224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 00:05:30 +00:00
Automerge script
c7a667391b automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@31192 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 23:05:21 +00:00
Automerge script
98b7b027be automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@31157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 21:05:23 +00:00
Automerge script
9b23589112 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@30905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-30 20:05:55 +00:00
Automerge script
99cf427def automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@30834 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-30 17:05:14 +00:00
Automerge script
f16891f03f automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@30799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-30 15:07:02 +00:00
Automerge script
b2fb09bd73 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@30577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-26 18:06:03 +00:00
Automerge script
b752fe2fb0 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@30462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 22:05:58 +00:00
Automerge script
ad5a410b70 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@30385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 20:05:54 +00:00
Automerge script
bc94429e8c automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@30358 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 19:05:14 +00:00
Automerge script
4f6e1f4878 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@30327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 18:05:26 +00:00
Automerge script
a5cfea7f28 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@30270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 16:05:31 +00:00
Automerge script
aa4d7f8df9 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@30127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 22:04:41 +00:00
Automerge script
b5b89d732c automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@30097 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 21:05:13 +00:00
Automerge script
a71ff914c6 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@30067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 20:05:12 +00:00
Automerge script
b30db14404 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@30001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 17:05:22 +00:00
Automerge script
0d1e7be6ea automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@29966 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 13:01:36 +00:00
Automerge script
4bcedb93cc automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@29934 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 04:05:45 +00:00
Automerge script
0a4881b51f automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@29877 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 22:05:06 +00:00
Automerge script
c96816d287 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@29798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 19:05:12 +00:00
Automerge script
ca89b4e76c automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@29762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 18:05:13 +00:00
Automerge script
cfd6e75c53 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@29702 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 16:01:16 +00:00
Automerge script
ebfd515ca7 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@29591 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 22:06:43 +00:00
Automerge script
db4f8886bd automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@29551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 21:05:40 +00:00
Automerge script
1683b50452 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@29502 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 17:06:30 +00:00
Automerge script
49be813673 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@29433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 15:06:09 +00:00
Automerge script
bb59b231d3 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@29233 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-21 16:06:29 +00:00
Automerge script
c8d73b95a0 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@29092 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-20 20:07:15 +00:00
Automerge script
dac92a6182 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@29006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-20 03:06:40 +00:00
Automerge script
142165cb92 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@28933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-20 01:07:21 +00:00
Automerge script
3e6f1fe864 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@28831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 20:06:50 +00:00
Automerge script
134eb7c8f6 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@28788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 19:07:56 +00:00
Automerge script
7633ebabe8 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@28702 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 17:04:55 +00:00
Automerge script
a2ebf8a0fb automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@28674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 16:07:43 +00:00
Automerge script
54282f4e4b automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@28392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 21:01:36 +00:00
Automerge script
f360986593 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@28379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 20:07:21 +00:00
Automerge script
7f5e1b4abe automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@28299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 18:07:34 +00:00
Automerge script
1da1f4e939 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@28256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 17:08:06 +00:00
Automerge script
f209b6fe9b automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@28211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 15:07:38 +00:00
Automerge script
1dea733878 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@28167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 13:06:54 +00:00
Automerge script
7b5e3d8fd5 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@28015 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 23:08:25 +00:00
Automerge script
2c8f7e39f6 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@27969 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 20:07:31 +00:00
Automerge script
64fa2ed07a automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@27890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 18:07:31 +00:00
Automerge script
2a3e4e3a38 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@27811 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 16:07:08 +00:00
Automerge script
8c111c6a6c automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@27765 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 10:07:11 +00:00
Automerge script
f16c918188 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@27677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 03:07:25 +00:00
Automerge script
c161ad3074 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@27635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 00:06:52 +00:00
Automerge script
fcdf61c4b3 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@27475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-16 20:06:30 +00:00
Automerge script
2e4c3cac8a automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@27127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-13 05:07:32 +00:00
Automerge script
a84ea4f014 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@27085 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-12 00:05:45 +00:00
Automerge script
e9ee611581 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@26798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 09:10:58 +00:00
Automerge script
d83e489d61 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@26130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 15:07:09 +00:00
Automerge script
269783fdff automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@26089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 14:06:34 +00:00
Automerge script
c43ec5a1bc automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@25650 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 16:07:44 +00:00
Automerge script
407350f13d automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@25607 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 15:07:01 +00:00
Automerge script
626a5228e3 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@25561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 14:07:31 +00:00
Automerge script
d4b1647374 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@25486 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 12:06:46 +00:00
Automerge script
151fc69ffc automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@25355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-07 14:05:27 +00:00
Automerge script
fcdcbf879a automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@25321 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-07 13:05:43 +00:00
Automerge script
91096b7368 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@25200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-06 03:06:16 +00:00
Automerge script
034337fb07 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@25158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-06 01:06:20 +00:00
Automerge script
0d352c2e09 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@25055 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 21:07:01 +00:00
Automerge script
f923e2c1b8 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@24949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 18:06:18 +00:00
Automerge script
5c40f5053f automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@24875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 15:08:18 +00:00
Automerge script
b4c09a0b95 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@24742 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-04 17:05:55 +00:00
Automerge script
218672370e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@24705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-04 12:05:58 +00:00
Automerge script
696ef06866 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@24603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 21:06:33 +00:00
Automerge script
fa4103cc3b automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@24533 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 19:06:04 +00:00
Automerge script
ef55cff62a automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@24420 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 13:08:48 +00:00
Automerge script
95c0040574 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@24338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 20:07:59 +00:00
Automerge script
d46854d378 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@24128 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 03:06:29 +00:00
Automerge script
622352f2c9 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@24049 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 21:05:01 +00:00
Automerge script
1a02e1b9c1 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@24018 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 20:05:24 +00:00
Automerge script
8cb576b993 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@23981 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 16:05:04 +00:00
Automerge script
ab900f7fad automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@23927 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 11:04:46 +00:00
Automerge script
8192165970 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@23734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 16:05:12 +00:00
Automerge script
5e0ea8da27 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@23703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 15:05:31 +00:00
Automerge script
a8798960dd automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@23668 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 14:05:02 +00:00
Automerge script
ac5119e455 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@23610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 12:04:51 +00:00
Automerge script
c67540d87b automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@23333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29 12:04:34 +00:00
Automerge script
49e844c0e6 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@23206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-28 17:05:06 +00:00
Automerge script
b51560eaa1 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@22987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 20:05:17 +00:00
Automerge script
3190fe1c57 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@22899 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 17:06:05 +00:00
Automerge script
0529a7f84a automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@22629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-26 20:05:58 +00:00
Automerge script
c292909f2e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@22123 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 23:02:41 +00:00
Automerge script
37a6092b27 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@21678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 22:05:55 +00:00
Automerge script
f73cbceaf6 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@21635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 19:06:20 +00:00
Automerge script
940c220642 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@21274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 00:06:11 +00:00
Automerge script
ccc668b5d6 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@21076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 07:06:21 +00:00
Automerge script
dd12cba9d0 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@21001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-17 17:06:46 +00:00
Automerge script
6e6a00609d automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@20074 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 18:05:52 +00:00
Automerge script
ee263ee87e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@19929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-13 21:06:44 +00:00
Kevin P. Fleming
63566eac42 Merged revisions 19812 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r19812 | kpfleming | 2006-04-13 12:40:21 -0500 (Thu, 13 Apr 2006) | 2 lines

oops... let's not set a variable and then immediately overwrite it while assuming its old value will magically return

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@19818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-13 17:52:23 +00:00
Automerge script
b64b6ef1f7 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@19808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-13 16:06:43 +00:00
Automerge script
54e190dacb automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@19435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 23:06:48 +00:00
Automerge script
27b633c817 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@19391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 22:06:47 +00:00
Automerge script
4099114189 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@19344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 21:06:53 +00:00
Automerge script
2c897a8b8c automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@19055 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 02:06:45 +00:00
Automerge script
2aac61e6ad automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@18903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 18:06:02 +00:00
Automerge script
1db17b168a automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@18532 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-08 20:06:31 +00:00
Automerge script
24298e447c automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@18478 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-07 23:05:40 +00:00
Automerge script
d3a87c1f69 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@18297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-07 15:06:19 +00:00
Automerge script
c72b1b15c4 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@18259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-07 14:01:46 +00:00
Automerge script
09609b0510 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@18125 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 23:05:57 +00:00
Automerge script
63bd37a91e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@17985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 18:06:57 +00:00
Automerge script
760352a196 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@17942 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 17:06:45 +00:00
Automerge script
1fce77dc68 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@17734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05 20:06:32 +00:00
Automerge script
bde8fa877f automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@17529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05 07:06:34 +00:00
Automerge script
08aecbb1ed automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@17403 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 19:05:53 +00:00
Automerge script
6f8262c9b4 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@17362 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 18:04:52 +00:00
Automerge script
f7feba82bc automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@17310 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 16:04:23 +00:00
Automerge script
c0bff2ac09 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@17177 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-03 21:04:38 +00:00
Automerge script
8839755956 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@17102 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-03 18:04:56 +00:00
Automerge script
2648e9f039 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@16797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 20:03:56 +00:00
Automerge script
15e7ec94e1 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@16770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 19:04:28 +00:00
Automerge script
b877a5b0f7 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@16599 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 23:02:42 +00:00
Automerge script
27405fac27 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@16577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 22:02:13 +00:00
Automerge script
d2f451ef0c automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@16545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 18:01:47 +00:00
Automerge script
b4d9cb0418 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@16385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 02:06:27 +00:00
Automerge script
c116009930 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@16343 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 01:06:54 +00:00
Automerge script
99a4cd1de2 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@16233 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 20:06:56 +00:00
Automerge script
9a26882461 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@16123 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 15:06:30 +00:00
Automerge script
e167a9a350 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@16050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 05:06:52 +00:00
Automerge script
f86140a213 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@15937 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 01:06:53 +00:00
Automerge script
b4589618c4 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@15783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 21:06:54 +00:00
Automerge script
fd1d8cdf10 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@15742 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 20:06:56 +00:00
Automerge script
7a879ed598 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@15698 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 19:06:50 +00:00
Automerge script
2764568353 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@15657 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 18:06:51 +00:00
Automerge script
e8862556fd automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@15423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 00:07:31 +00:00
Automerge script
1e59a857ae automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@15374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-27 23:01:43 +00:00
Automerge script
b705a62dc5 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@14914 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-25 06:07:49 +00:00
Automerge script
98ba3160e7 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@14867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-25 05:07:29 +00:00
Automerge script
0345a25e6a automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@14751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-24 15:07:22 +00:00
Automerge script
ce930f8e2d automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@14703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-24 05:07:41 +00:00
Automerge script
0314e5efc6 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@14655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-24 01:07:12 +00:00
Automerge script
c1d5aad112 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@14566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-23 22:07:47 +00:00
Automerge script
7cae785261 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@14515 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-23 21:07:45 +00:00
Automerge script
de670a217d automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@14319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-22 23:06:30 +00:00
Automerge script
78104df395 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@14274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-22 22:06:45 +00:00
Automerge script
ba4b234d34 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@14229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-22 21:07:01 +00:00
Kevin P. Fleming
97b3a1c5a4 use proper email address for merge failures
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@14182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-22 20:06:03 +00:00
Automerge script
2a14dad0f0 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@14178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-22 10:10:37 +00:00
Automerge script
c614f4d869 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@13999 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 19:06:07 +00:00
Automerge script
e2ad8bd804 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@13960 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 18:05:42 +00:00
Automerge script
f06bd477c0 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@13924 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 17:05:44 +00:00
Automerge script
a0e595febf automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@13886 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 16:06:13 +00:00
Automerge script
2395b09fef automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@13849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 15:05:43 +00:00
Automerge script
e3bc797a82 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@13784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 07:06:15 +00:00
Automerge script
00461229c2 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@13747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 06:06:20 +00:00
Automerge script
c9d7d267cd automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@13673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-20 19:07:11 +00:00
Automerge script
380d8cfcc4 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@13586 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-19 10:10:38 +00:00
Automerge script
fe83f9421b automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@13318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-16 21:05:36 +00:00
Automerge script
2b3941fcbf automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@13274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-16 18:06:16 +00:00
Automerge script
aad583ff1d automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@13204 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-16 07:01:26 +00:00
Automerge script
9b1e1fe199 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@13196 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-15 23:05:42 +00:00
Automerge script
ca6ae319c7 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@13130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-15 19:05:45 +00:00
Automerge script
5e338e72ba automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@13062 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-15 14:06:15 +00:00
Automerge script
10fe0e9c67 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@12959 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-14 19:05:40 +00:00
Automerge script
f1fade4fa6 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@12825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-13 16:05:25 +00:00
Automerge script
00e45fc396 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@12686 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-12 20:05:47 +00:00
Automerge script
0e3f10b86f automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@12644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-12 19:05:14 +00:00
Automerge script
d008cda808 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@12609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-12 18:05:51 +00:00
Automerge script
ba70bebc38 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@12538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-12 16:08:23 +00:00
Automerge script
eb6fc20dc8 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@12231 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-07 01:05:29 +00:00
Automerge script
db6920d628 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@12196 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-07 00:05:29 +00:00
Automerge script
0fcae43d36 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@12103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 15:05:03 +00:00
Automerge script
8d808bd9d3 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@12040 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 11:04:25 +00:00
Automerge script
c0763951ba automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@11975 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 03:04:43 +00:00
Automerge script
e483c1945d automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@11879 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-05 13:05:27 +00:00
Automerge script
0397dba5a4 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@11804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-04 12:04:16 +00:00
Automerge script
c19212f8d0 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@11745 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-03 18:04:19 +00:00
Automerge script
d848cb43b3 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@11683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-03 09:04:18 +00:00
Automerge script
50464af8c2 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@11658 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-03 01:03:41 +00:00
Automerge script
7f9c385052 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@11633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-02 23:03:50 +00:00
Automerge script
0840844421 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@11585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-02 20:03:53 +00:00
Automerge script
924be1c3b9 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@11553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-02 07:03:41 +00:00
Automerge script
b2b717e61f automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@11527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-01 18:04:00 +00:00
Automerge script
2f6c81bbc5 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@11502 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-01 07:03:42 +00:00
Automerge script
490cd4ada5 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@11434 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-28 20:04:13 +00:00
Automerge script
ee69978cdc automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@11406 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-28 19:03:52 +00:00
Automerge script
0a4506d0dd automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@11306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-27 16:04:08 +00:00
Automerge script
b7ad6d8c2d automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@11275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-27 03:04:02 +00:00
Automerge script
6f665a50e0 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@11191 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-26 17:04:15 +00:00
Automerge script
0bc176e6b8 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@11145 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-25 20:04:12 +00:00
Automerge script
b9b4ae4c34 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@11115 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-25 06:04:09 +00:00
Automerge script
2719e0aa02 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@11088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-25 05:04:25 +00:00
Automerge script
2dc3679b6e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@10986 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-24 00:04:40 +00:00
Automerge script
74879cff5b automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@10870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-23 15:01:21 +00:00
Automerge script
d58f08a1a9 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@10760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-22 18:03:52 +00:00
Automerge script
2d948fe31e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@10601 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-21 00:03:56 +00:00
Automerge script
5efaf11018 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@10558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-20 07:03:44 +00:00
Automerge script
b055431b5c automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@10534 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-20 06:03:40 +00:00
Automerge script
e3bf4c14dc automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@10509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-19 19:03:29 +00:00
Automerge script
d291491eb6 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@10486 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-19 18:03:48 +00:00
Automerge script
e098adeaf7 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@10430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-18 01:03:27 +00:00
Automerge script
304e39b8ec automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@10389 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-17 02:03:24 +00:00
Automerge script
d075508cf0 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@10322 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-16 19:03:22 +00:00
Automerge script
bf7f1e75da automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@10162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 02:03:35 +00:00
Automerge script
72e192fc42 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@10136 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 01:04:13 +00:00
Automerge script
86a106023b automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@10044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 21:05:23 +00:00
Automerge script
3a0ec4568d automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@10017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 20:11:19 +00:00
Automerge script
13d5513465 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@9987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 19:04:48 +00:00
Automerge script
b670fe8554 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@9879 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 05:01:18 +00:00
Automerge script
beff9bb972 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@9868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 04:01:20 +00:00
Automerge script
19c52a797b automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@9842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 01:03:47 +00:00
Automerge script
edbaad38fc automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@9782 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-13 18:04:04 +00:00
Automerge script
266010c7f2 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@9627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 20:03:02 +00:00
Automerge script
9bfab982fd automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@9606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 19:03:03 +00:00
Automerge script
18dbcd321d automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@9547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 16:03:16 +00:00
Automerge script
744ec2c02e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@9505 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 07:00:53 +00:00
Automerge script
c0dce52a12 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@9422 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-10 21:03:04 +00:00
Automerge script
cfe7565123 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@9346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-09 22:03:14 +00:00
Automerge script
a6d8e03be5 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@9273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-09 03:01:45 +00:00
Automerge script
5fc4e0d280 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@9258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-09 02:01:45 +00:00
Automerge script
1c4e84f888 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@9237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-08 23:00:44 +00:00
Kevin P. Fleming
f6d4da1706 simplify automerge setup
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@9169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-06 20:47:11 +00:00
Automerge script
f5bbba29fb automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@9159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-05 18:00:23 +00:00
Kevin P. Fleming
4f44b40d33 update to current 1.2 branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@9131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-02 23:47:35 +00:00
Kevin P. Fleming
08e0a56f32 setup for new automerge process
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@9130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-02 23:45:00 +00:00
Automerge script
a0b6fe01f4 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@9097 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-02 19:01:36 +00:00
Automerge script
a03cf25014 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@9083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-02 17:01:37 +00:00
Automerge script
9acbdbcc6d automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8916 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-30 18:01:34 +00:00
Automerge script
06765cc9d1 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-28 14:01:17 +00:00
Automerge script
2cfee72f8e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8795 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-27 09:01:17 +00:00
Automerge script
8ff712f50f automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-27 01:01:17 +00:00
Automerge script
6a02d8a8d9 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8740 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-26 20:01:20 +00:00
Automerge script
02e4d63d7e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-26 15:01:17 +00:00
Automerge script
6f4c9d5739 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8686 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-25 20:01:00 +00:00
Automerge script
0bd1631812 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-25 19:01:09 +00:00
Automerge script
edfe61308b automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-25 10:01:13 +00:00
Automerge script
9d4b0ced46 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-25 06:00:59 +00:00
Automerge script
9a8533488e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8617 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-25 02:01:00 +00:00
Automerge script
d7812f6634 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8607 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 23:00:59 +00:00
Automerge script
2e10d5244e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 21:01:03 +00:00
Automerge script
e295ae92f3 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8570 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 20:00:59 +00:00
Automerge script
0ca5e4125e automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 14:01:00 +00:00
Automerge script
86f0c7bfcc automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-22 20:00:19 +00:00
Automerge script
30c9cea332 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-22 18:00:19 +00:00
Automerge script
ea091271c8 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-22 16:00:19 +00:00
Automerge script
bea37cf37b automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8431 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-22 09:00:21 +00:00
Automerge script
b2d320b259 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-22 03:00:19 +00:00
Automerge script
749b766a8c automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8415 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-22 00:00:10 +00:00
Automerge script
6fae615794 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8396 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21 19:00:20 +00:00
Automerge script
abcbea02c1 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-20 19:01:00 +00:00
Automerge script
65850c0467 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8322 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-20 01:00:57 +00:00
Automerge script
413b215b6c automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-19 20:00:55 +00:00
Automerge script
30185fdff4 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8247 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-19 05:00:39 +00:00
Kevin P. Fleming
8cedcec2bc add README note to the proper place for future releases
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-18 23:14:04 +00:00
Automerge script
1cc6f6d3bb automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8202 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-18 22:00:37 +00:00
Automerge script
ca0a371996 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8176 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-18 03:00:42 +00:00
Automerge script
b0fd9f9b74 automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8172 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-18 02:00:34 +00:00
Kevin P. Fleming
396f6561a4 set up for automerge
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17 23:58:15 +00:00
Kevin P. Fleming
f16619507a updating to current 1.2
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8046 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-13 03:52:45 +00:00
Kevin P. Fleming
69ac155838 initial import of Asterisk SIP support for network security devices
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@7927 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-10 03:10:34 +00:00
Kevin P. Fleming
a6bae85952 prepare for merging changes from main 1.2 branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@7926 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-10 03:05:18 +00:00
Kevin P. Fleming
494b9c486e create branch to hold network security device code
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@7925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-10 03:03:29 +00:00
Kevin P. Fleming
d8c5d338cb re-initialize _all_ sequence numbers when transfer completes
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 22:48:48 +00:00
Russell Bryant
417438fea0 add missing unlock (issue #6112)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7915 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 22:07:26 +00:00
Tilghman Lesher
5488ffb6d4 Bug 6157 - Memory leak
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7908 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 20:08:24 +00:00
Tilghman Lesher
e8725ce940 Update variable documentation to match the code
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 18:37:50 +00:00
Kevin P. Fleming
0e734920e8 commit user/group-related changes from trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 18:11:23 +00:00
Kevin P. Fleming
ad598a2060 backport fix from revision 7856 of trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7899 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 18:09:53 +00:00
Kevin P. Fleming
bb47f95262 fix breakage introduced in revision 7871
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7898 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 18:08:07 +00:00
Russell Bryant
a7a2115b9c fix seg fault when using greek syntax in VoicemMailMain (issue #6142)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7871 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 05:11:44 +00:00
Russell Bryant
18429f2a69 backport fix for unnecessary unlock (issue #6171)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 04:52:16 +00:00
Tilghman Lesher
7e6430787c Bug 6156 - catch all threading errors, not just simple failure
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7848 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-07 07:27:18 +00:00
Tilghman Lesher
dc3ba8c223 Dumb error messages - "Context 'context' already included in 'in' context"
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-06 00:34:40 +00:00
Kevin P. Fleming
2fd6520a7e update agent persistence when an agent gets logged off by autologoff
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-06 00:21:00 +00:00
Tilghman Lesher
7a61b36104 Bug 6076 - Fix documentation of ast_trim_blank return value
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-05 23:53:07 +00:00
Kevin P. Fleming
2f4783a770 eliminate rounding errors that caused call time limits to be inaccurate (issue #5913)
round 'time left' reported during call limit warnings up to sound more accurate


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


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


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


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


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






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



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


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


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


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


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


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


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


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


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

View File

@@ -1 +1 @@
33
9

View File

@@ -1 +1 @@
33
9

View File

@@ -1 +1 @@
1.4.24-rc1
1.2.25-netsec

2
BUGS
View File

@@ -7,7 +7,7 @@ the official Asterisk Bug Tracker at:
http://bugs.digium.com
For more information on using the bug tracker, or to
learn how you can contribute by acting as a bug marshal
learn how you can contribute by acting as a bug marshall
please see:
http://www.asterisk.org/developers/bug-guidelines

499
CHANGES
View File

@@ -1,374 +1,127 @@
Changes since Asterisk 1.2:
Changes since Asterisk 1.2.0-beta2:
* over 4,000 commits since 1.2
* queue member naming
* CLI commands rework
o Change the way CLI commands are structured.
o Most commands are now <module> <verb> <args>
* chan_h323 update
* RTP packetization
* SLA (Shared Line Appearance) support
* T.38 Passthrough Support for faxing in SIP
* Generic channel jitterbuffer (spawned from RTP)
* Variable Length DTMF for better DTMF compatibility
* Improved chan_iax2 scalability by using multithreading
* AEL2 has replaced the original implementation of AEL. The "2" is removed. For more details,
read: http://www.voip-info.org/wiki/view/Asterisk+AEL2
AEL is no longer considered experimental.
* New sounds; English, Spanish, and French prompts, as well as music on hold files, in
multiple Asterisk native formats.
* IMAP storage of voicemail
* Jabber/GoogleTalk integration
* New speech recognition API for interfacing to different Voice Recognition software packages
* much more customizable and portable build system
o also for asterisk-addons
* Radius CDR logging
* SNMP support
* SMDI (Simplified Message Desk Interface) support
* Redesign of MusicOnHold configuration settings
* Manager over HTTP
* Significant chan_skinny updates
* Significant chan_misdn updates
* Improved SIP transfers
* SIP MWI subscription support
* Much improved support for SIP video
* Control over SIP transfers and subscriptions (enable/disable per device)
* ChanSpy whisper mode (Whisper Paging)
* Configurable language support for saying dates and times
* Significant architecture improvements for memory usage and performance
* Media-only IAX2 transfers
* Updates to the Radio Repeater app code
* Deprecation of AgentCallbackLogin in favor of a dialplan-based solution
* uClibc builds supported
* Work done for freeBSD portability
* Work done for Solaris portability
* FreeTDS-based database can be used with Realtime
* New internal data structure, stringfields, is implemented in IAX and SIP, reducing memory consumption by about 50%.
* Use of thread local storage for reduced memory allocation/freeing and lower stack consumption
* Reorganized files into docs/ main/ configs/, including name changes in some cases
* Much effort was expended in arranging documentation in source files in doxygen format
* Improved IP TOS support for IAX and SIP
* Builtin mini HTTP server
* Added support for Sigma Designs cards.
* Frame header caching to reduce memory allocation/freeing
* Passthrough and record/playback support for G.722 wideband audio
* using mpg123 to play MP3 files for music-on-hold will be deprecated in 1.4 (start using the "native support")
* New Apps:
1. AMD() ;; Answering Machine Detection
2. ChannelRedirect() ;; asynch goto, redirect chan to context/exten/priority
3. ContinueWhile() ;; Addition to the While() suite. Acts like "continue".
4. ExitWhile() ;; Addition to the While() suite. Acts like "break".
5. ExtenSpy() ;; A close cousin to ChanSpy().
6. FollowMe() ;; findme/followme call redirect app
7. Log() ;; Send a message to the log, based on severity level.
8. MacroExclusive() ;; No more than one invocation of this macro allowed at any one time.
9. MorseCode() ;; turns strings into dits and dahs. A playground for ham radio licensees!
10. OSPAuth() ;; OSP authentication
11. QueueLog() ;; allows you to write your own events into the queue log
12. SLAStation() ;; Shared Line Appearance
13. SLATrunk() ;; Shared Line Appearance
14. SpeechCreate() ;; Voice Recognition Engine interface...
15. SpeechActivateGrammar()
16. SpeechStart()
17. SpeechBackground
18. SpeechDeactivateGrammar()
19. SpeechProcessingSound()
20. SpeechDestroy()
21. SpeechLoadGrammar()
22. SpeechUnloadGrammar()
23. StopMixMonitor() ;; to stop the MixMonitor App.
24. TryExec() ;; execute dialplan app without fatal consequences
* Apps removed:
1. CheckGroup -- do a comparison to ${GROUP()}
2. Curl -- use the function CURL() instead
3. Cut -- use the function CUT() instead
4. DateTime -- use sayunixtime() app instead.
5. DBget -- deprecated in 1.2, now removed.
6. DBput -- deprecated in 1.2, now removed.
7. Enumlookup -- use the function ENUMLOOKUP() instead
8. Eval -- use the function EVAL() instead
9. GetGroupCount -- use the function GROUP_COUNT() instead
10. GetGroupMatchCount -- use the function GROUP_MATCH_COUNT() instead
11. Intercom -- use the chan_oss module instead
12. Math -- use the function MATH() instead
13. MD5 -- use the function MD5() instead
14. SetCIDname -- use the function CALLERID(name) instead
15. SetCIDnum -- use the function CALLERID(number) instead
16. SetGroup -- use Set(GROUP=group) instead
17. SetRDNIS -- use the function CALLERID(rdnis) instead
18. Sql_postgres -- was deprecated in 1.2, now removed
19. Txtcidname -- use the function TXTCIDNAME instead
* New Dialplan Functions:
1. ARRAY()
2. BASE_64_DECODE()
3. BASE_64_ENCODE()
4. CHANNEL()
5. CURL()
6. CUT()
7. DB_DELETE()
8. FILTER()
9. GLOBAL()
10. IFTIME()
11. KEYPADHASH()
12. ODBC()
13. QUOTE()
14. RAND()
15. REALTIME()
16. SHA1()
17. SORT()
18. SPRINTF()
19. SQL_ESC()
20. STAT()
21. STRPTIME()
22. AUDIOHOOK_INHERIT()
* Apps that have changes to their interface:
1. Authenticate() -- optional maxdigits argument added.
2. ChanSpy() -- new options:
o w -- Enable 'whisper' mode, so the spying channel can talk to...
o W -- Enable 'private whisper' mode, so the spying channel can...
3. DBdel() -- now marked as DEPRECATED in favor of the DB_DELETE func
4. Dial()
o New Option: O([x]) for Zaptel operator mode
o New Option: K/k parking via dtmf tones
5. Dictate() -- optional filename argument added.
6. Directory() -- new option: e - In addition to the name, also read the extension number...
7. ForkCDR() -- new options:
o 'a' -- update answer time on new cdr
o 'A' -- Lock the orig CDR answer time against changes.
o 'D' -- Copy the disposition from the orig to the new CDR.
o 'd' -- clear the dstcannel field in the new CDR.
o 'e' -- set the end time of the original CDR.
o 'R' -- do NOT reset the new CDR.
o 's' -- Add/change var in orig CDR.
o 'T' -- Force ast_cdr_end, answer to obey LOCKED flag for the orig. CDR.
-- ast_cdr_setvar will be forced also (used by the CDR() func in write mode)
8. Meetme() -- new options:
o 'I' -- announce user join/leave without review
o 'l' -- set listen only mode (Listen only, no talking)
o 'o' -- set talker optimization - treats talkers who aren't speaking as...
o '1' -- do not play message when first person enters
9. MeetmeAdmin() -- new options:
o 'r' -- Reset one user's volume settings
o 'R' -- Reset all users volume settings
o 's' -- Lower entire conference speaking volume
o 'S' -- Raise entire conference speaking volume
o 't' -- Lower one user's talk volume
o 'T' -- Lower all users talk volume
o 'u' -- Lower one user's listen volume
o 'U' -- Lower all users listen volume
o 'v' -- Lower entire conference listening volume
o 'V' -- Raise entire conference listening volume
10. OSPFinish() : now also can return ERROR result.
11. OSPLookup() : Sets more variables, also now returns ERROR result.
12. Page() -- New option: r - record the page into a file (see 'r' for app_meetme)
13. Pickup() -- multiple extensions, PICKUPMARK; read the description!
14. Queue()
o New Argument: AGI
o New option: i
15. Random() -- is now deprecated in 1.4
16. Read() -- replace 'skip' and 'noanswer' options with 's', 'n', add 'i' option.
17. Record() -- New option: 'x' : ignore all terminator keys (DTMF) and keep recording until hangup
18. UserEvent() -- slight change in behavior. Read the description.
19. VoiceMailMain() -- new a(#) option, goes to folder # directly.
20. WaitForSilence() -- new optional 3rd arg, time delay before returning.
* Functions that have changes to their interfaces:
1. CDR -- new options: u and s
2. LANGUAGE -- Deprecated. Use CHANNEL(language) instead.
3. MUSICCLASS -- Deprecated. Use CHANNEL(musicclass) instead.
* Configuration File Changes:
1. NEW config files:
1. amd.conf -- Answering Machine Detection parameters
2. followme.conf -- parameters for the findme/followme call forwarding
3. func_odbc.conf -- define sql access functions here
4. gtalk.conf -- how to handle gtalk protocol calls
5. h323.conf -- h323 configuration
6. http.conf -- config for the builtin mini-http server in asterisk
7. jabber.conf -- jabber interface
8. jingle.conf -- jingle protocol interface config
10. res_snmp.conf -- to enable snmp in asterisk, and define full/sub agent status
11. say.conf -- define per-language rules for numbers, dates, etc.
12. skinny.conf -- for those special skinny phones you want to use...
13. sla.conf -- Shared Line Appearance config
14. smdi.conf -- SMDI messaging config
15. udptl.conf -- T38's udptl transport config
16. users.conf -- user config
2. Changes to Existing Config files:
1. In General:
o Jitterbuffer support added to several channels. Usually adds these variables to a config file:
1. jbenable
2. jbmaxsize
3. jbresyncthreshold
4. jbimpl
5. jblog
o MusicOnHold upgrade introduces two new variables:
1. mohinterpret
2. mohsuggest
2. agents.conf
o multiplelogin variable added
o maxlogintries variable added
o autologoffunavail variable added
o endcall variable added
o goodbye variable added
o createlink variable REMOVED
3. alsa.conf
o mohinterpret variable added
o Jitterbuffer variables added
4. cdr.conf
o endbeforehexten variable added
o sections for csv and radius added, with variables usegmtime, loguniqueid,
loguserfield, and radiuscfg variables.
5. cdr_tds.conf
o table variable added
6. extensions.ael
o Many upgrades. See the info at http://www.voip-info.org/wiki/view/Asterisk+AEL2
7. extensions.conf
o autofallthru now set to "yes" by default
o userscontext variable added
o added info/examples on paging and hints.
8. features.conf
o parkedplay variable added (who to beep at)
o parkedmusicclass
o atxfernoanswertimeout variable added
o parkcall variable added (one step parking)
o improved documentation for dynamic feature declarations!
o added parkedcallltransfers option to control builtin transfers with parking
o added parkedcallparking option to control one touch parking w/ parking pickup
o added parkedcallhangup option to control disconnect feature w/ parking pickup
o added parkedcallrecording option to control one-touch record w/ parking pickup
o added BRIDGE_FEATURES variable to set available features for a channel
9. iax.conf
o adsi variable added
o mohinterpret variable added
o mohsuggest variable added
o jitterbuffer updates
o iaxthreadcount variable added
o iaxmaxthreadcount variable added
o the way to specify TOS has changed.
o mailboxdetail variable has been REMOVED.
10. indications.conf
o [bg] entry added (Bulgaria).
o [il] entry added (Israel)
o [in] entry added (India)
o [jp] entry added (Japan)
o [my] entry added (Malaysia)
o [th] entry added (Thailand)
11. manager.conf
o webenabled variable added
o httptimeout variable added
o timestampevents variable added
12. mgcp.conf
o Jitterbuffer support added
13. misdn.conf
o l1watcher_timeout variable added
o pp_l2_check variable added
o echocancelwhenbridged variable added
o echotraining variable added
o max_incoming variable added
o max_outgoing variable added
14. modules.conf
o a comment for preloading res_speech.so is added
o mention of global symbols is removed
o obsolesced entries for chan_modem_* and app_intercom have been removed
15. musiconhold.conf
o the default is now to do native moh from /var/lib/asterisk/moh
16. osp.conf
o authpolicy variable added
17. oss.conf
o debug variable added
o device variable added
o mixer variable added
o boost variable added
o callerid variable added
o autohangup variable added
o queuesize variable added
o frags variable added
o JitterBuffer support
o sections to define alternate sound cards
18. queues.conf
o autofill variable added
o monitor-type variable added
o musiconhold is now musicclass, with a difference in interpretation
o autofill variable added
o autopause variable added
o setinterfacevar variable added
o ringinuse variable added
19. res_odbc.conf
o pooling variable added
20. rpt.conf
o duplex variable added
o tailmessagetime variable added
o tailsquashedtime variable added
o tailmessages variable added
21. rtp.conf
o rtcpinterval varaible added
22. sip.conf
o allowguest variable can't be set to 'osp'
o allowoverlap variable added
o allowtransfer variable added
o limitonpeer variable added
o directrtpsetup variable added
o buggymwi variable added
o ospauth variable REMOVED
o notifyhold variable added
o autoframing variable added
o tos variable REMOVED
o tos_sip variable added
o tos_audio variable added
o tos_video variable added
o minexpiry variable added
o t1min variable added
o musicclass variable REMOVED
o mohinterpret variable added
o mohsuggest variable added
o allowsubscribe variable added
o videosupport variable added
o maxcallbitrate variable added
o g726nonstandard variable added
o dumphistory variable added
o t38pt_udptl variable added
o t38pt_rtp variable added
o t38pt_tcp variable added
o rfc2833compensate variable added
o matchexterniplocally variable added
o canreinvite variable can also now be set to 'nonat'
o rtsavesysname variable added
o JitterBuffer support added
o t38pt_usertpsource variable added
o regcontext variable can contains multiple contexts separated by an '&'
23. skinny.conf
o port variable renamed to bindport
o JitterBuffer support added
o model variable REMOVED
o mohinterpret variable added
o mohsuggest variable added
o speeddial variable added
o addon variable added
24. voicemail.conf
o userscontext variable added
o smdiport variable added
o attachfmt variable added
o volgain variable added
o tempgreetwarn variable added
25. zapata.conf
o pritimer variable has improved documentation
o New signalling method: fgccama
o New signalling method: fgccamamf
o outsignalling variable added
o distinctiveringaftercid variable added
o cidsignalling now also accepts v23_jp, and smdi
o usesmdi variable added
o smdiport variable added
o mohinterpret variable added
o mohsuggest variable added
o JitterBuffer support added
* Removed Codecs/Channels:
1. codec_g723 was removed because the actual codec implementation it was designed to use is not distributable
2. chan_modem_* and related modules are gone because the kernel support for those interfaces is old, buggy and unsupported
* New Utils:
1. aelparse -- compile .ael files outside of asterisk
* New manager events:
1. OriginateResponse event comes to replace OriginateSuccess and OriginateFailure
* iLBC source code no longer included (see UPGRADE.txt for details)
* New CLI command "pri show version" that shows the current version of libpri
that the library was built against (requires a version of libpri since this API
feature was added).
* Cygwin build system portability
* Optional generation of outbound silence during channel recording
Changes since Asterisk 1.2.0-beta1:
* Many, many bug fixes
* Documentation and sample configuration updates
* Vastly improved presence/subscription support in the SIP channel driver
* A new (experimental) mISDN channel driver
* A new monitoring application (MixMonitor)
* More portability fixes for non-Linux platforms
* New dialplan functions replacing old applications
* Significant deadlock and performance upgrades for the Manager interface
* An upgrade to the 'new' dialplan expression parser for all users
* New Zaptel echo cancellers with improved performance
* Support for the latest OSP toolkit from TransNexus
* Support user-controlled volume adjustment in MeetMe application
* More dialplan applications now return status variables instead of priority jumping
* Much more powerful ENUM support in the dialplan
* SIP domain support for authentication and virtual hosting
* Many PRI protocol updates and fixes, including more complete Q.SIG support
* New applications: Pickup() and Page()
Changes since Asterisk 1.0:
This list currently only containts changes made from the end of November until
March 26, 2005.
* Add new applications:
-- AgentMonitorOutgoing
-- Curl
-- ExecIf
-- ExecIfTime
-- IAX2Provision
-- MacroExit
-- MacroIf
-- PauseQueueMember
-- ReadFile
-- SetRDNIS
-- SIPAddHeader
-- SIPGetHeader
-- StartMusicOnHold
-- StopMusicOnHold
-- UnpauseQueueMember
-- WaitForSilence
-- While / EndWhile
* app Answer
-- added delay option
* app ChanIsAvail
-- added 's' option
* app Dial
-- add option to specify the class for musiconhold with m option
* app EnumLookup
-- added "reload enum" for configuration
* app Goto
-- added relative priorities
* app GotoIf
-- added relative priorities
* app MeetMe
-- added 'i' option
-- added 'r' option
-- added 'T' option
-- added 'P' option
-- added 'c' option
-- added adminpin to meetme.conf
-- added reload command
* app PrivacyManager
-- add config file privacy.conf
* app queue
-- queues.conf
-- added persistentmembers option to queues.conf
-- changed music option to musiconhold
-- added weight option
-- added note about why agent groups probably shouldn't be used
-- added timeoutrestart option
* app Read
-- added attempts parameter
-- added timeout parameter
* app Record
-- added 'q' option
* app SendDTMF
-- add timeout option
* app SMS
-- document alternative syntax for queueing messages
* app Voicemail
-- add info about VM_CATEGORY
-- voicemail.conf
-- added usedirectory option
-- added VM_CIDNUM and VM_CIDNAME in message config
* chan IAX2
-- new jitterbuffer
-- added setvar option
-- added regex to iax2 show peers/users
-- allow multiple bindaddr lines in iax.conf
-- added reload command
-- added forcejitterbuffer option
-- added note about specifying bindport before bindaddr
-- added trunktimestamps option
* chan Agent
-- added agent logoff CLI command
* chan OSS
-- added Flash CLI command
* chan SIP
-- added setvar option
-- added compactheaders option
-- added usereqphone option
-- added registertimeout option
-- added externhost option
-- added sip notify CLI command
-- added sip_notify.conf
-- added allowguest option
* chan Zap
-- added hanguponplarityswitch option
-- added sendcalleridafter option
-- added priresetinterval option
-- added TON/NPI config options (the ones right above the resetinterval option)
-- added answeronpolarityswitch option
-- added "never" for resetinterval
* extensions
-- allow '*' when including files (#include "sip-*.conf")
-- added eswitch
* General
-- added #exec syntax for including output from a command
-- added show features CLI command
-- added configuration templates for category inheritance

92
CREDITS
View File

@@ -27,149 +27,77 @@ Wasim - Hangup detect
* Thanks to QuickNet Technologies for their donation of an Internet
PhoneJack and Linejack card to the project. (http://www.quicknet.net)
* Thanks to VoipSupply for their donation of Sipura ATAs to the project for
T.38 testing. (http://www.voipsupply.com)
* Thanks to Grandstream for their donation of ATAs to the project for
T.38 testing. (http://www.grandstream.com)
=== MISCELLANEOUS PATCHES ===
Jim Dixon - Zapata Telephony and app_rpt
http://www.zapatatelephony.org/app_rpt.html
Russell Bryant - Asterisk 1.0 maintainer and misc. enhancements
russelb@clemson.edu
Anthony Minessale II - Countless big and small fixes, and relentless forward push
ChanSpy, ForkCDR, ControlPlayback, While/EndWhile, DumpChan, Dictate,
MacroIf, ExecIf, ExecIfTime, RetryDial, MixMonitor applications; many realtime
concepts and implementation pieces, including res_config_odbc; format_slin;
cdr_custom; several features in Dial including L(), G() and enhancements to
M() and D(); several CDR enhancements including CDR variables; attended
transfer; one touch record; native MOH; manager eventmask; command line '-t'
flag to allow recording/voicemail on nfs shares; #exec command and multiline
comments in config files; setvar in iax and sip configs.
MacroIf, ExecIf, ExecIfTime, RetryDial, MixMonitor applications; res_odbc;
many realtime concepts and implementation pieces, including res_config_odbc;
format_slin; cdr_custom; several features in Dial including L(), G() and
enhancements to M() and D(); several CDR enhancements including CDR variables;
attended transfer; one touch record; native MOH; manager eventmask; command
line '-t' flag to allow recording/voicemail on nfs shares; #exec command and
multiline comments in config files; setvar in iax and sip configs.
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
Oliver Daudey - ISDN4Linux fixes
Pauline Middelink - ISDN4Linux patches and some general patches.
She can be found at http://www.polyware.nl/~middelink/En/
Jean-Denis Girard - Various contributions from the South Pacific Islands
jd-girard@esoft.pf http://www.esoft.pf
William Jordan / Vonage - MySQL enhancements to Voicemail
wjordan@vonage.com
Jac Kersing - Various fixes
Steven Critchfield - Seek and Trunc functions for playback and recording
critch@basesys.com
Jefferson Noxon - app_lookupcidname, app_db, and various other contributions
Klaus-Peter Junghanns - in-band DTMF on SIP and MGCP
Ross Finlayson - Dynamic RTP payload support
Mahmut Fettahlioglu - Audio recording, music-on-hold changes, alaw file
format, and various fixes. Can be contacted at mahmut@oa.com.au
James Dennis - Cisco SIP compatibility patches to work with SIP service
providers. Can be contacted at asterisk@jdennis.net
Tilghman Lesher - ast_localtime(); ast_say_date_with_format();
GotoIfTime, Random, SayUnixTime, HasNewVoicemail applications;
CUT, SORT, EVAL, CURL, FIELDQTY, STRFTIME, QUEUEAGENT* functions;
and other innumerable bug fixes. http://asterisk.drunkcoder.com/
Jayson Vantuyl - Manager protocol changes, various other bugs.
jvantuyl@computingedge.net
Thorsten Lockert - OpenBSD, FreeBSD ports, making MacOS X port run on 10.3,
dialplan include verification, route lookup on OpenBSD, SNMP agent
support (res_snmp), various other bugs. tholo@sigmasoft.com
dialplan include verification, route lookup on OpenBSD, various other
bugs. tholo@sigmasoft.com
Brian West - ODBC support and Bug Marshaling
Josh Roberson - chan_zap reload support, Advanced Voicemail Features, other misc. patches,
and Bug Marshalling. - josh@asteriasgi.com, http://www.asteriasgi.com
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
Simon Lockhart - Porting to Solaris (based on work of Logan ???)
simon@slimey.org
Olle E. Johansson - SIP RFC compliance, documentation and testing, testing, testing
oej@edvina.net, http://edvina.net
Steve Kann - new jitter buffer for IAX2
stevek@stevek.com
Constantine Filin - major contributions to the Asterisk Realtime Architecture
Steve Murphy - privacy support, $[ ] parser upgrade, AEL2 parser upgrade
Steve Murphy - privacy support
Claude Patry - bug fixes, feature enhancements, and bug marshalling
cpatry@gmail.com
Miroslav Nachev, miro@space-comm.com COSMOS Software Enterprises, Ltd.
- for Variable for No Answer Timeout for Attended Transfer
Slav Klenov & Vanheuverzwijn Joachim - development of the generic jitterbuffer
Securax Ltd. info@securax.be
Roy Sigurd Karlsbakk - providing funding for generic jitterbuffer development
roy@karlsbakk.net, Briiz Telecom AS
Voop A/S, Nuvio Inc, Inotel S.A and Foniris Telecom A/S - funding for rewrite of SIP transfers
Philippe Sultan - RADIUS CDR module
INRIA, http://www.inria.fr/
John Martin, Aupix - Improved video support in the SIP channel
Steve Underwood - Provided T.38 pass through support.
George Konstantoulakis - Support for Greek in voicemail added by InAccess Networks (work funded by HOL, www.hol.gr) gkon@inaccessnetworks.com
Daniel Nylander - Support for Swedish and Norwegian languages in voicemail. http://www.danielnylander.se/
Stojan Sljivic - An option for maximum number of messsages per mailbox in voicemail. Also an issue with voicemail synchronization has been fixed. GDS Partners www.gdspartners.com . stojan.sljivic@gdspartners.com
Bartosz Supczinski - Support for Polish added by DIR (www.dir.pl) Bartosz.Supczinski@dir.pl
James Rothenberger - Support for IMAP storage integration added by OneBizTone LLC Work funded by University of Pennsylvania jar@onebiztone.com
Paul Cadach - Bringing chan_h323 up to date, bug fixes, and more!
=== OTHER CONTRIBUTIONS ===
John Todd - Monkey sounds and associated teletorture prompt
Michael Jerris - bug marshaling
Leif Madsen, Jared Smith and Jim van Meggelen - the Asterisk book
available under a Creative Commons License at http://www.asteriskdocs.org
Brian M. Clapper - poll.c emulation
This product includes software developed by Brian M. Clapper <bmc@clapper.org>
=== HOLD MUSIC ===
Music provided by www.opsound.org
=== OTHER SOURCE CODE IN ASTERISK ===
Asterisk uses libedit, the lightweight readline replacement from NetBSD.
The cdr_radius module uses libradiusclient-ng, which is also from NetBSD.
They are BSD-licensed and require the following statement:
This product includes software developed by the NetBSD
Foundation, Inc. and its contributors.
Digium did not implement the codecs in Asterisk. Here is the copyright on the
GSM source:

27425
ChangeLog

File diff suppressed because it is too large Load Diff

View File

@@ -2,16 +2,19 @@ A PBX is only really useful if you can get calls into it. Of course, you
can use Asterisk with VoIP calls (SIP, H.323, IAX), but you can also talk
to the real PSTN through various cards.
Supported Hardware is divided into two general groups: DAHDI devices and
non-DAHDI devices. The DAHDI compatible hardware supports pseudo-TDM
conferencing and all call features through chan_dahdi, whereas non-DAHDI
Supported Hardware is divided into two general groups: Zaptel devices and
non-zaptel devices. The Zaptel compatible hardware supports pseudo-TDM
conferencing and all call features through chan_zap, whereas non-zaptel
compatible hardware may have different features.
DAHDI compatible hardware
Zaptel compatible hardware
==========================
-- Digium (Primary author of Asterisk)
http://www.digium.com, http://store.digium.com
http://www.digium.com, http://store.yahoo.com/asteriskpbx
* Wildcard X100P - Single FXO interface connects to Loopstart phone
line
* Wildcard T400P (obsolete) - Quad T1 interface connects to four T1/PRI
interfaces. Supports RBS and PRI voice and PPP, FR, and HDLC data.
@@ -25,13 +28,16 @@ DAHDI compatible hardware
* Wildcard E100P - Single E1 interface connects to a single E1/PRI (or PRA)
interface. Supports PRA/PRI, EuroISDN voice and PPP, FR, HDLC data.
* Wildcard S100U - Single FXS interface connects to a standard analog
telephone.
* Wildcard TDM400P - Quad Modular FXS interface connects to standard
analog telephones.
* Wildcard TE410P - Quad T1/E1 switchable interface. Supports PRI and
RBS signalling, as well as PPP, FR, and HDLC data modes.
Non-DAHDI compatible hardware
Non-zaptel compatible hardware
==============================
-- QuickNet, Inc.
@@ -43,26 +49,16 @@ Non-DAHDI compatible hardware
* Internet LineJack - Single FXS or FXO interface. Supports Linux
telephony interface.
mISDN compatible hardware
=========================
mISDN homepage: http://www.isdn4linux.de/mISDN/
Any adapter with an mISDN driver should be compatible with
chan_misdn. See misdn.txt for information.
-- beroNet
http://www.beronet.com
* BN4S0 - 4 Port BRI card (TE/NT)
* BN8S0 - 8 Port BRI card (TE/NT)
* Billion Card - Single Port BRI card (TE (/NT with crossed cable) )
Miscellaneous other interfaces
==============================
-- ISDN4Linux
http://www.isdn4linux.de/
* Any ISDN terminal adapter supported by isdn4linux should provide
connectivity.
-- ALSA
http://www.alsa-project.org

14
LICENSE
View File

@@ -31,8 +31,8 @@ there is no requirement that you provide the same exception in your
GPL'd products (although if you've written a module for Asterisk we
would strongly encourage you to make the same exception that we do).
Specific permission is also granted to link Asterisk with OpenSSL, OpenH323
and/or the UW IMAP Toolkit and distribute the resulting binary files.
Specific permission is also granted to link Asterisk with OpenSSL and
OpenH323 and distribute the resulting binary files.
In addition, Asterisk implements two management/control protocols: the
Asterisk Manager Interface (AMI) and the Asterisk Gateway Interface
@@ -50,19 +50,19 @@ and use of them is subject to our trademark licensing policies. If you
wish to use these trademarks for purposes other than simple
redistribution of Asterisk source code obtained from Digium, you
should contact our licensing department to determine the necessary
steps you must take. For more information on this policy, please read
http://www.digium.com/en/company/profile/trademarkpolicy.php
steps you must take.
If you have any questions regarding our licensing policy, please
contact us:
+1.877.344.4861 (via telephone in the USA)
+1.877.546.8963 (via telephone in the USA)
+1.256.428.6000 (via telephone outside the USA)
+1.256.864.0464 (via FAX inside or outside the USA)
IAX2/pbx.digium.com (via IAX2)
IAX2/misery.digium.com/6000 (via IAX2)
licensing@digium.com (via email)
Digium, Inc.
445 Jan Davis Drive
150 West Park Loop
Suite 100
Huntsville, AL 35806
USA

1067
Makefile

File diff suppressed because it is too large Load Diff

View File

@@ -1,112 +0,0 @@
#
# Asterisk -- A telephony toolkit for Linux.
#
# Makefile rules for subdirectories containing modules
#
# Copyright (C) 2006, Digium, Inc.
#
# Kevin P. Fleming <kpfleming@digium.com>
#
# This program is free software, distributed under the terms of
# the GNU General Public License
#
ifeq ($(findstring LOADABLE_MODULES,$(MENUSELECT_CFLAGS)),)
ASTCFLAGS+=${GC_CFLAGS}
endif
ifneq ($(findstring STATIC_BUILD,$(MENUSELECT_CFLAGS)),)
STATIC_BUILD=-static
endif
include $(ASTTOPDIR)/Makefile.rules
comma:=,
$(addsuffix .o,$(C_MODS)): ASTCFLAGS+=-DAST_MODULE=\"$*\" $(MENUSELECT_OPTS_$*:%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_INCLUDE))
$(addsuffix .oo,$(CC_MODS)): ASTCFLAGS+=-DAST_MODULE=\"$*\" $(MENUSELECT_OPTS_$*:%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_INCLUDE))
$(LOADABLE_MODS:%=%.so): ASTCFLAGS+=-fPIC
$(LOADABLE_MODS:%=%.so): LIBS+=$(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_LIB))
$(LOADABLE_MODS:%=%.so): ASTLDFLAGS+=$(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_LDFLAGS))
$(addsuffix .so,$(filter $(LOADABLE_MODS),$(C_MODS))): %.so: %.o
$(addsuffix .so,$(filter $(LOADABLE_MODS),$(CC_MODS))): %.so: %.oo
modules.link: $(addsuffix .o,$(filter $(EMBEDDED_MODS),$(C_MODS)))
modules.link: $(addsuffix .oo,$(filter $(EMBEDDED_MODS),$(CC_MODS)))
.PHONY: clean uninstall _all moduleinfo makeopts
ifneq ($(LOADABLE_MODS),)
_all: $(LOADABLE_MODS:%=%.so)
endif
ifneq ($(EMBEDDED_MODS),)
_all: modules.link
__embed_ldscript:
@echo "../$(SUBDIR)/modules.link"
__embed_ldflags:
@echo "$(foreach mod,$(filter $(EMBEDDED_MODS),$(C_MODS)),$(foreach dep,$(MENUSELECT_DEPENDS_$(mod)),$(dep)_LDFLAGS))"
@echo "$(foreach mod,$(filter $(EMBEDDED_MODS),$(CC_MODS)),$(foreach dep,$(MENUSELECT_DEPENDS_$(mod)),$(dep)_LDFLAGS))"
__embed_libs:
@echo "$(foreach mod,$(filter $(EMBEDDED_MODS),$(C_MODS)),$(foreach dep,$(MENUSELECT_DEPENDS_$(mod)),$(dep)_LIB))"
@echo "$(foreach mod,$(filter $(EMBEDDED_MODS),$(CC_MODS)),$(foreach dep,$(MENUSELECT_DEPENDS_$(mod)),$(dep)_LIB))"
else
__embed_ldscript:
__embed_ldflags:
__embed_libs:
endif
modules.link:
@rm -f $@
@for file in $(patsubst %,$(SUBDIR)/%,$(filter %.o,$^)); do echo "INPUT (../$${file})" >> $@; done
@for file in $(patsubst %,$(SUBDIR)/%,$(filter-out %.o,$^)); do echo "INPUT (../$${file})" >> $@; done
clean::
rm -f *.so *.o *.oo *.s *.i *.ii
rm -f .*.d
rm -f modules.link
install:: all
for x in $(LOADABLE_MODS:%=%.so); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
uninstall::
dist-clean::
rm -f .*.moduleinfo .moduleinfo
rm -f .*.makeopts .makeopts
.%.moduleinfo: %.c
@echo "<member name=\"$*\" displayname=\"$(shell $(GREP) -e AST_MODULE_INFO $< | head -n 1 | cut -d '"' -f 2)\" remove_on_change=\"$(SUBDIR)/$*.o $(SUBDIR)/$*.so\">" > $@
$(AWK) -f $(ASTTOPDIR)/build_tools/get_moduleinfo $< >> $@
echo "</member>" >> $@
.%.moduleinfo: %.cc
@echo "<member name=\"$*\" displayname=\"$(shell $(GREP) -e AST_MODULE_INFO $< | head -n 1 | cut -d '"' -f 2)\" remove_on_change=\"$(SUBDIR)/$*.oo $(SUBDIR)/$*.so\">" > $@
$(AWK) -f $(ASTTOPDIR)/build_tools/get_moduleinfo $< >> $@
echo "</member>" >> $@
.moduleinfo:: $(addsuffix .moduleinfo,$(addprefix .,$(ALL_C_MODS) $(ALL_CC_MODS)))
@echo "<category name=\"MENUSELECT_$(MENUSELECT_CATEGORY)\" displayname=\"$(MENUSELECT_DESCRIPTION)\" remove_on_change=\"$(SUBDIR)/modules.link\">" > $@
@cat $^ >> $@
@echo "</category>" >> $@
moduleinfo: .moduleinfo
@cat $<
.%.makeopts: %.c
@$(AWK) -f $(ASTTOPDIR)/build_tools/get_makeopts $< > $@
.%.makeopts: %.cc
@$(AWK) -f $(ASTTOPDIR)/build_tools/get_makeopts $< > $@
.makeopts:: $(addsuffix .makeopts,$(addprefix .,$(ALL_C_MODS) $(ALL_CC_MODS)))
@cat $^ > $@
makeopts: .makeopts
@cat $<
ifneq ($(wildcard .*.d),)
include .*.d
endif

View File

@@ -1,129 +0,0 @@
#
# Asterisk -- A telephony toolkit for Linux.
#
# Makefile rules
#
# Copyright (C) 2006-2008, Digium, Inc.
#
# Kevin P. Fleming <kpfleming@digium.com>
#
# This program is free software, distributed under the terms of
# the GNU General Public License
#
# Each command is preceded by a short comment on what to do.
# Prefixing one or the other with @\# or @ or nothing makes the desired
# behaviour. ECHO_PREFIX prefixes the comment, CMD_PREFIX prefixes the command.
-include $(ASTTOPDIR)/makeopts
.PHONY: dist-clean
# If 'make' decides to create intermediate files to satisfy a build requirement
# (like producing a .i from a .c), we want to keep them, so tell make to keep
# all intermediate files
.SECONDARY:
# extra cflags to build dependencies. Recursively expanded.
MAKE_DEPS=-MD -MT $@ -MF .$(subst /,_,$@).d -MP
ifeq ($(NOISY_BUILD),)
ECHO_PREFIX=@
CMD_PREFIX=@
else
ECHO_PREFIX=@\#
CMD_PREFIX=
endif
OPTIMIZE?=-O6
ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)),)
# More GSM codec optimization
# Uncomment to enable MMXTM optimizations for x86 architecture CPU's
# which support MMX instructions. This should be newer pentiums,
# ppro's, etc, as well as the AMD K6 and K7.
#K6OPT=-DK6OPT
ASTCFLAGS+=$(OPTIMIZE)
endif
# shortcuts for common combinations of flags; these must be recursively expanded so that
# per-target settings will be applied
CC_CFLAGS=$(PTHREAD_CFLAGS) $(ASTCFLAGS)
CXX_CFLAGS=$(PTHREAD_CFLAGS) $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(AST_DECLARATION_AFTER_STATEMENT),$(ASTCFLAGS))
CC_LDFLAGS_SO=$(PTHREAD_CFLAGS) $(ASTLDFLAGS) $(SOLINK)
CXX_LDFLAGS_SO=$(PTHREAD_CFLAGS) $(ASTLDFLAGS) $(SOLINK)
CC_LIBS=$(PTHREAD_LIBS) $(LIBS)
CXX_LIBS=$(PTHREAD_LIBS) $(LIBS)
# determine whether to double-compile so that the optimizer can report code path problems
# this is only done when developer mode and DONT_OPTIMIZE are both enabled
# in that case, we run the preprocessor to produce a .i or .ii file from the source
# code, then compile once with optimizer enabled (and the output to /dev/null),
# and if that doesn't fail then compile again with optimizer disabled
ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS))$(AST_DEVMODE),DONT_OPTIMIZEyes)
COMPILE_DOUBLE=yes
endif
%.o: %.s
$(ECHO_PREFIX) echo " [AS] $< -> $@"
ifeq ($(COMPILE_DOUBLE),yes)
$(CMD_PREFIX) $(CC) -o /dev/null -c $< $(CC_CFLAGS) $(OPTIMIZE)
endif
$(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS)
%.o: %.i
$(ECHO_PREFIX) echo " [CCi] $< -> $@"
ifeq ($(COMPILE_DOUBLE),yes)
$(CMD_PREFIX) $(CC) -o /dev/null -c $< $(CC_CFLAGS) $(OPTIMIZE)
endif
$(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS)
ifneq ($(COMPILE_DOUBLE),yes)
%.o: %.c
$(ECHO_PREFIX) echo " [CC] $< -> $@"
$(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS) $(MAKE_DEPS)
endif
%.i: %.c
$(ECHO_PREFIX) echo " [CPP] $< -> $@"
$(CMD_PREFIX) $(CC) -o $@ -E $< $(CC_CFLAGS) $(MAKE_DEPS)
%.oo: %.ii
$(ECHO_PREFIX) echo " [CXXi] $< -> $@"
ifeq ($(COMPILE_DOUBLE),yes)
$(CMD_PREFIX) $(CXX) -o /dev/null -c $< $(CXX_CFLAGS) $(OPTIMIZE)
endif
$(CMD_PREFIX) $(CXX) -o $@ -c $< $(CXX_CFLAGS)
ifneq ($(COMPILE_DOUBLE),yes)
%.oo: %.cc
$(ECHO_PREFIX) echo " [CXX] $< -> $@"
$(CMD_PREFIX) $(CXX) -o $@ -c $< $(CXX_CFLAGS) $(MAKE_DEPS)
endif
%.ii: %.cc
$(ECHO_PREFIX) echo " [CPP] $< -> $@"
$(CMD_PREFIX) $(CXX) -o $@ -E $< $(CXX_CFLAGS) $(MAKE_DEPS)
%.c: %.y
$(ECHO_PREFIX) echo " [BISON] $< -> $@"
$(CMD_PREFIX) bison -o $@ -d --name-prefix=ast_yy $<
%.c: %.fl
$(ECHO_PREFIX) echo " [FLEX] $< -> $@"
$(CMD_PREFIX) flex -o $@ --full $<
%.so: %.o
$(ECHO_PREFIX) echo " [LD] $^ -> $@"
$(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(CC_LDFLAGS_SO) $^ $(CC_LIBS)
%.so: %.oo
$(ECHO_PREFIX) echo " [LDXX] $^ -> $@"
$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(CXX_LDFLAGS_SO) $^ $(CXX_LIBS)
%: %.o
$(ECHO_PREFIX) echo " [LD] $^ -> $@"
$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(PTHREAD_CFLAGS) $(ASTLDFLAGS) $^ $(CXX_LIBS)
dist-clean:: clean

56
README
View File

@@ -1,17 +1,17 @@
The Asterisk(R) Open Source PBX
The Asterisk Open Source PBX
by Mark Spencer <markster@digium.com>
and the Asterisk.org developer community
Copyright (C) 2001-2009 Digium, Inc.
Copyright (C) 2001-2005 Digium, Inc.
and other copyright holders.
================================================================
* SECURITY
It is imperative that you read and fully understand the contents of
the security information file (doc/security.txt) before you attempt
to configure and run an Asterisk server.
the SECURITY file before you attempt to configure and run an Asterisk
server.
* WHAT IS ASTERISK?
* WHAT IS ASTERISK ?
Asterisk is an Open Source PBX and telephony toolkit. It is, in a
sense, middleware between Internet and telephony channels on the bottom,
and Internet and telephony applications at the top. For more information
@@ -51,15 +51,13 @@ ANY special hardware, not even a soundcard) to install and run Asterisk.
* All Wildcard (tm) products from Digium (www.digium.com)
* QuickNet Internet PhoneJack and LineJack (http://www.quicknet.net)
* any full duplex sound card supported by ALSA or OSS
* any ISDN card supported by mISDN on Linux (BRI)
* The Xorcom AstriBank channel bank
* VoiceTronix OpenLine products
The are several drivers for ISDN BRI cards available from third party sources.
Check the voip-info.org wiki for more information on chan_capi and
Check the voip-info.org wiki for more information on chan_capi, chan_misdn and
zaphfc.
* UPGRADING FROM AN EARLIER VERSION
* UPGRADING FROM VERSION 1.0
If you are updating from a previous version of Asterisk, make sure you
read the UPGRADE.txt file in the source directory. There are some files
@@ -84,31 +82,14 @@ On many distributions, these files are installed by packages with names like
So let's proceed:
1) Read this README file.
There are more documents than this one in the doc/ directory.
You may also want to check the configuration files that contain
examples and reference guides. They are all in the configs/
directory.
2) Run "./configure"
Execute the configure script to guess values for system-dependent
variables used during compilation.
3) Run "make menuselect" [optional]
This is needed if you want to select the modules that will be
compiled and to check modules dependencies.
4) Run "make"
1) Run "make"
Assuming the build completes successfully:
5) Run "make install"
2) Run "make install"
Each time you update or checkout from the repository, you are strongly
encouraged to ensure all previous object files are removed to avoid internal
Each time you update or checkout from CVS, you are strongly encouraged
to ensure all previous object files are removed to avoid internal
inconsistency in Asterisk. Normally, this is automatically done with
the presence of the file .cleancount, which increments each time a 'make clean'
is required, and the file .lastclean, which contains the last .cleancount used.
@@ -116,7 +97,7 @@ is required, and the file .lastclean, which contains the last .cleancount used.
If this is your first time working with Asterisk, you may wish to install
the sample PBX, with demonstration extensions, etc. If so, run:
6) "make samples"
3) "make samples"
Doing so will overwrite any existing config files you have.
@@ -159,7 +140,7 @@ they're used only to help make the configuration file easier to
understand, and do not affect how it is actually parsed.
Entries of the form 'variable=value' set the value of some parameter in
asterisk. For example, in chan_dahdi.conf, one might specify:
asterisk. For example, in zapata.conf, one might specify:
switchtype=national
@@ -183,6 +164,14 @@ parameters. For example, the line "channel => 25-47" creates objects for
the channels 25 through 47 of the card, obtaining the settings
from the variables specified above.
* NETWORK SECURITY DEVICES
This release of Asterisk contains support for network security devices
manufactured by Ranch Networks, Inc., using their MIDCOM interface
library. You will need the companion libmidcom-0.1.0.tar.gz file to
build the library. Contact Ranch Networks' support department for assistance
in building and configuring MIDCOM support.
* SPECIAL NOTE ON TIME
Those using SIP phones should be aware that Asterisk is sensitive to
@@ -257,6 +246,3 @@ you're interested in getting more information.
Welcome to the growing worldwide community of Asterisk users!
Mark Spencer
----
Asterisk is a trademark belonging to Digium, inc

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

View File

@@ -28,13 +28,6 @@ The IAX2 protocol supports strong RSA key authentication as well as
AES encryption of voice and signalling. The SIP channel does not
support encryption in this version of Asterisk.
By default, if you have libcap available, Asterisk will try to retain the
CAP_NET_ADMIN capability when running as a non-root user. If you do not need
that capability you may want to configure Asterisk with --without-cap; however,
this will prevent Asterisk from being able to mark high ToS bits under Linux.
More information on CAP_NET_ADMIN is available at:
http://www.lids.org/lids-howto/node48.html
* DIALPLAN SECURITY
First and foremost remember this:

View File

@@ -1,210 +0,0 @@
=========================================================
=== Information for upgrading from Asterisk 1.0 to 1.2
===
===
=== UPGRADE-1.2.txt -- Upgrade info for 1.0 to 1.2
=== UPGRADE.txt -- Upgrade info for 1.2 to 1.4
=========================================================
Compiling:
* The Asterisk 1.2 source code now uses C language features
supported only by 'modern' C compilers. Generally, this means GCC
version 3.0 or higher, although some GCC 2.96 releases will also
work. Some non-GCC compilers that support C99 and the common GCC
extensions (including anonymous structures and unions) will also
work. All releases of GCC 2.95 do _not_ have the requisite feature
support; systems using that compiler will need to be upgraded to
a more recent compiler release.
Dialplan Expressions:
* The dialplan expression parser (which handles $[ ... ] constructs)
has gone through a major upgrade, but has one incompatible change:
spaces are no longer required around expression operators, including
string comparisons. However, you can now use quoting to keep strings
together for comparison. For more details, please read the
doc/README.variables file, and check over your dialplan for possible
problems.
Agents:
* The default for ackcall has been changed to "no" instead of "yes"
because of a bug which caused the "yes" behavior to generally act like
"no". You may need to adjust the value if your agents behave
differently than you expect with respect to acknowledgement.
* The AgentCallBackLogin application now requires a second '|' before
specifying an extension@context. This is to distinguish the options
string from the extension, so that they do not conflict. See
'show application AgentCallbackLogin' for more details.
Parking:
* Parking behavior has changed slightly; when a parked call times out,
Asterisk will attempt to deliver the call back to the extension that
parked it, rather than the 's' extension. If that extension is busy
or unavailable, the parked call will be lost.
Dialing:
* The Caller*ID of the outbound leg is now the extension that was
called, rather than the Caller*ID of the inbound leg of the call. The
"o" flag for Dial can be used to restore the original behavior if
desired. Note that if you are looking for the originating callerid
from the manager event, there is a new manager event "Dial" which
provides the source and destination channels and callerid.
IAX:
* The naming convention for IAX channels has changed in two ways:
1. The call number follows a "-" rather than a "/" character.
2. The name of the channel has been simplified to IAX2/peer-callno,
rather than IAX2/peer@peer-callno or even IAX2/peer@peer/callno.
SIP:
* The global option "port" in 1.0.X that is used to set which port to
bind to has been changed to "bindport" to be more consistent with
the other channel drivers and to avoid confusion with the "port"
option for users/peers.
* The "Registry" event now uses "Username" rather than "User" for
consistency with IAX.
Applications:
* With the addition of dialplan functions (which operate similarly
to variables), the SetVar application has been renamed to Set.
* The CallerPres application has been removed. Use SetCallerPres
instead. It accepts both numeric and symbolic names.
* The applications GetGroupCount, GetGroupMatchCount, SetGroup, and
CheckGroup have been deprecated in favor of functions. Here is a
table of their replacements:
GetGroupCount([groupname][@category] GROUP_COUNT([groupname][@category]) Set(GROUPCOUNT=${GROUP_COUNT()})
GroupMatchCount(groupmatch[@category]) GROUP_MATCH_COUNT(groupmatch[@category]) Set(GROUPCOUNT=${GROUP_MATCH_COUNT(SIP/.*)})
SetGroup(groupname[@category]) GROUP([category])=groupname Set(GROUP()=test)
CheckGroup(max[@category]) N/A GotoIf($[ ${GROUP_COUNT()} > 5 ]?103)
Note that CheckGroup does not have a direct replacement. There is
also a new function called GROUP_LIST() which will return a space
separated list of all of the groups set on a channel. The GROUP()
function can also return the name of the group set on a channel when
used in a read environment.
* The applications DBGet and DBPut have been deprecated in favor of
functions. Here is a table of their replacements:
DBGet(foo=family/key) Set(foo=${DB(family/key)})
DBPut(family/key=${foo}) Set(DB(family/key)=${foo})
* The application SetLanguage has been deprecated in favor of the
function LANGUAGE().
SetLanguage(fr) Set(LANGUAGE()=fr)
The LANGUAGE function can also return the currently set language:
Set(MYLANG=${LANGUAGE()})
* The applications AbsoluteTimeout, DigitTimeout, and ResponseTimeout
have been deprecated in favor of the function TIMEOUT(timeouttype):
AbsoluteTimeout(300) Set(TIMEOUT(absolute)=300)
DigitTimeout(15) Set(TIMEOUT(digit)=15)
ResponseTimeout(15) Set(TIMEOUT(response)=15)
The TIMEOUT() function can also return the currently set timeouts:
Set(DTIMEOUT=${TIMEOUT(digit)})
* The applications SetCIDName, SetCIDNum, and SetRDNIS have been
deprecated in favor of the CALLERID(datatype) function:
SetCIDName(Joe Cool) Set(CALLERID(name)=Joe Cool)
SetCIDNum(2025551212) Set(CALLERID(number)=2025551212)
SetRDNIS(2024561414) Set(CALLERID(RDNIS)=2024561414)
* The application Record now uses the period to separate the filename
from the format, rather than the colon.
* The application VoiceMail now supports a 'temporary' greeting for each
mailbox. This greeting can be recorded by using option 4 in the
'mailbox options' menu, and 'change your password' option has been
moved to option 5.
* The application VoiceMailMain now only matches the 'default' context if
none is specified in the arguments. (This was the previously
documented behavior, however, we didn't follow that behavior.) The old
behavior can be restored by setting searchcontexts=yes in voicemail.conf.
Queues:
* A queue is now considered empty not only if there are no members but if
none of the members are available (e.g. agents not logged on). To
restore the original behavior, use "leavewhenempty=strict" or
"joinwhenempty=strict" instead of "=yes" for those options.
* It is now possible to use multi-digit extensions in the exit context
for a queue (although you should not have overlapping extensions,
as there is no digit timeout). This means that the EXITWITHKEY event
in queue_log can now contain a key field with more than a single
character in it.
Extensions:
* By default, there is a new option called "autofallthrough" in
extensions.conf that is set to yes. Asterisk 1.0 (and earlier)
behavior was to wait for an extension to be dialed after there were no
more extensions to execute. "autofallthrough" changes this behavior
so that the call will immediately be terminated with BUSY,
CONGESTION, or HANGUP based on Asterisk's best guess. If you are
writing an extension for IVR, you must use the WaitExten application
if "autofallthrough" is set to yes.
AGI:
* AGI scripts did not always get SIGHUP at the end, previously. That
behavior has been fixed. If you do not want your script to terminate
at the end of AGI being called (e.g. on a hangup) then set SIGHUP to
be ignored within your application.
* CallerID is reported with agi_callerid and agi_calleridname instead
of a single parameter holding both.
Music On Hold:
* The preferred format for musiconhold.conf has changed; please see the
sample configuration file for the new format. The existing format
is still supported but will generate warnings when the module is loaded.
chan_modem:
* All the chan_modem channel drivers (aopen, bestdata and i4l) are deprecated
in this release, and will be removed in the next major Asterisk release.
Please migrate to chan_misdn for ISDN interfaces; there is no upgrade
path for aopen and bestdata modem users.
MeetMe:
* The conference application now allows users to increase/decrease their
speaking volume and listening volume (independently of each other and
other users); the 'admin' and 'user' menus have changed, and new sound
files are included with this release. However, if a user calling in
over a Zaptel channel that does NOT have hardware DTMF detection
increases their speaking volume, it is likely they will no longer be
able to enter/exit the menu or make any further adjustments, as the
software DTMF detector will not be able to recognize the DTMF coming
from their device.
GetVar Manager Action:
* Previously, the behavior of the GetVar manager action reported the value
of a variable in the following manner:
> name: value
This has been changed to a manner similar to the SetVar action and is now
> Variable: name
> Value: value

View File

@@ -1,500 +1,205 @@
=========================================================
=== Information for upgrading from Asterisk 1.2 to 1.4
===
===
=== UPGRADE-1.2.txt -- Upgrade info for 1.0 to 1.2
=== UPGRADE.txt -- Upgrade info for 1.2 to 1.4
Information for Upgrading From Previous Asterisk Releases
=========================================================
Build Process (configure script):
Compiling:
Asterisk now uses an autoconf-generated configuration script to learn how it
should build itself for your system. As it is a standard script, running:
* The Asterisk 1.2 source code now uses C language features
supported only by 'modern' C compilers. Generally, this means GCC
version 3.0 or higher, although some GCC 2.96 releases will also
work. Some non-GCC compilers that support C99 and the common GCC
extensions (including anonymous structures and unions) will also
work. All releases of GCC 2.95 do _not_ have the requisite feature
support; systems using that compiler will need to be upgraded to
a more recent compiler release.
$ ./configure --help
Dialplan Expressions:
will show you all the options available. This script can be used to tell the
build process what libraries you have on your system (if it cannot find them
automatically), which libraries you wish to have ignored even though they may
be present, etc.
* The dialplan expression parser (which handles $[ ... ] constructs)
has gone through a major upgrade, but has one incompatible change:
spaces are no longer required around expression operators, including
string comparisons. However, you can now use quoting to keep strings
together for comparison. For more details, please read the
doc/README.variables file, and check over your dialplan for possible
problems.
You must run the configure script before Asterisk will build, although it will
attempt to automatically run it for you with no options specified; for most
users, that will result in a similar build to what they would have had before
the configure script was added to the build process (except for having to run
'make' again after the configure script is run). Note that the configure script
does NOT need to be re-run just to rebuild Asterisk; you only need to re-run it
when your system configuration changes or you wish to build Asterisk with
different options.
Agents:
Build Process (module selection):
* The default for ackcall has been changed to "no" instead of "yes"
because of a bug which caused the "yes" behavior to generally act like
"no". You may need to adjust the value if your agents behave
differently than you expect with respect to acknowledgement.
The Asterisk source tree now includes a basic module selection and build option
selection tool called 'menuselect'. Run 'make menuselect' to make your choices.
In this tool, you can disable building of modules that you don't care about,
turn on/off global options for the build and see which modules will not
(and cannot) be built because your system does not have the required external
dependencies installed.
* The AgentCallBackLogin application now requires a second '|' before
specifying an extension@context. This is to distinguish the options
string from the extension, so that they do not conflict. See
'show application AgentCallbackLogin' for more details.
The resulting file from menuselect is called 'menuselect.makeopts'. Note that
the resulting menuselect.makeopts file generally contains which modules *not*
to build. The modules listed in this file indicate which modules have unmet
dependencies, a present conflict, or have been disabled by the user in the
menuselect interface. Compiler Flags can also be set in the menuselect
interface. In this case, the resulting file contains which CFLAGS are in use,
not which ones are not in use.
Parking:
If you would like to save your choices and have them applied against all
builds, the file can be copied to '~/.asterisk.makeopts' or
'/etc/asterisk.makeopts'.
* Parking behavior has changed slightly; when a parked call times out,
Asterisk will attempt to deliver the call back to the extension that
parked it, rather than the 's' extension. If that extension is busy
or unavailable, the parked call will be lost.
Build Process (Makefile targets):
Dialing:
The 'valgrind' and 'dont-optimize' targets have been removed; their functionality
is available by enabling the DONT_OPTIMIZE setting in the 'Compiler Flags' menu
in the menuselect tool.
* The Caller*ID of the outbound leg is now the extension that was
called, rather than the Caller*ID of the inbound leg of the call. The
"o" flag for Dial can be used to restore the original behavior if
desired. Note that if you are looking for the originating callerid
from the manager event, there is a new manager event "Dial" which
provides the source and destination channels and callerid.
It is now possible to run most make targets against a single subdirectory; from
the top level directory, for example, 'make channels' will run 'make all' in the
'channels' subdirectory. This also is true for 'clean', 'distclean' and 'depend'.
IAX:
Sound (prompt) and Music On Hold files:
* The naming convention for IAX channels has changed in two ways:
1. The call number follows a "-" rather than a "/" character.
2. The name of the channel has been simplified to IAX2/peer-callno,
rather than IAX2/peer@peer-callno or even IAX2/peer@peer/callno.
Beginning with Asterisk 1.4, the sound files and music on hold files supplied for
use with Asterisk have been replaced with new versions produced from high quality
master recordings, and are available in three languages (English, French and
Spanish) and in five formats (WAV (uncompressed), mu-Law, a-Law, GSM and G.729).
In addition, the music on hold files provided by opsound.org Music are now available
in the same five formats, but no longer available in MP3 format.
SIP:
The Asterisk 1.4 tarball packages will only include English prompts in GSM format,
(as were supplied with previous releases) and the opsound.org MOH files in WAV format.
All of the other variations can be installed by running 'make menuselect' and
selecting the packages you wish to install; when you run 'make install', those
packages will be downloaded and installed along with the standard files included
in the tarball.
* The global option "port" in 1.0.X that is used to set which port to
bind to has been changed to "bindport" to be more consistent with
the other channel drivers and to avoid confusion with the "port"
option for users/peers.
If for some reason you expect to not have Internet access at the time you will be
running 'make install', you can make your package selections using menuselect and
then run 'make sounds' to download (only) the sound packages; this will leave the
sound packages in the 'sounds' subdirectory to be used later during installation.
WARNING: Asterisk 1.4 supports a new layout for sound files in multiple languages;
instead of the alternate-language files being stored in subdirectories underneath
the existing files (for French, that would be digits/fr, letters/fr, phonetic/fr,
etc.) the new layout creates one directory under /var/lib/asterisk/sounds for the
language itself, then places all the sound files for that language under that
directory and its subdirectories. This is the layout that will be created if you
select non-English languages to be installed via menuselect, HOWEVER Asterisk does
not default to this layout and will not find the files in the places it expects them
to be. If you wish to use this layout, make sure you put 'languageprefix=yes' in your
/etc/asterisk/asterisk.conf file, so that Asterisk will know how the files were
installed.
PBX Core:
* The (very old and undocumented) ability to use BYEXTENSION for dialing
instead of ${EXTEN} has been removed.
* Builtin (res_features) transfer functionality attempts to use the context
defined in TRANSFER_CONTEXT variable of the transferer channel first. If
not set, it uses the transferee variable. If not set in any channel, it will
attempt to use the last non macro context. If not possible, it will default
to the current context.
* The autofallthrough setting introduced in Asterisk 1.2 now defaults to 'yes';
if your dialplan relies on the ability to 'run off the end' of an extension
and wait for a new extension without using WaitExten() to accomplish that,
you will need set autofallthrough to 'no' in your extensions.conf file.
Command Line Interface:
* 'show channels concise', designed to be used by applications that will parse
its output, previously used ':' characters to separate fields. However, some
of those fields can easily contain that character, making the output not
parseable. The delimiter has been changed to '!'.
* The "Registry" event now uses "Username" rather than "User" for
consistency with IAX.
Applications:
* In previous Asterisk releases, many applications would jump to priority n+101
to indicate some kind of status or error condition. This functionality was
marked deprecated in Asterisk 1.2. An option to disable it was provided with
the default value set to 'on'. The default value for the global priority
jumping option is now 'off'.
* The applications Cut, Sort, DBGet, DBPut, SetCIDNum, SetCIDName, SetRDNIS,
AbsoluteTimeout, DigitTimeout, ResponseTimeout, SetLanguage, GetGroupCount,
and GetGroupMatchCount were all deprecated in version 1.2, and therefore have
been removed in this version. You should use the equivalent dialplan
function in places where you have previously used one of these applications.
* The application SetGlobalVar has been deprecated. You should replace uses
of this application with the following combination of Set and GLOBAL():
Set(GLOBAL(name)=value). You may also access global variables exclusively by
using the GLOBAL() dialplan function, instead of relying on variable
interpolation falling back to globals when no channel variable is set.
* The application SetVar has been renamed to Set. The syntax SetVar was marked
deprecated in version 1.2 and is no longer recognized in this version. The
use of Set with multiple argument pairs has also been deprecated. Please
separate each name/value pair into its own dialplan line.
* app_read has been updated to use the newer options codes, using "skip" or
"noanswer" will not work. Use s or n. Also there is a new feature i, for
using indication tones, so typing in skip would give you unexpected results.
* OSPAuth is added to authenticate OSP tokens in in_bound call setup messages.
* The CONNECT event in the queue_log from app_queue now has a second field
in addition to the holdtime field. It contains the unique ID of the
queue member channel that is taking the call. This is useful when trying
to link recording filenames back to a particular call from the queue.
* The old/current behavior of app_queue has a serial type behavior
in that the queue will make all waiting callers wait in the queue
even if there is more than one available member ready to take
calls until the head caller is connected with the member they
were trying to get to. The next waiting caller in line then
becomes the head caller, and they are then connected with the
next available member and all available members and waiting callers
waits while this happens. This cycle continues until there are
no more available members or waiting callers, whichever comes first.
The new behavior, enabled by setting autofill=yes in queues.conf
either at the [general] level to default for all queues or
to set on a per-queue level, makes sure that when the waiting
callers are connecting with available members in a parallel fashion
until there are no more available members or no more waiting callers,
whichever comes first. This is probably more along the lines of how
one would expect a queue should work and in most cases, you will want
to enable this new behavior. If you do not specify or comment out this
option, it will default to "no" to keep backward compatability with the old
behavior.
* Queues depend on the channel driver reporting the proper state
for each member of the queue. To get proper signalling on
queue members that use the SIP channel driver, you need to
enable a call limit (could be set to a high value so it
is not put into action) and also make sure that both inbound
and outbound calls are accounted for.
Example:
[general]
limitonpeer = yes
[peername]
type=friend
call-limit=10
* The app_queue application now has the ability to use MixMonitor to
record conversations queue members are having with queue callers. Please
see configs/queues.conf.sample for more information on this option.
* The app_queue application strategy called 'roundrobin' has been deprecated
for this release. Users are encouraged to use 'rrmemory' instead, since it
provides more 'true' round-robin call delivery. For the Asterisk 1.6 release,
'rrmemory' will be renamed 'roundrobin'.
* The app_queue application option called 'monitor-join' has been deprecated
for this release. Users are encouraged to use 'monitor-type=mixmonitor' instead,
since it provides the same functionality but is not dependent on soxmix or some
other external program in order to mix the audio.
* app_meetme: The 'm' option (monitor) is renamed to 'l' (listen only), and
the 'm' option now provides the functionality of "initially muted".
In practice, most existing dialplans using the 'm' flag should not notice
any difference, unless the keypad menu is enabled, allowing the user
to unmute themsleves.
* ast_play_and_record would attempt to cancel the recording if a DTMF
'0' was received. This behavior was not documented in most of the
applications that used ast_play_and_record and the return codes from
ast_play_and_record weren't checked for properly.
ast_play_and_record has been changed so that '0' no longer cancels a
recording. If you want to allow DTMF digits to cancel an
in-progress recording use ast_play_and_record_full which allows you
to specify which DTMF digits can be used to accept a recording and
which digits can be used to cancel a recording.
* ast_app_messagecount has been renamed to ast_app_inboxcount. There is now a
new ast_app_messagecount function which takes a single context/mailbox/folder
mailbox specification and returns the message count for that folder only.
This addresses the deficiency of not being able to count the number of
messages in folders other than INBOX and Old.
* The exit behavior of the AGI applications has changed. Previously, when
a connection to an AGI server failed, the application would cause the channel
to immediately stop dialplan execution and hangup. Now, the only time that
the AGI applications will cause the channel to stop dialplan execution is
when the channel itself requests hangup. The AGI applications now set an
AGISTATUS variable which will allow you to find out whether running the AGI
was successful or not.
Previously, there was no way to handle the case where Asterisk was unable to
locally execute an AGI script for some reason. In this case, dialplan
execution will continue as it did before, but the AGISTATUS variable will be
set to "FAILURE".
A locally executed AGI script can now exit with a non-zero exit code and this
failure will be detected by Asterisk. If an AGI script exits with a non-zero
exit code, the AGISTATUS variable will be set to "FAILURE" as opposed to
"SUCCESS".
* app_voicemail: The ODBC_STORAGE capability now requires the extended table format
previously used only by EXTENDED_ODBC_STORAGE. This means that you will need to update
your table format using the schema provided in doc/odbcstorage.txt
* app_waitforsilence: Fixes have been made to this application which changes the
default behavior with how quickly it returns. You can maintain "old-style" behavior
with the addition/use of a third "timeout" parameter.
Please consult the application documentation and make changes to your dialplan
if appropriate.
Manager:
* After executing the 'status' manager action, the "Status" manager events
included the header "CallerID:" which was actually only the CallerID number,
and not the full CallerID string. This header has been renamed to
"CallerIDNum". For compatibility purposes, the CallerID parameter will remain
until after the release of 1.4, when it will be removed. Please use the time
during the 1.4 release to make this transition.
* The AgentConnect event now has an additional field called "BridgedChannel"
which contains the unique ID of the queue member channel that is taking the
call. This is useful when trying to link recording filenames back to
a particular call from the queue.
* app_userevent has been modified to always send Event: UserEvent with the
additional header UserEvent: <userspec>. Also, the Channel and UniqueID
headers are not automatically sent, unless you specify them as separate
arguments. Please see the application help for the new syntax.
* app_meetme: Mute and Unmute events are now reported via the Manager API.
Native Manager API commands MeetMeMute and MeetMeUnmute are provided, which
are easier to use than "Action Command:". The MeetMeStopTalking event has
also been deprecated in favor of the already existing MeetmeTalking event
with a "Status" of "on" or "off" added.
* OriginateFailure and OriginateSuccess events were replaced by event
OriginateResponse with a header named "Response" to indicate success or
failure
Variables:
* The builtin variables ${CALLERID}, ${CALLERIDNAME}, ${CALLERIDNUM},
${CALLERANI}, ${DNID}, ${RDNIS}, ${DATETIME}, ${TIMESTAMP}, ${ACCOUNTCODE},
and ${LANGUAGE} have all been deprecated in favor of their related dialplan
functions. You are encouraged to move towards the associated dialplan
function, as these variables will be removed in a future release.
* The CDR-CSV variables uniqueid, userfield, and basing time on GMT are now
adjustable from cdr.conf, instead of recompiling.
* OSP applications exports several new variables, ${OSPINHANDLE},
${OSPOUTHANDLE}, ${OSPINTOKEN}, ${OSPOUTTOKEN}, ${OSPCALLING},
${OSPINTIMELIMIT}, and ${OSPOUTTIMELIMIT}
* Builtin transfer functionality sets the variable ${TRANSFERERNAME} in the new
created channel. This variables holds the channel name of the transferer.
* The dial plan variable PRI_CAUSE will be removed from future versions
of Asterisk.
It is replaced by adding a cause value to the hangup() application.
Functions:
* The function ${CHECK_MD5()} has been deprecated in favor of using an
expression: $[${MD5(<string>)} = ${saved_md5}].
* The 'builtin' functions that used to be combined in pbx_functions.so are
now built as separate modules. If you are not using 'autoload=yes' in your
modules.conf file then you will need to explicitly load the modules that
contain the functions you want to use.
* The ENUMLOOKUP() function with the 'c' option (for counting the number of
records), but the lookup fails to match any records, the returned value will
now be "0" instead of blank.
* The REALTIME() function is now available in version 1.4 and app_realtime has
been deprecated in favor of the new function. app_realtime will be removed
completely with the version 1.6 release so please take the time between
releases to make any necessary changes
* The QUEUEAGENTCOUNT() function has been deprecated in favor of
QUEUE_MEMBER_COUNT().
The IAX2 channel:
* It is possible that previous configurations depended on the order in which
peers and users were specified in iax.conf for forcing the order in which
chan_iax2 matched against them. This behavior is going away and is considered
deprecated in this version. Avoid having ambiguous peer and user entries and
to make things easy on yourself, always set the "username" option for users
so that the remote end can match on that exactly instead of trying to infer
which user you want based on host.
If you would like to go ahead and use the new behavior which doesn't use the
order in the config file to influence matching order, then change the
MAX_PEER_BUCKETS define in chan_iax2.c to a value greater than one. An
example is provided there. By changing this, you will get *much* better
performance on systems that do a lot of peer and user lookups as they will be
stored in memory in a much more efficient manner.
* The "mailboxdetail" option has been deprecated. Previously, if this option
was not enabled, the 2 byte MSGCOUNT information element would be set to all
1's to indicate there there is some number of messages waiting. With this
option enabled, the number of new messages were placed in one byte and the
number of old messages are placed in the other. This is now the default
(and the only) behavior.
The SIP channel:
* The "incominglimit" setting is replaced by the "call-limit" setting in
sip.conf.
* OSP support code is removed from SIP channel to OSP applications. ospauth
option in sip.conf is removed to osp.conf as authpolicy. allowguest option
in sip.conf cannot be set as osp anymore.
* The Asterisk RTP stack has been changed in regards to RFC2833 reception
and transmission. Packets will now be sent with proper duration instead of all
at once. If you are receiving calls from a pre-1.4 Asterisk installation you
will want to turn on the rfc2833compensate option. Without this option your
DTMF reception may act poorly.
* The $SIPUSERAGENT dialplan variable is deprecated and will be removed
in coming versions of Asterisk. Please use the dialplan function
SIPCHANINFO(useragent) instead.
* The ALERT_INFO dialplan variable is deprecated and will be removed
in coming versions of Asterisk. Please use the dialplan application
sipaddheader() to add the "Alert-Info" header to the outbound invite.
* The "canreinvite" option has changed. canreinvite=yes used to disable
re-invites if you had NAT=yes. In 1.4, you need to set canreinvite=nonat
to disable re-invites when NAT=yes. This is propably what you want.
The settings are now: "yes", "no", "nonat", "update". Please consult
sip.conf.sample for detailed information.
The Zap channel:
* Support for MFC/R2 has been removed, as it has not been functional for some
time and it has no maintainer.
The Agent channel:
* Callback mode (AgentCallbackLogin) is now deprecated, since the entire function
it provided can be done using dialplan logic, without requiring additional
channel and module locks (which frequently caused deadlocks). An example of
how to do this using AEL dialplan is in doc/queues-with-callback-members.txt.
The G726-32 codec:
* It has been determined that previous versions of Asterisk used the wrong codeword
packing order for G726-32 data. This version supports both available packing orders,
and can transcode between them. It also now selects the proper order when
negotiating with a SIP peer based on the codec name supplied in the SDP. However,
there are existing devices that improperly request one order and then use another;
Sipura and Grandstream ATAs are known to do this, and there may be others. To
be able to continue to use these devices with this version of Asterisk and the
G726-32 codec, a configuration parameter called 'g726nonstandard' has been added
to sip.conf, so that Asterisk can use the packing order expected by the device (even
though it requested a different order). In addition, the internal format number for
G726-32 has been changed, and the old number is now assigned to AAL2-G726-32. The
result of this is that this version of Asterisk will be able to interoperate over
IAX2 with older versions of Asterisk, as long as this version is told to allow
'g726aal2' instead of 'g726' as the codec for the call.
Installation:
* On BSD systems, the installation directories have changed to more "FreeBSDish"
directories. On startup, Asterisk will look for the main configuration in
/usr/local/etc/asterisk/asterisk.conf
If you have an old installation, you might want to remove the binaries and
move the configuration files to the new locations. The following directories
are now default:
ASTLIBDIR /usr/local/lib/asterisk
ASTVARLIBDIR /usr/local/share/asterisk
ASTETCDIR /usr/local/etc/asterisk
ASTBINDIR /usr/local/bin/asterisk
ASTSBINDIR /usr/local/sbin/asterisk
Music on Hold:
* The music on hold handling has been changed in some significant ways in hopes
to make it work in a way that is much less confusing to users. Behavior will
not change if the same configuration is used from older versions of Asterisk.
However, there are some new configuration options that will make things work
in a way that makes more sense.
Previously, many of the channel drivers had an option called "musicclass" or
something similar. This option set what music on hold class this channel
would *hear* when put on hold. Some people expected (with good reason) that
this option was to configure what music on hold class to play when putting
the bridged channel on hold. This option has now been deprecated.
Two new music on hold related configuration options for channel drivers have
been introduced. Some channel drivers support both options, some just one,
and some support neither of them. Check the sample configuration files to see
which options apply to which channel driver.
The "mohsuggest" option specifies which music on hold class to suggest to the
bridged channel when putting them on hold. The only way that this class can
be overridden is if the bridged channel has a specific music class set that
was done in the dialplan using Set(CHANNEL(musicclass)=something).
The "mohinterpret" option is similar to the old "musicclass" option. It
specifies which music on hold class this channel would like to listen to when
put on hold. This music class is only effective if this channel has no music
class set on it from the dialplan and the bridged channel putting this one on
hold had no "mohsuggest" setting.
The IAX2 and Zap channel drivers have an additional feature for the
"mohinterpret" option. If this option is set to "passthrough", then these
channel drivers will pass through the HOLD message in signalling instead of
starting music on hold on the channel. An example for how this would be
useful is in an enterprise network of Asterisk servers. When one phone on one
server puts a phone on a different server on hold, the remote server will be
responsible for playing the hold music to its local phone that was put on
hold instead of the far end server across the network playing the music.
CDR Records:
* The behavior of the "clid" field of the CDR has always been that it will
contain the callerid ANI if it is set, or the callerid number if ANI was not
set. When using the "callerid" option for various channel drivers, some
would set ANI and some would not. This has been cleared up so that all
channel drivers set ANI. If you would like to change the callerid number
on the channel from the dialplan and have that change also show up in the
CDR, then you *must* set CALLERID(ANI) as well as CALLERID(num).
API:
* There are some API functions that were not previously prefixed with the 'ast_'
prefix but now are; these include the ADSI, ODBC and AGI interfaces. If you
have a module that uses the services provided by res_adsi, res_odbc, or
res_agi, you will need to add ast_ prefixes to the functions that you call
from those modules.
Formats:
* format_wav: The GAIN preprocessor definition has been changed from 2 to 0
in Asterisk 1.4. This change was made in response to user complaints of
choppiness or the clipping of loud signal peaks. The GAIN preprocessor
definition will be retained in Asterisk 1.4, but will be removed in a
future release. The use of GAIN for the increasing of voicemail message
volume should use the 'volgain' option in voicemail.conf
iLBC Codec:
* Previously, the Asterisk source code distribution included the iLBC
encoder/decoder source code, from Global IP Solutions
(http://www.gipscorp.com). This code is not licensed for
distribution, and thus has been removed from the Asterisk source
code distribution. If you wish to use codec_ilbc to support iLBC
channels in Asterisk, you can run the contrib/scripts/get_ilbc_source.sh
script to download the source and put it in the proper place in
the Asterisk build tree. Once that is done you can follow your normal
steps of building Asterisk. You will need to run 'menuselect' and enable
the iLBC codec in the 'Codec Translators' category.
* With the addition of dialplan functions (which operate similarly
to variables), the SetVar application has been renamed to Set.
* The CallerPres application has been removed. Use SetCallerPres
instead. It accepts both numeric and symbolic names.
* The applications GetGroupCount, GetGroupMatchCount, SetGroup, and
CheckGroup have been deprecated in favor of functions. Here is a
table of their replacements:
GetGroupCount([groupname][@category] GROUP_COUNT([groupname][@category]) Set(GROUPCOUNT=${GROUP_COUNT()})
GroupMatchCount(groupmatch[@category]) GROUP_MATCH_COUNT(groupmatch[@category]) Set(GROUPCOUNT=${GROUP_MATCH_COUNT(SIP/.*)})
SetGroup(groupname[@category]) GROUP([category])=groupname Set(GROUP()=test)
CheckGroup(max[@category]) N/A GotoIf($[ ${GROUP_COUNT()} > 5 ]?103)
Note that CheckGroup does not have a direct replacement. There is
also a new function called GROUP_LIST() which will return a space
separated list of all of the groups set on a channel. The GROUP()
function can also return the name of the group set on a channel when
used in a read environment.
* The applications DBGet and DBPut have been deprecated in favor of
functions. Here is a table of their replacements:
DBGet(foo=family/key) Set(foo=${DB(family/key)})
DBPut(family/key=${foo}) Set(DB(family/key)=${foo})
* The application SetLanguage has been deprecated in favor of the
function LANGUAGE().
SetLanguage(fr) Set(LANGUAGE()=fr)
The LANGUAGE function can also return the currently set language:
Set(MYLANG=${LANGUAGE()})
* The applications AbsoluteTimeout, DigitTimeout, and ResponseTimeout
have been deprecated in favor of the function TIMEOUT(timeouttype):
AbsoluteTimeout(300) Set(TIMEOUT(absolute)=300)
DigitTimeout(15) Set(TIMEOUT(digit)=15)
ResponseTimeout(15) Set(TIMEOUT(response)=15)
The TIMEOUT() function can also return the currently set timeouts:
Set(DTIMEOUT=${TIMEOUT(digit)})
* The applications SetCIDName, SetCIDNum, and SetRDNIS have been
deprecated in favor of the CALLERID(datatype) function:
SetCIDName(Joe Cool) Set(CALLERID(name)=Joe Cool)
SetCIDNum(2025551212) Set(CALLERID(number)=2025551212)
SetRDNIS(2024561414) Set(CALLERID(RDNIS)=2024561414)
* The application Record now uses the period to separate the filename
from the format, rather than the colon.
* The application VoiceMail now supports a 'temporary' greeting for each
mailbox. This greeting can be recorded by using option 4 in the
'mailbox options' menu, and 'change your password' option has been
moved to option 5.
* The application VoiceMailMain now only matches the 'default' context if
none is specified in the arguments. (This was the previously
documented behavior, however, we didn't follow that behavior.) The old
behavior can be restored by setting searchcontexts=yes in voicemail.conf.
Queues:
* A queue is now considered empty not only if there are no members but if
none of the members are available (e.g. agents not logged on). To
restore the original behavior, use "leavewhenempty=strict" or
"joinwhenempty=strict" instead of "=yes" for those options.
* It is now possible to use multi-digit extensions in the exit context
for a queue (although you should not have overlapping extensions,
as there is no digit timeout). This means that the EXITWITHKEY event
in queue_log can now contain a key field with more than a single
character in it.
Extensions:
* By default, there is a new option called "autofallthrough" in
extensions.conf that is set to yes. Asterisk 1.0 (and earlier)
behavior was to wait for an extension to be dialed after there were no
more extensions to execute. "autofallthrough" changes this behavior
so that the call will immediately be terminated with BUSY,
CONGESTION, or HANGUP based on Asterisk's best guess. If you are
writing an extension for IVR, you must use the WaitExten application
if "autofallthrough" is set to yes.
AGI:
* AGI scripts did not always get SIGHUP at the end, previously. That
behavior has been fixed. If you do not want your script to terminate
at the end of AGI being called (e.g. on a hangup) then set SIGHUP to
be ignored within your application.
* CallerID is reported with agi_callerid and agi_calleridname instead
of a single parameter holding both.
Music On Hold:
* The preferred format for musiconhold.conf has changed; please see the
sample configuration file for the new format. The existing format
is still supported but will generate warnings when the module is loaded.
chan_modem:
* All the chan_modem channel drivers (aopen, bestdata and i4l) are deprecated
in this release, and will be removed in the next major Asterisk release.
Please migrate to chan_misdn for ISDN interfaces; there is no upgrade
path for aopen and bestdata modem users.
MeetMe:
* The conference application now allows users to increase/decrease their
speaking volume and listening volume (independently of each other and
other users); the 'admin' and 'user' menus have changed, and new sound
files are included with this release. However, if a user calling in
over a Zaptel channel that does NOT have hardware DTMF detection
increases their speaking volume, it is likely they will no longer be
able to enter/exit the menu or make any further adjustments, as the
software DTMF detector will not be able to recognize the DTMF coming
from their device.
GetVar Manager Action:
* Previously, the behavior of the GetVar manager action reported the value
of a variable in the following manner:
> name: value
This has been changed to a manner similar to the SetVar action and is now
> Variable: name
> Value: value

View File

@@ -1,105 +0,0 @@
=========================================================
=== Information for upgrading from Zaptel to DAHDI ===
=========================================================
As announced in early 2008, Digium is renaming the Zaptel telephony
interface project to DAHDI (Digium Asterisk Hardware Device Interface)
to accommodate the desires of the owner of the Zaptel trademark for
telephony purposes.
This version of Asterisk can be built using either Zaptel or DAHDI,
and has many changes to make the use of DAHDI as easy as possible for
existing users with dialplans, CDR parsers, AMI applications, and
others that expect Zaptel to be in use.
First, the modules that directly use services from Zaptel/DAHDI have been
renamed; the new names are:
chan_zap.so -> chan_dahdi.so
app_zapbarge.so -> app_dahdibarge.so
app_zapras.so -> app_dahdiras.so
app_zapscan.so -> app_dahdiscan.so
codec_zap.so -> codec_dahdi.so
However, in spite of the file name changes, the channels and
applications provided by these modules can still be used with 'Zap'
style names; see below for more information.
Second, there are have been a number of efforts made to ensure that
existing systems will not have to have any major configuration changes
made solely because Asterisk was built against DAHDI instead of
Zaptel. This includes:
chan_dahdi.so:
This module will determine which channel name ('Zap' or 'DAHDI')
should be used for incoming and outgoing channels based on the
build-time choice of telephony drivers. However, if you wish to
continue using the 'Zap' channel name even though you built Asterisk
against the DAHDI drivers, you can add the following line to the
[options] section of your /etc/asterisk/asterisk.conf file:
dahdichanname = no
All CLI commands that begin with 'zap' are now available as 'dahdi'
commands as well; the 'zap' variants will report that they are
deprecated the first time you use each one in an Asterisk instance,
but they will otherwise operate just as they did in previous versions.
All Asterisk Manager Interface (AMI) actions that begin with 'Zap'
are also available with 'DAHDI' prefixes.
The ZapSendKeypadFacility dialplan application is now available as
DAHDISendKeypadFacility as well; the Zap variant will report a deprecation
warning but will otherwise operate as it did it in previous
versions.
The configuration for the channel driver will be read from
/etc/asterisk/chan_dahdi.conf unless 'dahdichanname' has been set to
'no' in asterisk.conf; if that is done, then the configuration will
be read from /etc/asterisk/zapata.conf, just as it was in previous
versions.
app_dahdibarge.so:
The ZapBarge application is now available as DAHDIBarge as well; the
ZapBarge variant will report a deprecation warning when used, but
will otherwise operate as it did in previous versions. Regardless of
which application name is used, the application will restrict itself
to channels of the proper type, based on the 'dahdichanname' setting
in asterisk.conf.
app_dahdiras.so:
The ZapRAS application is now available as DAHDIRAS as well; the
ZapRAS variant will report a deprecation warning when used, but will
otherwise operate as it did in previous versions. Regardless of
which application name is used, the application will restrict itself
to channels of the proper type, based on the 'dahdichanname' setting
in asterisk.conf.
app_dahdiscan.so:
The ZapScan application is now available as DAHDIScan as well; the
ZapScan variant will report a deprecation warning when used, but will
otherwise operate as it did in previous versions. Regardless of
which application name is used, the application will restrict itself
to channels of the proper type, based on the 'dahdichanname' setting
in asterisk.conf.
app_flash.so:
This application has not had any name changes, but will report its
usage (via 'show application flash') as being for either DAHDI or
Zaptel channels based on the 'dahdichanname' setting in
asterisk.conf.
app_chanspy.so:
This application will transparently create 'DAHDI' or 'Zap' channels
as needed, based on the 'dahdichanname' setting in asterisk.conf.
app_meetme.so:
This application will transparently create 'DAHDI' or 'Zap' channels
as needed, based on the 'dahdichanname' setting in asterisk.conf.

View File

@@ -1,7 +1,7 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 1999 - 2006, Digium, Inc.
* Copyright (C) 1999 - 2005, Digium, Inc.
*
* Mark Spencer <markster@digium.com>
*
@@ -19,14 +19,9 @@
/*! \file
*
* \brief Various sorts of access control
*
* \author Mark Spencer <markster@digium.com>
*
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -39,20 +34,18 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <sys/socket.h>
#include <netdb.h>
#include <net/if.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <sys/ioctl.h>
#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__Darwin__)
#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)
#include <fcntl.h>
#include <net/route.h>
#endif
#if defined(SOLARIS)
#include <sys/sockio.h>
#include <net/if.h>
#elif defined(HAVE_GETIFADDRS)
#include <ifaddrs.h>
#endif
/* netinet/ip.h may not define the following (See RFCs 791 and 1349) */
@@ -64,6 +57,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#define IPTOS_MINCOST IPTOS_LOWCOST
#endif
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/acl.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
@@ -71,6 +68,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/utils.h"
#include "asterisk/lock.h"
#include "asterisk/srv.h"
#include "asterisk/compat.h"
#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)
AST_MUTEX_DEFINE_STATIC(routeseq_lock);
#endif
struct ast_ha {
/* Host access rule */
@@ -81,179 +83,18 @@ struct ast_ha {
};
/* Default IP - if not otherwise set, don't breathe garbage */
static struct in_addr __ourip = { .s_addr = 0x00000000, };
static struct in_addr __ourip = { 0x00000000 };
struct my_ifreq {
char ifrn_name[IFNAMSIZ]; /* Interface name, e.g. "eth0", "ppp0", etc. */
struct sockaddr_in ifru_addr;
};
#if (!defined(SOLARIS) && !defined(HAVE_GETIFADDRS))
static int get_local_address(struct in_addr *ourip)
{
return -1;
}
#else
static void score_address(const struct sockaddr_in *sin, struct in_addr *best_addr, int *best_score)
{
const char *address;
int score;
address = ast_inet_ntoa(sin->sin_addr);
/* RFC 1700 alias for the local network */
if (address[0] == '0')
score = -25;
/* RFC 1700 localnet */
else if (strncmp(address, "127", 3) == 0)
score = -20;
/* RFC 1918 non-public address space */
else if (strncmp(address, "10.", 3) == 0)
score = -5;
/* RFC 1918 non-public address space */
else if (strncmp(address, "172", 3) == 0) {
/* 172.16.0.0 - 172.19.255.255, but not 172.160.0.0 - 172.169.255.255 */
if (address[4] == '1' && address[5] >= '6' && address[6] == '.')
score = -5;
/* 172.20.0.0 - 172.29.255.255, but not 172.200.0.0 - 172.255.255.255 nor 172.2.0.0 - 172.2.255.255 */
else if (address[4] == '2' && address[6] == '.')
score = -5;
/* 172.30.0.0 - 172.31.255.255 */
else if (address[4] == '3' && address[5] <= '1')
score = -5;
/* All other 172 addresses are public */
else
score = 0;
/* RFC 2544 Benchmark test range */
} else if (strncmp(address, "198.1", 5) == 0 && address[5] >= '8' && address[6] == '.')
score = -10;
/* RFC 1918 non-public address space */
else if (strncmp(address, "192.168", 7) == 0)
score = -5;
/* RFC 3330 Zeroconf network */
else if (strncmp(address, "169.254", 7) == 0)
/*!\note Better score than a test network, but not quite as good as RFC 1918
* address space. The reason is that some Linux distributions automatically
* configure a Zeroconf address before trying DHCP, so we want to prefer a
* DHCP lease to a Zeroconf address.
*/
score = -10;
/* RFC 3330 Test network */
else if (strncmp(address, "192.0.2.", 8) == 0)
score = -15;
/* Every other address should be publically routable */
else
score = 0;
if (score > *best_score) {
*best_score = score;
memcpy(best_addr, &sin->sin_addr, sizeof(*best_addr));
}
}
static int get_local_address(struct in_addr *ourip)
{
int s, res = -1;
#ifdef SOLARIS
struct lifreq *ifr = NULL;
struct lifnum ifn;
struct lifconf ifc;
struct sockaddr_in *sa;
char *buf = NULL;
int bufsz, x;
#endif /* SOLARIS */
#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__)
struct ifaddrs *ifap, *ifaphead;
int rtnerr;
const struct sockaddr_in *sin;
#endif /* BSD_OR_LINUX */
struct in_addr best_addr;
int best_score = -100;
memset(&best_addr, 0, sizeof(best_addr));
#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__)
rtnerr = getifaddrs(&ifaphead);
if (rtnerr) {
perror(NULL);
return -1;
}
#endif /* BSD_OR_LINUX */
s = socket(AF_INET, SOCK_STREAM, 0);
if (s > 0) {
#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__)
for (ifap = ifaphead; ifap; ifap = ifap->ifa_next) {
if (ifap->ifa_addr && ifap->ifa_addr->sa_family == AF_INET) {
sin = (const struct sockaddr_in *) ifap->ifa_addr;
score_address(sin, &best_addr, &best_score);
res = 0;
if (best_score == 0)
break;
}
}
#endif /* BSD_OR_LINUX */
/* There is no reason whatsoever that this shouldn't work on Linux or BSD also. */
#ifdef SOLARIS
/* Get a count of interfaces on the machine */
ifn.lifn_family = AF_INET;
ifn.lifn_flags = 0;
ifn.lifn_count = 0;
if (ioctl(s, SIOCGLIFNUM, &ifn) < 0) {
close(s);
return -1;
}
bufsz = ifn.lifn_count * sizeof(struct lifreq);
if (!(buf = malloc(bufsz))) {
close(s);
return -1;
}
memset(buf, 0, bufsz);
/* Get a list of interfaces on the machine */
ifc.lifc_len = bufsz;
ifc.lifc_buf = buf;
ifc.lifc_family = AF_INET;
ifc.lifc_flags = 0;
if (ioctl(s, SIOCGLIFCONF, &ifc) < 0) {
close(s);
free(buf);
return -1;
}
for (ifr = ifc.lifc_req, x = 0; x < ifn.lifn_count; ifr++, x++) {
sa = (struct sockaddr_in *)&(ifr->lifr_addr);
score_address(sa, &best_addr, &best_score);
res = 0;
if (best_score == 0)
break;
}
free(buf);
#endif /* SOLARIS */
close(s);
}
#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__)
freeifaddrs(ifaphead);
#endif /* BSD_OR_LINUX */
if (res == 0 && ourip)
memcpy(ourip, &best_addr, sizeof(*ourip));
return res;
}
#endif /* HAVE_GETIFADDRS */
/* Free HA structure */
void ast_free_ha(struct ast_ha *ha)
{
struct ast_ha *hal;
while (ha) {
while(ha) {
hal = ha;
ha = ha->next;
free(hal);
@@ -271,12 +112,9 @@ static void ast_copy_ha(struct ast_ha *from, struct ast_ha *to)
/* Create duplicate of ha structure */
static struct ast_ha *ast_duplicate_ha(struct ast_ha *original)
{
struct ast_ha *new_ha;
if ((new_ha = ast_malloc(sizeof(*new_ha)))) {
/* Copy from original to new object */
ast_copy_ha(original, new_ha);
}
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;
}
@@ -285,16 +123,16 @@ static struct ast_ha *ast_duplicate_ha(struct ast_ha *original)
/* Used in chan_sip2 templates */
struct ast_ha *ast_duplicate_ha_list(struct ast_ha *original)
{
struct ast_ha *start = original;
struct ast_ha *start=original;
struct ast_ha *ret = NULL;
struct ast_ha *link, *prev = 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)
if (!ret)
ret = link; /* Save starting point */
start = start->next; /* Go to next object */
@@ -305,20 +143,19 @@ struct ast_ha *ast_duplicate_ha_list(struct ast_ha *original)
struct ast_ha *ast_append_ha(char *sense, char *stuff, struct ast_ha *path)
{
struct ast_ha *ha;
struct ast_ha *ha = malloc(sizeof(struct ast_ha));
char *nm = "255.255.255.255";
char tmp[256];
struct ast_ha *prev = NULL;
struct ast_ha *ret;
int x, z;
unsigned int y;
ret = path;
while (path) {
prev = path;
path = path->next;
}
if ((ha = ast_malloc(sizeof(*ha)))) {
if (ha) {
ast_copy_string(tmp, stuff, sizeof(tmp));
nm = strchr(tmp, '/');
if (!nm) {
@@ -330,7 +167,7 @@ struct ast_ha *ast_append_ha(char *sense, char *stuff, struct ast_ha *path)
if (!strchr(nm, '.')) {
if ((sscanf(nm, "%d", &x) == 1) && (x >= 0) && (x <= 32)) {
y = 0;
for (z = 0; z < x; z++) {
for (z=0;z<x;z++) {
y >>= 1;
y |= 0x80000000;
}
@@ -359,8 +196,7 @@ struct ast_ha *ast_append_ha(char *sense, char *stuff, struct ast_ha *path)
ret = ha;
}
}
if (option_debug)
ast_log(LOG_DEBUG, "%s/%s appended to acl for peer\n", stuff, nm);
ast_log(LOG_DEBUG, "%s/%s appended to acl for peer\n", stuff, nm);
return ret;
}
@@ -372,10 +208,10 @@ int ast_apply_ha(struct ast_ha *ha, struct sockaddr_in *sin)
char iabuf[INET_ADDRSTRLEN];
char iabuf2[INET_ADDRSTRLEN];
/* DEBUG */
ast_copy_string(iabuf, ast_inet_ntoa(sin->sin_addr), sizeof(iabuf));
ast_copy_string(iabuf2, ast_inet_ntoa(ha->netaddr), sizeof(iabuf2));
if (option_debug)
ast_log(LOG_DEBUG, "##### Testing %s with %s\n", iabuf, iabuf2);
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)
@@ -411,55 +247,12 @@ int ast_get_ip_or_srv(struct sockaddr_in *sin, const char *value, const char *se
return 0;
}
struct dscp_codepoint {
char *name;
unsigned int space;
};
/* IANA registered DSCP codepoints */
static const struct dscp_codepoint dscp_pool1[] = {
{ "CS0", 0x00 },
{ "CS1", 0x08 },
{ "CS2", 0x10 },
{ "CS3", 0x18 },
{ "CS4", 0x20 },
{ "CS5", 0x28 },
{ "CS6", 0x30 },
{ "CS7", 0x38 },
{ "AF11", 0x0A },
{ "AF12", 0x0C },
{ "AF13", 0x0E },
{ "AF21", 0x12 },
{ "AF22", 0x14 },
{ "AF23", 0x16 },
{ "AF31", 0x1A },
{ "AF32", 0x1C },
{ "AF33", 0x1E },
{ "AF41", 0x22 },
{ "AF42", 0x24 },
{ "AF43", 0x26 },
{ "EF", 0x2E },
};
int ast_str2tos(const char *value, unsigned int *tos)
int ast_str2tos(const char *value, int *tos)
{
int fval;
unsigned int x;
if (sscanf(value, "%i", &fval) == 1) {
*tos = fval & 0xFF;
return 0;
}
for (x = 0; x < sizeof(dscp_pool1) / sizeof(dscp_pool1[0]); x++) {
if (!strcasecmp(value, dscp_pool1[x].name)) {
*tos = dscp_pool1[x].space << 2;
return 0;
}
}
if (!strcasecmp(value, "lowdelay"))
if (sscanf(value, "%i", &fval) == 1)
*tos = fval & 0xff;
else if (!strcasecmp(value, "lowdelay"))
*tos = IPTOS_LOWDELAY;
else if (!strcasecmp(value, "throughput"))
*tos = IPTOS_THROUGHPUT;
@@ -471,44 +264,16 @@ int ast_str2tos(const char *value, unsigned int *tos)
*tos = 0;
else
return -1;
ast_log(LOG_WARNING, "TOS value %s is deprecated. Please see doc/ip-tos.txt for more information.\n", value);
return 0;
}
const char *ast_tos2str(unsigned int tos)
{
unsigned int x;
switch (tos) {
case 0:
return "none";
case IPTOS_LOWDELAY:
return "lowdelay";
case IPTOS_THROUGHPUT:
return "throughput";
case IPTOS_RELIABILITY:
return "reliability";
case IPTOS_MINCOST:
return "mincost";
default:
for (x = 0; x < sizeof(dscp_pool1) / sizeof(dscp_pool1[0]); x++) {
if (dscp_pool1[x].space == (tos >> 2))
return dscp_pool1[x].name;
}
}
return "unknown";
}
int ast_get_ip(struct sockaddr_in *sin, const char *value)
{
return ast_get_ip_or_srv(sin, value, NULL);
}
/* iface is the interface (e.g. eth0); address is the return value */
int ast_lookup_iface(char *iface, struct in_addr *address)
int ast_lookup_iface(char *iface, struct in_addr *address)
{
int mysock, res = 0;
struct my_ifreq ifreq;
@@ -585,6 +350,6 @@ int ast_find_ourip(struct in_addr *ourip, struct sockaddr_in bindaddr)
/* A.ROOT-SERVERS.NET. */
if (inet_aton("198.41.0.4", &saddr) && !ast_ouraddrfor(&saddr, ourip))
return 0;
return get_local_address(ourip);
return -1;
}

View File

@@ -31,16 +31,12 @@
Issue Date: 26/08/2003
*/
/*! \file
*
* \brief This file contains the code for implementing encryption and decryption
* for AES (Rijndael) for block and key sizes of 16, 24 and 32 bytes. It
* can optionally be replaced by code written in assembler using NASM. For
* further details see the file aesopt.h
*
* \author Dr Brian Gladman <brg@gladman.me.uk>
*/
\brief This file contains the code for implementing encryption and decryption
for AES (Rijndael) for block and key sizes of 16, 24 and 32 bytes. It
can optionally be replaced by code written in assembler using NASM. For
further details see the file aesopt.h
*/
#include "aesopt.h"

View File

@@ -31,15 +31,11 @@
Issue Date: 26/08/2003
*/
/*! \file
*
* \brief This file contains the code for implementing the key schedule for AES
* (Rijndael) for block and key sizes of 16, 24, and 32 bytes. See aesopt.h
* for further details including optimisation.
*
* \author Dr Brian Gladman <brg@gladman.me.uk>
*/
\brief This file contains the code for implementing the key schedule for AES
(Rijndael) for block and key sizes of 16, 24, and 32 bytes. See aesopt.h
for further details including optimisation.
*/
#include "aesopt.h"

View File

@@ -3,7 +3,7 @@
#
# Makefile for AGI-related stuff
#
# Copyright (C) 1999-2006, Digium
# Copyright (C) 1999-2005, Digium
#
# Mark Spencer <markster@digium.com>
#
@@ -11,37 +11,42 @@
# the GNU General Public License
#
.PHONY: clean all uninstall
AGIS=agi-test.agi eagi-test eagi-sphinx-test
AGIS=agi-test.agi eagi-test eagi-sphinx-test jukebox.agi
CFLAGS+=-DNO_AST_MM
LIBS=
ifeq ($(OSARCH),SunOS)
LIBS+=-lsocket -lnsl
LIBS=-lsocket -lnsl ../strcompat.o
endif
include $(ASTTOPDIR)/Makefile.rules
ifeq ($(findstring BSD,${OSARCH}),BSD)
CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
endif
all: $(AGIS)
strcompat.c: ../main/strcompat.c
@cp $< $@
eagi-test: eagi-test.o strcompat.o
eagi-sphinx-test: eagi-sphinx-test.o
all: depend $(AGIS)
install: all
mkdir -p $(DESTDIR)$(AGI_DIR)
for x in $(AGIS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(AGI_DIR) ; done
uninstall:
for x in $(AGIS); do rm -f $(DESTDIR)$(AGI_DIR)/$$x ; done
eagi-test: eagi-test.o
$(CC) $(CFLAGS) -o eagi-test eagi-test.o $(LIBS)
eagi-sphinx-test: eagi-sphinx-test.o
$(CC) $(CFLAGS) -o eagi-sphinx-test eagi-sphinx-test.o $(LIBS)
clean:
rm -f *.so *.o look eagi-test eagi-sphinx-test
rm -f .*.d *.s *.i
rm -f strcompat.c
rm -f *.so *.o look .depend eagi-test eagi-sphinx-test
ifneq ($(wildcard .*.d),)
include .*.d
%.so : %.o
$(CC) -shared -Xlinker -x -o $@ $<
ifneq ($(wildcard .depend),)
include .depend
endif
depend: .depend
.depend:
../build_tools/mkdep $(CFLAGS) `ls *.c`

View File

@@ -17,10 +17,7 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include "asterisk.h"
#include "asterisk/compat.h"
#include <asterisk/compat.h>
#define AUDIO_FILENO (STDERR_FILENO + 1)
@@ -70,9 +67,7 @@ static int read_environment(void)
char *val;
/* Read environment */
for(;;) {
if (!fgets(buf, sizeof(buf), stdin)) {
return -1;
}
fgets(buf, sizeof(buf), stdin);
if (feof(stdin))
return -1;
buf[strlen(buf) - 1] = '\0';
@@ -123,9 +118,7 @@ static char *wait_result(void)
return NULL;
}
if (FD_ISSET(STDIN_FILENO, &fds)) {
if (!fgets(astresp, sizeof(astresp), stdin)) {
return NULL;
}
fgets(astresp, sizeof(astresp), stdin);
if (feof(stdin)) {
fprintf(stderr, "Got hungup on apparently\n");
return NULL;
@@ -136,10 +129,9 @@ static char *wait_result(void)
}
if (FD_ISSET(AUDIO_FILENO, &fds)) {
res = read(AUDIO_FILENO, audiobuf, sizeof(audiobuf));
if ((res > 0) && (sphinx_sock > -1)) {
if (write(sphinx_sock, audiobuf, res) < 0) {
fprintf(stderr, "write() failed: %s\n", strerror(errno));
}
if (res > 0) {
if (sphinx_sock > -1)
write(sphinx_sock, audiobuf, res);
}
}
if ((sphinx_sock > -1) && FD_ISSET(sphinx_sock, &fds)) {

View File

@@ -11,10 +11,7 @@
#include <errno.h>
#include <string.h>
#include <sys/select.h>
#include "asterisk.h"
#include "asterisk/compat.h"
#include <asterisk/compat.h>
#define AUDIO_FILENO (STDERR_FILENO + 1)
@@ -24,9 +21,7 @@ static int read_environment(void)
char *val;
/* Read environment */
for(;;) {
if (!fgets(buf, sizeof(buf), stdin)) {
return -1;
}
fgets(buf, sizeof(buf), stdin);
if (feof(stdin))
return -1;
buf[strlen(buf) - 1] = '\0';
@@ -70,9 +65,7 @@ static char *wait_result(void)
return NULL;
}
if (FD_ISSET(STDIN_FILENO, &fds)) {
if (!fgets(astresp, sizeof(astresp), stdin)) {
return NULL;
}
fgets(astresp, sizeof(astresp), stdin);
if (feof(stdin)) {
fprintf(stderr, "Got hungup on apparently\n");
return NULL;

View File

@@ -1,488 +0,0 @@
#!/usr/bin/perl
#
# Jukebox 0.2
#
# A music manager for Asterisk.
#
# Copyright (C) 2005-2006, Justin Tunney
#
# Justin Tunney <jesuscyborg@gmail.com>
#
# This program is free software, distributed under the terms of the
# GNU General Public License v2.
#
# Keep it open source pigs
#
# --------------------------------------------------------------------
#
# Uses festival to list off all your MP3 music files over a channel in
# a hierarchical fashion. Put this file in your agi-bin folder which
# is located at: /var/lib/asterisk/agi-bin Be sure to chmod +x it!
#
# Invocation Example:
# exten => 68742,1,Answer()
# exten => 68742,2,agi,jukebox.agi|/home/justin/Music
# exten => 68742,3,Hangup()
#
# exten => 68742,1,Answer()
# exten => 68742,2,agi,jukebox.agi|/home/justin/Music|pm
# exten => 68742,3,Hangup()
#
# Options:
# p - Precache text2wave outputs for every possible filename.
# It is much better to set this option because if a caller
# presses a key during a cache operation, it will be ignored.
# m - Go back to menu after playing song
# g - Do not play the greeting message
#
# Usage Instructions:
# - Press '*' to go up a directory. If you are in the root music
# folder you will be exitted from the script.
# - If you have a really long list of files, you can filter the list
# at any time by pressing '#' and spelling out a few letters you
# expect the files to start with. For example, if you wanted to
# know what extension 'Requiem For A Dream' was, you'd type:
# '#737'. Note, phone keypads don't include Q and Z. Q is 7 and
# Z is 9.
#
# Notes:
# - This AGI script uses the MP3Player command which uses the
# mpg123 Program. Grab yourself a copy of this program by
# going to http://www.mpg123.de/cgi-bin/sitexplorer.cgi?/mpg123/
# Be sure to download mpg123-0.59r.tar.gz because it is known to
# work with Asterisk and hopefully isn't the release with that
# awful security problem. If you're using Fedora Core 3 with
# Alsa like me, make linux-alsa isn't going to work. Do make
# linux-devel and you're peachy keen.
#
# - You won't get nifty STDERR debug messages if you're using a
# remote asterisk shell.
#
# - For some reason, caching certain files will generate the
# error: 'using default diphone ax-ax for y-pau'. Example:
# # echo "Depeche Mode - CUW - 05 - The Meaning of Love" | text2wave -o /var/jukeboxcache/jukeboxcache/Depeche_Mode/Depeche_Mode_-_CUW_-_05_-_The_Meaning_of_Love.mp3.ul -otype ulaw -
# The temporary work around is to just touch these files.
#
# - The background app doesn't like to get more than 2031 chars
# of input.
#
use strict;
$|=1;
# Setup some variables
my %AGI; my $tests = 0; my $fail = 0; my $pass = 0;
my @masterCacheList = ();
my $maxNumber = 10;
while (<STDIN>) {
chomp;
last unless length($_);
if (/^agi_(\w+)\:\s+(.*)$/) {
$AGI{$1} = $2;
}
}
# setup options
my $SHOWGREET = 1;
my $PRECACHE = 0;
my $MENUAFTERSONG = 0;
$PRECACHE = 1 if $ARGV[1] =~ /p/;
$MENUAFTERSONG = 1 if $ARGV[1] =~ /m/;
$SHOWGREET = 0 if $ARGV[1] =~ /g/;
# setup folders
my $MUSIC = $ARGV[0];
$MUSIC = &rmts($MUSIC);
my $FESTIVALCACHE = "/var/jukeboxcache";
if (! -e $FESTIVALCACHE) {
`mkdir -p -m0776 $FESTIVALCACHE`;
}
# make sure we have some essential files
if (! -e "$FESTIVALCACHE/jukebox_greet.ul") {
`echo "Welcome to the Asterisk Jukebox" | text2wave -o $FESTIVALCACHE/jukebox_greet.ul -otype ulaw -`;
}
if (! -e "$FESTIVALCACHE/jukebox_press.ul") {
`echo "Press" | text2wave -o $FESTIVALCACHE/jukebox_press.ul -otype ulaw -`;
}
if (! -e "$FESTIVALCACHE/jukebox_for.ul") {
`echo "For" | text2wave -o $FESTIVALCACHE/jukebox_for.ul -otype ulaw -`;
}
if (! -e "$FESTIVALCACHE/jukebox_toplay.ul") {
`echo "To play" | text2wave -o $FESTIVALCACHE/jukebox_toplay.ul -otype ulaw -`;
}
if (! -e "$FESTIVALCACHE/jukebox_nonefound.ul") {
`echo "There were no music files found in this folder" | text2wave -o $FESTIVALCACHE/jukebox_nonefound.ul -otype ulaw -`;
}
if (! -e "$FESTIVALCACHE/jukebox_percent.ul") {
`echo "Percent" | text2wave -o $FESTIVALCACHE/jukebox_percent.ul -otype ulaw -`;
}
if (! -e "$FESTIVALCACHE/jukebox_generate.ul") {
`echo "Please wait while Astrisk Jukebox cashes the files of your music collection" | text2wave -o $FESTIVALCACHE/jukebox_generate.ul -otype ulaw -`;
}
if (! -e "$FESTIVALCACHE/jukebox_invalid.ul") {
`echo "You have entered an invalid selection" | text2wave -o $FESTIVALCACHE/jukebox_invalid.ul -otype ulaw -`;
}
if (! -e "$FESTIVALCACHE/jukebox_thankyou.ul") {
`echo "Thank you for using Astrisk Jukebox, Goodbye" | text2wave -o $FESTIVALCACHE/jukebox_thankyou.ul -otype ulaw -`;
}
# greet the user
if ($SHOWGREET) {
print "EXEC Playback \"$FESTIVALCACHE/jukebox_greet\"\n";
my $result = <STDIN>; &check_result($result);
}
# go through the directories
music_dir_cache() if $PRECACHE;
music_dir_menu('/');
exit 0;
##########################################################################
sub music_dir_menu {
my $dir = shift;
# generate a list of mp3's and directories and assign each one it's
# own selection number. Then make sure that we've got a sound clip
# for the file name
if (!opendir(THEDIR, rmts($MUSIC.$dir))) {
print STDERR "Failed to open music directory: $dir\n";
exit 1;
}
my @files = sort readdir THEDIR;
my $cnt = 1;
my @masterBgList = ();
foreach my $file (@files) {
chomp($file);
if ($file ne '.' && $file ne '..' && $file ne 'festivalcache') { # ignore special files
my $real_version = &rmts($MUSIC.$dir).'/'.$file;
my $cache_version = &rmts($FESTIVALCACHE.$dir).'/'.$file.'.ul';
my $cache_version2 = &rmts($FESTIVALCACHE.$dir).'/'.$file;
my $cache_version_esc = &clean_file($cache_version);
my $cache_version2_esc = &clean_file($cache_version2);
if (-d $real_version) {
# 0:id 1:type 2:text2wav-file 3:for-filtering 4:the-directory 5:text2wav echo
push(@masterBgList, [$cnt++, 1, $cache_version2_esc, &remove_special_chars($file), $file, "for the $file folder"]);
} elsif ($real_version =~ /\.mp3$/) {
# 0:id 1:type 2:text2wav-file 3:for-filtering 4:the-mp3
push(@masterBgList, [$cnt++, 2, $cache_version2_esc, &remove_special_chars($file), $real_version, "to play $file"]);
}
}
}
close(THEDIR);
my @filterList = @masterBgList;
if (@filterList == 0) {
print "EXEC Playback \"$FESTIVALCACHE/jukebox_nonefound\"\n";
my $result = <STDIN>; &check_result($result);
return 0;
}
for (;;) {
MYCONTINUE:
# play bg selections and figure out their selection
my $digit = '';
my $digitstr = '';
for (my $n=0; $n<@filterList; $n++) {
&cache_speech(&remove_file_extension($filterList[$n][5]), "$filterList[$n][2].ul") if ! -e "$filterList[$n][2].ul";
&cache_speech("Press $filterList[$n][0]", "$FESTIVALCACHE/jukebox_$filterList[$n][0].ul") if ! -e "$FESTIVALCACHE/jukebox_$filterList[$n][0].ul";
print "EXEC Background \"$filterList[$n][2]&$FESTIVALCACHE/jukebox_$filterList[$n][0]\"\n";
my $result = <STDIN>;
$digit = &check_result($result);
if ($digit > 0) {
$digitstr .= chr($digit);
last;
}
}
for (;;) {
print "WAIT FOR DIGIT 3000\n";
my $result = <STDIN>;
$digit = &check_result($result);
last if $digit <= 0;
$digitstr .= chr($digit);
}
# see if it's a valid selection
print STDERR "Digits Entered: '$digitstr'\n";
exit 0 if $digitstr eq '';
my $found = 0;
goto EXITSUB if $digitstr =~ /\*/;
# filter the list
if ($digitstr =~ /^\#\d+/) {
my $regexp = '';
for (my $n=1; $n<length($digitstr); $n++) {
my $d = substr($digitstr, $n, 1);
if ($d == 2) {
$regexp .= '[abc]';
} elsif ($d == 3) {
$regexp .= '[def]';
} elsif ($d == 4) {
$regexp .= '[ghi]';
} elsif ($d == 5) {
$regexp .= '[jkl]';
} elsif ($d == 6) {
$regexp .= '[mno]';
} elsif ($d == 7) {
$regexp .= '[pqrs]';
} elsif ($d == 8) {
$regexp .= '[tuv]';
} elsif ($d == 9) {
$regexp .= '[wxyz]';
}
}
@filterList = ();
for (my $n=1; $n<@masterBgList; $n++) {
push(@filterList, $masterBgList[$n]) if $masterBgList[$n][3] =~ /^$regexp/i;
}
goto MYCONTINUE;
}
for (my $n=0; $n<@masterBgList; $n++) {
if ($digitstr == $masterBgList[$n][0]) {
if ($masterBgList[$n][1] == 1) { # a folder
&music_dir_menu(rmts($dir).'/'.$masterBgList[$n][4]);
@filterList = @masterBgList;
goto MYCONTINUE;
} elsif ($masterBgList[$n][1] == 2) { # a file
# because *'s scripting language is crunk and won't allow us to escape
# funny filenames, we need to create a temporary symlink to the mp3
# file
my $mp3 = &escape_file($masterBgList[$n][4]);
my $link = `mktemp`;
chomp($link);
$link .= '.mp3';
print STDERR "ln -s $mp3 $link\n";
my $cmdr = `ln -s $mp3 $link`;
chomp($cmdr);
print "Failed to create symlink to mp3: $cmdr\n" if $cmdr ne '';
print "EXEC MP3Player \"$link\"\n";
my $result = <STDIN>; &check_result($result);
`rm $link`;
if (!$MENUAFTERSONG) {
print "EXEC Playback \"$FESTIVALCACHE/jukebox_thankyou\"\n";
my $result = <STDIN>; &check_result($result);
exit 0;
} else {
goto MYCONTINUE;
}
}
}
}
print "EXEC Playback \"$FESTIVALCACHE/jukebox_invalid\"\n";
my $result = <STDIN>; &check_result($result);
}
EXITSUB:
}
sub cache_speech {
my $speech = shift;
my $file = shift;
my $theDir = extract_file_dir($file);
`mkdir -p -m0776 $theDir`;
print STDERR "echo \"$speech\" | text2wave -o $file -otype ulaw -\n";
my $cmdr = `echo "$speech" | text2wave -o $file -otype ulaw -`;
chomp($cmdr);
if ($cmdr =~ /using default diphone/) {
# temporary bug work around....
`touch $file`;
} elsif ($cmdr ne '') {
print STDERR "Command Failed\n";
exit 1;
}
}
sub music_dir_cache {
# generate list of text2speech files to generate
if (!music_dir_cache_genlist('/')) {
print STDERR "Horrible Dreadful Error: No Music Found in $MUSIC!";
exit 1;
}
# add to list how many 'number' files we have to generate. We can't
# use the SayNumber app in Asterisk because we want to chain all
# talking in one Background command. We also want a consistent
# voice...
for (my $n=1; $n<=$maxNumber; $n++) {
push(@masterCacheList, [3, "Press $n", "$FESTIVALCACHE/jukebox_$n.ul"]) if ! -e "$FESTIVALCACHE/jukebox_$n.ul";
}
# now generate all these darn text2speech files
if (@masterCacheList > 5) {
print "EXEC Playback \"$FESTIVALCACHE/jukebox_generate\"\n";
my $result = <STDIN>; &check_result($result);
}
my $theTime = time();
for (my $n=0; $n < @masterCacheList; $n++) {
my $cmdr = '';
if ($masterCacheList[$n][0] == 1) { # directory
&cache_speech("for folder $masterCacheList[$n][1]", $masterCacheList[$n][2]);
} elsif ($masterCacheList[$n][0] == 2) { # file
&cache_speech("to play $masterCacheList[$n][1]", $masterCacheList[$n][2]);
} elsif ($masterCacheList[$n][0] == 3) { # number
&cache_speech($masterCacheList[$n][1], $masterCacheList[$n][2]);
}
if (time() >= $theTime + 30) {
my $percent = int($n / @masterCacheList * 100);
print "SAY NUMBER $percent \"\"\n";
my $result = <STDIN>; &check_result($result);
print "EXEC Playback \"$FESTIVALCACHE/jukebox_percent\"\n";
my $result = <STDIN>; &check_result($result);
$theTime = time();
}
}
}
# this function will fill the @masterCacheList of all the files that
# need to have text2speeced ulaw files of their names generated
sub music_dir_cache_genlist {
my $dir = shift;
if (!opendir(THEDIR, rmts($MUSIC.$dir))) {
print STDERR "Failed to open music directory: $dir\n";
exit 1;
}
my @files = sort readdir THEDIR;
my $foundFiles = 0;
my $tmpMaxNum = 0;
foreach my $file (@files) {
chomp;
if ($file ne '.' && $file ne '..' && $file ne 'festivalcache') { # ignore special files
my $real_version = &rmts($MUSIC.$dir).'/'.$file;
my $cache_version = &rmts($FESTIVALCACHE.$dir).'/'.$file.'.ul';
my $cache_version2 = &rmts($FESTIVALCACHE.$dir).'/'.$file;
my $cache_version_esc = &clean_file($cache_version);
my $cache_version2_esc = &clean_file($cache_version2);
if (-d $real_version) {
if (music_dir_cache_genlist(rmts($dir).'/'.$file)) {
$tmpMaxNum++;
$maxNumber = $tmpMaxNum if $tmpMaxNum > $maxNumber;
push(@masterCacheList, [1, $file, $cache_version_esc]) if ! -e $cache_version_esc;
$foundFiles = 1;
}
} elsif ($real_version =~ /\.mp3$/) {
$tmpMaxNum++;
$maxNumber = $tmpMaxNum if $tmpMaxNum > $maxNumber;
push(@masterCacheList, [2, &remove_file_extension($file), $cache_version_esc]) if ! -e $cache_version_esc;
$foundFiles = 1;
}
}
}
close(THEDIR);
return $foundFiles;
}
sub rmts { # remove trailing slash
my $hog = shift;
$hog =~ s/\/$//;
return $hog;
}
sub extract_file_name {
my $hog = shift;
$hog =~ /\/?([^\/]+)$/;
return $1;
}
sub extract_file_dir {
my $hog = shift;
return $hog if ! ($hog =~ /\//);
$hog =~ /(.*)\/[^\/]*$/;
return $1;
}
sub remove_file_extension {
my $hog = shift;
return $hog if ! ($hog =~ /\./);
$hog =~ /(.*)\.[^.]*$/;
return $1;
}
sub clean_file {
my $hog = shift;
$hog =~ s/\\/_/g;
$hog =~ s/ /_/g;
$hog =~ s/\t/_/g;
$hog =~ s/\'/_/g;
$hog =~ s/\"/_/g;
$hog =~ s/\(/_/g;
$hog =~ s/\)/_/g;
$hog =~ s/&/_/g;
$hog =~ s/\[/_/g;
$hog =~ s/\]/_/g;
$hog =~ s/\$/_/g;
$hog =~ s/\|/_/g;
$hog =~ s/\^/_/g;
return $hog;
}
sub remove_special_chars {
my $hog = shift;
$hog =~ s/\\//g;
$hog =~ s/ //g;
$hog =~ s/\t//g;
$hog =~ s/\'//g;
$hog =~ s/\"//g;
$hog =~ s/\(//g;
$hog =~ s/\)//g;
$hog =~ s/&//g;
$hog =~ s/\[//g;
$hog =~ s/\]//g;
$hog =~ s/\$//g;
$hog =~ s/\|//g;
$hog =~ s/\^//g;
return $hog;
}
sub escape_file {
my $hog = shift;
$hog =~ s/\\/\\\\/g;
$hog =~ s/ /\\ /g;
$hog =~ s/\t/\\\t/g;
$hog =~ s/\'/\\\'/g;
$hog =~ s/\"/\\\"/g;
$hog =~ s/\(/\\\(/g;
$hog =~ s/\)/\\\)/g;
$hog =~ s/&/\\&/g;
$hog =~ s/\[/\\\[/g;
$hog =~ s/\]/\\\]/g;
$hog =~ s/\$/\\\$/g;
$hog =~ s/\|/\\\|/g;
$hog =~ s/\^/\\\^/g;
return $hog;
}
sub check_result {
my ($res) = @_;
my $retval;
$tests++;
chomp $res;
if ($res =~ /^200/) {
$res =~ /result=(-?\d+)/;
if (!length($1)) {
print STDERR "FAIL ($res)\n";
$fail++;
exit 1;
} else {
print STDERR "PASS ($1)\n";
return $1;
}
} else {
print STDERR "FAIL (unexpected result '$res')\n";
exit 1;
}
}

View File

@@ -19,8 +19,7 @@
/*! \file
*
* \brief u-Law to Signed linear conversion
*
* \author Mark Spencer <markster@digium.com>
*
*/
#include "asterisk.h"
@@ -71,7 +70,7 @@ static inline short int alaw2linear (unsigned char alaw)
int seg;
alaw ^= AMI_MASK;
i = ((alaw & 0x0F) << 4) + 8 /* rounding error */;
i = ((alaw & 0x0F) << 4);
seg = (((int) alaw & 0x70) >> 4);
if (seg)
i = (i + 0x100) << (seg - 1);

File diff suppressed because it is too large Load Diff

View File

@@ -3,40 +3,128 @@
#
# Makefile for PBX applications
#
# Copyright (C) 1999-2006, Digium, Inc.
# Copyright (C) 1999-2005, Digium
#
# Mark Spencer <markster@digium.com>
#
# This program is free software, distributed under the terms of
# the GNU General Public License
#
-include ../menuselect.makeopts ../menuselect.makedeps
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_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_setcidname.so app_lookupcidname.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_ices.so app_eval.so \
app_nbscat.so app_sendtext.so app_exec.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 app_math.so app_realtime.so \
app_dumpchan.so app_waitforsilence.so app_while.so app_setrdnis.so \
app_md5.so app_readfile.so app_chanspy.so app_settransfercapability.so \
app_dictate.so app_externalivr.so app_directed_pickup.so \
app_mixmonitor.so app_stack.so
MENUSELECT_CATEGORY=APPS
MENUSELECT_DESCRIPTION=Applications
#
# Obsolete things...
#
#APPS+=app_sql_postgres.so
#APPS+=app_sql_odbc.so
ALL_C_MODS:=$(patsubst %.c,%,$(wildcard app_*.c))
ALL_CC_MODS:=$(patsubst %.cc,%,$(wildcard app_*.cc))
#
# Experimental things
#
#APPS+=app_ivrdemo.so
#APPS+=app_skel.so
#APPS+=app_rpt.so
C_MODS:=$(filter-out $(MENUSELECT_APPS),$(ALL_C_MODS))
CC_MODS:=$(filter-out $(MENUSELECT_APPS),$(ALL_CC_MODS))
ifndef WITHOUT_ZAPTEL
ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h),)
APPS+=app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so app_page.so
endif
endif # WITHOUT_ZAPTEL
LOADABLE_MODS:=$(C_MODS) $(CC_MODS)
ifneq ($(findstring apps,$(MENUSELECT_EMBED)),)
EMBEDDED_MODS:=$(LOADABLE_MODS)
LOADABLE_MODS:=
ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/osp/osp.h $(CROSS_COMPILE_TARGET)/usr/include/osp/osp.h),)
APPS+=app_osplookup.so
endif
MENUSELECT_OPTS_app_directory:=$(MENUSELECT_OPTS_app_voicemail)
ifneq ($(findstring ODBC_STORAGE,$(MENUSELECT_OPTS_app_voicemail)),)
MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_ODBC_STORAGE)
MENUSELECT_DEPENDS_app_directory+=$(MENUSELECT_DEPENDS_ODBC_STORAGE)
endif
ifneq ($(findstring IMAP_STORAGE,$(MENUSELECT_OPTS_app_voicemail)),)
MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_IMAP_STORAGE)
MENUSELECT_DEPENDS_app_directory+=$(MENUSELECT_DEPENDS_IMAP_STORAGE)
ifeq ($(findstring BSD,${OSARCH}),BSD)
CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
endif
all: _all
CURLLIBS=$(shell $(CROSS_COMPILE_BIN)curl-config --libs)
ifneq ($(shell if [[ 0x`$(CROSS_COMPILE_BIN)curl-config --vernum` -ge 0x70907 ]]; then echo "OK" ; fi),)
ifneq (${CURLLIBS},)
APPS+=app_curl.so
endif
endif
include $(ASTTOPDIR)/Makefile.moddir_rules
ifeq (${OSARCH},CYGWIN)
CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
CYGSOLIB=-L.. -L. -L../res -lasterisk.dll -lres_features.so -lres_adsi.so -lres_monitor.so
else
CFLAGS+=-fPIC
APPS+=app_sms.so
endif
#
# If you have UnixODBC you can use ODBC voicemail
# storage
#
# Uncomment to use ODBC storage
#CFLAGS+=-DUSE_ODBC_STORAGE
# Uncomment for extended ODBC voicemail storage
#CFLAGS+=-DEXTENDED_ODBC_STORAGE
# See doc/README.odbcstorage for more information
all: $(APPS)
clean:
rm -f *.so *.o .depend
%.so : %.o
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}
app_rpt.so : app_rpt.o
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -ltonezone
install: all
for x in $(APPS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
rm -f $(DESTDIR)$(MODULES_DIR)/app_datetime.so
rm -f $(DESTDIR)$(MODULES_DIR)/app_qcall.so
app_curl.so: app_curl.o
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CURLLIBS)
app_sql_postgres.o: app_sql_postgres.c
$(CC) -pipe -I$(CROSS_COMPILE_TARGET)/usr/local/pgsql/include -I$(CROSS_COMPILE_TARGET)/usr/include/postgresql $(CFLAGS) -c -o app_sql_postgres.o app_sql_postgres.c
app_sql_postgres.so: app_sql_postgres.o
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -L/usr/local/pgsql/lib -lpq
app_sql_odbc.so: app_sql_odbc.o
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lodbc
ifeq (SunOS,$(shell uname))
app_chanspy.so: app_chanspy.o
$(CC) $(SOLINK) -o $@ $< -lrt
endif
ifneq ($(wildcard .depend),)
include .depend
endif
depend: .depend
.depend:
../build_tools/mkdep $(CFLAGS) `ls *.c`
env:
env

View File

@@ -17,22 +17,11 @@
*/
/*! \file
*
* \brief Program Asterisk ADSI Scripts into phone
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
/*** MODULEINFO
<depend>res_adsi</depend>
***/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <sys/types.h>
#include <netinet/in.h>
#include <stdlib.h>
@@ -43,6 +32,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdio.h>
#include <errno.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
@@ -53,6 +46,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/utils.h"
#include "asterisk/lock.h"
static char *tdesc = "Asterisk ADSI Programming Application";
static char *app = "ADSIProg";
static char *synopsis = "Load Asterisk ADSI Scripts into phone";
@@ -63,6 +58,10 @@ static char *descrip =
" ADSIProg(script): This application programs an ADSI Phone with the given\n"
"script. If nothing is specified, the default script (asterisk.adsi) is used.\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
struct adsi_event {
int id;
char *name;
@@ -1357,16 +1356,17 @@ static struct adsi_script *compile_script(char *script)
ast_log(LOG_WARNING, "Can't open file '%s'\n", fn);
return NULL;
}
if (!(scr = ast_calloc(1, sizeof(*scr)))) {
scr = malloc(sizeof(struct adsi_script));
if (!scr) {
fclose(f);
ast_log(LOG_WARNING, "Out of memory loading script '%s'\n", fn);
return NULL;
}
memset(scr, 0, sizeof(struct adsi_script));
/* Create "main" as first subroutine */
getsubbyname(scr, "main", NULL, 0);
while(!feof(f)) {
if (!fgets(buf, sizeof(buf), f)) {
continue;
}
fgets(buf, sizeof(buf), f);
if (!feof(f)) {
lineno++;
/* Trim off trailing return */
@@ -1444,11 +1444,11 @@ static int adsi_prog(struct ast_channel *chan, char *script)
return -1;
/* Start an empty ADSI Session */
if (ast_adsi_load_session(chan, NULL, 0, 1) < 1)
if (adsi_load_session(chan, NULL, 0, 1) < 1)
return -1;
/* Now begin the download attempt */
if (ast_adsi_begin_download(chan, scr->desc, scr->fdn, scr->sec, scr->ver)) {
if (adsi_begin_download(chan, scr->desc, scr->fdn, scr->sec, scr->ver)) {
/* User rejected us for some reason */
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "User rejected download attempt\n");
@@ -1462,7 +1462,7 @@ static int adsi_prog(struct ast_channel *chan, char *script)
for (x=0;x<scr->numkeys;x++) {
if (bytes + scr->keys[x].retstrlen > 253) {
/* Send what we've collected so far */
if (ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
if (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
ast_log(LOG_WARNING, "Unable to send chunk ending at %d\n", x);
return -1;
}
@@ -1475,7 +1475,7 @@ static int adsi_prog(struct ast_channel *chan, char *script)
#endif
}
if (bytes) {
if (ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
if (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
ast_log(LOG_WARNING, "Unable to send chunk ending at %d\n", x);
return -1;
}
@@ -1486,7 +1486,7 @@ static int adsi_prog(struct ast_channel *chan, char *script)
for (x=0;x<scr->numdisplays;x++) {
if (bytes + scr->displays[x].datalen > 253) {
/* Send what we've collected so far */
if (ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
if (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
ast_log(LOG_WARNING, "Unable to send chunk ending at %d\n", x);
return -1;
}
@@ -1499,7 +1499,7 @@ static int adsi_prog(struct ast_channel *chan, char *script)
#endif
}
if (bytes) {
if (ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
if (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
ast_log(LOG_WARNING, "Unable to send chunk ending at %d\n", x);
return -1;
}
@@ -1510,7 +1510,7 @@ static int adsi_prog(struct ast_channel *chan, char *script)
for (x=0;x<scr->numsubs;x++) {
if (bytes + scr->subs[x].datalen > 253) {
/* Send what we've collected so far */
if (ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
if (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
ast_log(LOG_WARNING, "Unable to send chunk ending at %d\n", x);
return -1;
}
@@ -1523,7 +1523,7 @@ static int adsi_prog(struct ast_channel *chan, char *script)
#endif
}
if (bytes) {
if (ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
if (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
ast_log(LOG_WARNING, "Unable to send chunk ending at %d\n", x);
return -1;
}
@@ -1531,11 +1531,11 @@ static int adsi_prog(struct ast_channel *chan, char *script)
bytes = 0;
bytes += ast_adsi_display(buf, ADSI_INFO_PAGE, 1, ADSI_JUST_LEFT, 0, "Download complete.", "");
bytes += ast_adsi_set_line(buf, ADSI_INFO_PAGE, 1);
if (ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY) < 0)
bytes += adsi_display(buf, ADSI_INFO_PAGE, 1, ADSI_JUST_LEFT, 0, "Download complete.", "");
bytes += adsi_set_line(buf, ADSI_INFO_PAGE, 1);
if (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY) < 0)
return -1;
if (ast_adsi_end_download(chan)) {
if (adsi_end_download(chan)) {
/* Download failed for some reason */
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Download attempt failed\n");
@@ -1544,21 +1544,21 @@ static int adsi_prog(struct ast_channel *chan, char *script)
return -1;
}
free(scr);
ast_adsi_unload_session(chan);
adsi_unload_session(chan);
return 0;
}
static int adsi_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct ast_module_user *u;
struct localuser *u;
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
if (ast_strlen_zero(data))
data = "asterisk.adsi";
if (!ast_adsi_available(chan)) {
if (!adsi_available(chan)) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "ADSI Unavailable on CPE. Not bothering to try.\n");
} else {
@@ -1567,26 +1567,40 @@ static int adsi_exec(struct ast_channel *chan, void *data)
res = adsi_prog(chan, data);
}
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return res;
}
static int unload_module(void)
int unload_module(void)
{
int res;
ast_module_user_hangup_all();
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
return ast_register_application(app, adsi_exec, synopsis, descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Asterisk ADSI Programming Application");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -22,17 +22,13 @@
*
* *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING ***
*
* Use at your own risk. Please consult the GNU GPL license document included with Asterisk. *
* Use at your own risk. Please consult the GNU GPL license document included with Asterisk details. *
*
* *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING ***
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
@@ -41,6 +37,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <unistd.h>
#include <sys/time.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -56,7 +56,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/localtime.h"
#include "asterisk/callerid.h"
#include "asterisk/astdb.h"
#include "asterisk/utils.h"
#define ALMRCV_CONFIG "alarmreceiver.conf"
#define ADEMCO_CONTACT_ID "ADEMCO_CONTACT_ID"
@@ -68,9 +67,11 @@ struct event_node{
typedef struct event_node event_node_t;
static char *tdesc = "Alarm Receiver for Asterisk";
static char *app = "AlarmReceiver";
static char *synopsis = "Provide support for receiving alarm reports from a burglar or fire alarm panel";
static char *synopsis = "Provide support for receving alarm reports from a burglar or fire alarm panel";
static char *descrip =
" AlarmReceiver(): Only 1 signalling format is supported at this time: Ademco\n"
"Contact ID. This application should be called whenever there is an alarm\n"
@@ -93,10 +94,18 @@ 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
@@ -549,9 +558,9 @@ static int receive_ademco_contact_id( struct ast_channel *chan, void *data, int
checksum = checksum % 15;
if (checksum) {
if(checksum){
database_increment("checksum-errors");
if (option_verbose >= 2)
if(option_verbose >= 2)
ast_verbose(VERBOSE_PREFIX_2 "AlarmReceiver: Nonzero checksum\n");
ast_log(LOG_DEBUG, "AlarmReceiver: Nonzero checksum\n");
continue;
@@ -571,11 +580,17 @@ static int receive_ademco_contact_id( struct ast_channel *chan, void *data, int
events_received++;
/* Queue the Event */
if (!(enew = ast_calloc(1, sizeof(*enew)))) {
/* 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;
break;
}
memset(enew, 0, sizeof(event_node_t));
enew->next = NULL;
ast_copy_string(enew->data, event, sizeof(enew->data));
@@ -626,13 +641,13 @@ static int receive_ademco_contact_id( struct ast_channel *chan, void *data, int
static int alarmreceiver_exec(struct ast_channel *chan, void *data)
{
int res = 0;
struct ast_module_user *u;
struct localuser *u;
event_node_t *elp, *efree;
char signalling_type[64] = "";
event_node_t *event_head = NULL;
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
/* Set write and read formats to ULAW */
@@ -641,13 +656,13 @@ static int alarmreceiver_exec(struct ast_channel *chan, void *data)
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);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
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);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -666,7 +681,7 @@ static int alarmreceiver_exec(struct ast_channel *chan, void *data)
res = ast_answer(chan);
if (res) {
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
}
@@ -721,7 +736,7 @@ static int alarmreceiver_exec(struct ast_channel *chan, void *data)
}
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return 0;
}
@@ -733,7 +748,7 @@ static int alarmreceiver_exec(struct ast_channel *chan, void *data)
static int load_config(void)
{
struct ast_config *cfg;
const char *p;
char *p;
/* Read in the config file */
@@ -743,7 +758,6 @@ static int load_config(void)
if(option_verbose >= 4)
ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: No config file\n");
return 0;
}
else{
@@ -810,7 +824,7 @@ static int load_config(void)
}
ast_config_destroy(cfg);
}
return 1;
return 0;
}
@@ -819,23 +833,36 @@ static int load_config(void)
*/
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
if(load_config())
return ast_register_application(app, alarmreceiver_exec, synopsis, descrip);
else
return AST_MODULE_LOAD_DECLINE;
load_config();
return ast_register_application(app, alarmreceiver_exec, synopsis, descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Alarm Receiver for Asterisk");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -1,430 +0,0 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 2003 - 2006, Aheeva Technology.
*
* Claude Klimos (claude.klimos@aheeva.com)
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
*
* A license has been granted to Digium (via disclaimer) for the use of
* this code.
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdio.h>
#include <stdlib.h>
#include "asterisk/module.h"
#include "asterisk/lock.h"
#include "asterisk/options.h"
#include "asterisk/channel.h"
#include "asterisk/dsp.h"
#include "asterisk/pbx.h"
#include "asterisk/config.h"
#include "asterisk/app.h"
static char *app = "AMD";
static char *synopsis = "Attempts to detect answering machines";
static char *descrip =
" AMD([initialSilence][|greeting][|afterGreetingSilence][|totalAnalysisTime]\n"
" [|minimumWordLength][|betweenWordsSilence][|maximumNumberOfWords]\n"
" [|silenceThreshold])\n"
" This application attempts to detect answering machines at the beginning\n"
" of outbound calls. Simply call this application after the call\n"
" has been answered (outbound only, of course).\n"
" When loaded, AMD reads amd.conf and uses the parameters specified as\n"
" default values. Those default values get overwritten when calling AMD\n"
" with parameters.\n"
"- 'initialSilence' is the maximum silence duration before the greeting. If\n"
" exceeded then MACHINE.\n"
"- 'greeting' is the maximum length of a greeting. If exceeded then MACHINE.\n"
"- 'afterGreetingSilence' is the silence after detecting a greeting.\n"
" If exceeded then HUMAN.\n"
"- 'totalAnalysisTime' is the maximum time allowed for the algorithm to decide\n"
" on a HUMAN or MACHINE.\n"
"- 'minimumWordLength'is the minimum duration of Voice to considered as a word.\n"
"- 'betweenWordsSilence' is the minimum duration of silence after a word to \n"
" consider the audio that follows as a new word.\n"
"- 'maximumNumberOfWords'is the maximum number of words in the greeting. \n"
" If exceeded then MACHINE.\n"
"- 'silenceThreshold' is the silence threshold.\n"
"This application sets the following channel variable upon completion:\n"
" AMDSTATUS - This is the status of the answering machine detection.\n"
" Possible values are:\n"
" MACHINE | HUMAN | NOTSURE | HANGUP\n"
" AMDCAUSE - Indicates the cause that led to the conclusion.\n"
" Possible values are:\n"
" TOOLONG-<%d total_time>\n"
" INITIALSILENCE-<%d silenceDuration>-<%d initialSilence>\n"
" HUMAN-<%d silenceDuration>-<%d afterGreetingSilence>\n"
" MAXWORDS-<%d wordsCount>-<%d maximumNumberOfWords>\n"
" LONGGREETING-<%d voiceDuration>-<%d greeting>\n";
#define STATE_IN_WORD 1
#define STATE_IN_SILENCE 2
/* Some default values for the algorithm parameters. These defaults will be overwritten from amd.conf */
static int dfltInitialSilence = 2500;
static int dfltGreeting = 1500;
static int dfltAfterGreetingSilence = 800;
static int dfltTotalAnalysisTime = 5000;
static int dfltMinimumWordLength = 100;
static int dfltBetweenWordsSilence = 50;
static int dfltMaximumNumberOfWords = 3;
static int dfltSilenceThreshold = 256;
/* Set to the lowest ms value provided in amd.conf or application parameters */
static int dfltMaxWaitTimeForFrame = 50;
static void isAnsweringMachine(struct ast_channel *chan, void *data)
{
int res = 0;
struct ast_frame *f = NULL;
struct ast_dsp *silenceDetector = NULL;
int dspsilence = 0, readFormat, framelength = 0;
int inInitialSilence = 1;
int inGreeting = 0;
int voiceDuration = 0;
int silenceDuration = 0;
int iTotalTime = 0;
int iWordsCount = 0;
int currentState = STATE_IN_WORD;
int previousState = STATE_IN_SILENCE;
int consecutiveVoiceDuration = 0;
char amdCause[256] = "", amdStatus[256] = "";
char *parse = ast_strdupa(data);
/* Lets set the initial values of the variables that will control the algorithm.
The initial values are the default ones. If they are passed as arguments
when invoking the application, then the default values will be overwritten
by the ones passed as parameters. */
int initialSilence = dfltInitialSilence;
int greeting = dfltGreeting;
int afterGreetingSilence = dfltAfterGreetingSilence;
int totalAnalysisTime = dfltTotalAnalysisTime;
int minimumWordLength = dfltMinimumWordLength;
int betweenWordsSilence = dfltBetweenWordsSilence;
int maximumNumberOfWords = dfltMaximumNumberOfWords;
int silenceThreshold = dfltSilenceThreshold;
int maxWaitTimeForFrame = dfltMaxWaitTimeForFrame;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(argInitialSilence);
AST_APP_ARG(argGreeting);
AST_APP_ARG(argAfterGreetingSilence);
AST_APP_ARG(argTotalAnalysisTime);
AST_APP_ARG(argMinimumWordLength);
AST_APP_ARG(argBetweenWordsSilence);
AST_APP_ARG(argMaximumNumberOfWords);
AST_APP_ARG(argSilenceThreshold);
);
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "AMD: %s %s %s (Fmt: %d)\n", chan->name ,chan->cid.cid_ani, chan->cid.cid_rdnis, chan->readformat);
/* Lets parse the arguments. */
if (!ast_strlen_zero(parse)) {
/* Some arguments have been passed. Lets parse them and overwrite the defaults. */
AST_STANDARD_APP_ARGS(args, parse);
if (!ast_strlen_zero(args.argInitialSilence))
initialSilence = atoi(args.argInitialSilence);
if (!ast_strlen_zero(args.argGreeting))
greeting = atoi(args.argGreeting);
if (!ast_strlen_zero(args.argAfterGreetingSilence))
afterGreetingSilence = atoi(args.argAfterGreetingSilence);
if (!ast_strlen_zero(args.argTotalAnalysisTime))
totalAnalysisTime = atoi(args.argTotalAnalysisTime);
if (!ast_strlen_zero(args.argMinimumWordLength))
minimumWordLength = atoi(args.argMinimumWordLength);
if (!ast_strlen_zero(args.argBetweenWordsSilence))
betweenWordsSilence = atoi(args.argBetweenWordsSilence);
if (!ast_strlen_zero(args.argMaximumNumberOfWords))
maximumNumberOfWords = atoi(args.argMaximumNumberOfWords);
if (!ast_strlen_zero(args.argSilenceThreshold))
silenceThreshold = atoi(args.argSilenceThreshold);
} else if (option_debug)
ast_log(LOG_DEBUG, "AMD using the default parameters.\n");
/* Find lowest ms value, that will be max wait time for a frame */
if (maxWaitTimeForFrame > initialSilence)
maxWaitTimeForFrame = initialSilence;
if (maxWaitTimeForFrame > greeting)
maxWaitTimeForFrame = greeting;
if (maxWaitTimeForFrame > afterGreetingSilence)
maxWaitTimeForFrame = afterGreetingSilence;
if (maxWaitTimeForFrame > totalAnalysisTime)
maxWaitTimeForFrame = totalAnalysisTime;
if (maxWaitTimeForFrame > minimumWordLength)
maxWaitTimeForFrame = minimumWordLength;
if (maxWaitTimeForFrame > betweenWordsSilence)
maxWaitTimeForFrame = betweenWordsSilence;
/* Now we're ready to roll! */
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "AMD: initialSilence [%d] greeting [%d] afterGreetingSilence [%d] "
"totalAnalysisTime [%d] minimumWordLength [%d] betweenWordsSilence [%d] maximumNumberOfWords [%d] silenceThreshold [%d] \n",
initialSilence, greeting, afterGreetingSilence, totalAnalysisTime,
minimumWordLength, betweenWordsSilence, maximumNumberOfWords, silenceThreshold );
/* Set read format to signed linear so we get signed linear frames in */
readFormat = chan->readformat;
if (ast_set_read_format(chan, AST_FORMAT_SLINEAR) < 0 ) {
ast_log(LOG_WARNING, "AMD: Channel [%s]. Unable to set to linear mode, giving up\n", chan->name );
pbx_builtin_setvar_helper(chan , "AMDSTATUS", "");
pbx_builtin_setvar_helper(chan , "AMDCAUSE", "");
return;
}
/* Create a new DSP that will detect the silence */
if (!(silenceDetector = ast_dsp_new())) {
ast_log(LOG_WARNING, "AMD: Channel [%s]. Unable to create silence detector :(\n", chan->name );
pbx_builtin_setvar_helper(chan , "AMDSTATUS", "");
pbx_builtin_setvar_helper(chan , "AMDCAUSE", "");
return;
}
/* Set silence threshold to specified value */
ast_dsp_set_threshold(silenceDetector, silenceThreshold);
/* Now we go into a loop waiting for frames from the channel */
while ((res = ast_waitfor(chan, 2 * maxWaitTimeForFrame)) > -1) {
/* If we fail to read in a frame, that means they hung up */
if (!(f = ast_read(chan))) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "AMD: HANGUP\n");
if (option_debug)
ast_log(LOG_DEBUG, "Got hangup\n");
strcpy(amdStatus, "HANGUP");
break;
}
if (f->frametype == AST_FRAME_VOICE || f->frametype == AST_FRAME_NULL || f->frametype == AST_FRAME_CNG) {
/* If the total time exceeds the analysis time then give up as we are not too sure */
if (f->frametype == AST_FRAME_VOICE)
framelength = (ast_codec_get_samples(f) / DEFAULT_SAMPLES_PER_MS);
else
framelength += 2 * maxWaitTimeForFrame;
iTotalTime += framelength;
if (iTotalTime >= totalAnalysisTime) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "AMD: Channel [%s]. Too long...\n", chan->name );
ast_frfree(f);
strcpy(amdStatus , "NOTSURE");
sprintf(amdCause , "TOOLONG-%d", iTotalTime);
break;
}
/* Feed the frame of audio into the silence detector and see if we get a result */
if (f->frametype != AST_FRAME_VOICE)
dspsilence += 2 * maxWaitTimeForFrame;
else {
dspsilence = 0;
ast_dsp_silence(silenceDetector, f, &dspsilence);
}
if (dspsilence > 0) {
silenceDuration = dspsilence;
if (silenceDuration >= betweenWordsSilence) {
if (currentState != STATE_IN_SILENCE ) {
previousState = currentState;
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "AMD: Changed state to STATE_IN_SILENCE\n");
}
currentState = STATE_IN_SILENCE;
consecutiveVoiceDuration = 0;
}
if (inInitialSilence == 1 && silenceDuration >= initialSilence) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "AMD: ANSWERING MACHINE: silenceDuration:%d initialSilence:%d\n",
silenceDuration, initialSilence);
ast_frfree(f);
strcpy(amdStatus , "MACHINE");
sprintf(amdCause , "INITIALSILENCE-%d-%d", silenceDuration, initialSilence);
res = 1;
break;
}
if (silenceDuration >= afterGreetingSilence && inGreeting == 1) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "AMD: HUMAN: silenceDuration:%d afterGreetingSilence:%d\n",
silenceDuration, afterGreetingSilence);
ast_frfree(f);
strcpy(amdStatus , "HUMAN");
sprintf(amdCause , "HUMAN-%d-%d", silenceDuration, afterGreetingSilence);
res = 1;
break;
}
} else {
consecutiveVoiceDuration += framelength;
voiceDuration += framelength;
/* If I have enough consecutive voice to say that I am in a Word, I can only increment the
number of words if my previous state was Silence, which means that I moved into a word. */
if (consecutiveVoiceDuration >= minimumWordLength && currentState == STATE_IN_SILENCE) {
iWordsCount++;
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "AMD: Word detected. iWordsCount:%d\n", iWordsCount);
previousState = currentState;
currentState = STATE_IN_WORD;
}
if (iWordsCount >= maximumNumberOfWords) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "AMD: ANSWERING MACHINE: iWordsCount:%d\n", iWordsCount);
ast_frfree(f);
strcpy(amdStatus , "MACHINE");
sprintf(amdCause , "MAXWORDS-%d-%d", iWordsCount, maximumNumberOfWords);
res = 1;
break;
}
if (inGreeting == 1 && voiceDuration >= greeting) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "AMD: ANSWERING MACHINE: voiceDuration:%d greeting:%d\n", voiceDuration, greeting);
ast_frfree(f);
strcpy(amdStatus , "MACHINE");
sprintf(amdCause , "LONGGREETING-%d-%d", voiceDuration, greeting);
res = 1;
break;
}
if (voiceDuration >= minimumWordLength ) {
silenceDuration = 0;
inInitialSilence = 0;
inGreeting = 1;
}
}
}
ast_frfree(f);
}
if (!res) {
/* It took too long to get a frame back. Giving up. */
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "AMD: Channel [%s]. Too long...\n", chan->name);
strcpy(amdStatus , "NOTSURE");
sprintf(amdCause , "TOOLONG-%d", iTotalTime);
}
/* Set the status and cause on the channel */
pbx_builtin_setvar_helper(chan , "AMDSTATUS" , amdStatus);
pbx_builtin_setvar_helper(chan , "AMDCAUSE" , amdCause);
/* Restore channel read format */
if (readFormat && ast_set_read_format(chan, readFormat))
ast_log(LOG_WARNING, "AMD: Unable to restore read format on '%s'\n", chan->name);
/* Free the DSP used to detect silence */
ast_dsp_free(silenceDetector);
return;
}
static int amd_exec(struct ast_channel *chan, void *data)
{
struct ast_module_user *u = NULL;
u = ast_module_user_add(chan);
isAnsweringMachine(chan, data);
ast_module_user_remove(u);
return 0;
}
static void load_config(void)
{
struct ast_config *cfg = NULL;
char *cat = NULL;
struct ast_variable *var = NULL;
if (!(cfg = ast_config_load("amd.conf"))) {
ast_log(LOG_ERROR, "Configuration file amd.conf missing.\n");
return;
}
cat = ast_category_browse(cfg, NULL);
while (cat) {
if (!strcasecmp(cat, "general") ) {
var = ast_variable_browse(cfg, cat);
while (var) {
if (!strcasecmp(var->name, "initial_silence")) {
dfltInitialSilence = atoi(var->value);
} else if (!strcasecmp(var->name, "greeting")) {
dfltGreeting = atoi(var->value);
} else if (!strcasecmp(var->name, "after_greeting_silence")) {
dfltAfterGreetingSilence = atoi(var->value);
} else if (!strcasecmp(var->name, "silence_threshold")) {
dfltSilenceThreshold = atoi(var->value);
} else if (!strcasecmp(var->name, "total_analysis_time")) {
dfltTotalAnalysisTime = atoi(var->value);
} else if (!strcasecmp(var->name, "min_word_length")) {
dfltMinimumWordLength = atoi(var->value);
} else if (!strcasecmp(var->name, "between_words_silence")) {
dfltBetweenWordsSilence = atoi(var->value);
} else if (!strcasecmp(var->name, "maximum_number_of_words")) {
dfltMaximumNumberOfWords = atoi(var->value);
} else {
ast_log(LOG_WARNING, "%s: Cat:%s. Unknown keyword %s at line %d of amd.conf\n",
app, cat, var->name, var->lineno);
}
var = var->next;
}
}
cat = ast_category_browse(cfg, cat);
}
ast_config_destroy(cfg);
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "AMD defaults: initialSilence [%d] greeting [%d] afterGreetingSilence [%d] "
"totalAnalysisTime [%d] minimumWordLength [%d] betweenWordsSilence [%d] maximumNumberOfWords [%d] silenceThreshold [%d] \n",
dfltInitialSilence, dfltGreeting, dfltAfterGreetingSilence, dfltTotalAnalysisTime,
dfltMinimumWordLength, dfltBetweenWordsSilence, dfltMaximumNumberOfWords, dfltSilenceThreshold );
return;
}
static int unload_module(void)
{
ast_module_user_hangup_all();
return ast_unregister_application(app);
}
static int load_module(void)
{
load_config();
return ast_register_application(app, amd_exec, synopsis, descrip);
}
static int reload(void)
{
load_config();
return 0;
}
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Answering Machine Detection Application",
.load = load_module,
.unload = unload_module,
.reload = reload,
);

View File

@@ -17,24 +17,21 @@
*/
/*! \file
*
* \brief Execute arbitrary authenticate commands
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <stdio.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -44,33 +41,17 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/app.h"
#include "asterisk/astdb.h"
#include "asterisk/utils.h"
#include "asterisk/options.h"
enum {
OPT_ACCOUNT = (1 << 0),
OPT_DATABASE = (1 << 1),
OPT_JUMP = (1 << 2),
OPT_MULTIPLE = (1 << 3),
OPT_REMOVE = (1 << 4),
} auth_option_flags;
AST_APP_OPTIONS(auth_app_options, {
AST_APP_OPTION('a', OPT_ACCOUNT),
AST_APP_OPTION('d', OPT_DATABASE),
AST_APP_OPTION('j', OPT_JUMP),
AST_APP_OPTION('m', OPT_MULTIPLE),
AST_APP_OPTION('r', OPT_REMOVE),
});
static char *tdesc = "Authentication Application";
static char *app = "Authenticate";
static char *synopsis = "Authenticate a user";
static char *descrip =
" Authenticate(password[|options[|maxdigits]]): This application asks the caller\n"
"to enter a given password in order to continue dialplan execution. If the password\n"
"begins with the '/' character, it is interpreted as a file which contains a list of\n"
" Authenticate(password[|options]): This application asks the caller to enter a\n"
"given password in order to continue dialplan execution. If the password begins\n"
"with the '/' character, it is interpreted as a file which contains a list of\n"
"valid passwords, listed 1 password per line in the file.\n"
" When using a database key, the value associated with the key can be anything.\n"
"Users have three attempts to authenticate before the channel is hung up. If the\n"
@@ -85,96 +66,79 @@ static char *descrip =
" the file. When one of the passwords is matched, the channel will have\n"
" its account code set to the corresponding account code in the file.\n"
" r - Remove the database key upon successful entry (valid with 'd' only)\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"
;
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int auth_exec(struct ast_channel *chan, void *data)
{
int res=0;
int jump = 0;
int retries;
struct ast_module_user *u;
struct localuser *u;
char password[256]="";
char passwd[256];
char *opts;
char *prompt;
int maxdigits;
char *argcopy =NULL;
struct ast_flags flags = {0};
AST_DECLARE_APP_ARGS(arglist,
AST_APP_ARG(password);
AST_APP_ARG(options);
AST_APP_ARG(maxdigits);
);
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "Authenticate requires an argument(password)\n");
return -1;
}
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
if (chan->_state != AST_STATE_UP) {
res = ast_answer(chan);
if (res) {
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
}
argcopy = ast_strdupa(data);
AST_STANDARD_APP_ARGS(arglist,argcopy);
if (!ast_strlen_zero(arglist.options)) {
ast_app_parse_options(auth_app_options, &flags, NULL, arglist.options);
}
if (!ast_strlen_zero(arglist.maxdigits)) {
maxdigits = atoi(arglist.maxdigits);
if ((maxdigits<1) || (maxdigits>sizeof(passwd)-2))
maxdigits = sizeof(passwd) - 2;
} else {
maxdigits = sizeof(passwd) - 2;
}
strncpy(password, data, sizeof(password) - 1);
opts=strchr(password, '|');
if (opts) {
*opts = 0;
opts++;
} else
opts = "";
if (strchr(opts, 'j'))
jump = 1;
/* Start asking for password */
prompt = "agent-pass";
for (retries = 0; retries < 3; retries++) {
res = ast_app_getdata(chan, prompt, passwd, maxdigits, 0);
res = ast_app_getdata(chan, prompt, passwd, sizeof(passwd) - 2, 0);
if (res < 0)
break;
res = 0;
if (arglist.password[0] == '/') {
if (ast_test_flag(&flags,OPT_DATABASE)) {
if (password[0] == '/') {
if (strchr(opts, 'd')) {
char tmp[256];
/* Compare against a database key */
if (!ast_db_get(arglist.password + 1, passwd, tmp, sizeof(tmp))) {
if (!ast_db_get(password + 1, passwd, tmp, sizeof(tmp))) {
/* It's a good password */
if (ast_test_flag(&flags,OPT_REMOVE)) {
ast_db_del(arglist.password + 1, passwd);
if (strchr(opts, 'r')) {
ast_db_del(password + 1, passwd);
}
break;
}
} else {
/* Compare against a file */
FILE *f;
f = fopen(arglist.password, "r");
f = fopen(password, "r");
if (f) {
char buf[256] = "";
char md5passwd[33] = "";
char *md5secret = NULL;
while (!feof(f)) {
if (!fgets(buf, sizeof(buf), f)) {
continue;
}
if (!ast_strlen_zero(buf)) {
size_t len = strlen(buf);
if (buf[len - 1] == '\n')
buf[len - 1] = '\0';
if (ast_test_flag(&flags,OPT_MULTIPLE)) {
fgets(buf, sizeof(buf), f);
if (!feof(f) && !ast_strlen_zero(buf)) {
buf[strlen(buf) - 1] = '\0';
if (strchr(opts, 'm')) {
md5secret = strchr(buf, ':');
if (md5secret == NULL)
continue;
@@ -182,13 +146,13 @@ static int auth_exec(struct ast_channel *chan, void *data)
md5secret++;
ast_md5_hash(md5passwd, passwd);
if (!strcmp(md5passwd, md5secret)) {
if (ast_test_flag(&flags,OPT_ACCOUNT))
if (strchr(opts, 'a'))
ast_cdr_setaccount(chan, buf);
break;
}
} else {
if (!strcmp(passwd, buf)) {
if (ast_test_flag(&flags,OPT_ACCOUNT))
if (strchr(opts, 'a'))
ast_cdr_setaccount(chan, buf);
break;
}
@@ -197,7 +161,7 @@ static int auth_exec(struct ast_channel *chan, void *data)
}
fclose(f);
if (!ast_strlen_zero(buf)) {
if (ast_test_flag(&flags,OPT_MULTIPLE)) {
if (strchr(opts, 'm')) {
if (md5secret && !strcmp(md5passwd, md5secret))
break;
} else {
@@ -206,23 +170,23 @@ static int auth_exec(struct ast_channel *chan, void *data)
}
}
} else
ast_log(LOG_WARNING, "Unable to open file '%s' for authentication: %s\n", arglist.password, strerror(errno));
ast_log(LOG_WARNING, "Unable to open file '%s' for authentication: %s\n", password, strerror(errno));
}
} else {
/* Compare against a fixed password */
if (!strcmp(passwd, arglist.password))
if (!strcmp(passwd, password))
break;
}
prompt="auth-incorrect";
}
if ((retries < 3) && !res) {
if (ast_test_flag(&flags,OPT_ACCOUNT) && !ast_test_flag(&flags,OPT_MULTIPLE))
if (strchr(opts, 'a') && !strchr(opts, 'm'))
ast_cdr_setaccount(chan, passwd);
res = ast_streamfile(chan, "auth-thankyou", chan->language);
if (!res)
res = ast_waitstream(chan, "");
} else {
if (ast_test_flag(&flags,OPT_JUMP) && ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101) == 0) {
if (jump && ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101) == 0) {
res = 0;
} else {
if (!ast_streamfile(chan, "vm-goodbye", chan->language))
@@ -230,25 +194,39 @@ static int auth_exec(struct ast_channel *chan, void *data)
res = -1;
}
}
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return res;
}
static int unload_module(void)
int unload_module(void)
{
int res;
ast_module_user_hangup_all();
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
return ast_register_application(app, auth_exec, synopsis, descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Authentication Application");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -17,25 +17,25 @@
*/
/*! \file
*
* \brief Applications connected with CDR engine
*
* Martin Pycko <martinp@digium.com>
*
* \ingroup applications
*/
#include <sys/types.h>
#include <stdlib.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <sys/types.h>
#include <stdlib.h>
#include "asterisk/channel.h"
#include "asterisk/module.h"
#include "asterisk/pbx.h"
static char *tdesc = "Tell Asterisk to not maintain a CDR for the current call";
static char *nocdr_descrip =
" NoCDR(): This application will tell Asterisk not to maintain a CDR for the\n"
"current call.\n";
@@ -43,36 +43,55 @@ static char *nocdr_descrip =
static char *nocdr_app = "NoCDR";
static char *nocdr_synopsis = "Tell Asterisk to not maintain a CDR for the current call";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int nocdr_exec(struct ast_channel *chan, void *data)
{
struct ast_module_user *u;
struct localuser *u;
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
if (chan->cdr) {
ast_set_flag(chan->cdr, AST_CDR_FLAG_POST_DISABLED);
ast_cdr_free(chan->cdr);
chan->cdr = NULL;
}
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return 0;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(nocdr_app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
return ast_register_application(nocdr_app, nocdr_exec, nocdr_synopsis, nocdr_descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Tell Asterisk to not maintain a CDR for the current call");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -18,19 +18,11 @@
*/
/*! \file
*
* \brief Check if Channel is Available
*
* \author Mark Spencer <markster@digium.com>
* \author James Golovich <james@gnuinter.net>
* \brief Check if Channel is Available
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -38,6 +30,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <errno.h>
#include <sys/ioctl.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -48,6 +44,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/devicestate.h"
#include "asterisk/options.h"
static char *tdesc = "Check channel availability";
static char *app = "ChanIsAvail";
static char *synopsis = "Check channel availability";
@@ -63,37 +61,36 @@ static char *descrip =
" s - Consider the channel unavailable if the channel is in use at all\n"
" j - Support jumping to priority n+101 if no channel is available\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int chanavail_exec(struct ast_channel *chan, void *data)
{
int res=-1, inuse=-1, option_state=0, priority_jump=0;
int status;
struct ast_module_user *u;
char *info, tmp[512], trychan[512], *peers, *tech, *number, *rest, *cur;
struct localuser *u;
char *info, tmp[512], trychan[512], *peers, *tech, *number, *rest, *cur, *options, *stringp;
struct ast_channel *tempchan;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(reqchans);
AST_APP_ARG(options);
);
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "ChanIsAvail requires an argument (Zap/1&Zap/2)\n");
return -1;
}
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
info = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, info);
if (args.options) {
if (strchr(args.options, 's'))
stringp = info;
strsep(&stringp, "|");
options = strsep(&stringp, "|");
if (options) {
if (strchr(options, 's'))
option_state = 1;
if (strchr(args.options, 'j'))
if (strchr(options, 'j'))
priority_jump = 1;
}
peers = args.reqchans;
peers = info;
if (peers) {
cur = peers;
do {
@@ -107,7 +104,7 @@ static int chanavail_exec(struct ast_channel *chan, void *data)
number = strchr(tech, '/');
if (!number) {
ast_log(LOG_WARNING, "ChanIsAvail argument takes format ([technology]/[device])\n");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
*number = '\0';
@@ -142,32 +139,47 @@ 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 (priority_jump || ast_opt_priority_jumping) {
if (priority_jump || option_priority_jumping) {
if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101)) {
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
}
}
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return 0;
}
static int unload_module(void)
int unload_module(void)
{
int res = 0;
res = ast_unregister_application(app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
return ast_register_application(app, chanavail_exec, synopsis, descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Check channel availability");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -1,145 +0,0 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 2006, Sergey Basmanov
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
*/
/*! \file
*
* \brief ChannelRedirect application
*
* \author Sergey Basmanov <sergey_basmanov@mail.ru>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/lock.h"
#include "asterisk/app.h"
#include "asterisk/features.h"
#include "asterisk/options.h"
static char *app = "ChannelRedirect";
static char *synopsis = "Redirects given channel to a dialplan target.";
static char *descrip =
"ChannelRedirect(channel|[[context|]extension|]priority):\n"
" Sends the specified channel to the specified extension priority\n";
static int asyncgoto_exec(struct ast_channel *chan, void *data)
{
int res = -1;
struct ast_module_user *u;
char *info, *context, *exten, *priority;
int prio = 1;
struct ast_channel *chan2 = NULL;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(channel);
AST_APP_ARG(label);
);
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "%s requires an argument (channel|[[context|]exten|]priority)\n", app);
return -1;
}
u = ast_module_user_add(chan);
info = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, info);
if (ast_strlen_zero(args.channel) || ast_strlen_zero(args.label)) {
ast_log(LOG_WARNING, "%s requires an argument (channel|[[context|]exten|]priority)\n", app);
goto quit;
}
chan2 = ast_get_channel_by_name_locked(args.channel);
if (!chan2) {
ast_log(LOG_WARNING, "No such channel: %s\n", args.channel);
goto quit;
}
/* Parsed right to left, so standard parsing won't work */
context = strsep(&args.label, "|");
exten = strsep(&args.label, "|");
if (exten) {
priority = strsep(&args.label, "|");
if (!priority) {
priority = exten;
exten = context;
context = NULL;
}
} else {
priority = context;
context = NULL;
}
/* ast_findlabel_extension does not convert numeric priorities; it only does a lookup */
if (!(prio = atoi(priority)) && !(prio = ast_findlabel_extension(chan2, S_OR(context, chan2->context),
S_OR(exten, chan2->exten), priority, chan2->cid.cid_num))) {
ast_log(LOG_WARNING, "'%s' is not a known priority or label\n", priority);
goto chanquit;
}
if (option_debug > 1)
ast_log(LOG_DEBUG, "Attempting async goto (%s) to %s|%s|%d\n", args.channel, S_OR(context, chan2->context), S_OR(exten, chan2->exten), prio);
if (chan2->pbx) {
ast_channel_lock(chan2);
ast_set_flag(chan2, AST_FLAG_BRIDGE_HANGUP_DONT); /* don't let the after-bridge code run the h-exten */
ast_channel_unlock(chan2);
}
if (ast_async_goto_if_exists(chan2, S_OR(context, chan2->context), S_OR(exten, chan2->exten), prio))
ast_log(LOG_WARNING, "%s failed for %s\n", app, args.channel);
else
res = 0;
chanquit:
ast_mutex_unlock(&chan2->lock);
quit:
ast_module_user_remove(u);
return res;
}
static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
ast_module_user_hangup_all();
return res;
}
static int load_module(void)
{
return ast_register_application(app, asyncgoto_exec, synopsis, descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Channel Redirect");

File diff suppressed because it is too large Load Diff

View File

@@ -17,22 +17,19 @@
*/
/*! \file
*
* \brief Trivial application to control playback of a sound file
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -44,6 +41,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/utils.h"
#include "asterisk/options.h"
static const char *tdesc = "Control Playback Application";
static const char *app = "ControlPlayback";
static const char *synopsis = "Play a file with fast forward and rewind";
@@ -66,6 +65,9 @@ static const char *descrip =
" CPLAYBACKSTATUS - This variable contains the status of the attempt as a text\n"
" string, one of: SUCCESS | USERSTOPPED | ERROR\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int is_on_phonepad(char key)
{
@@ -76,7 +78,7 @@ static int controlplayback_exec(struct ast_channel *chan, void *data)
{
int res = 0, priority_jump = 0;
int skipms = 0;
struct ast_module_user *u;
struct localuser *u;
char *tmp;
int argc;
char *argv[8];
@@ -96,7 +98,7 @@ static int controlplayback_exec(struct ast_channel *chan, void *data)
return -1;
}
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
tmp = ast_strdupa(data);
memset(argv, 0, sizeof(argv));
@@ -105,7 +107,7 @@ static int controlplayback_exec(struct ast_channel *chan, void *data)
if (argc < 1) {
ast_log(LOG_WARNING, "ControlPlayback requires an argument (filename)\n");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -132,12 +134,12 @@ static int controlplayback_exec(struct ast_channel *chan, void *data)
res = ast_control_streamfile(chan, argv[arg_file], argv[arg_fwd], argv[arg_rev], argv[arg_stop], argv[arg_pause], argv[arg_restart], skipms);
/* If we stopped on one of our stop keys, return 0 */
if (res > 0 && argv[arg_stop] && strchr(argv[arg_stop], res)) {
if (argv[arg_stop] && strchr(argv[arg_stop], res)) {
res = 0;
pbx_builtin_setvar_helper(chan, "CPLAYBACKSTATUS", "USERSTOPPED");
} else {
if (res < 0) {
if (priority_jump || ast_opt_priority_jumping) {
if (priority_jump || option_priority_jumping) {
if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101)) {
ast_log(LOG_WARNING, "ControlPlayback tried to jump to priority n+101 as requested, but priority didn't exist\n");
}
@@ -148,21 +150,41 @@ static int controlplayback_exec(struct ast_channel *chan, void *data)
pbx_builtin_setvar_helper(chan, "CPLAYBACKSTATUS", "SUCCESS");
}
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return res;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
return ast_register_application(app, controlplayback_exec, synopsis, descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Control Playback Application");
char *description(void)
{
return (char *) tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

257
apps/app_curl.c Normal file
View File

@@ -0,0 +1,257 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 2004 - 2005, Tilghman Lesher
*
* Tilghman Lesher <curl-20050919@the-tilghman.com>
* and Brian Wilkins <bwilkins@cfl.rr.com> (Added POST option)
*
* app_curl.c is distributed with no restrictions on usage or
* redistribution.
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
*/
/*! \file
* \brief Curl - App to load a URL
*
* \ingroup applications
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <curl/curl.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/cli.h"
#include "asterisk/options.h"
#include "asterisk/module.h"
static char *tdesc = "Load external URL";
static char *app = "Curl";
static char *synopsis = "Load an external URL";
static char *descrip =
" Curl(URL[|postdata]): This application will request the specified URL.\n"
"It is mainly used for signalling external applications of an event.\n"
"Parameters:\n"
" URL - This is the external URL to request.\n"
" postdata - This information will be treated as POST data.\n"
"This application will set the following variable:\n"
" CURL - This variable will contain the resulting page.\n"
"This application has been deprecated in favor of the CURL function.\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
struct MemoryStruct {
char *memory;
size_t size;
};
static void *myrealloc(void *ptr, size_t size)
{
/* There might be a realloc() out there that doesn't like reallocing
NULL pointers, so we take care of it here */
if (ptr)
return realloc(ptr, size);
else
return malloc(size);
}
static size_t WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data)
{
register int realsize = size * nmemb;
struct MemoryStruct *mem = (struct MemoryStruct *)data;
mem->memory = (char *)myrealloc(mem->memory, mem->size + realsize + 1);
if (mem->memory) {
memcpy(&(mem->memory[mem->size]), ptr, realsize);
mem->size += realsize;
mem->memory[mem->size] = 0;
}
return realsize;
}
static int curl_internal(struct MemoryStruct *chunk, char *url, char *post)
{
CURL *curl;
curl = curl_easy_init();
if (!curl) {
return -1;
}
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)chunk);
curl_easy_setopt(curl, CURLOPT_USERAGENT, "asterisk-libcurl-agent/1.0");
if (post) {
curl_easy_setopt(curl, CURLOPT_POST, 1);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, post);
}
curl_easy_perform(curl);
curl_easy_cleanup(curl);
return 0;
}
static int curl_exec(struct ast_channel *chan, void *data)
{
int res = 0;
struct localuser *u;
char *info, *post_data=NULL, *url;
struct MemoryStruct chunk = { NULL, 0 };
static int dep_warning = 0;
if (!dep_warning) {
ast_log(LOG_WARNING, "The application Curl is deprecated. Please use the CURL() function instead.\n");
dep_warning = 1;
}
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "Curl requires an argument (URL)\n");
return -1;
}
LOCAL_USER_ADD(u);
if ((info = ast_strdupa(data))) {
url = strsep(&info, "|");
post_data = info;
} else {
ast_log(LOG_ERROR, "Out of memory\n");
LOCAL_USER_REMOVE(u);
return -1;
}
if (! curl_internal(&chunk, url, post_data)) {
if (chunk.memory) {
chunk.memory[chunk.size] = '\0';
if (chunk.memory[chunk.size - 1] == 10)
chunk.memory[chunk.size - 1] = '\0';
pbx_builtin_setvar_helper(chan, "CURL", chunk.memory);
free(chunk.memory);
}
} else {
ast_log(LOG_ERROR, "Cannot allocate curl structure\n");
res = -1;
}
LOCAL_USER_REMOVE(u);
return res;
}
static char *acf_curl_exec(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
{
struct localuser *u;
char *info, *post_data=NULL, *url;
struct MemoryStruct chunk = { NULL, 0 };
*buf = '\0';
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "CURL requires an argument (URL)\n");
return buf;
}
LOCAL_USER_ACF_ADD(u);
info = ast_strdupa(data);
if (!info) {
ast_log(LOG_ERROR, "Out of memory\n");
LOCAL_USER_REMOVE(u);
return buf;
}
url = strsep(&info, "|");
post_data = info;
if (! curl_internal(&chunk, url, post_data)) {
if (chunk.memory) {
chunk.memory[chunk.size] = '\0';
if (chunk.memory[chunk.size - 1] == 10)
chunk.memory[chunk.size - 1] = '\0';
ast_copy_string(buf, chunk.memory, len);
free(chunk.memory);
}
} else {
ast_log(LOG_ERROR, "Cannot allocate curl structure\n");
}
LOCAL_USER_REMOVE(u);
return buf;
}
struct ast_custom_function acf_curl = {
.name = "CURL",
.synopsis = "Retrieves the contents of a URL",
.syntax = "CURL(url[|post-data])",
.desc =
" url - URL to retrieve\n"
" post-data - Optional data to send as a POST (GET is default action)\n",
.read = acf_curl_exec,
};
int unload_module(void)
{
int res;
res = ast_custom_function_unregister(&acf_curl);
res |= ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
curl_global_cleanup();
return res;
}
int load_module(void)
{
int res;
curl_global_init(CURL_GLOBAL_ALL);
res = ast_custom_function_register(&acf_curl);
res |= ast_register_application(app, curl_exec, synopsis, descrip);
return res;
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -1,7 +1,7 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (c) 2003-2006 Tilghman Lesher. All rights reserved.
* Copyright (c) 2003 Tilghman Lesher. All rights reserved.
*
* Tilghman Lesher <app_cut__v003@the-tilghman.com>
*
@@ -16,23 +16,20 @@
*/
/*! \file
*
* \brief CUT function
* \brief Cut application
*
* \author Tilghman Lesher <app_cut__v003@the-tilghman.com>
*
* \ingroup functions
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/options.h"
@@ -44,6 +41,37 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
/* Maximum length of any variable */
#define MAXRESULT 1024
static char *tdesc = "Cut out information from a string";
static char *app_cut = "Cut";
static char *cut_synopsis = "Splits a variable's contents using the specified delimiter";
static char *cut_descrip =
" Cut(newvar=varname,delimiter,fieldspec): This application will split the\n"
"contents of a variable based on the given delimeter and store the result in\n"
"a new variable.\n"
"Parameters:\n"
" newvar - new variable created from result string\n"
" varname - variable you want cut\n"
" delimiter - defaults to '-'\n"
" fieldspec - number of the field you want (1-based offset)\n"
" may also be specified as a range (with -)\n"
" or group of ranges and fields (with &)\n"
"This application has been deprecated in favor of the CUT function.\n";
static char *app_sort = "Sort";
static char *app_sort_synopsis = "Sorts a list of keywords and values";
static char *app_sort_descrip =
" Sort(newvar=key1:val1[,key2:val2[[...],keyN:valN]]): This application will\n"
"sort the list provided in ascending order. The result will be stored in the\n"
"specified variable name.\n"
" This application has been deprecated in favor of the SORT function.\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
struct sortable_keys {
char *key;
float value;
@@ -52,12 +80,13 @@ struct sortable_keys {
static int sort_subroutine(const void *arg1, const void *arg2)
{
const struct sortable_keys *one=arg1, *two=arg2;
if (one->value < two->value)
if (one->value < two->value) {
return -1;
else if (one->value == two->value)
} else if (one->value == two->value) {
return 0;
else
} else {
return 1;
}
}
#define ERROR_NOARG (-1)
@@ -72,17 +101,25 @@ static int sort_internal(struct ast_channel *chan, char *data, char *buffer, siz
memset(buffer, 0, buflen);
if (!data)
if (!data) {
return ERROR_NOARG;
}
strings = ast_strdupa(data);
strings = ast_strdupa((char *)data);
if (!strings) {
return ERROR_NOMEM;
}
for (ptrkey = strings; *ptrkey; ptrkey++) {
if (*ptrkey == '|')
if (*ptrkey == '|') {
count++;
}
}
sortable_keys = alloca(count * sizeof(struct sortable_keys));
if (!sortable_keys) {
return ERROR_NOMEM;
}
memset(sortable_keys, 0, count * sizeof(struct sortable_keys));
@@ -94,7 +131,8 @@ static int sort_internal(struct ast_channel *chan, char *data, char *buffer, siz
count--;
continue;
}
*ptrvalue++ = '\0';
*ptrvalue = '\0';
ptrvalue++;
sortable_keys[count2].key = ptrkey;
sscanf(ptrvalue, "%f", &sortable_keys[count2].value);
count2++;
@@ -117,47 +155,42 @@ static int sort_internal(struct ast_channel *chan, char *data, char *buffer, siz
static int cut_internal(struct ast_channel *chan, char *data, char *buffer, size_t buflen)
{
char *parse;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(varname);
AST_APP_ARG(delimiter);
AST_APP_ARG(field);
);
char *s, *args[3], *varname=NULL, *delimiter=NULL, *field=NULL;
int args_okay = 0;
memset(buffer, 0, buflen);
parse = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, parse);
memset(buffer, 0, buflen);
/* Check and parse arguments */
if(args.argc < 3){
return ERROR_NOARG;
} else {
if (data) {
s = ast_strdupa((char *)data);
if (s) {
ast_app_separate_args(s, '|', args, 3);
varname = args[0];
delimiter = args[1];
field = args[2];
if (field) {
args_okay = 1;
}
} else {
return ERROR_NOMEM;
}
}
if (args_okay) {
char d, ds[2];
char *tmp = alloca(strlen(args.varname) + 4);
char *tmp = alloca(strlen(varname) + 4);
char varvalue[MAXRESULT], *tmp2=varvalue;
if (tmp) {
snprintf(tmp, strlen(args.varname) + 4, "${%s}", args.varname);
snprintf(tmp, strlen(varname) + 4, "${%s}", varname);
memset(varvalue, 0, sizeof(varvalue));
} else {
return ERROR_NOMEM;
}
if (args.delimiter[0] == '\\') {
if (args.delimiter[1] == 'n')
d = '\n';
else if (args.delimiter[1] == 't')
d = '\t';
else if (args.delimiter[1] == 'r')
d = '\r';
else if (args.delimiter[1])
d = args.delimiter[1];
else
d = '-';
} else if (args.delimiter[0])
d = args.delimiter[0];
if (delimiter[0])
d = delimiter[0];
else
d = '-';
@@ -168,8 +201,8 @@ static int cut_internal(struct ast_channel *chan, char *data, char *buffer, size
if (tmp2) {
int curfieldnum = 1;
while (tmp2 != NULL && args.field != NULL) {
char *nextgroup = strsep(&(args.field), "&");
while ((tmp2 != NULL) && (field != NULL)) {
char *nextgroup = strsep(&field, "&");
int num1 = 0, num2 = MAXRESULT;
char trashchar;
@@ -190,44 +223,146 @@ static int cut_internal(struct ast_channel *chan, char *data, char *buffer, size
/* Get to start, if any */
if (num1 > 0) {
while (tmp2 != (char *)NULL + 1 && curfieldnum < num1) {
while ((tmp2 != (char *)NULL + 1) && (curfieldnum < num1)) {
tmp2 = index(tmp2, d) + 1;
curfieldnum++;
}
}
/* Most frequent problem is the expectation of reordering fields */
if ((num1 > 0) && (curfieldnum > num1))
if ((num1 > 0) && (curfieldnum > num1)) {
ast_log(LOG_WARNING, "We're already past the field you wanted?\n");
}
/* Re-null tmp2 if we added 1 to NULL */
if (tmp2 == (char *)NULL + 1)
tmp2 = NULL;
/* Output fields until we either run out of fields or num2 is reached */
while (tmp2 != NULL && curfieldnum <= num2) {
while ((tmp2 != NULL) && (curfieldnum <= num2)) {
char *tmp3 = strsep(&tmp2, ds);
int curlen = strlen(buffer);
if (curlen)
if (curlen) {
snprintf(buffer + curlen, buflen - curlen, "%c%s", d, tmp3);
else
} else {
snprintf(buffer, buflen, "%s", tmp3);
}
curfieldnum++;
}
}
}
} else {
return ERROR_NOARG;
}
return 0;
}
static int acf_sort_exec(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
static int sort_exec(struct ast_channel *chan, void *data)
{
struct ast_module_user *u;
int ret = -1;
int res=0;
struct localuser *u;
char *varname, *strings, result[512] = "";
static int dep_warning=0;
u = ast_module_user_add(chan);
if (!dep_warning) {
ast_log(LOG_WARNING, "The application Sort is deprecated. Please use the SORT() function instead.\n");
dep_warning=1;
}
if (!data) {
ast_log(LOG_ERROR, "Sort() requires an argument\n");
return 0;
}
LOCAL_USER_ADD(u);
strings = ast_strdupa((char *)data);
if (!strings) {
ast_log(LOG_ERROR, "Out of memory\n");
LOCAL_USER_REMOVE(u);
return 0;
}
varname = strsep(&strings, "=");
switch (sort_internal(chan, strings, result, sizeof(result))) {
case ERROR_NOARG:
ast_log(LOG_ERROR, "Sort() requires an argument\n");
res = 0;
break;
case ERROR_NOMEM:
ast_log(LOG_ERROR, "Out of memory\n");
res = -1;
break;
case 0:
pbx_builtin_setvar_helper(chan, varname, result);
res = 0;
break;
default:
ast_log(LOG_ERROR, "Unknown internal error\n");
res = -1;
}
LOCAL_USER_REMOVE(u);
return res;
}
static int cut_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct localuser *u;
char *s, *newvar=NULL, result[512];
static int dep_warning = 0;
LOCAL_USER_ADD(u);
if (!dep_warning) {
ast_log(LOG_WARNING, "The application Cut is deprecated. Please use the CUT() function instead.\n");
dep_warning=1;
}
/* Check and parse arguments */
if (data) {
s = ast_strdupa((char *)data);
if (s) {
newvar = strsep(&s, "=");
} else {
ast_log(LOG_ERROR, "Out of memory\n");
LOCAL_USER_REMOVE(u);
return -1;
}
}
switch (cut_internal(chan, s, result, sizeof(result))) {
case ERROR_NOARG:
ast_log(LOG_ERROR, "Cut() requires an argument\n");
res = 0;
break;
case ERROR_NOMEM:
ast_log(LOG_ERROR, "Out of memory\n");
res = -1;
break;
case ERROR_USAGE:
ast_log(LOG_ERROR, "Usage: %s\n", cut_synopsis);
res = 0;
break;
case 0:
pbx_builtin_setvar_helper(chan, newvar, result);
res = 0;
break;
default:
ast_log(LOG_ERROR, "Unknown internal error\n");
res = -1;
}
LOCAL_USER_REMOVE(u);
return res;
}
static char *acf_sort_exec(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
{
struct localuser *u;
LOCAL_USER_ACF_ADD(u);
switch (sort_internal(chan, data, buf, len)) {
case ERROR_NOARG:
@@ -237,48 +372,37 @@ static int acf_sort_exec(struct ast_channel *chan, char *cmd, char *data, char *
ast_log(LOG_ERROR, "Out of memory\n");
break;
case 0:
ret = 0;
break;
default:
ast_log(LOG_ERROR, "Unknown internal error\n");
}
ast_module_user_remove(u);
return ret;
LOCAL_USER_REMOVE(u);
return buf;
}
static int acf_cut_exec(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
static char *acf_cut_exec(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
{
int ret = -1;
struct ast_module_user *u = NULL;
struct localuser *u;
if (chan) {
u = ast_module_user_add(chan);
}
LOCAL_USER_ACF_ADD(u);
switch (cut_internal(chan, data, buf, len)) {
case ERROR_NOARG:
ast_log(LOG_ERROR, "Syntax: CUT(<varname>,<char-delim>,<range-spec>) - missing argument!\n");
ast_log(LOG_ERROR, "CUT() requires an argument\n");
break;
case ERROR_NOMEM:
ast_log(LOG_ERROR, "Out of memory\n");
break;
case ERROR_USAGE:
ast_log(LOG_ERROR, "Usage: CUT(<varname>,<char-delim>,<range-spec>)\n");
ast_log(LOG_ERROR, "Usage: %s\n", cut_synopsis);
break;
case 0:
ret = 0;
break;
default:
ast_log(LOG_ERROR, "Unknown internal error\n");
}
if (chan) {
ast_module_user_remove(u);
}
return ret;
LOCAL_USER_REMOVE(u);
return buf;
}
struct ast_custom_function acf_sort = {
@@ -305,26 +429,45 @@ struct ast_custom_function acf_cut = {
.read = acf_cut_exec,
};
static int unload_module(void)
int unload_module(void)
{
int res = 0;
int res;
res |= ast_custom_function_unregister(&acf_cut);
res = ast_custom_function_unregister(&acf_cut);
res |= ast_custom_function_unregister(&acf_sort);
res |= ast_unregister_application(app_sort);
res |= ast_unregister_application(app_cut);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
int res = 0;
int res;
res |= ast_custom_function_register(&acf_cut);
res = ast_custom_function_register(&acf_cut);
res |= ast_custom_function_register(&acf_sort);
res |= ast_register_application(app_sort, sort_exec, app_sort_synopsis, app_sort_descrip);
res |= ast_register_application(app_cut, cut_exec, cut_synopsis, cut_descrip);
return res;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Cut out information from a string");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

101
apps/app_datetime.c Normal file
View File

@@ -0,0 +1,101 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 1999 - 2005, Digium, Inc.
*
* Mark Spencer <markster@digium.com>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
*/
/*! \file
* \brief Time of day - Report the time of day
*
* \ingroup applications
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#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/say.h"
static char *tdesc = "Date and Time";
static char *app = "DateTime";
static char *synopsis = "Say the date and time";
static char *descrip =
" DateTime(): This application will say the current date and time.\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int datetime_exec(struct ast_channel *chan, void *data)
{
int res=0;
time_t t;
struct localuser *u;
LOCAL_USER_ADD(u);
time(&t);
if (chan->_state != AST_STATE_UP)
res = ast_answer(chan);
if (!res)
res = ast_say_datetime(chan, t, "", chan->language);
LOCAL_USER_REMOVE(u);
return res;
}
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
return res;
}
int load_module(void)
{
return ast_register_application(app, datetime_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -22,22 +22,19 @@
*
* \brief Database access functions
*
* \author Mark Spencer <markster@digium.com>
* \author Jefferson Noxon <jeff@debian.org>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/options.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -48,38 +45,65 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/options.h"
/*! \todo XXX Remove this application after 1.4 is relased */
static char *tdesc = "Database Access Functions";
static char *g_descrip =
" DBget(varname=family/key[|options]): This application will retrieve a value\n"
"from the Asterisk database and store it in the given variable.\n"
" Options:\n"
" j - Jump to priority n+101 if the requested family/key isn't found.\n"
" This application sets the following channel variable upon completion:\n"
" DBGETSTATUS - This variable will contain the status of the attempt\n"
" FOUND | NOTFOUND \n"
" This application has been deprecated in favor of the DB function.\n";
static char *p_descrip =
" DBput(family/key=value): This application will store the given value in the\n"
"specified location in the Asterisk database.\n"
" This application has been deprecated in favor of the DB function.\n";
static char *d_descrip =
" DBdel(family/key): This application will delete a key from the Asterisk\n"
"database.\n"
" This application has been DEPRECATED in favor of the DB_DELETE function.\n";
"database.\n";
static char *dt_descrip =
" DBdeltree(family[/keytree]): This application will delete a family or keytree\n"
"from the Asterisk database\n";
static char *g_app = "DBget";
static char *p_app = "DBput";
static char *d_app = "DBdel";
static char *dt_app = "DBdeltree";
static char *g_synopsis = "Retrieve a value from the database";
static char *p_synopsis = "Store a value in the database";
static char *d_synopsis = "Delete a key from the database";
static char *dt_synopsis = "Delete a family or keytree from the database";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int deltree_exec(struct ast_channel *chan, void *data)
{
char *argv, *family, *keytree;
struct ast_module_user *u;
struct localuser *u;
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
argv = ast_strdupa(data);
if (!argv) {
ast_log(LOG_ERROR, "Memory allocation failed\n");
LOCAL_USER_REMOVE(u);
return 0;
}
if (strchr(argv, '/')) {
family = strsep(&argv, "/");
keytree = strsep(&argv, "\0");
if (!family || !keytree) {
ast_log(LOG_DEBUG, "Ignoring; Syntax error in argument\n");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return 0;
}
if (ast_strlen_zero(keytree))
@@ -101,7 +125,7 @@ static int deltree_exec(struct ast_channel *chan, void *data)
ast_verbose(VERBOSE_PREFIX_3 "DBdeltree: Error deleting key from database.\n");
}
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return 0;
}
@@ -109,24 +133,23 @@ static int deltree_exec(struct ast_channel *chan, void *data)
static int del_exec(struct ast_channel *chan, void *data)
{
char *argv, *family, *key;
struct ast_module_user *u;
static int deprecation_warning = 0;
struct localuser *u;
u = ast_module_user_add(chan);
if (!deprecation_warning) {
deprecation_warning = 1;
ast_log(LOG_WARNING, "The DBdel application has been deprecated in favor of the DB_DELETE dialplan function!\n");
}
LOCAL_USER_ADD(u);
argv = ast_strdupa(data);
if (!argv) {
ast_log (LOG_ERROR, "Memory allocation failed\n");
LOCAL_USER_REMOVE(u);
return 0;
}
if (strchr(argv, '/')) {
family = strsep(&argv, "/");
key = strsep(&argv, "\0");
if (!family || !key) {
ast_log(LOG_DEBUG, "Ignoring; Syntax error in argument\n");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return 0;
}
if (option_verbose > 2)
@@ -139,29 +162,162 @@ static int del_exec(struct ast_channel *chan, void *data)
ast_log(LOG_DEBUG, "Ignoring, no parameters\n");
}
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return 0;
}
static int unload_module(void)
static int put_exec(struct ast_channel *chan, void *data)
{
char *argv, *value, *family, *key;
static int dep_warning = 0;
struct localuser *u;
LOCAL_USER_ADD(u);
if (!dep_warning) {
ast_log(LOG_WARNING, "This application has been deprecated, please use the ${DB(family/key)} function instead.\n");
dep_warning = 1;
}
argv = ast_strdupa(data);
if (!argv) {
ast_log(LOG_ERROR, "Memory allocation failed\n");
LOCAL_USER_REMOVE(u);
return 0;
}
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");
LOCAL_USER_REMOVE(u);
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");
}
LOCAL_USER_REMOVE(u);
return 0;
}
static int get_exec(struct ast_channel *chan, void *data)
{
char *argv, *varname, *family, *key, *options = NULL;
char dbresult[256];
static int dep_warning = 0;
int priority_jump = 0;
struct localuser *u;
LOCAL_USER_ADD(u);
if (!dep_warning) {
ast_log(LOG_WARNING, "This application has been deprecated, please use the ${DB(family/key)} function instead.\n");
dep_warning = 1;
}
argv = ast_strdupa(data);
if (!argv) {
ast_log(LOG_ERROR, "Memory allocation failed\n");
LOCAL_USER_REMOVE(u);
return 0;
}
if (strchr(argv, '=') && strchr(argv, '/')) {
varname = strsep(&argv, "=");
family = strsep(&argv, "/");
if (strchr((void *)&argv, '|')) {
key = strsep(&argv, "|");
options = strsep(&argv, "\0");
} else
key = strsep(&argv, "\0");
if (!varname || !family || !key) {
ast_log(LOG_DEBUG, "Ignoring; Syntax error in argument\n");
LOCAL_USER_REMOVE(u);
return 0;
}
if (options) {
if (strchr(options, 'j'))
priority_jump = 1;
}
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);
pbx_builtin_setvar_helper(chan, "DBGETSTATUS", "FOUND");
} else {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "DBget: Value not found in database.\n");
if (priority_jump || option_priority_jumping) {
/* Send the call to n+101 priority, where n is the current priority */
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
}
pbx_builtin_setvar_helper(chan, "DBGETSTATUS", "NOTFOUND");
}
} else {
ast_log(LOG_DEBUG, "Ignoring, no parameters\n");
}
LOCAL_USER_REMOVE(u);
return 0;
}
int unload_module(void)
{
int retval;
retval = ast_unregister_application(dt_app);
retval |= ast_unregister_application(d_app);
retval |= ast_unregister_application(p_app);
retval |= ast_unregister_application(g_app);
STANDARD_HANGUP_LOCALUSERS;
return retval;
}
static int load_module(void)
int load_module(void)
{
int retval;
retval = ast_register_application(d_app, del_exec, d_synopsis, d_descrip);
retval = ast_register_application(g_app, get_exec, g_synopsis, g_descrip);
retval |= ast_register_application(p_app, put_exec, p_synopsis, p_descrip);
retval |= ast_register_application(d_app, del_exec, d_synopsis, d_descrip);
retval |= ast_register_application(dt_app, deltree_exec, dt_synopsis, dt_descrip);
return retval;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Database Access Functions");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

File diff suppressed because it is too large Load Diff

View File

@@ -22,20 +22,18 @@
*
* \brief Virtual Dictation Machine Application For Asterisk
*
* \author Anthony Minessale II <anthmct@yahoo.com>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/stat.h> /* for mkdir */
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -46,12 +44,16 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/app.h"
static char *tdesc = "Virtual Dictation Machine";
static char *app = "Dictate";
static char *synopsis = "Virtual Dictation Machine";
static char *desc = " Dictate([<base_dir>[|<filename>]])\n"
static char *desc = " Dictate([<base_dir>])\n"
"Start dictation machine using optional base dir for files.\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
typedef enum {
DFLAG_RECORD = (1 << 0),
DFLAG_PLAY = (1 << 1),
@@ -78,20 +80,16 @@ static int play_and_wait(struct ast_channel *chan, char *file, char *digits)
static int dictate_exec(struct ast_channel *chan, void *data)
{
char *path = NULL, filein[256], *filename = "";
char *parse;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(base);
AST_APP_ARG(filename);
);
char *mydata, *argv[2], *path = NULL, filein[256];
char dftbase[256];
char *base;
struct ast_flags flags = {0};
struct ast_filestream *fs;
struct ast_frame *f = NULL;
struct ast_module_user *u;
struct localuser *u;
int ffactor = 320 * 80,
res = 0,
argc = 0,
done = 0,
oldr = 0,
lastop = 0,
@@ -102,43 +100,35 @@ static int dictate_exec(struct ast_channel *chan, void *data)
maxlen = 0,
mode = 0;
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
snprintf(dftbase, sizeof(dftbase), "%s/dictate", ast_config_AST_SPOOL_DIR);
if (!ast_strlen_zero(data)) {
parse = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, parse);
} else
args.argc = 0;
if (!ast_strlen_zero(data) && (mydata = ast_strdupa(data))) {
argc = ast_app_separate_args(mydata, '|', argv, sizeof(argv) / sizeof(argv[0]));
}
if (args.argc && !ast_strlen_zero(args.base)) {
base = args.base;
if (argc) {
base = argv[0];
} else {
base = dftbase;
}
if (args.argc > 1 && args.filename) {
filename = args.filename;
}
oldr = chan->readformat;
if ((res = ast_set_read_format(chan, AST_FORMAT_SLINEAR)) < 0) {
ast_log(LOG_WARNING, "Unable to set to linear mode.\n");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
ast_answer(chan);
ast_safe_sleep(chan, 200);
for (res = 0; !res;) {
if (ast_strlen_zero(filename)) {
if (ast_app_getdata(chan, "dictate/enter_filename", filein, sizeof(filein), 0) ||
ast_strlen_zero(filein)) {
res = -1;
break;
}
} else {
ast_copy_string(filein, filename, sizeof(filein));
filename = "";
for(res = 0; !res;) {
if (ast_app_getdata(chan, "dictate/enter_filename", filein, sizeof(filein), 0) ||
ast_strlen_zero(filein)) {
res = -1;
break;
}
mkdir(base, 0755);
len = strlen(base) + strlen(filein) + 2;
if (!path || len > maxlen) {
@@ -330,20 +320,40 @@ static int dictate_exec(struct ast_channel *chan, void *data)
if (oldr) {
ast_set_read_format(chan, oldr);
}
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return 0;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
return ast_register_application(app, dictate_exec, synopsis, desc);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Virtual Dictation Machine");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -20,20 +20,18 @@
*
* \brief Directed Call Pickup Support
*
* \author Joshua Colp <jcolp@digium.com>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
@@ -41,141 +39,131 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/module.h"
#include "asterisk/lock.h"
#include "asterisk/app.h"
#include "asterisk/options.h"
#define PICKUPMARK "PICKUPMARK"
static const char *tdesc = "Directed Call Pickup Application";
static const char *app = "Pickup";
static const char *synopsis = "Directed Call Pickup";
static const char *descrip =
" Pickup(extension[@context][&extension2@context...]): This application can pickup any ringing channel\n"
" Pickup(extension[@context]): This application can pickup any ringing channel\n"
"that is calling the specified extension. If no context is specified, the current\n"
"context will be used. If you use the special string \"PICKUPMARK\" for the context parameter, for example\n"
"10@PICKUPMARK, this application tries to find a channel which has defined a channel variable with the same content\n"
"as \"extension\".";
"context will be used.\n";
/* Perform actual pickup between two channels */
static int pickup_do(struct ast_channel *chan, struct ast_channel *target)
{
int res = 0;
STANDARD_LOCAL_USER;
if (option_debug)
ast_log(LOG_DEBUG, "Call pickup on '%s' by '%s'\n", target->name, chan->name);
LOCAL_USER_DECL;
if ((res = ast_answer(chan))) {
ast_log(LOG_WARNING, "Unable to answer '%s'\n", chan->name);
return -1;
}
if ((res = ast_queue_control(chan, AST_CONTROL_ANSWER))) {
ast_log(LOG_WARNING, "Unable to queue answer on '%s'\n", chan->name);
return -1;
}
if ((res = ast_channel_masquerade(target, chan))) {
ast_log(LOG_WARNING, "Unable to masquerade '%s' into '%s'\n", chan->name, target->name);
return -1;
}
return res;
}
/* Helper function that determines whether a channel is capable of being picked up */
static int can_pickup(struct ast_channel *chan)
{
if (!chan->pbx && (chan->_state == AST_STATE_RINGING || chan->_state == AST_STATE_RING || chan->_state == AST_STATE_DOWN))
return 1;
else
return 0;
}
/* Attempt to pick up specified extension with context */
static int pickup_by_exten(struct ast_channel *chan, char *exten, char *context)
{
int res = -1;
struct ast_channel *target = NULL;
while ((target = ast_channel_walk_locked(target))) {
if ((!strcasecmp(target->macroexten, exten) || !strcasecmp(target->exten, exten)) &&
!strcasecmp(target->dialcontext, context) &&
can_pickup(target)) {
res = pickup_do(chan, target);
ast_channel_unlock(target);
break;
}
ast_channel_unlock(target);
}
return res;
}
/* Attempt to pick up specified mark */
static int pickup_by_mark(struct ast_channel *chan, char *mark)
{
int res = -1;
const char *tmp = NULL;
struct ast_channel *target = NULL;
while ((target = ast_channel_walk_locked(target))) {
if ((tmp = pbx_builtin_getvar_helper(target, PICKUPMARK)) &&
!strcasecmp(tmp, mark) &&
can_pickup(target)) {
res = pickup_do(chan, target);
ast_channel_unlock(target);
break;
}
ast_channel_unlock(target);
}
return res;
}
/* Main application entry point */
static int pickup_exec(struct ast_channel *chan, void *data)
{
int res = 0;
struct ast_module_user *u = NULL;
char *tmp = ast_strdupa(data);
char *exten = NULL, *context = NULL;
struct localuser *u = NULL;
struct ast_channel *origin = NULL, *target = NULL;
char *tmp = NULL, *exten = NULL, *context = NULL;
char workspace[256] = "";
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "Pickup requires an argument (extension)!\n");
ast_log(LOG_WARNING, "Pickup requires an argument (extension) !\n");
return -1;
}
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
/* Parse extension (and context if there) */
while (!ast_strlen_zero(tmp) && (exten = strsep(&tmp, "&"))) {
if ((context = strchr(exten, '@')))
*context++ = '\0';
if (context && !strcasecmp(context, PICKUPMARK)) {
if (!pickup_by_mark(chan, exten))
break;
} else {
if (!pickup_by_exten(chan, exten, context ? context : chan->context))
break;
}
ast_log(LOG_NOTICE, "No target channel found for %s.\n", exten);
/* Get the extension and context if present */
exten = data;
context = strchr(data, '@');
if (context) {
*context = '\0';
context++;
}
ast_module_user_remove(u);
/* Find a channel to pickup */
origin = ast_get_channel_by_exten_locked(exten, context);
if (origin && origin->cdr) {
ast_cdr_getvar(origin->cdr, "dstchannel", &tmp, workspace,
sizeof(workspace), 0);
if (tmp) {
/* We have a possible channel... now we need to find it! */
target = ast_get_channel_by_name_locked(tmp);
} else {
ast_log(LOG_DEBUG, "No target channel found.\n");
res = -1;
}
ast_mutex_unlock(&origin->lock);
} else {
if (origin)
ast_mutex_unlock(&origin->lock);
ast_log(LOG_DEBUG, "No originating channel found.\n");
}
if (res)
goto out;
if (target && (!target->pbx) && ((target->_state == AST_STATE_RINGING) || (target->_state == AST_STATE_RING))) {
ast_log(LOG_DEBUG, "Call pickup on chan '%s' by '%s'\n", target->name,
chan->name);
res = ast_answer(chan);
if (res) {
ast_log(LOG_WARNING, "Unable to answer '%s'\n", chan->name);
res = -1;
goto out;
}
res = ast_queue_control(chan, AST_CONTROL_ANSWER);
if (res) {
ast_log(LOG_WARNING, "Unable to queue answer on '%s'\n",
chan->name);
res = -1;
goto out;
}
res = ast_channel_masquerade(target, chan);
if (res) {
ast_log(LOG_WARNING, "Unable to masquerade '%s' into '%s'\n", chan->name, target->name);
res = -1;
goto out;
}
} else {
ast_log(LOG_DEBUG, "No call pickup possible...\n");
res = -1;
}
/* Done */
out:
if (target)
ast_mutex_unlock(&target->lock);
LOCAL_USER_REMOVE(u);
return res;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
return ast_register_application(app, pickup_exec, synopsis, descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Directed Call Pickup Application");
char *description(void)
{
return (char *) tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -19,21 +19,19 @@
/*! \file
*
* \brief Provide a directory of extensions
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -43,9 +41,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/config.h"
#include "asterisk/say.h"
#include "asterisk/utils.h"
#include "asterisk/app.h"
#ifdef ODBC_STORAGE
#ifdef USE_ODBC_STORAGE
#include <errno.h>
#include <sys/mman.h>
#include "asterisk/res_odbc.h"
@@ -55,6 +52,7 @@ static char odbc_table[80] = "voicemessages";
static char vmfmts[80] = "wav";
#endif
static char *tdesc = "Extension Directory";
static char *app = "Directory";
static char *synopsis = "Provide directory of voicemail extensions";
@@ -74,10 +72,8 @@ static char *descrip =
" extension that the user has selected, or when jumping to the\n"
" 'o' or 'a' extension.\n\n"
" Options:\n"
" e - In addition to the name, also read the extension number to the\n"
" caller before presenting dialing options.\n"
" f - Allow the caller to enter the first name of a user in the directory\n"
" instead of using the last name.\n";
" instead of using the last name.\n";
/* For simplicity, I'm keeping the format compatible with the voicemail config,
but i'm open to suggestions for isolating it */
@@ -87,38 +83,11 @@ static char *descrip =
/* How many digits to read in */
#define NUMDIGITS 3
STANDARD_LOCAL_USER;
#ifdef ODBC_STORAGE
struct generic_prepare_struct {
const char *sql;
const char *param;
};
static SQLHSTMT generic_prepare(struct odbc_obj *obj, void *data)
{
struct generic_prepare_struct *gps = data;
SQLHSTMT stmt;
int res;
res = SQLAllocHandle(SQL_HANDLE_STMT, obj->con, &stmt);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Alloc Handle failed!\n");
return NULL;
}
res = SQLPrepare(stmt, (unsigned char *)gps->sql, SQL_NTS);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Prepare failed![%s]\n", (char *)gps->sql);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
return NULL;
}
if (!ast_strlen_zero(gps->param))
SQLBindParameter(stmt, 1, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(gps->param), 0, (void *)gps->param, 0, NULL);
return stmt;
}
LOCAL_USER_DECL;
#ifdef USE_ODBC_STORAGE
static void retrieve_file(char *dir)
{
int x = 0;
@@ -132,10 +101,9 @@ static void retrieve_file(char *dir)
char *c;
SQLLEN colsize;
char full_fn[256];
struct odbc_obj *obj;
struct generic_prepare_struct gps = { .sql = sql, .param = dir };
obj = ast_odbc_request_obj(odbc_database, 1);
odbc_obj *obj;
obj = fetch_odbc_obj(odbc_database, 0);
if (obj) {
do {
ast_copy_string(fmt, vmfmts, sizeof(fmt));
@@ -145,11 +113,23 @@ static void retrieve_file(char *dir)
if (!strcasecmp(fmt, "wav49"))
strcpy(fmt, "WAV");
snprintf(full_fn, sizeof(full_fn), "%s.%s", dir, fmt);
res = SQLAllocHandle(SQL_HANDLE_STMT, obj->con, &stmt);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Alloc Handle failed!\n");
break;
}
snprintf(sql, sizeof(sql), "SELECT recording FROM %s WHERE dir=? AND msgnum=-1", odbc_table);
stmt = ast_odbc_prepare_and_execute(obj, generic_prepare, &gps);
if (!stmt) {
res = SQLPrepare(stmt, (unsigned char *)sql, SQL_NTS);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Prepare failed![%s]\n", sql);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
break;
}
SQLBindParameter(stmt, 1, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(dir), 0, (void *)dir, 0, NULL);
res = odbc_smart_execute(obj, stmt);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
break;
}
res = SQLFetch(stmt);
@@ -192,7 +172,6 @@ static void retrieve_file(char *dir)
}
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
} while (0);
ast_odbc_release_obj(obj);
} else
ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
if (fdm != MAP_FAILED)
@@ -203,11 +182,11 @@ static void retrieve_file(char *dir)
}
#endif
static char *convert(const char *lastname)
static char *convert(char *lastname)
{
char *tmp;
int lcount = 0;
tmp = ast_malloc(NUMDIGITS + 1);
tmp = malloc(NUMDIGITS + 1);
if (tmp) {
while((*lastname > 32) && lcount < NUMDIGITS) {
switch(toupper(*lastname)) {
@@ -277,79 +256,95 @@ static char *convert(const char *lastname)
* '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 readext,
int fromappvm)
{
static int play_mailbox_owner(struct ast_channel *chan, char *context, char *dialcontext, char *ext, char *name, int fromappvm) {
int res = 0;
int loop;
int loop = 3;
char fn[256];
char fn2[256];
/* Check for the VoiceMail2 greeting first */
snprintf(fn, sizeof(fn), "%s/voicemail/%s/%s/greet",
ast_config_AST_SPOOL_DIR, context, ext);
#ifdef ODBC_STORAGE
(char *)ast_config_AST_SPOOL_DIR, context, ext);
#ifdef USE_ODBC_STORAGE
retrieve_file(fn);
#endif
if (ast_fileexists(fn, NULL, chan->language) <= 0) {
/* no file, check for an old-style Voicemail greeting */
snprintf(fn, sizeof(fn), "%s/vm/%s/greet",
ast_config_AST_SPOOL_DIR, ext);
}
#ifdef ODBC_STORAGE
retrieve_file(fn);
/* Otherwise, check for an old-style Voicemail greeting */
snprintf(fn2, sizeof(fn2), "%s/vm/%s/greet",
(char *)ast_config_AST_SPOOL_DIR, ext);
#ifdef USE_ODBC_STORAGE
retrieve_file(fn2);
#endif
if (ast_fileexists(fn, NULL, chan->language) > 0) {
res = ast_stream_and_wait(chan, fn, chan->language, AST_DIGIT_ANY);
res = ast_streamfile(chan, fn, chan->language);
if (!res) {
res = ast_waitstream(chan, AST_DIGIT_ANY);
}
ast_stopstream(chan);
/* If Option 'e' was specified, also read the extension number with the name */
if (readext) {
ast_stream_and_wait(chan, "vm-extension", chan->language, AST_DIGIT_ANY);
res = ast_say_character_str(chan, ext, AST_DIGIT_ANY, chan->language);
} 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, S_OR(name, ext), AST_DIGIT_ANY, chan->language);
if (!ast_strlen_zero(name) && readext) {
ast_stream_and_wait(chan, "vm-extension", chan->language, AST_DIGIT_ANY);
res = ast_say_character_str(chan, ext, AST_DIGIT_ANY, chan->language);
}
res = ast_say_character_str(chan, !ast_strlen_zero(name) ? name : ext,
AST_DIGIT_ANY, chan->language);
}
#ifdef ODBC_STORAGE
#ifdef USE_ODBC_STORAGE
ast_filedelete(fn, NULL);
ast_filedelete(fn2, NULL);
#endif
for (loop = 3 ; loop > 0; loop--) {
if (!res)
res = ast_stream_and_wait(chan, "dir-instr", chan->language, AST_DIGIT_ANY);
if (!res)
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 < 0) /* User hungup, so jump out now */
break;
if (res == '1') { /* Name selected */
if (fromappvm) {
/* We still want to set the exten though */
ast_copy_string(chan->exten, ext, sizeof(chan->exten));
} else {
if (ast_goto_if_exists(chan, dialcontext, ext, 1)) {
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;
if (res > -1) {
switch (res) {
case '1':
/* Name selected */
loop = 0;
if (fromappvm) {
/* We still want to set the exten */
ast_copy_string(chan->exten, ext, sizeof(chan->exten));
} else {
if (ast_goto_if_exists(chan, dialcontext, ext, 1)) {
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;
}
if (res == '*') /* Skip to next match in list */
break;
/* Not '1', or '*', so decrement number of tries */
res = 0;
}
} /* end while */
return(res);
}
@@ -361,8 +356,8 @@ static struct ast_config *realtime_directory(char *context)
struct ast_category *cat;
struct ast_variable *var;
char *mailbox;
const char *fullname;
const char *hidefromdir;
char *fullname;
char *hidefromdir;
char tmp[100];
/* Load flat file config. */
@@ -389,16 +384,13 @@ static struct ast_config *realtime_directory(char *context)
if (!cat) {
ast_log(LOG_WARNING, "Out of memory\n");
ast_config_destroy(cfg);
if (rtdata) {
ast_config_destroy(rtdata);
}
return NULL;
}
ast_category_append(cfg, cat);
}
mailbox = NULL;
while ( (mailbox = ast_category_browse(rtdata, mailbox)) ) {
mailbox = ast_category_browse(rtdata, NULL);
while (mailbox) {
fullname = ast_variable_retrieve(rtdata, mailbox, "fullname");
hidefromdir = ast_variable_retrieve(rtdata, mailbox, "hidefromdir");
snprintf(tmp, sizeof(tmp), "no-password,%s,hidefromdir=%s",
@@ -409,24 +401,23 @@ static struct ast_config *realtime_directory(char *context)
ast_variable_append(cat, var);
else
ast_log(LOG_WARNING, "Out of memory adding mailbox '%s'\n", mailbox);
mailbox = ast_category_browse(rtdata, mailbox);
}
ast_config_destroy(rtdata);
return cfg;
}
static int do_directory(struct ast_channel *chan, struct ast_config *cfg, struct ast_config *ucfg, char *context, char *dialcontext, char digit, int last, int readext, int fromappvm)
static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char *context, char *dialcontext, char digit, int last, int fromappvm)
{
/* Read in the first three digits.. "digit" is the first digit, already read */
char ext[NUMDIGITS + 1], *cat;
char ext[NUMDIGITS + 1];
char name[80] = "";
struct ast_variable *v;
int res;
int found=0;
int lastuserchoice = 0;
char *start, *conv, *stringp = NULL;
const char *pos;
int breakout = 0;
char *start, *pos, *conv,*stringp=NULL;
if (ast_strlen_zero(context)) {
ast_log(LOG_WARNING,
@@ -496,7 +487,7 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, struct
if (v) {
/* We have a match -- play a greeting if they have it */
res = play_mailbox_owner(chan, context, dialcontext, v->name, name, readext, fromappvm);
res = play_mailbox_owner(chan, context, dialcontext, v->name, name, fromappvm);
switch (res) {
case -1:
/* user pressed '1' but extension does not exist, or
@@ -523,66 +514,11 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, struct
}
}
if (!res && ucfg) {
/* Search users.conf for all names which start with those digits */
for (cat = ast_category_browse(ucfg, NULL); cat && !res ; cat = ast_category_browse(ucfg, cat)) {
if (!strcasecmp(cat, "general"))
continue;
if (!ast_true(ast_config_option(ucfg, cat, "hasdirectory")))
continue;
/* Find all candidate extensions */
if ((pos = ast_variable_retrieve(ucfg, cat, "fullname"))) {
ast_copy_string(name, pos, sizeof(name));
/* Grab the last name */
if (last && strrchr(pos,' '))
pos = strrchr(pos, ' ') + 1;
conv = convert(pos);
if (conv) {
if (!strcmp(conv, ext)) {
/* Match! */
found++;
/* We have a match -- play a greeting if they have it */
res = play_mailbox_owner(chan, context, dialcontext, cat, name, readext, fromappvm);
switch (res) {
case -1:
/* user pressed '1' but extension does not exist, or
* user hungup
*/
lastuserchoice = 0;
breakout = 1;
break;
case '1':
/* user pressed '1' and extensions exists;
play_mailbox_owner will already have done
a goto() on the channel
*/
lastuserchoice = res;
breakout = 1;
break;
case '*':
/* user pressed '*' to skip something found */
lastuserchoice = res;
breakout = 0;
res = 0;
break;
default:
breakout = 1;
break;
}
free(conv);
if (breakout)
break;
}
else
free(conv);
}
}
}
}
if (lastuserchoice != '1') {
res = ast_streamfile(chan, found ? "dir-nomore" : "dir-nomatch", chan->language);
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;
@@ -595,96 +531,96 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, struct
static int directory_exec(struct ast_channel *chan, void *data)
{
int res = 0;
struct ast_module_user *u;
struct ast_config *cfg, *ucfg;
struct localuser *u;
struct ast_config *cfg;
int last = 1;
int readext = 0;
int fromappvm = 0;
const char *dirintro;
char *parse;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(vmcontext);
AST_APP_ARG(dialcontext);
AST_APP_ARG(options);
);
char *context, *dialcontext, *dirintro, *options;
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "Directory requires an argument (context[,dialcontext])\n");
return -1;
}
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
parse = ast_strdupa(data);
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;
if (strchr(options, 'v'))
fromappvm = 1;
}
} else
dialcontext = context;
AST_STANDARD_APP_ARGS(args, parse);
if (args.options) {
if (strchr(args.options, 'f'))
last = 0;
if (strchr(args.options, 'e'))
readext = 1;
if (strchr(args.options, 'v'))
fromappvm = 1;
}
if (ast_strlen_zero(args.dialcontext))
args.dialcontext = args.vmcontext;
cfg = realtime_directory(args.vmcontext);
cfg = realtime_directory(context);
if (!cfg) {
ast_log(LOG_ERROR, "Unable to read the configuration data!\n");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
ucfg = ast_config_load("users.conf");
dirintro = ast_variable_retrieve(cfg, args.vmcontext, "directoryintro");
dirintro = ast_variable_retrieve(cfg, context, "directoryintro");
if (ast_strlen_zero(dirintro))
dirintro = ast_variable_retrieve(cfg, "general", "directoryintro");
if (ast_strlen_zero(dirintro))
dirintro = last ? "dir-intro" : "dir-intro-fn";
if (ast_strlen_zero(dirintro)) {
if (last)
dirintro = "dir-intro";
else
dirintro = "dir-intro-fn";
}
if (chan->_state != AST_STATE_UP)
res = ast_answer(chan);
for (;;) {
if (!res)
res = ast_stream_and_wait(chan, dirintro, chan->language, AST_DIGIT_ANY);
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, ucfg, args.vmcontext, args.dialcontext, res, last, readext, fromappvm);
res = do_directory(chan, cfg, context, dialcontext, res, last, fromappvm);
if (res > 0) {
res = ast_waitstream(chan, AST_DIGIT_ANY);
ast_stopstream(chan);
if (res >= 0)
if (res >= 0) {
continue;
}
}
}
break;
}
if (ucfg)
ast_config_destroy(ucfg);
ast_config_destroy(cfg);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return res;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
#ifdef ODBC_STORAGE
#ifdef USE_ODBC_STORAGE
struct ast_config *cfg = ast_config_load(VOICEMAIL_CONFIG);
const char *tmp;
char *tmp;
if (cfg) {
if ((tmp = ast_variable_retrieve(cfg, "general", "odbcstorage"))) {
@@ -704,4 +640,19 @@ static int load_module(void)
return ast_register_application(app, directory_exec, synopsis, descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Extension Directory");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -26,16 +26,16 @@
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <sys/time.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -47,14 +47,15 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/translate.h"
#include "asterisk/ulaw.h"
#include "asterisk/callerid.h"
#include "asterisk/stringfields.h"
static char *tdesc = "DISA (Direct Inward System Access) Application";
static char *app = "DISA";
static char *synopsis = "DISA (Direct Inward System Access)";
static char *descrip =
"DISA(<numeric passcode>[|<context>]) or DISA(<filename>)\n"
"DISA(<numeric passcode>[|<context>]) or disa(<filename>)\n"
"The DISA, Direct Inward System Access, application allows someone from \n"
"outside the telephone switch (PBX) to obtain an \"internal\" system \n"
"dialtone and to place calls from it as if they were placing a call from \n"
@@ -70,7 +71,7 @@ static char *descrip =
"Be aware that using this compromises the security of your PBX.\n\n"
"The arguments to this application (in extensions.conf) allow either\n"
"specification of a single global passcode (that everyone uses), or\n"
"individual passcodes contained in a file. It also allows specification\n"
"individual passcodes contained in a file. It also allow specification\n"
"of the context on which the user will be dialing. If no context is\n"
"specified, the DISA application defaults the context to \"disa\".\n"
"Presumably a normal system will have a special context set up\n"
@@ -92,9 +93,11 @@ static char *descrip =
"If login is successful, the application looks up the dialed number in\n"
"the specified (or default) context, and executes it if found.\n"
"If the user enters an invalid extension and extension \"i\" (invalid) \n"
"exists in the context, it will be used. Also, if you set the 5th argument\n"
"to 'NOANSWER', the DISA application will not answer initially.\n";
"exists in the context, it will be used.\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static void play_dialtone(struct ast_channel *chan, char *mailbox)
{
@@ -111,10 +114,10 @@ static void play_dialtone(struct ast_channel *chan, char *mailbox)
static int disa_exec(struct ast_channel *chan, void *data)
{
int i,j,k,x,did_ignore,special_noanswer;
int i,j,k,x,did_ignore;
int firstdigittimeout = 20000;
int digittimeout = 10000;
struct ast_module_user *u;
struct localuser *u;
char *tmp, exten[AST_MAX_EXTENSION],acctcode[20]="";
char pwline[256];
char ourcidname[256],ourcidnum[256];
@@ -128,15 +131,14 @@ static int disa_exec(struct ast_channel *chan, void *data)
AST_APP_ARG(context);
AST_APP_ARG(cid);
AST_APP_ARG(mailbox);
AST_APP_ARG(noanswer);
);
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "DISA requires an argument (passcode/passcode file)\n");
ast_log(LOG_WARNING, "disa requires an argument (passcode/passcode file)\n");
return -1;
}
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
if (chan->pbx) {
firstdigittimeout = chan->pbx->rtimeout*1000;
@@ -144,13 +146,13 @@ static int disa_exec(struct ast_channel *chan, void *data)
}
if (ast_set_write_format(chan,AST_FORMAT_ULAW)) {
ast_log(LOG_WARNING, "Unable to set write format to Mu-law on %s\n", chan->name);
ast_module_user_remove(u);
ast_log(LOG_WARNING, "Unable to set write format to Mu-law on %s\n",chan->name);
LOCAL_USER_REMOVE(u);
return -1;
}
if (ast_set_read_format(chan,AST_FORMAT_ULAW)) {
ast_log(LOG_WARNING, "Unable to set read format to Mu-law on %s\n", chan->name);
ast_module_user_remove(u);
ast_log(LOG_WARNING, "Unable to set read format to Mu-law on %s\n",chan->name);
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -158,6 +160,11 @@ static int disa_exec(struct ast_channel *chan, void *data)
ast_log(LOG_DEBUG, "Responsetimeout: %d\n", firstdigittimeout);
tmp = ast_strdupa(data);
if (!tmp) {
ast_log(LOG_ERROR, "Out of memory\n");
LOCAL_USER_REMOVE(u);
return -1;
}
AST_STANDARD_APP_ARGS(args, tmp);
@@ -168,15 +175,10 @@ static int disa_exec(struct ast_channel *chan, void *data)
ast_log(LOG_DEBUG, "Mailbox: %s\n",args.mailbox);
special_noanswer = 0;
if ((!args.noanswer) || strcmp(args.noanswer,"NOANSWER"))
{
if (chan->_state != AST_STATE_UP) {
/* answer */
ast_answer(chan);
}
} else special_noanswer = 1;
if (chan->_state != AST_STATE_UP) {
/* answer */
ast_answer(chan);
}
i = k = x = 0; /* k is 0 for pswd entry, 1 for ext entry */
did_ignore = 0;
exten[0] = 0;
@@ -196,7 +198,8 @@ static int disa_exec(struct ast_channel *chan, void *data)
for (;;) {
/* if outa time, give em reorder */
if (ast_tvdiff_ms(ast_tvnow(), lastdigittime) >
((k&2) ? digittimeout : firstdigittimeout)) {
((k&2) ? digittimeout : firstdigittimeout))
{
ast_log(LOG_DEBUG,"DISA %s entry timeout on chan %s\n",
((k&1) ? "extension" : "password"),chan->name);
break;
@@ -207,68 +210,72 @@ static int disa_exec(struct ast_channel *chan, void *data)
}
f = ast_read(chan);
if (f == NULL) {
ast_module_user_remove(u);
if (f == NULL)
{
LOCAL_USER_REMOVE(u);
return -1;
}
if ((f->frametype == AST_FRAME_CONTROL) &&
(f->subclass == AST_CONTROL_HANGUP)) {
(f->subclass == AST_CONTROL_HANGUP))
{
ast_frfree(f);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
if (f->frametype == AST_FRAME_VOICE) {
ast_frfree(f);
continue;
}
/* if not DTMF, just do it again */
if (f->frametype != AST_FRAME_DTMF) {
/* if not DTMF, just do it again */
if (f->frametype != AST_FRAME_DTMF)
{
ast_frfree(f);
continue;
}
j = f->subclass; /* save digit */
ast_frfree(f);
if (i == 0) {
if (i == 0)
{
k|=2; /* We have the first digit */
ast_playtones_stop(chan);
}
lastdigittime = ast_tvnow();
/* got a DTMF tone */
if (i < AST_MAX_EXTENSION) { /* if still valid number of digits */
if (!(k&1)) { /* if in password state */
if (j == '#') { /* end of password */
if (i < AST_MAX_EXTENSION) /* if still valid number of digits */
{
if (!(k&1)) /* if in password state */
{
if (j == '#') /* end of password */
{
/* see if this is an integer */
if (sscanf(args.passcode,"%d",&j) < 1) { /* nope, it must be a filename */
if (sscanf(args.passcode,"%d",&j) < 1)
{ /* nope, it must be a filename */
fp = fopen(args.passcode,"r");
if (!fp) {
if (!fp)
{
ast_log(LOG_WARNING,"DISA password file %s not found on chan %s\n",args.passcode,chan->name);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
}
pwline[0] = 0;
while(fgets(pwline,sizeof(pwline) - 1,fp)) {
if (!pwline[0])
continue;
while(fgets(pwline,sizeof(pwline) - 1,fp))
{
if (!pwline[0]) continue;
if (pwline[strlen(pwline) - 1] == '\n')
pwline[strlen(pwline) - 1] = 0;
if (!pwline[0])
continue;
/* skip comments */
if (pwline[0] == '#')
continue;
if (pwline[0] == ';')
continue;
if (!pwline[0]) continue;
/* skip comments */
if (pwline[0] == '#') continue;
if (pwline[0] == ';') continue;
AST_STANDARD_APP_ARGS(args, pwline);
ast_log(LOG_DEBUG, "Mailbox: %s\n",args.mailbox);
/* password must be in valid format (numeric) */
if (sscanf(args.passcode,"%d", &j) < 1)
continue;
/* if we got it */
/* password must be in valid format (numeric) */
if (sscanf(args.passcode,"%d",&j) < 1) continue;
/* if we got it */
if (!strcmp(exten,args.passcode)) {
if (ast_strlen_zero(args.context))
args.context = "disa";
@@ -276,11 +283,12 @@ static int disa_exec(struct ast_channel *chan, void *data)
args.mailbox = "";
break;
}
}
}
fclose(fp);
}
/* compare the two */
if (strcmp(exten,args.passcode)) {
}
/* compare the two */
if (strcmp(exten,args.passcode))
{
ast_log(LOG_WARNING,"DISA on chan %s got bad password %s\n",chan->name,exten);
goto reorder;
@@ -294,26 +302,15 @@ static int disa_exec(struct ast_channel *chan, void *data)
exten[sizeof(acctcode)] = 0;
ast_copy_string(acctcode, exten, sizeof(acctcode));
exten[0] = 0;
ast_log(LOG_DEBUG,"Successful DISA log-in on chan %s\n", chan->name);
ast_log(LOG_DEBUG,"Successful DISA log-in on chan %s\n",chan->name);
continue;
}
} else {
if (j == '#') { /* end of extension .. maybe */
if (i == 0 &&
(ast_matchmore_extension(chan, args.context, "#", 1, chan->cid.cid_num) ||
ast_exists_extension(chan, args.context, "#", 1, chan->cid.cid_num)) ) {
/* Let the # be the part of, or the entire extension */
} else {
break;
}
}
}
exten[i++] = j; /* save digit */
exten[i] = 0;
if (!(k&1))
continue; /* if getting password, continue doing it */
/* if this exists */
if (!(k&1)) continue; /* if getting password, continue doing it */
/* if this exists */
if (ast_ignore_pattern(args.context, exten)) {
play_dialtone(chan, "");
@@ -324,7 +321,7 @@ static int disa_exec(struct ast_channel *chan, void *data)
did_ignore = 0;
}
/* if can do some more, do it */
/* if can do some more, do it */
if (!ast_matchmore_extension(chan,args.context,exten,1, chan->cid.cid_num)) {
break;
}
@@ -344,18 +341,18 @@ static int disa_exec(struct ast_channel *chan, void *data)
if (!recheck || ast_exists_extension(chan, args.context, exten, 1, chan->cid.cid_num)) {
ast_playtones_stop(chan);
/* We're authenticated and have a target extension */
if (!ast_strlen_zero(args.cid)) {
if (!ast_strlen_zero(args.cid))
{
ast_callerid_split(args.cid, ourcidname, sizeof(ourcidname), ourcidnum, sizeof(ourcidnum));
ast_set_callerid(chan, ourcidnum, ourcidname, ourcidnum);
}
if (!ast_strlen_zero(acctcode))
ast_string_field_set(chan, accountcode, acctcode);
ast_copy_string(chan->accountcode, acctcode, sizeof(chan->accountcode));
if (special_noanswer) flags.flags = 0;
ast_cdr_reset(chan->cdr, &flags);
ast_explicit_goto(chan, args.context, exten, 1);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return 0;
}
}
@@ -367,7 +364,8 @@ reorder:
ast_indicate(chan,AST_CONTROL_CONGESTION);
/* something is invalid, give em reorder for several seconds */
time(&rstart);
while(time(NULL) < rstart + 10) {
while(time(NULL) < rstart + 10)
{
if (ast_waitfor(chan, -1) < 0)
break;
f = ast_read(chan);
@@ -376,24 +374,39 @@ reorder:
ast_frfree(f);
}
ast_playtones_stop(chan);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
return ast_register_application(app, disa_exec, synopsis, descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "DISA (Direct Inward System Access) Application");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key(void)
{
return ASTERISK_GPL_KEY;
}

View File

@@ -22,21 +22,19 @@
/*! \file
*
* \brief Application to dump channel variables
*
* \author Anthony Minessale <anthmct@yahoo.com>
*
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
@@ -47,27 +45,30 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/utils.h"
static char *tdesc = "Dump Info About The Calling Channel";
static char *app = "DumpChan";
static char *synopsis = "Dump Info About The Calling Channel";
static char *desc =
" DumpChan([<min_verbose_level>])\n"
"Displays information on channel and listing of all channel\n"
"variables. If min_verbose_level is specified, output is only\n"
"displayed when the verbose level is currently set to that number\n"
"or greater. \n";
" DumpChan([<min_verbose_level>])\n"
"Displays information on channel and listing of all channel\n"
"variables. If min_verbose_level is specified, output is only\n"
"displayed when the verbose level is currently set to that number\n"
"or greater. \n";
STANDARD_LOCAL_USER;
static int serialize_showchan(struct ast_channel *c, char *buf, size_t size)
LOCAL_USER_DECL;
static int ast_serialize_showchan(struct ast_channel *c, char *buf, size_t size)
{
struct timeval now;
long elapsed_seconds = 0;
int hour = 0, min = 0, sec = 0;
char cgrp[BUFSIZ/2];
char pgrp[BUFSIZ/2];
char formatbuf[BUFSIZ/2];
long elapsed_seconds=0;
int hour=0, min=0, sec=0;
char cgrp[256];
char pgrp[256];
now = ast_tvnow();
memset(buf, 0, size);
memset(buf,0,size);
if (!c)
return 0;
@@ -85,12 +86,11 @@ static int serialize_showchan(struct ast_channel *c, char *buf, size_t size)
"CallerID= %s\n"
"CallerIDName= %s\n"
"DNIDDigits= %s\n"
"RDNIS= %s\n"
"State= %s (%d)\n"
"Rings= %d\n"
"NativeFormat= %s\n"
"WriteFormat= %s\n"
"ReadFormat= %s\n"
"NativeFormat= %d\n"
"WriteFormat= %d\n"
"ReadFormat= %d\n"
"1stFileDescriptor= %d\n"
"Framesin= %d %s\n"
"Framesout= %d %s\n"
@@ -105,20 +105,19 @@ static int serialize_showchan(struct ast_channel *c, char *buf, size_t size)
"Data= %s\n"
"Blocking_in= %s\n",
c->name,
c->tech->type,
c->type,
c->uniqueid,
S_OR(c->cid.cid_num, "(N/A)"),
S_OR(c->cid.cid_name, "(N/A)"),
S_OR(c->cid.cid_dnid, "(N/A)"),
S_OR(c->cid.cid_rdnis, "(N/A)"),
(c->cid.cid_num ? c->cid.cid_num : "(N/A)"),
(c->cid.cid_name ? c->cid.cid_name : "(N/A)"),
(c->cid.cid_dnid ? c->cid.cid_dnid : "(N/A)" ),
ast_state2str(c->_state),
c->_state,
c->rings,
ast_getformatname_multiple(formatbuf, sizeof(formatbuf), c->nativeformats),
ast_getformatname_multiple(formatbuf, sizeof(formatbuf), c->writeformat),
ast_getformatname_multiple(formatbuf, sizeof(formatbuf), c->readformat),
c->fds[0], c->fin & ~DEBUGCHAN_FLAG, (c->fin & DEBUGCHAN_FLAG) ? " (DEBUGGED)" : "",
c->fout & ~DEBUGCHAN_FLAG, (c->fout & DEBUGCHAN_FLAG) ? " (DEBUGGED)" : "", (long)c->whentohangup,
c->nativeformats,
c->writeformat,
c->readformat,
c->fds[0], c->fin & 0x7fffffff, (c->fin & 0x80000000) ? " (DEBUGGED)" : "",
c->fout & 0x7fffffff, (c->fout & 0x80000000) ? " (DEBUGGED)" : "", (long)c->whentohangup,
hour,
min,
sec,
@@ -128,7 +127,7 @@ static int serialize_showchan(struct ast_channel *c, char *buf, size_t size)
ast_print_group(cgrp, sizeof(cgrp), c->callgroup),
ast_print_group(pgrp, sizeof(pgrp), c->pickupgroup),
( c->appl ? c->appl : "(N/A)" ),
( c-> data ? S_OR(c->data, "(Empty)") : "(None)"),
( c-> data ? (!ast_strlen_zero(c->data) ? c->data : "(Empty)") : "(None)"),
(ast_test_flag(c, AST_FLAG_BLOCKING) ? c->blockproc : "(Not Blocking)"));
return 0;
@@ -136,41 +135,59 @@ static int serialize_showchan(struct ast_channel *c, char *buf, size_t size)
static int dumpchan_exec(struct ast_channel *chan, void *data)
{
struct ast_module_user *u;
char vars[BUFSIZ * 4];
int res=0;
struct localuser *u;
char vars[1024];
char info[1024];
int level = 0;
static char *line = "================================================================================";
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
if (!ast_strlen_zero(data))
if (!ast_strlen_zero(data)) {
level = atoi(data);
}
pbx_builtin_serialize_variables(chan, vars, sizeof(vars));
serialize_showchan(chan, info, sizeof(info));
ast_serialize_showchan(chan, info, sizeof(info));
if (option_verbose >= level)
ast_verbose("\nDumping Info For Channel: %s:\n%s\nInfo:\n%s\nVariables:\n%s%s\n", chan->name, line, info, vars, line);
ast_verbose("\nDumping Info For Channel: %s:\n%s\nInfo:\n%s\nVariables:\n%s%s\n",chan->name, line, info, vars, line);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return 0;
return res;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
return ast_register_application(app, dumpchan_exec, synopsis, desc);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Dump Info About The Calling Channel");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -19,21 +19,19 @@
/*! \file
*
* \brief Echo application -- play back what you hear to evaluate latency
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -41,64 +39,85 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/pbx.h"
#include "asterisk/module.h"
static char *tdesc = "Simple Echo Application";
static char *app = "Echo";
static char *synopsis = "Echo audio, video, or DTMF back to the calling party";
static char *synopsis = "Echo audio read back to the user";
static char *descrip =
" Echo(): This application will echo any audio, video, or DTMF frames read from\n"
"the calling channel back to itself. If the DTMF digit '#' is received, the\n"
"application will exit.\n";
" Echo(): Echo audio read from channel back to the channel. \n"
"User can exit the application by either pressing the '#' key, \n"
"or hanging up.\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int echo_exec(struct ast_channel *chan, void *data)
{
int res = -1;
int format;
struct ast_module_user *u;
u = ast_module_user_add(chan);
format = ast_best_codec(chan->nativeformats);
ast_set_write_format(chan, format);
ast_set_read_format(chan, format);
while (ast_waitfor(chan, -1) > -1) {
struct ast_frame *f = ast_read(chan);
int res=-1;
struct localuser *u;
struct ast_frame *f;
LOCAL_USER_ADD(u);
ast_set_write_format(chan, ast_best_codec(chan->nativeformats));
ast_set_read_format(chan, ast_best_codec(chan->nativeformats));
/* Do our thing here */
while(ast_waitfor(chan, -1) > -1) {
f = ast_read(chan);
if (!f)
break;
f->delivery.tv_sec = 0;
f->delivery.tv_usec = 0;
if (ast_write(chan, f)) {
ast_frfree(f);
goto end;
}
if ((f->frametype == AST_FRAME_DTMF) && (f->subclass == '#')) {
res = 0;
ast_frfree(f);
goto end;
if (f->frametype == AST_FRAME_VOICE) {
if (ast_write(chan, f))
break;
} else if (f->frametype == AST_FRAME_VIDEO) {
if (ast_write(chan, f))
break;
} else if (f->frametype == AST_FRAME_DTMF) {
if (f->subclass == '#') {
res = 0;
break;
} else
if (ast_write(chan, f))
break;
}
ast_frfree(f);
}
end:
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return res;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
return ast_register_application(app, echo_exec, synopsis, descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Simple Echo Application");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

270
apps/app_enumlookup.c Normal file
View File

@@ -0,0 +1,270 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 1999 - 2005, Digium, Inc.
*
* Mark Spencer <markster@digium.com>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
*/
/*! \file
*
* \brief Enumlookup - lookup entry in ENUM
*
* \ingroup applications
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <ctype.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#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 "asterisk/app.h"
#include "asterisk/options.h"
static char *tdesc = "ENUM Lookup";
static char *app = "EnumLookup";
static char *synopsis = "Lookup number in ENUM";
static char *descrip =
" EnumLookup(exten[|option]): Looks up an extension via ENUM and sets\n"
"the variable 'ENUM'. For VoIP URIs this variable will \n"
"look like 'TECHNOLOGY/URI' with the appropriate technology.\n"
"Currently, the enumservices SIP, H323, IAX, IAX2 and TEL are recognized. \n"
"\nReturns status in the ENUMSTATUS channel variable:\n"
" ERROR Failed to do a lookup\n"
" <tech> Technology of the successful lookup: SIP, H323, IAX, IAX2 or TEL\n"
" BADURI Got URI Asterisk does not understand.\n"
" The option string may contain zero or the following character:\n"
" 'j' -- jump to +101 priority if the lookup isn't successful.\n"
" and jump to +51 priority on a TEL entry.\n";
#define ENUM_CONFIG "enum.conf"
static char h323driver[80] = "";
#define H323DRIVERDEFAULT "H323"
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
/*--- enumlookup_exec: Look up number in ENUM and return result */
static int enumlookup_exec(struct ast_channel *chan, void *data)
{
int res=0,priority_jump=0;
char tech[80];
char dest[80];
char tmp[256];
char *c,*t = NULL;
static int dep_warning=0;
struct localuser *u;
char *parse;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(d);
AST_APP_ARG(o);
);
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "EnumLookup requires an argument (extension)\n");
return -1;
}
if (!dep_warning) {
ast_log(LOG_WARNING, "The application EnumLookup is deprecated. Please use the ENUMLOOKUP() function instead.\n");
dep_warning = 1;
}
LOCAL_USER_ADD(u);
parse = ast_strdupa(data);
if (!parse) {
ast_log(LOG_ERROR, "Out of memory!\n");
LOCAL_USER_REMOVE(u);
return -1;
}
AST_STANDARD_APP_ARGS(args, parse);
tech[0] = '\0';
dest[0] = '\0';
if (args.o) {
if (strchr(args.o, 'j'))
priority_jump = 1;
}
res = ast_get_enum(chan, args.d, dest, sizeof(dest), tech, sizeof(tech), NULL, NULL);
if (!res) { /* Failed to do a lookup */
if (priority_jump || option_priority_jumping) {
/* Look for a "busy" place */
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
}
pbx_builtin_setvar_helper(chan, "ENUMSTATUS", "ERROR");
LOCAL_USER_REMOVE(u);
return 0;
}
pbx_builtin_setvar_helper(chan, "ENUMSTATUS", tech);
/* Parse it out */
if (res > 0) {
if (!strcasecmp(tech, "SIP")) {
c = dest;
if (!strncmp(c, "sip:", 4))
c += 4;
snprintf(tmp, sizeof(tmp), "SIP/%s", c);
pbx_builtin_setvar_helper(chan, "ENUM", tmp);
} else if (!strcasecmp(tech, "h323")) {
c = dest;
if (!strncmp(c, "h323:", 5))
c += 5;
snprintf(tmp, sizeof(tmp), "%s/%s", h323driver, c);
/* do a s!;.*!! on the H323 URI */
t = strchr(c,';');
if (t)
*t = 0;
pbx_builtin_setvar_helper(chan, "ENUM", tmp);
} else if (!strcasecmp(tech, "iax")) {
c = dest;
if (!strncmp(c, "iax:", 4))
c += 4;
snprintf(tmp, sizeof(tmp), "IAX/%s", c);
pbx_builtin_setvar_helper(chan, "ENUM", tmp);
} else if (!strcasecmp(tech, "iax2")) {
c = dest;
if (!strncmp(c, "iax2:", 5))
c += 5;
snprintf(tmp, sizeof(tmp), "IAX2/%s", c);
pbx_builtin_setvar_helper(chan, "ENUM", tmp);
} else if (!strcasecmp(tech, "tel")) {
c = dest;
if (!strncmp(c, "tel:", 4))
c += 4;
if (c[0] != '+') {
ast_log(LOG_NOTICE, "tel: uri must start with a \"+\" (got '%s')\n", c);
res = 0;
} else {
/* now copy over the number, skipping all non-digits and stop at ; or NULL */
t = tmp;
while( *c && (*c != ';') && (t - tmp < (sizeof(tmp) - 1))) {
if (isdigit(*c))
*t++ = *c;
c++;
}
*t = 0;
pbx_builtin_setvar_helper(chan, "ENUM", tmp);
ast_log(LOG_NOTICE, "tel: ENUM set to \"%s\"\n", tmp);
if (priority_jump || option_priority_jumping) {
if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 51))
res = 0;
}
}
} else if (!ast_strlen_zero(tech)) {
ast_log(LOG_NOTICE, "Don't know how to handle technology '%s'\n", tech);
pbx_builtin_setvar_helper(chan, "ENUMSTATUS", "BADURI");
res = 0;
}
}
LOCAL_USER_REMOVE(u);
return 0;
}
/*--- load_config: Load enum.conf and find out how to handle H.323 */
static int load_config(void)
{
struct ast_config *cfg;
char *s;
cfg = ast_config_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_config_destroy(cfg);
return 0;
}
ast_log(LOG_NOTICE, "No ENUM Config file, using defaults\n");
return 0;
}
/*--- unload_module: Unload this application from PBX */
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
return res;
}
/*--- load_module: Load this application into PBX */
int load_module(void)
{
int res;
res = ast_register_application(app, enumlookup_exec, synopsis, descrip);
if (!res)
res = load_config();
return res;
}
/*--- reload: Reload configuration file */
int reload(void)
{
return load_config();
}
/*--- description: Describe module */
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

127
apps/app_eval.c Normal file
View File

@@ -0,0 +1,127 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (c) 2004 - 2005, Tilghman Lesher. All rights reserved.
*
* Tilghman Lesher <app_eval__v001@the-tilghman.com>
*
* This code is released by the author with no restrictions on usage.
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
*/
/*! \file
* \brief Eval application
*
* \author Tilghman Lesher <app_eval__v001@the-tilghman.com>
*
* \ingroup applications
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#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 = "Evaluates a string";
static char *eval_descrip =
"Usage: 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];
static int dep_warning = 0;
LOCAL_USER_ADD(u);
if (!dep_warning) {
ast_log(LOG_WARNING, "This application has been deprecated in favor of the dialplan function, EVAL\n");
dep_warning = 1;
}
/* 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)
{
int res;
res = ast_unregister_application(app_eval);
STANDARD_HANGUP_LOCALUSERS;
return res;
}
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;
}

View File

@@ -2,9 +2,8 @@
* Asterisk -- An open source telephony toolkit.
*
* Copyright (c) 2004 - 2005, Tilghman Lesher. All rights reserved.
* Portions copyright (c) 2006, Philipp Dunkel.
*
* Tilghman Lesher <app_exec__v002@the-tilghman.com>
* Tilghman Lesher <app_exec__v001@the-tilghman.com>
*
* This code is released by the author with no restrictions on usage.
*
@@ -20,21 +19,20 @@
*
* \brief Exec application
*
* \author Tilghman Lesher <app_exec__v002@the-tilghman.com>
* \author Philipp Dunkel <philipp.dunkel@ebox.at>
* \author Tilghman Lesher <app_exec__v001@the-tilghman.com>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/options.h"
@@ -45,177 +43,93 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
/* Maximum length of any variable */
#define MAXRESULT 1024
/*! Note
*
* The key difference between these two apps is exit status. In a
* nutshell, Exec tries to be transparent as possible, behaving
* in exactly the same way as if the application it calls was
* directly invoked from the dialplan.
*
* TryExec, on the other hand, provides a way to execute applications
* and catch any possible fatal error without actually fatally
* affecting the dialplan.
*/
static char *tdesc = "Executes applications";
static char *app_exec = "Exec";
static char *exec_synopsis = "Executes dialplan application";
static char *exec_synopsis = "Executes internal application";
static char *exec_descrip =
"Usage: Exec(appname(arguments))\n"
" Allows an arbitrary application to be invoked even when not\n"
"hardcoded into the dialplan. If the underlying application\n"
"terminates the dialplan, or if the application cannot be found,\n"
"Exec will terminate the dialplan.\n"
" To invoke external applications, see the application System.\n"
" If you would like to catch any error instead, see TryExec.\n";
static char *app_tryexec = "TryExec";
static char *tryexec_synopsis = "Executes dialplan application, always returning";
static char *tryexec_descrip =
"Usage: TryExec(appname(arguments))\n"
" Allows an arbitrary application to be invoked even when not\n"
"hardcoded into the dialplan. To invoke external applications\n"
"see the application System. Always returns to the dialplan.\n"
"The channel variable TRYSTATUS will be set to:\n"
" SUCCESS if the application returned zero\n"
" FAILED if the application returned non-zero\n"
" NOAPP if the application was not found or was not specified\n";
"see the application System. Returns whatever value the\n"
"app returns or a non-zero value if the app cannot be found.\n";
static char *app_execif = "ExecIf";
static char *execif_synopsis = "Executes dialplan application, conditionally";
static char *execif_descrip =
"Usage: ExecIF (<expr>|<app>|<data>)\n"
"If <expr> is true, execute and return the result of <app>(<data>).\n"
"If <expr> is true, but <app> is not found, then the application\n"
"will return a non-zero value.\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int exec_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct ast_module_user *u;
char *s, *appname, *endargs, args[MAXRESULT] = "";
struct localuser *u;
char *s, *appname, *endargs, args[MAXRESULT];
struct ast_app *app;
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
memset(args, 0, MAXRESULT);
/* Check and parse arguments */
if (data) {
s = ast_strdupa(data);
appname = strsep(&s, "(");
s = ast_strdupa((char *)data);
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);
} else {
ast_log(LOG_WARNING, "Could not find application (%s)\n", appname);
res = -1;
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 = -1;
}
}
} else {
ast_log(LOG_ERROR, "Out of memory\n");
res = -1;
}
}
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return res;
}
static int tryexec_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct ast_module_user *u;
char *s, *appname, *endargs, args[MAXRESULT] = "";
struct ast_app *app;
u = ast_module_user_add(chan);
/* Check and parse arguments */
if (data) {
s = ast_strdupa(data);
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);
pbx_builtin_setvar_helper(chan, "TRYSTATUS", res ? "FAILED" : "SUCCESS");
} else {
ast_log(LOG_WARNING, "Could not find application (%s)\n", appname);
pbx_builtin_setvar_helper(chan, "TRYSTATUS", "NOAPP");
}
}
}
ast_module_user_remove(u);
return 0;
}
static int execif_exec(struct ast_channel *chan, void *data)
{
int res = 0;
struct ast_module_user *u;
char *myapp = NULL;
char *mydata = NULL;
char *expr = NULL;
struct ast_app *app = NULL;
u = ast_module_user_add(chan);
expr = ast_strdupa(data);
if ((myapp = strchr(expr,'|'))) {
*myapp = '\0';
myapp++;
if ((mydata = strchr(myapp,'|'))) {
*mydata = '\0';
mydata++;
} else
mydata = "";
if (pbx_checkcondition(expr)) {
if ((app = pbx_findapp(myapp))) {
res = pbx_exec(chan, app, mydata);
} else {
ast_log(LOG_WARNING, "Could not find application! (%s)\n", myapp);
res = -1;
}
}
} else {
ast_log(LOG_ERROR,"Invalid Syntax.\n");
res = -1;
}
ast_module_user_remove(u);
return res;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app_exec);
res |= ast_unregister_application(app_tryexec);
res |= ast_unregister_application(app_execif);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
int res = ast_register_application(app_exec, exec_exec, exec_synopsis, exec_descrip);
res |= ast_register_application(app_tryexec, tryexec_exec, tryexec_synopsis, tryexec_descrip);
res |= ast_register_application(app_execif, execif_exec, execif_synopsis, execif_descrip);
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;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Executes dialplan applications");
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -22,32 +22,20 @@
/*! \file
*
* \brief External IVR application interface
*
* \author Kevin P. Fleming <kpfleming@digium.com>
*
* \note Portions taken from the file-based music-on-hold work
* created by Anthony Minessale II in res_musiconhold.c
*
*
* \ingroup applications
*/
/*** MODULEINFO
<depend>working_fork</depend>
***/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <signal.h>
#ifdef HAVE_CAP
#include <sys/capability.h>
#endif /* HAVE_CAP */
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/file.h"
@@ -57,22 +45,23 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/module.h"
#include "asterisk/linkedlists.h"
#include "asterisk/app.h"
#include "asterisk/utils.h"
#include "asterisk/options.h"
static const char *tdesc = "External IVR Interface Application";
static const char *app = "ExternalIVR";
static const char *synopsis = "Interfaces with an external IVR application";
static const char *descrip =
" ExternalIVR(command[|arg[|arg...]]): Forks a process to run the supplied command,\n"
" ExternalIVR(command[|arg[|arg...]]): Forks an process to run the supplied command,\n"
"and starts a generator on the channel. The generator's play list is\n"
"controlled by the external application, which can add and clear entries\n"
"via simple commands issued over its stdout. The external application\n"
"will receive all DTMF events received on the channel, and notification\n"
"if the channel is hung up. The application will not be forcibly terminated\n"
"when the channel is hung up.\n"
"See doc/externalivr.txt for a protocol specification.\n";
"See doc/README.externalivr for a protocol specification.\n";
/* XXX the parser in gcc 2.95 gets confused if you don't put a space between 'name' and the comma */
#define ast_chan_log(level, channel, format, ...) ast_log(level, "%s: " format, channel->name , ## __VA_ARGS__)
@@ -82,8 +71,9 @@ struct playlist_entry {
char filename[1];
};
struct ivr_localuser {
struct localuser {
struct ast_channel *chan;
struct localuser *next;
AST_LIST_HEAD(playlist, playlist_entry) playlist;
AST_LIST_HEAD(finishlist, playlist_entry) finishlist;
int abort_current_sound;
@@ -91,9 +81,10 @@ struct ivr_localuser {
int option_autoclear;
};
LOCAL_USER_DECL;
struct gen_state {
struct ivr_localuser *u;
struct localuser *u;
struct ast_filestream *stream;
struct playlist_entry *current;
int sample_queue;
@@ -116,10 +107,12 @@ static void send_child_event(FILE *handle, const char event, const char *data,
static void *gen_alloc(struct ast_channel *chan, void *params)
{
struct ivr_localuser *u = params;
struct localuser *u = params;
struct gen_state *state;
if (!(state = ast_calloc(1, sizeof(*state))))
state = calloc(1, sizeof(*state));
if (!state)
return NULL;
state->u = u;
@@ -148,7 +141,7 @@ static void gen_release(struct ast_channel *chan, void *data)
/* caller has the playlist locked */
static int gen_nextfile(struct gen_state *state)
{
struct ivr_localuser *u = state->u;
struct localuser *u = state->u;
char *file_to_stream;
u->abort_current_sound = 0;
@@ -180,7 +173,7 @@ static int gen_nextfile(struct gen_state *state)
static struct ast_frame *gen_readframe(struct gen_state *state)
{
struct ast_frame *f = NULL;
struct ivr_localuser *u = state->u;
struct localuser *u = state->u;
if (u->abort_current_sound ||
(u->playing_silence && AST_LIST_FIRST(&u->playlist))) {
@@ -238,8 +231,10 @@ static struct ast_generator gen =
static struct playlist_entry *make_entry(const char *filename)
{
struct playlist_entry *entry;
if (!(entry = ast_calloc(1, sizeof(*entry) + strlen(filename) + 10))) /* XXX why 10 ? */
entry = calloc(1, sizeof(*entry) + strlen(filename) + 10);
if (!entry)
return NULL;
strcpy(entry->filename, filename);
@@ -249,14 +244,13 @@ static struct playlist_entry *make_entry(const char *filename)
static int app_exec(struct ast_channel *chan, void *data)
{
struct ast_module_user *lu;
struct localuser *u = NULL;
struct playlist_entry *entry;
const char *args = data;
int child_stdin[2] = { 0,0 };
int child_stdout[2] = { 0,0 };
int child_stderr[2] = { 0,0 };
int res = -1;
int test_available_fd = -1;
int gen_active = 0;
int pid;
char *argv[32];
@@ -265,28 +259,28 @@ static int app_exec(struct ast_channel *chan, void *data)
FILE *child_commands = NULL;
FILE *child_errors = NULL;
FILE *child_events = NULL;
struct ivr_localuser foo = {
.playlist = AST_LIST_HEAD_INIT_VALUE,
.finishlist = AST_LIST_HEAD_INIT_VALUE,
};
struct ivr_localuser *u = &foo;
sigset_t fullset, oldset;
lu = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
sigfillset(&fullset);
pthread_sigmask(SIG_BLOCK, &fullset, &oldset);
AST_LIST_HEAD_INIT(&u->playlist);
AST_LIST_HEAD_INIT(&u->finishlist);
u->abort_current_sound = 0;
u->chan = chan;
if (ast_strlen_zero(args)) {
ast_log(LOG_WARNING, "ExternalIVR requires a command to execute\n");
ast_module_user_remove(lu);
return -1;
goto exit;
}
buf = ast_strdupa(data);
if (!buf) {
ast_log(LOG_ERROR, "Out of memory!\n");
LOCAL_USER_REMOVE(u);
return -1;
}
argc = ast_app_separate_args(buf, '|', argv, sizeof(argv) / sizeof(argv[0]));
@@ -324,20 +318,11 @@ static int app_exec(struct ast_channel *chan, void *data)
if (!pid) {
/* child process */
int i;
#ifdef HAVE_CAP
cap_t cap = cap_from_text("cap_net_admin-eip");
if (cap_set_proc(cap)) {
/* Careful with order! Logging cannot happen after we close FDs */
ast_log(LOG_WARNING, "Unable to remove capabilities.\n");
}
cap_free(cap);
#endif
signal(SIGPIPE, SIG_DFL);
pthread_sigmask(SIG_UNBLOCK, &fullset, NULL);
if (ast_opt_high_priority)
if (option_highpriority)
ast_set_priority(0);
dup2(child_stdin[0], STDIN_FILENO);
@@ -384,8 +369,6 @@ static int app_exec(struct ast_channel *chan, void *data)
goto exit;
}
test_available_fd = open("/dev/null", O_RDONLY);
setvbuf(child_events, NULL, _IONBF, 0);
setvbuf(child_commands, NULL, _IONBF, 0);
setvbuf(child_errors, NULL, _IONBF, 0);
@@ -519,7 +502,7 @@ static int app_exec(struct ast_channel *chan, void *data)
} else if (ready_fd == child_errors_fd) {
char input[1024];
if (exception || (dup2(child_commands_fd, test_available_fd) == -1) || feof(child_errors)) {
if (exception || feof(child_errors)) {
ast_chan_log(LOG_WARNING, chan, "Child process went away\n");
res = -1;
break;
@@ -552,10 +535,6 @@ static int app_exec(struct ast_channel *chan, void *data)
if (child_errors)
fclose(child_errors);
if (test_available_fd > -1) {
close(test_available_fd);
}
if (child_stdin[0])
close(child_stdin[0]);
@@ -577,25 +556,42 @@ static int app_exec(struct ast_channel *chan, void *data)
while ((entry = AST_LIST_REMOVE_HEAD(&u->playlist, list)))
free(entry);
ast_module_user_remove(lu);
LOCAL_USER_REMOVE(u);
return res;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
return ast_register_application(app, app_exec, synopsis, descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "External IVR Interface Application");
char *description(void)
{
return (char *) tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -19,20 +19,10 @@
/*! \file
*
* \brief Connect to festival
*
* \author Christos Ricudis <ricudis@itc.auth.gr>
*
* \ingroup applications
*/
/*** MODULEINFO
<depend>working_fork</depend>
***/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <sys/types.h>
#include <stdlib.h>
#include <unistd.h>
@@ -49,10 +39,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <unistd.h>
#include <fcntl.h>
#include <ctype.h>
#include <errno.h>
#ifdef HAVE_CAP
#include <sys/capability.h>
#endif /* HAVE_CAP */
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -67,6 +57,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#define FESTIVAL_CONFIG "festival.conf"
static char *tdesc = "Simple Festival Interface";
static char *app = "Festival";
static char *synopsis = "Say text to the user";
@@ -76,6 +68,9 @@ static char *descrip =
"play it to the user, allowing any given interrupt keys to immediately terminate and return\n"
"the value, or 'any' to allow any number back (useful in dialplan)\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static char *socket_receive_file_to_buff(int fd,int *size)
{
@@ -90,10 +85,7 @@ static char *socket_receive_file_to_buff(int fd,int *size)
char c;
bufflen = 1024;
if (!(buff = ast_malloc(bufflen)))
{
/* TODO: Handle memory allocation failure */
}
buff = (char *)malloc(bufflen);
*size=0;
for (k=0; file_stuff_key[k] != '\0';)
@@ -103,10 +95,7 @@ static char *socket_receive_file_to_buff(int fd,int *size)
if ((*size)+k+1 >= bufflen)
{ /* +1 so you can add a NULL if you want */
bufflen += bufflen/4;
if (!(buff = ast_realloc(buff, bufflen)))
{
/* TODO: Handle memory allocation failure */
}
buff = (char *)realloc(buff,bufflen);
}
if (file_stuff_key[k] == c)
k++;
@@ -139,34 +128,22 @@ static int send_waveform_to_fd(char *waveform, int length, int fd) {
char c;
#endif
sigset_t fullset, oldset;
#ifdef HAVE_CAP
cap_t cap;
#endif
sigfillset(&fullset);
pthread_sigmask(SIG_BLOCK, &fullset, &oldset);
res = fork();
if (res < 0)
ast_log(LOG_WARNING, "Fork failed\n");
if (res) {
res = fork();
if (res < 0)
ast_log(LOG_WARNING, "Fork failed\n");
if (res) {
pthread_sigmask(SIG_SETMASK, &oldset, NULL);
return res;
return res;
}
#ifdef HAVE_CAP
cap = cap_from_text("cap_net_admin-eip");
if (cap_set_proc(cap)) {
/* Careful with order! Logging cannot happen after we close FDs */
ast_log(LOG_WARNING, "Unable to remove capabilities.\n");
}
cap_free(cap);
#endif
for (x=0;x<256;x++) {
if (x != fd)
close(x);
}
if (ast_opt_high_priority)
for (x=0;x<256;x++) {
if (x != fd)
close(x);
}
if (option_highpriority)
ast_set_priority(0);
signal(SIGPIPE, SIG_DFL);
pthread_sigmask(SIG_UNBLOCK, &fullset, NULL);
@@ -180,9 +157,7 @@ static int send_waveform_to_fd(char *waveform, int length, int fd) {
}
#endif
if (write(fd,waveform,length) < 0) {
ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
}
write(fd,waveform,length);
close(fd);
exit(0);
}
@@ -200,9 +175,7 @@ static int send_waveform_to_channel(struct ast_channel *chan, char *waveform, in
struct ast_frame f;
char offset[AST_FRIENDLY_OFFSET];
char frdata[2048];
} myf = {
.f = { 0, },
};
} myf;
if (pipe(fds)) {
ast_log(LOG_WARNING, "Unable to create pipe\n");
@@ -262,6 +235,7 @@ static int send_waveform_to_channel(struct ast_channel *chan, char *waveform, in
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.data = myf.frdata;
@@ -304,16 +278,16 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
{
int usecache;
int res=0;
struct ast_module_user *u;
struct localuser *u;
struct sockaddr_in serv_addr;
struct hostent *serverhost;
struct ast_hostent ahp;
int fd;
FILE *fs;
const char *host;
const char *cachedir;
const char *temp;
const char *festivalcommand;
char *host;
char *cachedir;
char *temp;
char *festivalcommand;
int port=1314;
int n;
char ack[4];
@@ -336,19 +310,18 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
char *data;
char *intstr;
struct ast_config *cfg;
char *newfestivalcommand;
if (ast_strlen_zero(vdata)) {
ast_log(LOG_WARNING, "festival requires an argument (text)\n");
return -1;
}
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
cfg = ast_config_load(FESTIVAL_CONFIG);
if (!cfg) {
ast_log(LOG_WARNING, "No such configuration file %s\n", FESTIVAL_CONFIG);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
if (!(host = ast_variable_retrieve(cfg, "general", "host"))) {
@@ -369,25 +342,15 @@ 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";
} else { /* This else parses the festivalcommand that we're sent from the config file for \n's, etc */
int i, j;
newfestivalcommand = alloca(strlen(festivalcommand) + 1);
for (i = 0, j = 0; i < strlen(festivalcommand); i++) {
if (festivalcommand[i] == '\\' && festivalcommand[i + 1] == 'n') {
newfestivalcommand[j++] = '\n';
i++;
} else if (festivalcommand[i] == '\\') {
newfestivalcommand[j++] = festivalcommand[i + 1];
i++;
} else
newfestivalcommand[j++] = festivalcommand[i];
}
newfestivalcommand[j] = '\0';
festivalcommand = newfestivalcommand;
}
data = ast_strdupa(vdata);
if (!data) {
ast_log(LOG_ERROR, "Out of memery\n");
ast_config_destroy(cfg);
LOCAL_USER_REMOVE(u);
return -1;
}
intstr = strchr(data, '|');
if (intstr) {
@@ -405,7 +368,7 @@ 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_config_destroy(cfg);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
memset(&serv_addr, 0, sizeof(serv_addr));
@@ -415,7 +378,7 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
if (serverhost == (struct hostent *)0) {
ast_log(LOG_WARNING,"festival_client: gethostbyname failed\n");
ast_config_destroy(cfg);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
memmove(&serv_addr.sin_addr,serverhost->h_addr, serverhost->h_length);
@@ -426,7 +389,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_config_destroy(cfg);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -453,25 +416,17 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
writecache=1;
strln=strlen((char *)data);
ast_log(LOG_DEBUG,"line length : %d\n",strln);
if (write(fdesc,&strln,sizeof(int)) < 0) {
ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
}
if (write(fdesc,data,strln) < 0) {
ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
}
write(fdesc,&strln,sizeof(int));
write(fdesc,data,strln);
seekpos=lseek(fdesc,0,SEEK_CUR);
ast_log(LOG_DEBUG,"Seek position : %d\n",seekpos);
}
} else {
if (read(fdesc,&strln,sizeof(int)) != sizeof(int)) {
ast_log(LOG_WARNING, "read() failed: %s\n", strerror(errno));
}
read(fdesc,&strln,sizeof(int));
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");
if (read(fdesc,&bigstring,strln) != strln) {
ast_log(LOG_WARNING, "read() failed: %s\n", strerror(errno));
}
read(fdesc,&bigstring,strln);
bigstring[strln] = 0;
if (strcmp(bigstring,data)==0) {
readcache=1;
@@ -500,9 +455,7 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
if (writecache==1) {
ast_log(LOG_DEBUG,"Writing result to cache...\n");
while ((strln=read(fd,buffer,16384))!=0) {
if (write(fdesc,buffer,strln) < 0) {
ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
}
write(fdesc,buffer,strln);
}
close(fd);
close(fdesc);
@@ -528,7 +481,7 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
ast_log(LOG_WARNING,"Unable to read from cache/festival fd\n");
close(fd);
ast_config_destroy(cfg);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
n += read_data;
@@ -555,31 +508,41 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
} while (strcmp(ack,"OK\n") != 0);
close(fd);
ast_config_destroy(cfg);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return res;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
struct ast_config *cfg = ast_config_load(FESTIVAL_CONFIG);
if (!cfg) {
ast_log(LOG_WARNING, "No such configuration file %s\n", FESTIVAL_CONFIG);
return AST_MODULE_LOAD_DECLINE;
}
ast_config_destroy(cfg);
return ast_register_application(app, festival_exec, synopsis, descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Simple Festival Interface");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -18,26 +18,25 @@
/*! \file
*
* \brief App to flash a DAHDI trunk
*
* \author Mark Spencer <markster@digium.com>
* \brief App to flash a zap trunk
*
* \ingroup applications
*/
/*** MODULEINFO
<depend>dahdi</depend>
***/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <sys/ioctl.h>
#ifdef __linux__
#include <linux/zaptel.h>
#else
#include <zaptel.h>
#endif /* __linux__ */
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/file.h"
@@ -49,33 +48,28 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/image.h"
#include "asterisk/options.h"
#include "asterisk/dahdi_compat.h"
static char *tdesc = "Flash zap trunk application";
static char *app = "Flash";
static char *dahdi_synopsis = "Flashes a DAHDI trunk";
static char *synopsis = "Flashes a Zap Trunk";
static char *dahdi_descrip =
"Performs a flash on a DAHDI trunk. This can be used\n"
"to access features provided on an incoming analogue circuit\n"
"such as conference and call waiting. Use with SendDTMF() to\n"
"perform external transfers\n";
static char *descrip =
" Flash(): Sends a flash on a zap trunk. This is only a hack for\n"
"people who want to perform transfers and such via AGI and is generally\n"
"quite useless oths application will only work on Zap trunks.\n";
static char *zap_synopsis = "Flashes a Zap trunk";
STANDARD_LOCAL_USER;
static char *zap_descrip =
"Performs a flash on a Zap trunk. This can be used\n"
"to access features provided on an incoming analogue circuit\n"
"such as conference and call waiting. Use with SendDTMF() to\n"
"perform external transfers\n";
LOCAL_USER_DECL;
static inline int zt_wait_event(int fd)
{
/* Avoid the silly zt_waitevent which ignores a bunch of events */
int i,j=0;
i = DAHDI_IOMUX_SIGEVENT;
if (ioctl(fd, DAHDI_IOMUX, &i) == -1) return -1;
if (ioctl(fd, DAHDI_GETEVENT, &j) == -1) return -1;
i = ZT_IOMUX_SIGEVENT;
if (ioctl(fd, ZT_IOMUX, &i) == -1) return -1;
if (ioctl(fd, ZT_GETEVENT, &j) == -1) return -1;
return j;
}
@@ -83,16 +77,16 @@ static int flash_exec(struct ast_channel *chan, void *data)
{
int res = -1;
int x;
struct ast_module_user *u;
struct dahdi_params ztp;
u = ast_module_user_add(chan);
if (!strcasecmp(chan->tech->type, dahdi_chan_name)) {
struct localuser *u;
struct zt_params ztp;
LOCAL_USER_ADD(u);
if (!strcasecmp(chan->type, "Zap")) {
memset(&ztp, 0, sizeof(ztp));
res = ioctl(chan->fds[0], DAHDI_GET_PARAMS, &ztp);
res = ioctl(chan->fds[0], ZT_GET_PARAMS, &ztp);
if (!res) {
if (ztp.sigtype & __DAHDI_SIG_FXS) {
x = DAHDI_FLASH;
res = ioctl(chan->fds[0], DAHDI_HOOK, &x);
if (ztp.sigtype & __ZT_SIG_FXS) {
x = ZT_FLASH;
res = ioctl(chan->fds[0], ZT_HOOK, &x);
if (!res || (errno == EINPROGRESS)) {
if (res) {
/* Wait for the event to finish */
@@ -108,29 +102,40 @@ static int flash_exec(struct ast_channel *chan, void *data)
} else
ast_log(LOG_WARNING, "Unable to get parameters of %s: %s\n", chan->name, strerror(errno));
} else
ast_log(LOG_WARNING, "%s is not a DAHDI channel\n", chan->name);
ast_module_user_remove(u);
ast_log(LOG_WARNING, "%s is not a Zap channel\n", chan->name);
LOCAL_USER_REMOVE(u);
return res;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
if (dahdi_chan_mode == CHAN_ZAP_MODE) {
return ast_register_application(app, flash_exec, zap_synopsis, zap_descrip);
} else {
return ast_register_application(app, flash_exec, dahdi_synopsis, dahdi_descrip);
}
return ast_register_application(app, flash_exec, synopsis, descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Flash channel application");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

File diff suppressed because it is too large Load Diff

View File

@@ -18,148 +18,42 @@
/*! \file
*
* \brief Fork CDR application
*
* \author Anthony Minessale anthmct@yahoo.com
*
* \note Development of this app Sponsored/Funded by TAAN Softworks Corp
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/cdr.h"
#include "asterisk/app.h"
#include "asterisk/module.h"
static char *tdesc = "Fork The CDR into 2 separate entities.";
static char *app = "ForkCDR";
static char *synopsis =
"Forks the Call Data Record";
static char *descrip =
" ForkCDR([options]): Causes the Call Data Record to fork an additional\n"
"cdr record starting from the time of the fork call. This new cdr record will\n"
"be linked to end of the list of cdr records attached to the channel. The original CDR is\n"
"has a LOCKED flag set, which forces most cdr operations to skip it, except\n"
"for the functions that set the answer and end times, which ignore the LOCKED\n"
"flag. This allows all the cdr records in the channel to be 'ended' together\n"
"when the channel is closed.\n"
"The CDR() func (when setting CDR values) normally ignores the LOCKED flag also,\n"
"but has options to vary its behavior. The 'T' option (described below), can\n"
"override this behavior, but beware the risks.\n"
"\n"
"Detailed Behavior Description:\n"
"First, this app finds the last cdr record in the list, and makes\n"
"a copy of it. This new copy will be the newly forked cdr record.\n"
"Next, this new record is linked to the end of the cdr record list.\n"
"Next, The new cdr record is RESET (unless you use an option to prevent this)\n"
"This means that:\n"
" 1. All flags are unset on the cdr record\n"
" 2. the start, end, and answer times are all set to zero.\n"
" 3. the billsec and duration fields are set to zero.\n"
" 4. the start time is set to the current time.\n"
" 5. the disposition is set to NULL.\n"
"Next, unless you specified the 'v' option, all variables will be\n"
"removed from the original cdr record. Thus, the 'v' option allows\n"
"any CDR variables to be replicated to all new forked cdr records.\n"
"Without the 'v' option, the variables on the original are effectively\n"
"moved to the new forked cdr record.\n"
"Next, if the 's' option is set, the provided variable and value\n"
"are set on the original cdr record.\n"
"Next, if the 'a' option is given, and the original cdr record has an\n"
"answer time set, then the new forked cdr record will have its answer\n"
"time set to its start time. If the old answer time were carried forward,\n"
"the answer time would be earlier than the start time, giving strange\n"
"duration and billsec times.\n"
"Next, if the 'd' option was specified, the disposition is copied from\n"
"the original cdr record to the new forked cdr.\n"
"Next, if the 'D' option was specified, the destination channel field\n"
"in the new forked CDR is erased.\n"
"Next, if the 'e' option was specified, the 'end' time for the original\n"
"cdr record is set to the current time. Future hang-up or ending events\n"
"will not override this time stamp.\n"
"Next, If the 'A' option is specified, the original cdr record will have\n"
"it ANS_LOCKED flag set, which prevent future answer events\n"
"from updating the original cdr record's disposition. Normally, an\n"
"'ANSWERED' event would mark all cdr records in the chain as 'ANSWERED'.\n"
"Next, if the 'T' option is specified, the original cdr record will have\n"
"its 'DONT_TOUCH' flag set, which will force the cdr_answer, cdr_end, and\n"
"cdr_setvar functions to leave that cdr record alone.\n"
"And, last but not least, the original cdr record has its LOCKED flag\n"
"set. Almost all internal CDR functions (except for the funcs that set\n"
"the end, and answer times, and set a variable) will honor this flag\n"
"and leave a LOCKED cdr record alone.\n"
"This means that the newly created forked cdr record will affected\n"
"by events transpiring within Asterisk, with the previously noted\n"
"exceptions.\n"
" Options:\n"
" a - update the answer time on the NEW CDR just after it's been inited..\n"
" The new CDR may have been answered already, the reset that forkcdr.\n"
" does will erase the answer time. This will bring it back, but\n"
" the answer time will be a copy of the fork/start time. It will.\n"
" only do this if the initial cdr was indeed already answered..\n"
" A - Lock the original CDR against the answer time being updated.\n"
" This will allow the disposition on the original CDR to remain the same.\n"
" d - Copy the disposition forward from the old cdr, after the .\n"
" init..\n"
" D - Clear the dstchannel on the new CDR after reset..\n"
" e - end the original CDR. Do this after all the necc. data.\n"
" is copied from the original CDR to the new forked CDR..\n"
" R - do NOT reset the new cdr..\n"
" s(name=val) - Set the CDR var 'name' in the original CDR, with value.\n"
" 'val'.\n"
" T - Mark the original CDR with a DONT_TOUCH flag. setvar, answer, and end\n"
" cdr funcs will obey this flag; normally they don't honor the LOCKED\n"
" flag set on the original CDR record.\n"
" Beware-- using this flag may cause CDR's not to have their end times\n"
" updated! It is suggested that if you specify this flag, you might\n"
" wish to use the 'e' flag as well!\n"
" v - When the new CDR is forked, it gets a copy of the vars attached\n"
" to the current CDR. The vars attached to the original CDR are removed\n"
" unless this option is specified.\n";
"cdr record starting from the time of the fork call\n"
"If the option 'v' is passed all cdr variables will be passed along also.\n"
"";
enum {
OPT_SETANS = (1 << 0),
OPT_SETDISP = (1 << 1),
OPT_RESETDEST = (1 << 2),
OPT_ENDCDR = (1 << 3),
OPT_NORESET = (1 << 4),
OPT_KEEPVARS = (1 << 5),
OPT_VARSET = (1 << 6),
OPT_ANSLOCK = (1 << 7),
OPT_DONTOUCH = (1 << 8),
};
STANDARD_LOCAL_USER;
enum {
OPT_ARG_VARSET = 0,
/* note: this entry _MUST_ be the last one in the enum */
OPT_ARG_ARRAY_SIZE,
};
LOCAL_USER_DECL;
AST_APP_OPTIONS(forkcdr_exec_options, {
AST_APP_OPTION('a', OPT_SETANS),
AST_APP_OPTION('A', OPT_ANSLOCK),
AST_APP_OPTION('d', OPT_SETDISP),
AST_APP_OPTION('D', OPT_RESETDEST),
AST_APP_OPTION('e', OPT_ENDCDR),
AST_APP_OPTION('R', OPT_NORESET),
AST_APP_OPTION_ARG('s', OPT_VARSET, OPT_ARG_VARSET),
AST_APP_OPTION('T', OPT_DONTOUCH),
AST_APP_OPTION('v', OPT_KEEPVARS),
});
static void ast_cdr_fork(struct ast_channel *chan, struct ast_flags optflags, char *set)
static void ast_cdr_fork(struct ast_channel *chan)
{
struct ast_cdr *cdr;
struct ast_cdr *newcdr;
@@ -174,94 +68,64 @@ static void ast_cdr_fork(struct ast_channel *chan, struct ast_flags optflags, ch
return;
ast_cdr_append(cdr, newcdr);
if (!ast_test_flag(&optflags, OPT_NORESET))
ast_cdr_reset(newcdr, &flags);
ast_cdr_reset(newcdr, &flags);
if (!ast_test_flag(cdr, AST_CDR_FLAG_KEEP_VARS))
ast_cdr_free_vars(cdr, 0);
if (!ast_strlen_zero(set)) {
char *varname = ast_strdupa(set), *varval;
varval = strchr(varname,'=');
if (varval) {
*varval = 0;
varval++;
ast_cdr_setvar(cdr, varname, varval, 0);
}
}
if (ast_test_flag(&optflags, OPT_SETANS) && !ast_tvzero(cdr->answer))
newcdr->answer = newcdr->start;
if (ast_test_flag(&optflags, OPT_SETDISP))
newcdr->disposition = cdr->disposition;
if (ast_test_flag(&optflags, OPT_RESETDEST))
newcdr->dstchannel[0] = 0;
if (ast_test_flag(&optflags, OPT_ENDCDR))
ast_cdr_end(cdr);
if (ast_test_flag(&optflags, OPT_ANSLOCK))
ast_set_flag(cdr, AST_CDR_FLAG_ANSLOCKED);
if (ast_test_flag(&optflags, OPT_DONTOUCH))
ast_set_flag(cdr, AST_CDR_FLAG_DONT_TOUCH);
ast_set_flag(cdr, AST_CDR_FLAG_CHILD | AST_CDR_FLAG_LOCKED);
}
static int forkcdr_exec(struct ast_channel *chan, void *data)
{
int res = 0;
struct ast_module_user *u;
char *argcopy = NULL;
struct ast_flags flags = {0};
char *opts[OPT_ARG_ARRAY_SIZE];
AST_DECLARE_APP_ARGS(arglist,
AST_APP_ARG(options);
);
struct localuser *u;
if (!chan->cdr) {
ast_log(LOG_WARNING, "Channel does not have a CDR\n");
return 0;
}
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
argcopy = ast_strdupa(data);
AST_STANDARD_APP_ARGS(arglist, argcopy);
opts[OPT_ARG_VARSET] = 0;
if (!ast_strlen_zero(arglist.options))
ast_app_parse_options(forkcdr_exec_options, &flags, opts, arglist.options);
if (!ast_strlen_zero(data))
ast_set2_flag(chan->cdr, ast_test_flag(&flags, OPT_KEEPVARS), AST_CDR_FLAG_KEEP_VARS);
ast_set2_flag(chan->cdr, strchr(data, 'v'), AST_CDR_FLAG_KEEP_VARS);
ast_cdr_fork(chan, flags, opts[OPT_ARG_VARSET]);
ast_cdr_fork(chan);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return res;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
return ast_register_application(app, forkcdr_exec, synopsis, descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Fork The CDR into 2 separate entities");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -19,21 +19,19 @@
/*! \file
*
* \brief Get ADSI CPE ID
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -43,14 +41,19 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/adsi.h"
#include "asterisk/options.h"
static char *tdesc = "Get ADSI CPE ID";
static char *app = "GetCPEID";
static char *synopsis = "Get ADSI CPE ID";
static char *descrip =
" GetCPEID: Obtains and displays ADSI CPE ID and other information in order\n"
"to properly setup chan_dahdi.conf for on-hook operations.\n";
"to properly setup zapata.conf for on-hook operations.\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int cpeid_setstatus(struct ast_channel *chan, char *stuff[], int voice)
{
@@ -60,42 +63,43 @@ static int cpeid_setstatus(struct ast_channel *chan, char *stuff[], int voice)
for (x=0;x<4;x++)
tmp[x] = stuff[x];
tmp[4] = NULL;
return ast_adsi_print(chan, tmp, justify, voice);
return adsi_print(chan, tmp, justify, voice);
}
static int cpeid_exec(struct ast_channel *chan, void *idata)
{
int res=0;
struct ast_module_user *u;
struct localuser *u;
unsigned char cpeid[4];
int gotgeometry = 0;
int gotcpeid = 0;
int width, height, buttons;
char *data[4];
unsigned int x;
char data[4][80];
char *stuff[4];
u = ast_module_user_add(chan);
for (x = 0; x < 4; x++)
data[x] = alloca(80);
strcpy(data[0], "** CPE Info **");
strcpy(data[1], "Identifying CPE...");
strcpy(data[2], "Please wait...");
res = ast_adsi_load_session(chan, NULL, 0, 1);
LOCAL_USER_ADD(u);
stuff[0] = data[0];
stuff[1] = data[1];
stuff[2] = data[2];
stuff[3] = data[3];
memset(data, 0, sizeof(data));
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, data, 0);
res = ast_adsi_get_cpeid(chan, cpeid, 0);
cpeid_setstatus(chan, stuff, 0);
res = adsi_get_cpeid(chan, cpeid, 0);
if (res > 0) {
gotcpeid = 1;
if (option_verbose > 2)
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(data[1], "Measuring CPE...");
strcpy(data[2], "Please wait...");
cpeid_setstatus(chan, data, 0);
res = ast_adsi_get_cpeinfo(chan, &width, &height, &buttons, 0);
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) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "CPE has %d lines, %d columns, and %d buttons on '%s'\n", height, width, buttons, chan->name);
@@ -104,15 +108,15 @@ static int cpeid_exec(struct ast_channel *chan, void *idata)
}
if (res > -1) {
if (gotcpeid)
snprintf(data[1], 80, "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(data[1], "CPEID Unknown");
strncpy(stuff[1], "CPEID Unknown", sizeof(data[1]) - 1);
if (gotgeometry)
snprintf(data[2], 80, "Geom: %dx%d, %d buttons", width, height, buttons);
snprintf(stuff[2], sizeof(data[2]), "Geom: %dx%d, %d buttons", width, height, buttons);
else
strcpy(data[2], "Geometry unknown");
strcpy(data[3], "Press # to exit");
cpeid_setstatus(chan, data, 1);
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);
if (res < 0)
@@ -122,27 +126,42 @@ static int cpeid_exec(struct ast_channel *chan, void *idata)
break;
}
}
ast_adsi_unload_session(chan);
adsi_unload_session(chan);
}
}
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return res;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
return ast_register_application(app, cpeid_exec, synopsis, descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Get ADSI CPE ID");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

338
apps/app_groupcount.c Normal file
View File

@@ -0,0 +1,338 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 1999 - 2005, Digium, Inc.
*
* Mark Spencer <markster@digium.com>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
*/
/*! \file
*
* \brief Group Manipulation Applications
*
* \ingroup applications
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <regex.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#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"
#include "asterisk/cli.h"
#include "asterisk/app.h"
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int group_count_exec(struct ast_channel *chan, void *data)
{
int res = 0;
int count;
struct localuser *u;
char group[80] = "";
char category[80] = "";
char ret[80] = "";
char *grp;
static int deprecation_warning = 0;
LOCAL_USER_ADD(u);
if (!deprecation_warning) {
ast_log(LOG_WARNING, "The GetGroupCount application has been deprecated, please use the GROUP_COUNT function.\n");
deprecation_warning = 1;
}
ast_app_group_split_group(data, group, sizeof(group), category, sizeof(category));
if (ast_strlen_zero(group)) {
grp = pbx_builtin_getvar_helper(chan, category);
if (!ast_strlen_zero(grp))
ast_copy_string(group, grp, sizeof(group));
}
count = ast_app_group_get_count(group, category);
snprintf(ret, sizeof(ret), "%d", count);
pbx_builtin_setvar_helper(chan, "GROUPCOUNT", ret);
LOCAL_USER_REMOVE(u);
return res;
}
static int group_match_count_exec(struct ast_channel *chan, void *data)
{
int res = 0;
int count;
struct localuser *u;
char group[80] = "";
char category[80] = "";
char ret[80] = "";
static int deprecation_warning = 0;
LOCAL_USER_ADD(u);
if (!deprecation_warning) {
ast_log(LOG_WARNING, "The GetGroupMatchCount application has been deprecated, please use the GROUP_MATCH_COUNT function.\n");
deprecation_warning = 1;
}
ast_app_group_split_group(data, group, sizeof(group), category, sizeof(category));
if (!ast_strlen_zero(group)) {
count = ast_app_group_match_get_count(group, category);
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;
static int deprecation_warning = 0;
LOCAL_USER_ADD(u);
if (!deprecation_warning) {
ast_log(LOG_WARNING, "The SetGroup application has been deprecated, please use the GROUP() function.\n");
deprecation_warning = 1;
}
if (ast_app_group_set_channel(chan, data))
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 limit[80]="";
char category[80]="";
static int deprecation_warning = 0;
char *parse;
int priority_jump = 0;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(max);
AST_APP_ARG(options);
);
LOCAL_USER_ADD(u);
if (!deprecation_warning) {
ast_log(LOG_WARNING, "The CheckGroup application has been deprecated, please use a combination of the GotoIf application and the GROUP_COUNT() function.\n");
deprecation_warning = 1;
}
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "CheckGroup requires an argument(max[@category][|options])\n");
return 0;
}
if (!(parse = ast_strdupa(data))) {
ast_log(LOG_WARNING, "Memory Error!\n");
LOCAL_USER_REMOVE(u);
return -1;
}
AST_STANDARD_APP_ARGS(args, parse);
if (args.options) {
if (strchr(args.options, 'j'))
priority_jump = 1;
}
if (ast_strlen_zero(args.max)) {
ast_log(LOG_WARNING, "CheckGroup requires an argument(max[@category][|options])\n");
return res;
}
ast_app_group_split_group(args.max, limit, sizeof(limit), category, sizeof(category));
if ((sscanf(limit, "%d", &max) == 1) && (max > -1)) {
count = ast_app_group_get_count(pbx_builtin_getvar_helper(chan, category), category);
if (count > max) {
pbx_builtin_setvar_helper(chan, "CHECKGROUPSTATUS", "OVERMAX");
if (priority_jump || option_priority_jumping) {
if (!ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101))
res = -1;
}
} else
pbx_builtin_setvar_helper(chan, "CHECKGROUPSTATUS", "OK");
} else
ast_log(LOG_WARNING, "CheckGroup requires a positive integer argument (max)\n");
LOCAL_USER_REMOVE(u);
return res;
}
static int group_show_channels(int fd, int argc, char *argv[])
{
#define FORMAT_STRING "%-25s %-20s %-20s\n"
int numchans = 0;
struct ast_group_info *gi = NULL;
regex_t regexbuf;
int havepattern = 0;
if (argc < 3 || argc > 4)
return RESULT_SHOWUSAGE;
if (argc == 4) {
if (regcomp(&regexbuf, argv[3], REG_EXTENDED | REG_NOSUB))
return RESULT_SHOWUSAGE;
havepattern = 1;
}
ast_cli(fd, FORMAT_STRING, "Channel", "Group", "Category");
ast_app_group_list_lock();
gi = ast_app_group_list_head();
while (gi) {
if (!havepattern || !regexec(&regexbuf, gi->group, 0, NULL, 0)) {
ast_cli(fd, FORMAT_STRING, gi->chan->name, gi->group, (ast_strlen_zero(gi->category) ? "(default)" : gi->category));
numchans++;
}
gi = AST_LIST_NEXT(gi, list);
}
ast_app_group_list_unlock();
if (havepattern)
regfree(&regexbuf);
ast_cli(fd, "%d active channel%s\n", numchans, (numchans != 1) ? "s" : "");
return RESULT_SUCCESS;
#undef FORMAT_STRING
}
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 *app_group_match_count = "GetGroupMatchCount";
static char *group_count_synopsis = "Get the channel count of a group";
static char *group_set_synopsis = "Set the channel's group";
static char *group_check_synopsis = "Check the channel count of a group against a limit";
static char *group_match_count_synopsis = "Get the channel count of all groups that match a pattern";
static char *group_count_descrip =
"Usage: GetGroupCount([groupname][@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. \n"
"Note: This application has been deprecated, please use the function\n"
"GROUP_COUNT.\n";
static char *group_set_descrip =
"Usage: SetGroup(groupname[@category])\n"
" Sets the channel group to the specified value. Equivalent to\n"
"Set(GROUP=group). Always returns 0.\n";
static char *group_check_descrip =
"Usage: CheckGroup(max[@category][|options])\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. \n"
" The option string may contain zero of the following character:\n"
" 'j' -- jump to n+101 priority if the number does in fact exceed max,\n"
" and priority n+101 exists. Execuation then continues at that\n"
" step, otherwise -1 is returned.\n"
" This application sets the following channel variable upon successful completion:\n"
" CHECKGROUPSTATUS The status of the check that the current channel's\n"
" group does not exceed 'max'. It's value is one of\n"
" OK | OVERMAX \n";
static char *group_match_count_descrip =
"Usage: GetGroupMatchCount(groupmatch[@category])\n"
" Calculates the group count for all groups that match the specified\n"
"pattern. Uses standard regular expression matching (see regex(7)).\n"
"Stores result in GROUPCOUNT. Always returns 0.\n"
"Note: This application has been deprecated, please use the function\n"
"GROUP_MATCH_COUNT.\n";
static char show_channels_usage[] =
"Usage: group show channels [pattern]\n"
" Lists all currently active channels with channel group(s) specified.\n Optional regular expression pattern is matched to group names for each channel.\n";
static struct ast_cli_entry cli_show_channels =
{ { "group", "show", "channels", NULL }, group_show_channels, "Show active channels with group(s)", show_channels_usage};
int unload_module(void)
{
int res;
res = ast_cli_unregister(&cli_show_channels);
res |= ast_unregister_application(app_group_count);
res |= ast_unregister_application(app_group_set);
res |= ast_unregister_application(app_group_check);
res |= ast_unregister_application(app_group_match_count);
STANDARD_HANGUP_LOCALUSERS;
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);
res |= ast_register_application(app_group_match_count, group_match_count_exec, group_match_count_synopsis, group_match_count_descrip);
res |= ast_cli_register(&cli_show_channels);
return res;
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -1,7 +1,7 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Changes Copyright (c) 2004 - 2006 Todd Freeman <freeman@andrews.edu>
* Changes Copyright (c) 2004 - 2005 Todd Freeman <freeman@andrews.edu>
*
* 95% based on HasNewVoicemail by:
*
@@ -24,18 +24,9 @@
*
* \brief HasVoicemail application
*
* \author Todd Freeman <freeman@andrews.edu>
*
* \note 95% based on HasNewVoicemail by
* Tilghman Lesher <asterisk-hasnewvoicemail-app@the-tilghman.com>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -43,6 +34,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <dirent.h>
#include <sys/types.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
@@ -52,7 +47,14 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/utils.h"
#include "asterisk/app.h"
#include "asterisk/options.h"
#ifdef USE_ODBC_STORAGE
#include "asterisk/res_odbc.h"
static char odbc_database[80];
static char odbc_table[80];
#endif
static char *tdesc = "Indicator for whether a voice mailbox has messages in a given folder.";
static char *app_hasvoicemail = "HasVoicemail";
static char *hasvoicemail_synopsis = "Conditionally branches to priority + 101 with the right options set";
static char *hasvoicemail_descrip =
@@ -63,8 +65,7 @@ static char *hasvoicemail_descrip =
" 'j' -- jump to priority n+101, if there is voicemail in the folder indicated.\n"
" This application sets the following channel variable upon completion:\n"
" HASVMSTATUS The result of the voicemail check returned as a text string as follows\n"
" <# of messages in the folder, 0 for NONE>\n"
"\nThis application has been deprecated in favor of the VMCOUNT() function\n";
" <# of messages in the folder, 0 for NONE>\n";
static char *app_hasnewvoicemail = "HasNewVoicemail";
static char *hasnewvoicemail_synopsis = "Conditionally branches to priority + 101 with the right options set";
@@ -76,13 +77,103 @@ static char *hasnewvoicemail_descrip =
" 'j' -- jump to priority n+101, if there is new voicemail in folder 'folder' or INBOX\n"
" This application sets the following channel variable upon completion:\n"
" HASVMSTATUS The result of the new voicemail check returned as a text string as follows\n"
" <# of messages in the folder, 0 for NONE>\n"
"\nThis application has been deprecated in favor of the VMCOUNT() function\n";
" <# of messages in the folder, 0 for NONE>\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
#ifdef USE_ODBC_STORAGE
static int hasvoicemail_internal(const char *context, const char *mailbox, const char *folder)
{
int nummsgs = 0;
int res;
SQLHSTMT stmt;
char sql[256];
char rowdata[20];
if (!folder)
folder = "INBOX";
/* If no mailbox, return immediately */
if (ast_strlen_zero(mailbox))
return 0;
if (ast_strlen_zero(context))
context = "default";
odbc_obj *obj;
obj = fetch_odbc_obj(odbc_database, 0);
if (obj) {
res = SQLAllocHandle(SQL_HANDLE_STMT, obj->con, &stmt);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Alloc Handle failed!\n");
goto yuck;
}
snprintf(sql, sizeof(sql), "SELECT COUNT(*) FROM %s WHERE dir = '%s/voicemail/%s/%s/%s'", odbc_table, ast_config_AST_SPOOL_DIR, context, mailbox, folder);
res = SQLPrepare(stmt, sql, SQL_NTS);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Prepare failed![%s]\n", sql);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
goto yuck;
}
res = odbc_smart_execute(obj, stmt);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
goto yuck;
}
res = SQLFetch(stmt);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Fetch error!\n[%s]\n\n", sql);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
goto yuck;
}
res = SQLGetData(stmt, 1, SQL_CHAR, rowdata, sizeof(rowdata), NULL);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Get Data error!\n[%s]\n\n", sql);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
goto yuck;
}
nummsgs = atoi(rowdata);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
} else
ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
yuck:
return nummsgs;
}
#else
static int hasvoicemail_internal(const char *context, const char *mailbox, const char *folder)
{
DIR *dir;
struct dirent *de;
char fn[256];
int count = 0;
if (ast_strlen_zero(folder))
folder = "INBOX";
if (ast_strlen_zero(context))
context = "default";
/* If no mailbox, return immediately */
if (ast_strlen_zero(mailbox))
return 0;
snprintf(fn, sizeof(fn), "%s/voicemail/%s/%s/%s", ast_config_AST_SPOOL_DIR, context, mailbox, folder);
dir = opendir(fn);
if (!dir)
return 0;
while ((de = readdir(dir))) {
if (!strncasecmp(de->d_name, "msg", 3) && !strcasecmp(de->d_name + 8, "txt"))
count++;
}
closedir(dir);
return count;
}
#endif
static int hasvoicemail_exec(struct ast_channel *chan, void *data)
{
struct ast_module_user *u;
struct localuser *u;
char *input, *varname = NULL, *vmbox, *context = "default";
char *vmfolder;
int vmcount = 0;
@@ -105,16 +196,22 @@ static int hasvoicemail_exec(struct ast_channel *chan, void *data)
return -1;
}
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
input = ast_strdupa(data);
input = ast_strdupa((char *)data);
if (! input) {
ast_log(LOG_ERROR, "Out of memory error\n");
LOCAL_USER_REMOVE(u);
return -1;
}
AST_STANDARD_APP_ARGS(args, input);
vmbox = strsep(&args.vmbox, "@");
if (!ast_strlen_zero(args.vmbox))
context = args.vmbox;
if ((vmbox = strsep(&args.vmbox, "@")))
if (!ast_strlen_zero(args.vmbox))
context = args.vmbox;
if (!vmbox)
vmbox = args.vmbox;
vmfolder = strchr(vmbox, '/');
if (vmfolder) {
@@ -129,7 +226,7 @@ static int hasvoicemail_exec(struct ast_channel *chan, void *data)
priority_jump = 1;
}
vmcount = ast_app_messagecount(context, vmbox, vmfolder);
vmcount = hasvoicemail_internal(context, vmbox, vmfolder);
/* Set the count in the channel variable */
if (varname) {
snprintf(tmp, sizeof(tmp), "%d", vmcount);
@@ -138,7 +235,7 @@ static int hasvoicemail_exec(struct ast_channel *chan, void *data)
if (vmcount > 0) {
/* Branch to the next extension */
if (priority_jump || ast_opt_priority_jumping) {
if (priority_jump || option_priority_jumping) {
if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101))
ast_log(LOG_WARNING, "VM box %s@%s has new voicemail, but extension %s, priority %d doesn't exist\n", vmbox, context, chan->exten, chan->priority + 101);
}
@@ -147,45 +244,46 @@ static int hasvoicemail_exec(struct ast_channel *chan, void *data)
snprintf(tmp, sizeof(tmp), "%d", vmcount);
pbx_builtin_setvar_helper(chan, "HASVMSTATUS", tmp);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return 0;
}
static int acf_vmcount_exec(struct ast_channel *chan, char *cmd, char *argsstr, char *buf, size_t len)
static char *acf_vmcount_exec(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
{
struct ast_module_user *u;
char *context;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(vmbox);
AST_APP_ARG(folder);
);
struct localuser *u;
char *args, *context, *box, *folder;
if (ast_strlen_zero(argsstr))
return -1;
u = ast_module_user_add(chan);
LOCAL_USER_ACF_ADD(u);
buf[0] = '\0';
AST_STANDARD_APP_ARGS(args, argsstr);
args = ast_strdupa(data);
if (!args) {
ast_log(LOG_ERROR, "Out of memory\n");
LOCAL_USER_REMOVE(u);
return buf;
}
if (strchr(args.vmbox, '@')) {
context = args.vmbox;
args.vmbox = strsep(&context, "@");
box = strsep(&args, "|");
if (strchr(box, '@')) {
context = box;
box = strsep(&context, "@");
} else {
context = "default";
}
if (ast_strlen_zero(args.folder)) {
args.folder = "INBOX";
if (args) {
folder = args;
} else {
folder = "INBOX";
}
snprintf(buf, len, "%d", ast_app_messagecount(context, args.vmbox, args.folder));
snprintf(buf, len, "%d", hasvoicemail_internal(context, box, folder));
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return 0;
return buf;
}
struct ast_custom_function acf_vmcount = {
@@ -198,7 +296,32 @@ struct ast_custom_function acf_vmcount = {
.read = acf_vmcount_exec,
};
static int unload_module(void)
static int load_config(void)
{
#ifdef USE_ODBC_STORAGE
struct ast_config *cfg;
char *tmp;
cfg = ast_config_load("voicemail.conf");
if (cfg) {
if (! (tmp = ast_variable_retrieve(cfg, "general", "odbcstorage")))
tmp = "asterisk";
ast_copy_string(odbc_database, tmp, sizeof(odbc_database));
if (! (tmp = ast_variable_retrieve(cfg, "general", "odbctable")))
tmp = "voicemessages";
ast_copy_string(odbc_table, tmp, sizeof(odbc_table));
ast_config_destroy(cfg);
}
#endif
return 0;
}
int reload(void)
{
return load_config();
}
int unload_module(void)
{
int res;
@@ -206,15 +329,15 @@ static int unload_module(void)
res |= ast_unregister_application(app_hasvoicemail);
res |= ast_unregister_application(app_hasnewvoicemail);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
int res;
load_config();
res = ast_custom_function_register(&acf_vmcount);
res |= ast_register_application(app_hasvoicemail, hasvoicemail_exec, hasvoicemail_synopsis, hasvoicemail_descrip);
res |= ast_register_application(app_hasnewvoicemail, hasvoicemail_exec, hasnewvoicemail_synopsis, hasnewvoicemail_descrip);
@@ -222,4 +345,19 @@ static int load_module(void)
return res;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Indicator for whether a voice mailbox has messages in a given folder.");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -19,20 +19,10 @@
/*! \file
*
* \brief Stream to an icecast server via ICES (see contrib/asterisk-ices.xml)
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
/*** MODULEINFO
<depend>working_fork</depend>
***/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <string.h>
#include <stdio.h>
#include <signal.h>
@@ -41,9 +31,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <fcntl.h>
#include <sys/time.h>
#include <errno.h>
#ifdef HAVE_CAP
#include <sys/capability.h>
#endif /* HAVE_CAP */
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/file.h"
@@ -55,8 +46,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/translate.h"
#include "asterisk/options.h"
#define path_BIN "/usr/bin/"
#define path_LOCAL "/usr/local/bin/"
#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";
@@ -65,16 +58,17 @@ 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 contrib/asterisk-ices.xml). \n";
"for ices (see examples/asterisk-ices.conf). \n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int icesencode(char *filename, int fd)
{
int res;
int x;
sigset_t fullset, oldset;
#ifdef HAVE_CAP
cap_t cap;
#endif
sigfillset(&fullset);
pthread_sigmask(SIG_BLOCK, &fullset, &oldset);
@@ -91,48 +85,27 @@ static int icesencode(char *filename, int fd)
signal(SIGPIPE, SIG_DFL);
pthread_sigmask(SIG_UNBLOCK, &fullset, NULL);
#ifdef HAVE_CAP
cap = cap_from_text("cap_net_admin-eip");
if (cap_set_proc(cap)) {
/* Careful with order! Logging cannot happen after we close FDs */
ast_log(LOG_WARNING, "Unable to remove capabilities.\n");
}
cap_free(cap);
#endif
if (ast_opt_high_priority)
if (option_highpriority)
ast_set_priority(0);
dup2(fd, STDIN_FILENO);
for (x=STDERR_FILENO + 1;x<1024;x++) {
if ((x != STDIN_FILENO) && (x != STDOUT_FILENO))
close(x);
}
/* Most commonly installed in /usr/local/bin
* But many places has it in /usr/bin
* As a last-ditch effort, try to use PATH
*/
execl(path_LOCAL "ices2", "ices", filename, (char *)NULL);
execl(path_BIN "ices2", "ices", filename, (char *)NULL);
execlp("ices2", "ices", filename, (char *)NULL);
if (option_debug)
ast_log(LOG_DEBUG, "Couldn't find ices version 2, attempting to use ices version 1.");
execl(path_LOCAL "ices", "ices", filename, (char *)NULL);
execl(path_BIN "ices", "ices", filename, (char *)NULL);
/* 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, could not be found.\n");
close(fd);
ast_log(LOG_WARNING, "Execute of ices failed\n");
_exit(0);
}
static int ices_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct ast_module_user *u;
struct localuser *u;
int fds[2];
int ms = -1;
int pid = -1;
@@ -148,13 +121,13 @@ static int ices_exec(struct ast_channel *chan, void *data)
return -1;
}
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
last = ast_tv(0, 0);
if (pipe(fds)) {
ast_log(LOG_WARNING, "Unable to create pipe\n");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
flags = fcntl(fds[1], F_GETFL);
@@ -169,7 +142,7 @@ static int ices_exec(struct ast_channel *chan, void *data)
close(fds[0]);
close(fds[1]);
ast_log(LOG_WARNING, "Answer failed!\n");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -179,11 +152,11 @@ static int ices_exec(struct ast_channel *chan, void *data)
close(fds[0]);
close(fds[1]);
ast_log(LOG_WARNING, "Unable to set write format to signed linear\n");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
if (((char *)data)[0] == '/')
ast_copy_string(filename, (char *) data, sizeof(filename));
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 */
@@ -191,6 +164,7 @@ static int ices_exec(struct ast_channel *chan, void *data)
if (c)
*c = '\0';
res = icesencode(filename, fds[0]);
close(fds[0]);
if (res >= 0) {
pid = res;
for (;;) {
@@ -221,7 +195,6 @@ static int ices_exec(struct ast_channel *chan, void *data)
ast_frfree(f);
}
}
close(fds[0]);
close(fds[1]);
if (pid > -1)
@@ -229,25 +202,40 @@ static int ices_exec(struct ast_channel *chan, void *data)
if (!res && oreadformat)
ast_set_read_format(chan, oreadformat);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return res;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
return ast_register_application(app, ices_exec, synopsis, descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Encode and Stream via icecast and ices");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -19,20 +19,18 @@
/*! \file
*
* \brief App to transmit an image
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -44,6 +42,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/app.h"
#include "asterisk/options.h"
static char *tdesc = "Image Transmission Application";
static char *app = "SendImage";
static char *synopsis = "Send an image file";
@@ -59,11 +59,14 @@ static char *descrip =
" SENDIMAGESTATUS The status is the result of the attempt as a text string, one of\n"
" OK | NOSUPPORT \n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int sendimage_exec(struct ast_channel *chan, void *data)
{
int res = 0;
struct ast_module_user *u;
struct localuser *u;
char *parse;
int priority_jump = 0;
AST_DECLARE_APP_ARGS(args,
@@ -71,9 +74,13 @@ static int sendimage_exec(struct ast_channel *chan, void *data)
AST_APP_ARG(options);
);
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
parse = ast_strdupa(data);
if (!(parse = ast_strdupa(data))) {
ast_log(LOG_WARNING, "Memory Error!\n");
LOCAL_USER_REMOVE(u);
return -1;
}
AST_STANDARD_APP_ARGS(args, parse);
@@ -89,10 +96,10 @@ static int sendimage_exec(struct ast_channel *chan, void *data)
if (!ast_supports_images(chan)) {
/* Does not support transport */
if (priority_jump || ast_opt_priority_jumping)
if (priority_jump || option_priority_jumping)
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
pbx_builtin_setvar_helper(chan, "SENDIMAGESTATUS", "NOSUPPORT");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return 0;
}
@@ -101,25 +108,40 @@ static int sendimage_exec(struct ast_channel *chan, void *data)
if (!res)
pbx_builtin_setvar_helper(chan, "SENDIMAGESTATUS", "OK");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return res;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
return ast_register_application(app, sendimage_exec, synopsis, descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Image Transmission Application");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

234
apps/app_intercom.c Normal file
View File

@@ -0,0 +1,234 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 1999 - 2005, Digium, Inc.
*
* Mark Spencer <markster@digium.com>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
*/
/*! \file
*
* \brief Use /dev/dsp as an intercom.
*
* \ingroup applications
*/
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <string.h>
#include <stdlib.h>
#include <sys/time.h>
#include <netinet/in.h>
#if defined(__linux__)
#include <linux/soundcard.h>
#elif defined(__FreeBSD__)
#include <sys/soundcard.h>
#else
#include <soundcard.h>
#endif
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/frame.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/translate.h"
#ifdef __OpenBSD__
#define DEV_DSP "/dev/audio"
#else
#define DEV_DSP "/dev/dsp"
#endif
/* Number of 32 byte buffers -- each buffer is 2 ms */
#define BUFFER_SIZE 32
static char *tdesc = "Intercom using /dev/dsp for output";
static char *app = "Intercom";
static char *synopsis = "(Obsolete) Send to Intercom";
static char *descrip =
" Intercom(): Sends the user to the intercom (i.e. /dev/dsp). This program\n"
"is generally considered obselete by the chan_oss module. User can terminate\n"with a DTMF tone, or by hangup.\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
AST_MUTEX_DEFINE_STATIC(sound_lock);
static int sound = -1;
static int write_audio(short *data, int len)
{
int res;
struct audio_buf_info info;
ast_mutex_lock(&sound_lock);
if (sound < 0) {
ast_log(LOG_WARNING, "Sound device closed?\n");
ast_mutex_unlock(&sound_lock);
return -1;
}
if (ioctl(sound, SNDCTL_DSP_GETOSPACE, &info)) {
ast_log(LOG_WARNING, "Unable to read output space\n");
ast_mutex_unlock(&sound_lock);
return -1;
}
res = write(sound, data, len);
ast_mutex_unlock(&sound_lock);
return res;
}
static int create_audio(void)
{
int fmt, desired, res, fd;
fd = open(DEV_DSP, O_WRONLY);
if (fd < 0) {
ast_log(LOG_WARNING, "Unable to open %s: %s\n", DEV_DSP, strerror(errno));
close(fd);
return -1;
}
fmt = AFMT_S16_LE;
res = ioctl(fd, SNDCTL_DSP_SETFMT, &fmt);
if (res < 0) {
ast_log(LOG_WARNING, "Unable to set format to 16-bit signed\n");
close(fd);
return -1;
}
fmt = 0;
res = ioctl(fd, SNDCTL_DSP_STEREO, &fmt);
if (res < 0) {
ast_log(LOG_WARNING, "Failed to set audio device to mono\n");
close(fd);
return -1;
}
/* 8000 Hz desired */
desired = 8000;
fmt = desired;
res = ioctl(fd, SNDCTL_DSP_SPEED, &fmt);
if (res < 0) {
ast_log(LOG_WARNING, "Failed to set audio device to mono\n");
close(fd);
return -1;
}
if (fmt != desired) {
ast_log(LOG_WARNING, "Requested %d Hz, got %d Hz -- sound may be choppy\n", desired, fmt);
}
#if 1
/* 2 bytes * 15 units of 2^5 = 32 bytes per buffer */
fmt = ((BUFFER_SIZE) << 16) | (0x0005);
res = ioctl(fd, SNDCTL_DSP_SETFRAGMENT, &fmt);
if (res < 0) {
ast_log(LOG_WARNING, "Unable to set fragment size -- sound may be choppy\n");
}
#endif
sound = fd;
return 0;
}
static int intercom_exec(struct ast_channel *chan, void *data)
{
int res = 0;
struct localuser *u;
struct ast_frame *f;
int oreadformat;
LOCAL_USER_ADD(u);
/* Remember original read format */
oreadformat = chan->readformat;
/* Set mode to signed linear */
res = ast_set_read_format(chan, AST_FORMAT_SLINEAR);
if (res < 0) {
ast_log(LOG_WARNING, "Unable to set format to signed linear on channel %s\n", chan->name);
LOCAL_USER_REMOVE(u);
return -1;
}
/* Read packets from the channel */
while(!res) {
res = ast_waitfor(chan, -1);
if (res > 0) {
res = 0;
f = ast_read(chan);
if (f) {
if (f->frametype == AST_FRAME_DTMF) {
ast_frfree(f);
break;
} else {
if (f->frametype == AST_FRAME_VOICE) {
if (f->subclass == AST_FORMAT_SLINEAR) {
res = write_audio(f->data, f->datalen);
if (res > 0)
res = 0;
} else
ast_log(LOG_DEBUG, "Unable to handle non-signed linear frame (%d)\n", f->subclass);
}
}
ast_frfree(f);
} else
res = -1;
}
}
if (!res)
ast_set_read_format(chan, oreadformat);
LOCAL_USER_REMOVE(u);
return res;
}
int unload_module(void)
{
int res;
if (sound > -1)
close(sound);
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
return res;
}
int load_module(void)
{
if (create_audio())
return -1;
return ast_register_application(app, intercom_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -19,25 +19,19 @@
/*! \file
*
* \brief IVR Demo application
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
/*** MODULEINFO
<defaultenabled>no</defaultenabled>
***/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
@@ -88,18 +82,21 @@ AST_IVR_DECLARE_MENU(ivr_demo, "IVR Demo Main Menu", 0,
{ NULL },
});
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int skel_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct ast_module_user *u;
struct localuser *u;
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "skel requires an argument (filename)\n");
return -1;
}
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
/* Do our thing here */
@@ -108,25 +105,40 @@ static int skel_exec(struct ast_channel *chan, void *data)
if (!res)
res = ast_ivr_menu_run(chan, &ivr_demo, data);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return res;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
return ast_register_application(app, skel_exec, tdesc, synopsis);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "IVR Demo Application");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -20,20 +20,18 @@
*
* \brief App to lookup the callerid number, and see if it is blacklisted
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -47,6 +45,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/astdb.h"
#include "asterisk/options.h"
static char *tdesc = "Look up Caller*ID name/number from blacklist database";
static char *app = "LookupBlacklist";
static char *synopsis = "Look up Caller*ID name/number from blacklist database";
@@ -59,52 +59,21 @@ static char *descrip =
"This application sets the following channel variable upon completion:\n"
" LOOKUPBLSTATUS The status of the Blacklist lookup as a text string, one of\n"
" FOUND | NOTFOUND\n"
"Example: exten => 1234,1,LookupBlacklist()\n\n"
"This application is deprecated and may be removed from a future release.\n"
"Please use the dialplan function BLACKLIST() instead.\n";
"Example: exten => 1234,1,LookupBlacklist()\n";
STANDARD_LOCAL_USER;
static int blacklist_read(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
{
char blacklist[1];
int bl = 0;
if (chan->cid.cid_num) {
if (!ast_db_get("blacklist", chan->cid.cid_num, blacklist, sizeof (blacklist)))
bl = 1;
}
if (chan->cid.cid_name) {
if (!ast_db_get("blacklist", chan->cid.cid_name, blacklist, sizeof (blacklist)))
bl = 1;
}
snprintf(buf, len, "%d", bl);
return 0;
}
static struct ast_custom_function blacklist_function = {
.name = "BLACKLIST",
.synopsis = "Check if the callerid is on the blacklist",
.desc = "Uses astdb to check if the Caller*ID is in family 'blacklist'. Returns 1 or 0.\n",
.syntax = "BLACKLIST()",
.read = blacklist_read,
};
LOCAL_USER_DECL;
static int
lookupblacklist_exec (struct ast_channel *chan, void *data)
{
char blacklist[1];
struct ast_module_user *u;
struct localuser *u;
int bl = 0;
int priority_jump = 0;
static int dep_warning = 0;
u = ast_module_user_add(chan);
if (!dep_warning) {
dep_warning = 1;
ast_log(LOG_WARNING, "LookupBlacklist is deprecated. Please use ${BLACKLIST()} instead.\n");
}
LOCAL_USER_ADD(u);
if (!ast_strlen_zero(data)) {
if (strchr(data, 'j'))
@@ -127,34 +96,46 @@ lookupblacklist_exec (struct ast_channel *chan, void *data)
}
if (bl) {
if (priority_jump || ast_opt_priority_jumping)
if (priority_jump || option_priority_jumping)
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
pbx_builtin_setvar_helper(chan, "LOOKUPBLSTATUS", "FOUND");
} else
pbx_builtin_setvar_helper(chan, "LOOKUPBLSTATUS", "NOTFOUND");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return 0;
}
static int unload_module(void)
int unload_module (void)
{
int res;
res = ast_unregister_application(app);
res |= ast_custom_function_unregister(&blacklist_function);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module (void)
{
int res = ast_custom_function_register(&blacklist_function);
res |= ast_register_application (app, lookupblacklist_exec, synopsis,descrip);
return ast_register_application (app, lookupblacklist_exec, synopsis,descrip);
}
char *description (void)
{
return tdesc;
}
int usecount (void)
{
int res;
STANDARD_USECOUNT (res);
return res;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Look up Caller*ID name/number from blacklist database");
char *key ()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -19,20 +19,18 @@
/*! \file
*
* \brief App to set callerid name from database, based on directory number
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -45,6 +43,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/callerid.h"
#include "asterisk/astdb.h"
static char *tdesc = "Look up CallerID Name from local database";
static char *app = "LookupCIDName";
static char *synopsis = "Look up CallerID Name from local database";
@@ -55,49 +55,66 @@ static char *descrip =
"Caller*ID name. Does nothing if no Caller*ID was received on the\n"
"channel. This is useful if you do not subscribe to Caller*ID\n"
"name delivery, or if you want to change the names on some incoming\n"
"calls.\n\n"
"LookupCIDName is deprecated. Please use ${DB(cidname/${CALLERID(num)})}\n"
"instead.\n";
"calls.\n";
STANDARD_LOCAL_USER;
static int lookupcidname_exec (struct ast_channel *chan, void *data)
LOCAL_USER_DECL;
static int
lookupcidname_exec (struct ast_channel *chan, void *data)
{
char dbname[64];
struct ast_module_user *u;
static int dep_warning = 0;
char dbname[64];
struct localuser *u;
u = ast_module_user_add(chan);
if (!dep_warning) {
dep_warning = 1;
ast_log(LOG_WARNING, "LookupCIDName is deprecated. Please use ${DB(cidname/${CALLERID(num)})} instead.\n");
LOCAL_USER_ADD (u);
if (chan->cid.cid_num) {
if (!ast_db_get ("cidname", chan->cid.cid_num, dbname, sizeof (dbname))) {
ast_set_callerid (chan, NULL, dbname, NULL);
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_3 "Changed Caller*ID name to %s\n",
dbname);
}
if (chan->cid.cid_num) {
if (!ast_db_get ("cidname", chan->cid.cid_num, dbname, sizeof (dbname))) {
ast_set_callerid (chan, NULL, dbname, NULL);
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_3 "Changed Caller*ID name to %s\n",
dbname);
}
}
ast_module_user_remove(u);
return 0;
}
LOCAL_USER_REMOVE (u);
return 0;
}
static int unload_module(void)
int
unload_module (void)
{
int res;
res = ast_unregister_application (app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int
load_module (void)
{
return ast_register_application (app, lookupcidname_exec, synopsis, descrip);
return ast_register_application (app, lookupcidname_exec, synopsis,
descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Look up CallerID Name from local database");
char *
description (void)
{
return tdesc;
}
int
usecount (void)
{
int res;
STANDARD_USECOUNT (res);
return res;
}
char *
key ()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -19,22 +19,20 @@
/*! \file
*
* \brief Dial plan macro Implementation
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
@@ -50,6 +48,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
/* special result value used to force macro exit */
#define MACRO_EXIT_RESULT 1024
static char *tdesc = "Extension Macros";
static char *descrip =
" Macro(macroname|arg1|arg2...): Executes a macro using the context\n"
"'macro-<macroname>', jumping to the 's' extension of that context and\n"
@@ -70,8 +70,8 @@ static char *descrip =
" contained within it via sub-engine), and a fixed per-thread\n"
" memory stack allowance, macros are limited to 7 levels\n"
" of nesting (macro calling macro calling macro, etc.); It\n"
" may be possible that stack-intensive applications in deeply nested macros\n"
" could cause asterisk to crash earlier than this limit.\n";
" may be possible that stack-intensive applications in deeply nested\n"
" macros could cause asterisk to crash earlier than this limit.\n";
static char *if_descrip =
" MacroIf(<expr>?macroname_a[|arg1][:macroname_b[|arg1]])\n"
@@ -79,13 +79,6 @@ static char *if_descrip =
"(otherwise <macroname_b> if provided)\n"
"Arguments and return values as in application macro()\n";
static char *exclusive_descrip =
" MacroExclusive(macroname|arg1|arg2...):\n"
"Executes macro defined in the context 'macro-macroname'\n"
"Only one call at a time may run the macro.\n"
"(we'll wait if another call is busy executing in the Macro)\n"
"Arguments and return values as in application Macro()\n";
static char *exit_descrip =
" MacroExit():\n"
"Causes the currently running macro to exit as if it had\n"
@@ -95,38 +88,15 @@ static char *exit_descrip =
static char *app = "Macro";
static char *if_app = "MacroIf";
static char *exclusive_app = "MacroExclusive";
static char *exit_app = "MacroExit";
static char *synopsis = "Macro Implementation";
static char *if_synopsis = "Conditional Macro Implementation";
static char *exclusive_synopsis = "Exclusive Macro Implementation";
static char *exit_synopsis = "Exit From Macro";
static void macro_fixup(void *data, struct ast_channel *old_chan, struct ast_channel *new_chan);
STANDARD_LOCAL_USER;
struct ast_datastore_info macro_ds_info = {
.type = "MACRO",
.chan_fixup = macro_fixup,
};
static void macro_fixup(void *data, struct ast_channel *old_chan, struct ast_channel *new_chan)
{
int i;
char varname[10];
pbx_builtin_setvar_helper(new_chan, "MACRO_DEPTH", "0");
pbx_builtin_setvar_helper(new_chan, "MACRO_CONTEXT", NULL);
pbx_builtin_setvar_helper(new_chan, "MACRO_EXTEN", NULL);
pbx_builtin_setvar_helper(new_chan, "MACRO_PRIORITY", NULL);
pbx_builtin_setvar_helper(new_chan, "MACRO_OFFSET", NULL);
for (i = 1; i < 100; i++) {
snprintf(varname, sizeof(varname), "ARG%d", i);
while (pbx_builtin_getvar_helper(new_chan, varname)) {
/* Kill all levels of arguments */
pbx_builtin_setvar_helper(new_chan, varname, NULL);
}
}
}
LOCAL_USER_DECL;
static struct ast_exten *find_matching_priority(struct ast_context *c, const char *exten, int priority, const char *callerid)
{
@@ -163,9 +133,8 @@ static struct ast_exten *find_matching_priority(struct ast_context *c, const cha
return NULL;
}
static int _macro_exec(struct ast_channel *chan, void *data, int exclusive)
static int macro_exec(struct ast_channel *chan, void *data)
{
const char *s;
char *tmp;
char *cur, *rest;
char *macro;
@@ -179,37 +148,23 @@ static int _macro_exec(struct ast_channel *chan, void *data, int exclusive)
int oldpriority, gosub_level = 0;
char pc[80], depthc[12];
char oldcontext[AST_MAX_CONTEXT] = "";
const char *inhangupc;
char *offsets, *s, *inhangupc;
int offset, depth = 0, maxdepth = 7;
int setmacrocontext=0;
int autoloopflag, inhangup = 0;
int autoloopflag, dead = 0, inhangup = 0;
char *save_macro_exten;
char *save_macro_context;
char *save_macro_priority;
char *save_macro_offset;
struct ast_module_user *u;
struct ast_datastore *macro_store = ast_channel_datastore_find(chan, &macro_ds_info, NULL);
struct localuser *u;
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "Macro() requires arguments. See \"show application macro\" for help.\n");
return -1;
}
u = ast_module_user_add(chan);
do {
if (macro_store) {
break;
}
if (!(macro_store = ast_channel_datastore_alloc(&macro_ds_info, NULL))) {
ast_log(LOG_WARNING, "Unable to allocate new datastore.\n");
break;
}
/* Just the existence of this datastore is enough. */
macro_store->inheritance = DATASTORE_INHERIT_FOREVER;
ast_channel_datastore_add(chan, macro_store);
} while (0);
LOCAL_USER_ADD(u);
/* does the user want a deeper rabbit hole? */
s = pbx_builtin_getvar_helper(chan, "MACRO_RECURSION");
@@ -217,9 +172,13 @@ static int _macro_exec(struct ast_channel *chan, void *data, int exclusive)
sscanf(s, "%d", &maxdepth);
/* Count how many levels deep the rabbit hole goes */
s = pbx_builtin_getvar_helper(chan, "MACRO_DEPTH");
if (s)
sscanf(s, "%d", &depth);
tmp = pbx_builtin_getvar_helper(chan, "MACRO_DEPTH");
if (tmp) {
sscanf(tmp, "%d", &depth);
} else {
depth = 0;
}
/* Used for detecting whether to return when a Macro is called from another Macro after hangup */
if (strcmp(chan->exten, "h") == 0)
pbx_builtin_setvar_helper(chan, "MACRO_IN_HANGUP", "1");
@@ -229,7 +188,7 @@ static int _macro_exec(struct ast_channel *chan, void *data, int exclusive)
if (depth >= maxdepth) {
ast_log(LOG_ERROR, "Macro(): possible infinite loop detected. Returning early.\n");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return 0;
}
snprintf(depthc, sizeof(depthc), "%d", depth + 1);
@@ -240,33 +199,18 @@ static int _macro_exec(struct ast_channel *chan, void *data, int exclusive)
macro = strsep(&rest, "|");
if (ast_strlen_zero(macro)) {
ast_log(LOG_WARNING, "Invalid macro name specified\n");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return 0;
}
snprintf(fullmacro, sizeof(fullmacro), "macro-%s", macro);
if (!ast_exists_extension(chan, fullmacro, "s", 1, chan->cid.cid_num)) {
if (!ast_context_find(fullmacro))
if (!ast_context_find(fullmacro))
ast_log(LOG_WARNING, "No such context '%s' for macro '%s'\n", fullmacro, macro);
else
ast_log(LOG_WARNING, "Context '%s' for macro '%s' lacks 's' extension, priority 1\n", fullmacro, macro);
ast_module_user_remove(u);
ast_log(LOG_WARNING, "Context '%s' for macro '%s' lacks 's' extension, priority 1\n", fullmacro, macro);
LOCAL_USER_REMOVE(u);
return 0;
}
/* If we are to run the macro exclusively, take the mutex */
if (exclusive) {
ast_log(LOG_DEBUG, "Locking macrolock for '%s'\n", fullmacro);
ast_autoservice_start(chan);
if (ast_context_lockmacro(fullmacro)) {
ast_log(LOG_WARNING, "Failed to lock macro '%s' as in-use\n", fullmacro);
ast_autoservice_stop(chan);
ast_module_user_remove(u);
return 0;
}
ast_autoservice_stop(chan);
}
/* Save old info */
oldpriority = chan->priority;
@@ -280,17 +224,25 @@ static int _macro_exec(struct ast_channel *chan, void *data, int exclusive)
}
argc = 1;
/* Save old macro variables */
save_macro_exten = ast_strdup(pbx_builtin_getvar_helper(chan, "MACRO_EXTEN"));
save_macro_exten = pbx_builtin_getvar_helper(chan, "MACRO_EXTEN");
if (save_macro_exten)
save_macro_exten = strdup(save_macro_exten);
pbx_builtin_setvar_helper(chan, "MACRO_EXTEN", oldexten);
save_macro_context = ast_strdup(pbx_builtin_getvar_helper(chan, "MACRO_CONTEXT"));
save_macro_context = pbx_builtin_getvar_helper(chan, "MACRO_CONTEXT");
if (save_macro_context)
save_macro_context = strdup(save_macro_context);
pbx_builtin_setvar_helper(chan, "MACRO_CONTEXT", oldcontext);
save_macro_priority = ast_strdup(pbx_builtin_getvar_helper(chan, "MACRO_PRIORITY"));
save_macro_priority = pbx_builtin_getvar_helper(chan, "MACRO_PRIORITY");
if (save_macro_priority)
save_macro_priority = strdup(save_macro_priority);
snprintf(pc, sizeof(pc), "%d", oldpriority);
pbx_builtin_setvar_helper(chan, "MACRO_PRIORITY", pc);
save_macro_offset = ast_strdup(pbx_builtin_getvar_helper(chan, "MACRO_OFFSET"));
save_macro_offset = pbx_builtin_getvar_helper(chan, "MACRO_OFFSET");
if (save_macro_offset)
save_macro_offset = strdup(save_macro_offset);
pbx_builtin_setvar_helper(chan, "MACRO_OFFSET", NULL);
/* Setup environment for new run */
@@ -300,13 +252,12 @@ static int _macro_exec(struct ast_channel *chan, void *data, int exclusive)
chan->priority = 1;
while((cur = strsep(&rest, "|")) && (argc < MAX_ARGS)) {
const char *s;
/* Save copy of old arguments if we're overwriting some, otherwise
let them pass through to the other macro */
snprintf(varname, sizeof(varname), "ARG%d", argc);
s = pbx_builtin_getvar_helper(chan, varname);
if (s)
oldargs[argc] = ast_strdup(s);
oldargs[argc] = pbx_builtin_getvar_helper(chan, varname);
if (oldargs[argc])
oldargs[argc] = strdup(oldargs[argc]);
pbx_builtin_setvar_helper(chan, varname, cur);
argc++;
}
@@ -319,7 +270,7 @@ static int _macro_exec(struct ast_channel *chan, void *data, int exclusive)
runningdata[0] = '\0';
/* What application will execute? */
if (ast_rdlock_contexts()) {
if (ast_lock_contexts()) {
ast_log(LOG_WARNING, "Failed to lock contexts list\n");
} else {
for (c = ast_walk_contexts(NULL), e = NULL; c; c = ast_walk_contexts(c)) {
@@ -358,14 +309,16 @@ static int _macro_exec(struct ast_channel *chan, void *data, int exclusive)
case AST_PBX_KEEPALIVE:
if (option_debug)
ast_log(LOG_DEBUG, "Spawn extension (%s,%s,%d) exited KEEPALIVE in macro %s on '%s'\n", chan->context, chan->exten, chan->priority, macro, chan->name);
else if (option_verbose > 1)
if (option_verbose > 1)
ast_verbose( VERBOSE_PREFIX_2 "Spawn extension (%s, %s, %d) exited KEEPALIVE in macro '%s' on '%s'\n", chan->context, chan->exten, chan->priority, macro, chan->name);
goto out;
break;
default:
if (option_debug)
ast_log(LOG_DEBUG, "Spawn extension (%s,%s,%d) exited non-zero on '%s' in macro '%s'\n", chan->context, chan->exten, chan->priority, chan->name, macro);
else if (option_verbose > 1)
if (option_verbose > 1)
ast_verbose( VERBOSE_PREFIX_2 "Spawn extension (%s, %s, %d) exited non-zero on '%s' in macro '%s'\n", chan->context, chan->exten, chan->priority, chan->name, macro);
dead = 1;
goto out;
}
}
@@ -440,30 +393,32 @@ static int _macro_exec(struct ast_channel *chan, void *data, int exclusive)
chan->priority++;
}
out:
/* Don't let the channel change now. */
ast_channel_lock(chan);
/* Reset the depth back to what it was when the routine was entered (like if we called Macro recursively) */
snprintf(depthc, sizeof(depthc), "%d", depth);
pbx_builtin_setvar_helper(chan, "MACRO_DEPTH", depthc);
ast_set2_flag(chan, autoloopflag, AST_FLAG_IN_AUTOLOOP);
if (!dead) {
pbx_builtin_setvar_helper(chan, "MACRO_DEPTH", depthc);
ast_set2_flag(chan, autoloopflag, AST_FLAG_IN_AUTOLOOP);
}
for (x = 1; x < argc; x++) {
/* Restore old arguments and delete ours */
snprintf(varname, sizeof(varname), "ARG%d", x);
if (oldargs[x]) {
pbx_builtin_setvar_helper(chan, varname, oldargs[x]);
if (!dead)
pbx_builtin_setvar_helper(chan, varname, oldargs[x]);
free(oldargs[x]);
} else {
} else if (!dead) {
pbx_builtin_setvar_helper(chan, varname, NULL);
}
}
/* Restore macro variables */
pbx_builtin_setvar_helper(chan, "MACRO_EXTEN", save_macro_exten);
pbx_builtin_setvar_helper(chan, "MACRO_CONTEXT", save_macro_context);
pbx_builtin_setvar_helper(chan, "MACRO_PRIORITY", save_macro_priority);
if (!dead) {
pbx_builtin_setvar_helper(chan, "MACRO_EXTEN", save_macro_exten);
pbx_builtin_setvar_helper(chan, "MACRO_CONTEXT", save_macro_context);
pbx_builtin_setvar_helper(chan, "MACRO_PRIORITY", save_macro_priority);
}
if (save_macro_exten)
free(save_macro_exten);
if (save_macro_context)
@@ -471,36 +426,18 @@ static int _macro_exec(struct ast_channel *chan, void *data, int exclusive)
if (save_macro_priority)
free(save_macro_priority);
if (setmacrocontext) {
if (!dead && setmacrocontext) {
chan->macrocontext[0] = '\0';
chan->macroexten[0] = '\0';
chan->macropriority = 0;
}
/*!\note
* This section is used to restore a behavior that we mistakenly
* changed in issue #6176, then mistakenly reverted in #13962 and
* #13363. A corresponding change is made in main/pbx.c, where we
* check this variable for existence, then look for the "h" extension
* in that context.
*/
if (ast_check_hangup(chan) || res < 0) {
/* Don't need to lock the channel, as we aren't dereferencing emc.
* The intent here is to grab the deepest context, without overwriting
* in any above context. */
const char *emc = pbx_builtin_getvar_helper(chan, "EXIT_MACRO_CONTEXT");
if (!emc) {
pbx_builtin_setvar_helper(chan, "EXIT_MACRO_CONTEXT", fullmacro);
}
}
if (!strcasecmp(chan->context, fullmacro)) {
if (!dead && !strcasecmp(chan->context, fullmacro)) {
/* If we're leaving the macro normally, restore original information */
chan->priority = oldpriority;
ast_copy_string(chan->context, oldcontext, sizeof(chan->context));
if (!(chan->_softhangup & AST_SOFTHANGUP_ASYNCGOTO)) {
/* Copy the extension, so long as we're not in softhangup, where we could be given an asyncgoto */
const char *offsets;
ast_copy_string(chan->exten, oldexten, sizeof(chan->exten));
if ((offsets = pbx_builtin_getvar_helper(chan, "MACRO_OFFSET"))) {
/* Handle macro offset if it's set by checking the availability of step n + offset + 1, otherwise continue
@@ -514,45 +451,26 @@ static int _macro_exec(struct ast_channel *chan, void *data, int exclusive)
}
}
pbx_builtin_setvar_helper(chan, "MACRO_OFFSET", save_macro_offset);
if (!dead)
pbx_builtin_setvar_helper(chan, "MACRO_OFFSET", save_macro_offset);
if (save_macro_offset)
free(save_macro_offset);
/* Unlock the macro */
if (exclusive) {
ast_log(LOG_DEBUG, "Unlocking macrolock for '%s'\n", fullmacro);
if (ast_context_unlockmacro(fullmacro)) {
ast_log(LOG_ERROR, "Failed to unlock macro '%s' - that isn't good\n", fullmacro);
res = 0;
}
}
ast_channel_unlock(chan);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return res;
}
static int macro_exec(struct ast_channel *chan, void *data)
{
return _macro_exec(chan, data, 0);
}
static int macroexclusive_exec(struct ast_channel *chan, void *data)
{
return _macro_exec(chan, data, 1);
}
static int macroif_exec(struct ast_channel *chan, void *data)
{
char *expr = NULL, *label_a = NULL, *label_b = NULL;
int res = 0;
struct ast_module_user *u;
struct localuser *u;
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
if (!(expr = ast_strdupa(data))) {
ast_module_user_remove(u);
expr = ast_strdupa(data);
if (!expr) {
ast_log(LOG_ERROR, "Out of Memory!\n");
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -570,7 +488,7 @@ static int macroif_exec(struct ast_channel *chan, void *data)
} else
ast_log(LOG_WARNING, "Invalid Syntax.\n");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return res;
}
@@ -580,30 +498,43 @@ static int macro_exit_exec(struct ast_channel *chan, void *data)
return MACRO_EXIT_RESULT;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(if_app);
res |= ast_unregister_application(exit_app);
res |= ast_unregister_application(app);
res |= ast_unregister_application(exclusive_app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
int res;
res = ast_register_application(exit_app, macro_exit_exec, exit_synopsis, exit_descrip);
res |= ast_register_application(if_app, macroif_exec, if_synopsis, if_descrip);
res |= ast_register_application(exclusive_app, macroexclusive_exec, exclusive_synopsis, exclusive_descrip);
res |= ast_register_application(app, macro_exec, synopsis, descrip);
return res;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Extension Macros");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

298
apps/app_math.c Normal file
View File

@@ -0,0 +1,298 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 2004 - 2005, Andy Powell
*
* Updated by Mark Spencer <markster@digium.com>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
*/
/*! \file
*
* \brief A simple math application
*
* \ingroup applications
*/
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <time.h>
#include <dirent.h>
#include <ctype.h>
#include <sys/file.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#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/say.h"
#include "asterisk/module.h"
#include "asterisk/app.h"
#include "asterisk/manager.h"
#include "asterisk/localtime.h"
#include "asterisk/cli.h"
#include "asterisk/utils.h"
#include "asterisk/module.h"
#include "asterisk/translate.h"
static char *tdesc = "Basic Math Functions";
static char *app_math = "Math";
static char *math_synopsis = "Performs Mathematical Functions";
static char *math_descrip =
"Math(returnvar,<number1><op><number 2>\n\n"
"Perform floating point calculation on number 1 to number 2 and \n"
"store the result in returnvar. Valid ops are: \n"
" +,-,/,*,%,<,>,>=,<=,==\n"
"and behave as their C equivalents.\n"
" This application has been deprecated in favor of the MATH function.\n";
#define ADDFUNCTION 0
#define DIVIDEFUNCTION 1
#define MULTIPLYFUNCTION 2
#define SUBTRACTFUNCTION 3
#define MODULUSFUNCTION 4
#define GTFUNCTION 5
#define LTFUNCTION 6
#define GTEFUNCTION 7
#define LTEFUNCTION 8
#define EQFUNCTION 9
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int math_exec(struct ast_channel *chan, void *data)
{
float fnum1;
float fnum2;
float ftmp = 0;
char *op;
int iaction=-1;
static int deprecation_warning = 0;
/* dunno, big calulations :D */
char user_result[30];
char *s;
char *mvar, *mvalue1, *mvalue2=NULL;
struct localuser *u;
if (!deprecation_warning) {
ast_log(LOG_WARNING, "Math() is deprecated, please use Set(var=${MATH(...)} instead.\n");
deprecation_warning = 1;
}
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "No parameters passed. !\n");
return -1;
}
LOCAL_USER_ADD(u);
s = ast_strdupa(data);
if (!s) {
ast_log(LOG_ERROR, "Out of memory\n");
LOCAL_USER_REMOVE(u);
return -1;
}
mvar = strsep(&s, "|");
mvalue1 = strsep(&s, "|");
if ((op = strchr(mvalue1, '+'))) {
iaction = ADDFUNCTION;
*op = '\0';
} else if ((op = strchr(mvalue1, '-'))) {
iaction = SUBTRACTFUNCTION;
*op = '\0';
} else if ((op = strchr(mvalue1, '*'))) {
iaction = MULTIPLYFUNCTION;
*op = '\0';
} else if ((op = strchr(mvalue1, '/'))) {
iaction = DIVIDEFUNCTION;
*op = '\0';
} else if ((op = strchr(mvalue1, '>'))) {
iaction = GTFUNCTION;
*op = '\0';
if (*(op+1) == '=') {
op++;
*op = '\0';
iaction = GTEFUNCTION;
}
} else if ((op = strchr(mvalue1, '<'))) {
iaction = LTFUNCTION;
*op = '\0';
if (*(op+1) == '=') {
op++;
*op = '\0';
iaction = LTEFUNCTION;
}
} else if ((op = strchr(mvalue1, '='))) {
iaction = GTFUNCTION;
*op = '\0';
if (*(op+1) == '=') {
op++;
*op = '\0';
iaction = EQFUNCTION;
} else
op = NULL;
}
if (op)
mvalue2 = op + 1;
if (!mvar || !mvalue1 || !mvalue2) {
ast_log(LOG_WARNING, "Supply all the parameters - just this once, please\n");
LOCAL_USER_REMOVE(u);
return -1;
}
if (!strcmp(mvar,"")) {
ast_log(LOG_WARNING, "No return variable set.\n");
LOCAL_USER_REMOVE(u);
return -1;
}
if (sscanf(mvalue1, "%f", &fnum1) != 1) {
ast_log(LOG_WARNING, "'%s' is not a valid number\n", mvalue1);
LOCAL_USER_REMOVE(u);
return -1;
}
if (sscanf(mvalue2, "%f", &fnum2) != 1) {
ast_log(LOG_WARNING, "'%s' is not a valid number\n", mvalue2);
LOCAL_USER_REMOVE(u);
return -1;
}
switch (iaction) {
case ADDFUNCTION :
ftmp = fnum1 + fnum2;
break;
case DIVIDEFUNCTION :
if (fnum2 <=0)
ftmp = 0; /* can't do a divide by 0 */
else
ftmp = (fnum1 / fnum2);
break;
case MULTIPLYFUNCTION :
ftmp = (fnum1 * fnum2);
break;
case SUBTRACTFUNCTION :
ftmp = (fnum1 - fnum2);
break;
case MODULUSFUNCTION : {
int inum1 = fnum1;
int inum2 = fnum2;
ftmp = (inum1 % inum2);
break;
}
case GTFUNCTION :
if (fnum1 > fnum2)
strcpy(user_result, "TRUE");
else
strcpy(user_result, "FALSE");
break;
case LTFUNCTION :
if (fnum1 < fnum2)
strcpy(user_result, "TRUE");
else
strcpy(user_result, "FALSE");
break;
case GTEFUNCTION :
if (fnum1 >= fnum2)
strcpy(user_result, "TRUE");
else
strcpy(user_result, "FALSE");
break;
case LTEFUNCTION :
if (fnum1 <= fnum2)
strcpy(user_result, "TRUE");
else
strcpy(user_result, "FALSE");
break;
case EQFUNCTION :
if (fnum1 == fnum2)
strcpy(user_result, "TRUE");
else
strcpy(user_result, "FALSE");
break;
default :
ast_log(LOG_WARNING, "Something happened that neither of us should be proud of %d\n", iaction);
LOCAL_USER_REMOVE(u);
return -1;
}
if (iaction < GTFUNCTION || iaction > EQFUNCTION)
snprintf(user_result,sizeof(user_result),"%f",ftmp);
pbx_builtin_setvar_helper(chan, mvar, user_result);
LOCAL_USER_REMOVE(u);
return 0;
}
int unload_module(void)
{
int res;
res = ast_unregister_application(app_math);
STANDARD_HANGUP_LOCALUSERS;
return res;
}
int load_module(void)
{
return ast_register_application(app_math, math_exec, math_synopsis, math_descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
/* Fading everything to black and blue... */

205
apps/app_md5.c Normal file
View File

@@ -0,0 +1,205 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 2005, Olle E. Johansson, Edvina.net
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
*/
/*! \file
*
* \brief MD5 checksum application
*
* \todo Remove this deprecated application in 1.3dev
* \ingroup applications
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/utils.h"
#include "asterisk/options.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/lock.h"
#include "asterisk/app.h"
static char *tdesc_md5 = "MD5 checksum applications";
static char *app_md5 = "MD5";
static char *desc_md5 = "Calculate MD5 checksum";
static char *synopsis_md5 =
" MD5(<var>=<string>): Calculates a MD5 checksum on <string>.\n"
"Returns hash value in a channel variable. \n";
static char *app_md5check = "MD5Check";
static char *desc_md5check = "Check MD5 checksum";
static char *synopsis_md5check =
" MD5Check(<md5hash>|<string>[|options]): Calculates a MD5 checksum on <string>\n"
"and compares it with the hash. Returns 0 if <md5hash> is correct for <string>.\n"
"The option string may contain zero or more of the following characters:\n"
" 'j' -- jump to priority n+101 if the hash and string do not match \n"
"This application sets the following channel variable upon completion:\n"
" CHECKMD5STATUS The status of the MD5 check, one of the following\n"
" MATCH | NOMATCH\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
/*--- md5_exec: Calculate MD5 checksum (hash) on given string and
return it in channel variable ---*/
static int md5_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct localuser *u;
char *varname= NULL; /* Variable to set */
char *string = NULL; /* String to calculate on */
char retvar[50]; /* Return value */
static int dep_warning = 0;
if (!dep_warning) {
ast_log(LOG_WARNING, "This application has been deprecated, please use the MD5 function instead.\n");
dep_warning = 1;
}
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "Syntax: md5(<varname>=<string>) - missing argument!\n");
return -1;
}
LOCAL_USER_ADD(u);
memset(retvar,0, sizeof(retvar));
string = ast_strdupa(data);
varname = strsep(&string,"=");
if (ast_strlen_zero(varname)) {
ast_log(LOG_WARNING, "Syntax: md5(<varname>=<string>) - missing argument!\n");
LOCAL_USER_REMOVE(u);
return -1;
}
ast_md5_hash(retvar, string);
pbx_builtin_setvar_helper(chan, varname, retvar);
LOCAL_USER_REMOVE(u);
return res;
}
/*--- md5check_exec: Calculate MD5 checksum and compare it with
existing checksum. ---*/
static int md5check_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct localuser *u;
char *string = NULL; /* String to calculate on */
char newhash[50]; /* Return value */
static int dep_warning = 0;
int priority_jump = 0;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(md5hash);
AST_APP_ARG(string);
AST_APP_ARG(options);
);
if (!dep_warning) {
ast_log(LOG_WARNING, "This application has been deprecated, please use the CHECK_MD5 function instead.\n");
dep_warning = 1;
}
LOCAL_USER_ADD(u);
if (!(string = ast_strdupa(data))) {
ast_log(LOG_WARNING, "Memory Error!\n");
LOCAL_USER_REMOVE(u);
return -1;
}
AST_STANDARD_APP_ARGS(args, string);
if (args.options) {
if (strchr(args.options, 'j'))
priority_jump = 1;
}
if (ast_strlen_zero(args.md5hash) || ast_strlen_zero(args.string)) {
ast_log(LOG_WARNING, "Syntax: MD5Check(<md5hash>|<string>[|options]) - missing argument!\n");
LOCAL_USER_REMOVE(u);
return -1;
}
memset(newhash,0, sizeof(newhash));
ast_md5_hash(newhash, args.string);
if (!strcmp(newhash, args.md5hash)) { /* Verification ok */
if (option_debug > 2)
ast_log(LOG_DEBUG, "MD5 verified ok: %s -- %s\n", args.md5hash, args.string);
pbx_builtin_setvar_helper(chan, "CHECKMD5STATUS", "MATCH");
LOCAL_USER_REMOVE(u);
return 0;
}
if (option_debug > 2)
ast_log(LOG_DEBUG, "ERROR: MD5 not verified: %s -- %s\n", args.md5hash, args.string);
pbx_builtin_setvar_helper(chan, "CHECKMD5STATUS", "NOMATCH");
if (priority_jump || option_priority_jumping) {
if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101))
if (option_debug > 2)
ast_log(LOG_DEBUG, "Can't jump to exten+101 (e%s,p%d), sorry\n", chan->exten,chan->priority+101);
}
LOCAL_USER_REMOVE(u);
return res;
}
int unload_module(void)
{
int res;
res = ast_unregister_application(app_md5);
res |= ast_unregister_application(app_md5check);
STANDARD_HANGUP_LOCALUSERS;
return res;
}
int load_module(void)
{
int res;
res = ast_register_application(app_md5check, md5check_exec, desc_md5check, synopsis_md5check);
res |= ast_register_application(app_md5, md5_exec, desc_md5, synopsis_md5);
return res;
}
char *description(void)
{
return tdesc_md5;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

File diff suppressed because it is too large Load Diff

View File

@@ -19,51 +19,49 @@
/*! \file
*
* \brief Digital Milliwatt Test
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
/*** MODULEINFO
<depend>res_indications</depend>
***/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#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/utils.h"
static char *tdesc = "Digital Milliwatt (mu-law) Test Application";
static char *app = "Milliwatt";
static char *synopsis = "Generate a Constant 1004Hz tone at 0dbm (mu-law)";
static char *synopsis = "Generate a Constant 1000Hz tone at 0dbm (mu-law)";
static char *descrip =
" Milliwatt([options]): Generate a Constant 1004Hz tone at 0dbm.\n"
"Previous versions of this application generated the tone at 1000Hz. If for\n"
"some reason you would prefer that behavior, supply the 'o' option to get the\n"
"old behavior.\n"
"";
"Milliwatt(): Generate a Constant 1000Hz tone at 0dbm (mu-law)\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static char digital_milliwatt[] = {0x1e,0x0b,0x0b,0x1e,0x9e,0x8b,0x8b,0x9e} ;
static void *milliwatt_alloc(struct ast_channel *chan, void *params)
{
return ast_calloc(1, sizeof(int));
int *indexp;
indexp = malloc(sizeof(int));
if (indexp == NULL) return(NULL);
*indexp = 0;
return(indexp);
}
static void milliwatt_release(struct ast_channel *chan, void *data)
@@ -74,121 +72,99 @@ static void milliwatt_release(struct ast_channel *chan, void *data)
static int milliwatt_generate(struct ast_channel *chan, void *data, int len, int samples)
{
struct ast_frame wf;
unsigned char buf[AST_FRIENDLY_OFFSET + 640];
const int maxsamples = sizeof (buf) / sizeof (buf[0]);
int i, *indexp = (int *) data;
struct ast_frame wf = {
.frametype = AST_FRAME_VOICE,
.subclass = AST_FORMAT_ULAW,
.offset = AST_FRIENDLY_OFFSET,
.data = buf + AST_FRIENDLY_OFFSET,
.src = __FUNCTION__,
};
int i,*indexp = (int *) data;
/* Instead of len, use samples, because channel.c generator_force
* generate(chan, tmp, 0, 160) ignores len. In any case, len is
* a multiple of samples, given by number of samples times bytes per
* sample. In the case of ulaw, len = samples. for signed linear
* len = 2 * samples */
if (samples > maxsamples) {
ast_log(LOG_WARNING, "Only doing %d samples (%d requested)\n", maxsamples, samples);
samples = maxsamples;
if (len + AST_FRIENDLY_OFFSET > sizeof(buf))
{
ast_log(LOG_WARNING,"Only doing %d bytes (%d bytes requested)\n",(int)(sizeof(buf) - AST_FRIENDLY_OFFSET),len);
len = sizeof(buf) - AST_FRIENDLY_OFFSET;
}
len = samples * sizeof (buf[0]);
wf.frametype = AST_FRAME_VOICE;
wf.subclass = AST_FORMAT_ULAW;
wf.offset = AST_FRIENDLY_OFFSET;
wf.mallocd = 0;
wf.data = buf + AST_FRIENDLY_OFFSET;
wf.datalen = len;
wf.samples = samples;
wf.samples = wf.datalen;
wf.src = "app_milliwatt";
wf.delivery.tv_sec = 0;
wf.delivery.tv_usec = 0;
wf.prev = wf.next = NULL;
/* create a buffer containing the digital milliwatt pattern */
for (i = 0; i < len; i++) {
for(i = 0; i < len; i++)
{
buf[AST_FRIENDLY_OFFSET + i] = digital_milliwatt[(*indexp)++];
*indexp &= 7;
}
if (ast_write(chan,&wf) < 0) {
if (ast_write(chan,&wf) < 0)
{
ast_log(LOG_WARNING,"Failed to write frame to '%s': %s\n",chan->name,strerror(errno));
return -1;
}
return 0;
}
static struct ast_generator milliwattgen = {
static struct ast_generator milliwattgen =
{
alloc: milliwatt_alloc,
release: milliwatt_release,
generate: milliwatt_generate,
};
static int old_milliwatt_exec(struct ast_channel *chan)
{
ast_set_write_format(chan, AST_FORMAT_ULAW);
ast_set_read_format(chan, AST_FORMAT_ULAW);
if (chan->_state != AST_STATE_UP) {
ast_answer(chan);
}
if (ast_activate_generator(chan,&milliwattgen,"milliwatt") < 0) {
ast_log(LOG_WARNING,"Failed to activate generator on '%s'\n",chan->name);
return -1;
}
while (!ast_safe_sleep(chan, 10000))
;
ast_deactivate_generator(chan);
return -1;
}
} ;
static int milliwatt_exec(struct ast_channel *chan, void *data)
{
const char *options = data;
struct ast_app *playtones_app;
struct ast_module_user *u;
int res = -1;
u = ast_module_user_add(chan);
if (!ast_strlen_zero(options) && strchr(options, 'o')) {
res = old_milliwatt_exec(chan);
goto exit_app;
struct localuser *u;
LOCAL_USER_ADD(u);
ast_set_write_format(chan, AST_FORMAT_ULAW);
ast_set_read_format(chan, AST_FORMAT_ULAW);
if (chan->_state != AST_STATE_UP)
{
ast_answer(chan);
}
if (!(playtones_app = pbx_findapp("Playtones"))) {
ast_log(LOG_ERROR, "The Playtones application is required to run Milliwatt()\n");
goto exit_app;
if (ast_activate_generator(chan,&milliwattgen,"milliwatt") < 0)
{
ast_log(LOG_WARNING,"Failed to activate generator on '%s'\n",chan->name);
LOCAL_USER_REMOVE(u);
return -1;
}
res = pbx_exec(chan, playtones_app, "1004/1000");
while (!res) {
res = ast_safe_sleep(chan, 10000);
}
res = 0;
exit_app:
ast_module_user_remove(u);
return res;
while(!ast_safe_sleep(chan, 10000));
ast_deactivate_generator(chan);
LOCAL_USER_REMOVE(u);
return -1;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
return ast_register_application(app, milliwatt_exec, synopsis, descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Digital Milliwatt (mu-law) Test Application");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -2,7 +2,7 @@
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 2005, Anthony Minessale II
* Copyright (C) 2005 - 2006, Digium, Inc.
* Copyright (C) 2005, Digium, Inc.
*
* Mark Spencer <markster@digium.com>
* Kevin P. Fleming <kpfleming@digium.com>
@@ -22,30 +22,23 @@
*/
/*! \file
*
* \brief MixMonitor() - Record a call and mix the audio during the recording
* \ingroup applications
*
* \author Mark Spencer <markster@digium.com>
* \author Kevin P. Fleming <kpfleming@digium.com>
*
* \note Based on app_muxmon.c provided by
* Anthony Minessale II <anthmct@yahoo.com>
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
#include "asterisk/audiohook.h"
#include "asterisk/chanspy.h"
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/lock.h"
@@ -53,10 +46,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/options.h"
#include "asterisk/app.h"
#include "asterisk/linkedlists.h"
#include "asterisk/utils.h"
#define get_volfactor(x) x ? ((x > 0) ? (1 << x) : ((1 << abs(x)) * -1)) : 0
static const char *tdesc = "Mixed Audio Monitoring Application";
static const char *app = "MixMonitor";
static const char *synopsis = "Record a call and mix the audio during the recording";
static const char *desc = ""
@@ -80,25 +73,18 @@ static const char *desc = ""
"The variable MIXMONITOR_FILENAME will contain the filename used to record.\n"
"";
static const char *stop_app = "StopMixMonitor";
static const char *stop_synopsis = "Stop recording a call through MixMonitor";
static const char *stop_desc = ""
" StopMixMonitor()\n\n"
"Stops the audio recording that was started with a call to MixMonitor()\n"
"on the current channel.\n"
"";
STANDARD_LOCAL_USER;
struct module_symbols *me;
LOCAL_USER_DECL;
static const char *mixmonitor_spy_type = "MixMonitor";
struct mixmonitor {
struct ast_audiohook audiohook;
struct ast_channel_spy spy;
char *filename;
char *post_process;
char *name;
unsigned int flags;
struct mixmonitor_ds *mixmonitor_ds;
};
enum {
@@ -124,51 +110,7 @@ AST_APP_OPTIONS(mixmonitor_opts, {
AST_APP_OPTION_ARG('W', MUXFLAG_VOLUME, OPT_ARG_VOLUME),
});
/* This structure is used as a means of making sure that our pointer to
* the channel we are monitoring remains valid. This is very similar to
* what is used in app_chanspy.c.
*/
struct mixmonitor_ds {
struct ast_channel *chan;
/* These condition variables are used to be sure that the channel
* hangup code completes before the mixmonitor thread attempts to
* free this structure. The combination of a bookean flag and a
* ast_cond_t ensure that no matter what order the threads run in,
* we are guaranteed to never have the waiting thread block forever
* in the case that the signaling thread runs first.
*/
unsigned int destruction_ok;
ast_cond_t destruction_condition;
ast_mutex_t lock;
};
static void mixmonitor_ds_destroy(void *data)
{
struct mixmonitor_ds *mixmonitor_ds = data;
ast_mutex_lock(&mixmonitor_ds->lock);
mixmonitor_ds->chan = NULL;
mixmonitor_ds->destruction_ok = 1;
ast_cond_signal(&mixmonitor_ds->destruction_condition);
ast_mutex_unlock(&mixmonitor_ds->lock);
}
static void mixmonitor_ds_chan_fixup(void *data, struct ast_channel *old_chan, struct ast_channel *new_chan)
{
struct mixmonitor_ds *mixmonitor_ds = data;
ast_mutex_lock(&mixmonitor_ds->lock);
mixmonitor_ds->chan = new_chan;
ast_mutex_unlock(&mixmonitor_ds->lock);
}
static struct ast_datastore_info mixmonitor_ds_info = {
.type = "mixmonitor",
.destroy = mixmonitor_ds_destroy,
.chan_fixup = mixmonitor_ds_chan_fixup,
};
static int startmon(struct ast_channel *chan, struct ast_audiohook *audiohook)
static int startmon(struct ast_channel *chan, struct ast_channel_spy *spy)
{
struct ast_channel *peer;
int res;
@@ -176,7 +118,9 @@ static int startmon(struct ast_channel *chan, struct ast_audiohook *audiohook)
if (!chan)
return -1;
res = ast_audiohook_attach(chan, audiohook);
ast_mutex_lock(&chan->lock);
res = ast_channel_spy_add(chan, spy);
ast_mutex_unlock(&chan->lock);
if (!res && ast_test_flag(chan, AST_FLAG_NBRIDGE) && (peer = ast_bridged_channel(chan)))
ast_softhangup(peer, AST_SOFTHANGUP_UNBRIDGE);
@@ -189,115 +133,90 @@ static int startmon(struct ast_channel *chan, struct ast_audiohook *audiohook)
static void *mixmonitor_thread(void *obj)
{
struct mixmonitor *mixmonitor = obj;
struct ast_frame *f = NULL;
struct ast_filestream *fs = NULL;
unsigned int oflags;
char *ext;
int errflag = 0;
STANDARD_INCREMENT_USECOUNT;
if (option_verbose > 1)
ast_verbose(VERBOSE_PREFIX_2 "Begin MixMonitor Recording %s\n", mixmonitor->name);
ast_audiohook_lock(&mixmonitor->audiohook);
ast_mutex_lock(&mixmonitor->spy.lock);
while (mixmonitor->audiohook.status == AST_AUDIOHOOK_STATUS_RUNNING) {
struct ast_frame *fr = NULL;
while (mixmonitor->spy.chan) {
struct ast_frame *next;
int write;
ast_channel_spy_trigger_wait(&mixmonitor->spy);
ast_audiohook_trigger_wait(&mixmonitor->audiohook);
if (mixmonitor->audiohook.status != AST_AUDIOHOOK_STATUS_RUNNING)
if (!mixmonitor->spy.chan || mixmonitor->spy.status != CHANSPY_RUNNING)
break;
if (!(fr = ast_audiohook_read_frame(&mixmonitor->audiohook, SAMPLES_PER_FRAME, AST_AUDIOHOOK_DIRECTION_BOTH, AST_FORMAT_SLINEAR)))
continue;
while (1) {
if (!(f = ast_channel_spy_read_frame(&mixmonitor->spy, SAMPLES_PER_FRAME)))
break;
ast_mutex_lock(&mixmonitor->mixmonitor_ds->lock);
if (!ast_test_flag(mixmonitor, MUXFLAG_BRIDGED) || (mixmonitor->mixmonitor_ds->chan && ast_bridged_channel(mixmonitor->mixmonitor_ds->chan))) {
ast_mutex_unlock(&mixmonitor->mixmonitor_ds->lock);
/* Initialize the file if not already done so */
if (!fs && !errflag) {
oflags = O_CREAT | O_WRONLY;
oflags |= ast_test_flag(mixmonitor, MUXFLAG_APPEND) ? O_APPEND : O_TRUNC;
if ((ext = strrchr(mixmonitor->filename, '.')))
*(ext++) = '\0';
else
ext = "raw";
if (!(fs = ast_writefile(mixmonitor->filename, ext, NULL, oflags, 0, 0644))) {
ast_log(LOG_ERROR, "Cannot open %s.%s\n", mixmonitor->filename, ext);
errflag = 1;
write = (!ast_test_flag(mixmonitor, MUXFLAG_BRIDGED) ||
ast_bridged_channel(mixmonitor->spy.chan));
/* it is possible for ast_channel_spy_read_frame() to return a chain
of frames if a queue flush was necessary, so process them
*/
for (; f; f = next) {
next = f->next;
if (write && errflag == 0) {
if (!fs) {
/* Determine creation flags and filename plus extension for filestream */
oflags = O_CREAT | O_WRONLY;
oflags |= ast_test_flag(mixmonitor, MUXFLAG_APPEND) ? O_APPEND : O_TRUNC;
if ((ext = strrchr(mixmonitor->filename, '.')))
*(ext++) = '\0';
else
ext = "raw";
/* Move onto actually creating the filestream */
if (!(fs = ast_writefile(mixmonitor->filename, ext, NULL, oflags, 0, 0644))) {
ast_log(LOG_ERROR, "Cannot open %s.%s\n", mixmonitor->filename, ext);
errflag = 1;
}
}
if (fs)
ast_writestream(fs, f);
}
ast_frfree(f);
}
/* Write out the frame */
if (fs)
ast_writestream(fs, fr);
} else {
ast_mutex_unlock(&mixmonitor->mixmonitor_ds->lock);
}
/* All done! free it. */
ast_frame_free(fr, 0);
}
ast_audiohook_detach(&mixmonitor->audiohook);
ast_audiohook_unlock(&mixmonitor->audiohook);
ast_audiohook_destroy(&mixmonitor->audiohook);
ast_mutex_unlock(&mixmonitor->spy.lock);
ast_channel_spy_free(&mixmonitor->spy);
if (option_verbose > 1)
ast_verbose(VERBOSE_PREFIX_2 "End MixMonitor Recording %s\n", mixmonitor->name);
if (fs)
ast_closestream(fs);
if (mixmonitor->post_process) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_2 "Executing [%s]\n", mixmonitor->post_process);
ast_safe_system(mixmonitor->post_process);
}
if (fs)
ast_closestream(fs);
ast_mutex_lock(&mixmonitor->mixmonitor_ds->lock);
if (!mixmonitor->mixmonitor_ds->destruction_ok) {
ast_cond_wait(&mixmonitor->mixmonitor_ds->destruction_condition, &mixmonitor->mixmonitor_ds->lock);
}
ast_mutex_unlock(&mixmonitor->mixmonitor_ds->lock);
ast_mutex_destroy(&mixmonitor->mixmonitor_ds->lock);
ast_cond_destroy(&mixmonitor->mixmonitor_ds->destruction_condition);
ast_free(mixmonitor->mixmonitor_ds);
free(mixmonitor);
STANDARD_DECREMENT_USECOUNT;
return NULL;
}
static int setup_mixmonitor_ds(struct mixmonitor *mixmonitor, struct ast_channel *chan)
{
struct ast_datastore *datastore = NULL;
struct mixmonitor_ds *mixmonitor_ds;
if (!(mixmonitor_ds = ast_calloc(1, sizeof(*mixmonitor_ds)))) {
return -1;
}
ast_mutex_init(&mixmonitor_ds->lock);
ast_cond_init(&mixmonitor_ds->destruction_condition, NULL);
if (!(datastore = ast_channel_datastore_alloc(&mixmonitor_ds_info, NULL))) {
ast_free(mixmonitor_ds);
return -1;
}
/* No need to lock mixmonitor_ds since this is still operating in the channel's thread */
mixmonitor_ds->chan = chan;
datastore->data = mixmonitor_ds;
ast_channel_lock(chan);
ast_channel_datastore_add(chan, datastore);
ast_channel_unlock(chan);
mixmonitor->mixmonitor_ds = mixmonitor_ds;
return 0;
}
static void launch_monitor_thread(struct ast_channel *chan, const char *filename, unsigned int flags,
int readvol, int writevol, const char *post_process)
{
@@ -327,14 +246,12 @@ static void launch_monitor_thread(struct ast_channel *chan, const char *filename
/* Pre-allocate mixmonitor structure and spy */
if (!(mixmonitor = calloc(1, len))) {
ast_log(LOG_ERROR, "Memory Error!\n");
return;
}
/* Copy over flags and channel name */
mixmonitor->flags = flags;
if (setup_mixmonitor_ds(mixmonitor, chan)) {
return;
}
mixmonitor->name = (char *) mixmonitor + sizeof(*mixmonitor);
strcpy(mixmonitor->name, chan->name);
if (!ast_strlen_zero(postprocess2)) {
@@ -346,37 +263,42 @@ static void launch_monitor_thread(struct ast_channel *chan, const char *filename
strcpy(mixmonitor->filename, filename);
/* Setup the actual spy before creating our thread */
if (ast_audiohook_init(&mixmonitor->audiohook, AST_AUDIOHOOK_TYPE_SPY, mixmonitor_spy_type)) {
free(mixmonitor);
return;
ast_set_flag(&mixmonitor->spy, CHANSPY_FORMAT_AUDIO);
ast_set_flag(&mixmonitor->spy, CHANSPY_MIXAUDIO);
mixmonitor->spy.type = mixmonitor_spy_type;
mixmonitor->spy.status = CHANSPY_RUNNING;
mixmonitor->spy.read_queue.format = AST_FORMAT_SLINEAR;
mixmonitor->spy.write_queue.format = AST_FORMAT_SLINEAR;
if (readvol) {
ast_set_flag(&mixmonitor->spy, CHANSPY_READ_VOLADJUST);
mixmonitor->spy.read_vol_adjustment = readvol;
}
ast_set_flag(&mixmonitor->audiohook, AST_AUDIOHOOK_TRIGGER_SYNC);
if (readvol)
mixmonitor->audiohook.options.read_volume = readvol;
if (writevol)
mixmonitor->audiohook.options.write_volume = writevol;
if (writevol) {
ast_set_flag(&mixmonitor->spy, CHANSPY_WRITE_VOLADJUST);
mixmonitor->spy.write_vol_adjustment = writevol;
}
ast_mutex_init(&mixmonitor->spy.lock);
if (startmon(chan, &mixmonitor->audiohook)) {
if (startmon(chan, &mixmonitor->spy)) {
ast_log(LOG_WARNING, "Unable to add '%s' spy to channel '%s'\n",
mixmonitor_spy_type, chan->name);
mixmonitor->spy.type, chan->name);
/* Since we couldn't add ourselves - bail out! */
ast_audiohook_destroy(&mixmonitor->audiohook);
ast_mutex_destroy(&mixmonitor->spy.lock);
free(mixmonitor);
return;
}
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
ast_pthread_create_background(&thread, &attr, mixmonitor_thread, mixmonitor);
ast_pthread_create(&thread, &attr, mixmonitor_thread, mixmonitor);
pthread_attr_destroy(&attr);
}
static int mixmonitor_exec(struct ast_channel *chan, void *data)
{
int x, readvol = 0, writevol = 0;
struct ast_module_user *u;
struct localuser *u;
struct ast_flags flags = {0};
char *parse;
AST_DECLARE_APP_ARGS(args,
@@ -390,15 +312,19 @@ static int mixmonitor_exec(struct ast_channel *chan, void *data)
return -1;
}
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
parse = ast_strdupa(data);
if (!(parse = ast_strdupa(data))) {
ast_log(LOG_WARNING, "Memory Error!\n");
LOCAL_USER_REMOVE(u);
return -1;
}
AST_STANDARD_APP_ARGS(args, parse);
if (ast_strlen_zero(args.filename)) {
ast_log(LOG_WARNING, "MixMonitor requires an argument (filename)\n");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -450,20 +376,7 @@ static int mixmonitor_exec(struct ast_channel *chan, void *data)
pbx_builtin_setvar_helper(chan, "MIXMONITOR_FILENAME", args.filename);
launch_monitor_thread(chan, args.filename, flags.flags, readvol, writevol, args.post_process);
ast_module_user_remove(u);
return 0;
}
static int stop_mixmonitor_exec(struct ast_channel *chan, void *data)
{
struct ast_module_user *u;
u = ast_module_user_add(chan);
ast_audiohook_detach_source(chan, mixmonitor_spy_type);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return 0;
}
@@ -483,49 +396,59 @@ static int mixmonitor_cli(int fd, int argc, char **argv)
if (!strcasecmp(argv[1], "start"))
mixmonitor_exec(chan, argv[3]);
else if (!strcasecmp(argv[1], "stop"))
ast_audiohook_detach_source(chan, mixmonitor_spy_type);
ast_channel_spy_stop_by_type(chan, mixmonitor_spy_type);
ast_channel_unlock(chan);
ast_mutex_unlock(&chan->lock);
return RESULT_SUCCESS;
}
static char *complete_mixmonitor_cli(const char *line, const char *word, int pos, int state)
{
return ast_complete_channels(line, word, pos, state, 2);
}
static struct ast_cli_entry cli_mixmonitor[] = {
{ { "mixmonitor", NULL, NULL },
mixmonitor_cli, "Execute a MixMonitor command.",
"mixmonitor <start|stop> <chan_name> [args]\n\n"
"The optional arguments are passed to the\n"
"MixMonitor application when the 'start' command is used.\n",
complete_mixmonitor_cli },
static struct ast_cli_entry cli_mixmonitor = {
{ "mixmonitor", NULL, NULL },
mixmonitor_cli,
"Execute a MixMonitor command",
"mixmonitor <start|stop> <chan_name> [<args>]\n"
};
static int unload_module(void)
int unload_module(void)
{
int res;
ast_cli_unregister_multiple(cli_mixmonitor, sizeof(cli_mixmonitor) / sizeof(struct ast_cli_entry));
res = ast_unregister_application(stop_app);
res = ast_cli_unregister(&cli_mixmonitor);
res |= ast_unregister_application(app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
int res;
ast_cli_register_multiple(cli_mixmonitor, sizeof(cli_mixmonitor) / sizeof(struct ast_cli_entry));
res = ast_register_application(app, mixmonitor_exec, synopsis, desc);
res |= ast_register_application(stop_app, stop_mixmonitor_exec, stop_synopsis, stop_desc);
res = ast_cli_register(&cli_mixmonitor);
res |= ast_register_application(app, mixmonitor_exec, synopsis, desc);
return res;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Mixed Audio Monitoring Application");
char *description(void)
{
return (char *) tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -1,179 +0,0 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (c) 2006, Tilghman Lesher. All rights reserved.
*
* Tilghman Lesher <app_morsecode__v001@the-tilghman.com>
*
* This code is released by the author with no restrictions on usage.
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
*/
/*! \file
*
* \brief Morsecode application
*
* \author Tilghman Lesher <app_morsecode__v001@the-tilghman.com>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#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/indications.h"
static char *app_morsecode = "Morsecode";
static char *morsecode_synopsis = "Plays morse code";
static char *morsecode_descrip =
"Usage: Morsecode(<string>)\n"
"Plays the Morse code equivalent of the passed string. If the variable\n"
"MORSEDITLEN is set, it will use that value for the length (in ms) of the dit\n"
"(defaults to 80). Additionally, if MORSETONE is set, it will use that tone\n"
"(in Hz). The tone default is 800.\n";
static char *morsecode[] = {
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", /* 0-15 */
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", /* 16-31 */
" ", /* 32 - <space> */
".-.-.-", /* 33 - ! */
".-..-.", /* 34 - " */
"", /* 35 - # */
"", /* 36 - $ */
"", /* 37 - % */
"", /* 38 - & */
".----.", /* 39 - ' */
"-.--.-", /* 40 - ( */
"-.--.-", /* 41 - ) */
"", /* 42 - * */
"", /* 43 - + */
"--..--", /* 44 - , */
"-....-", /* 45 - - */
".-.-.-", /* 46 - . */
"-..-.", /* 47 - / */
"-----", ".----", "..---", "...--", "....-", ".....", "-....", "--...", "---..", "----.", /* 48-57 - 0-9 */
"---...", /* 58 - : */
"-.-.-.", /* 59 - ; */
"", /* 60 - < */
"-...-", /* 61 - = */
"", /* 62 - > */
"..--..", /* 63 - ? */
".--.-.", /* 64 - @ */
".-", "-...", "-.-.", "-..", ".", "..-.", "--.", "....", "..", ".---", "-.-", ".-..", "--",
"-.", "---", ".--.", "--.-", ".-.", "...", "-", "..-", "...-", ".--", "-..-", "-.--", "--..",
"-.--.-", /* 91 - [ (really '(') */
"-..-.", /* 92 - \ (really '/') */
"-.--.-", /* 93 - ] (really ')') */
"", /* 94 - ^ */
"..--.-", /* 95 - _ */
".----.", /* 96 - ` */
".-", "-...", "-.-.", "-..", ".", "..-.", "--.", "....", "..", ".---", "-.-", ".-..", "--",
"-.", "---", ".--.", "--.-", ".-.", "...", "-", "..-", "...-", ".--", "-..-", "-.--", "--..",
"-.--.-", /* 123 - { (really '(') */
"", /* 124 - | */
"-.--.-", /* 125 - } (really ')') */
"-..-.", /* 126 - ~ (really bar) */
". . .", /* 127 - <del> (error) */
};
static void playtone(struct ast_channel *chan, int tone, int len)
{
char dtmf[20];
snprintf(dtmf, sizeof(dtmf), "%d/%d", tone, len);
ast_playtones_start(chan, 0, dtmf, 0);
ast_safe_sleep(chan, len);
ast_playtones_stop(chan);
}
static int morsecode_exec(struct ast_channel *chan, void *data)
{
int res=0, ditlen, tone;
char *digit;
const char *ditlenc, *tonec;
struct ast_module_user *u;
u = ast_module_user_add(chan);
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "Syntax: Morsecode(<string>) - no argument found\n");
ast_module_user_remove(u);
return 0;
}
/* Use variable MORESEDITLEN, if set (else 80) */
ditlenc = pbx_builtin_getvar_helper(chan, "MORSEDITLEN");
if (ast_strlen_zero(ditlenc) || (sscanf(ditlenc, "%d", &ditlen) != 1)) {
ditlen = 80;
}
/* Use variable MORSETONE, if set (else 800) */
tonec = pbx_builtin_getvar_helper(chan, "MORSETONE");
if (ast_strlen_zero(tonec) || (sscanf(tonec, "%d", &tone) != 1)) {
tone = 800;
}
for (digit = data; *digit; digit++) {
int digit2 = *digit;
char *dahdit;
if (digit2 < 0) {
continue;
}
for (dahdit = morsecode[digit2]; *dahdit; dahdit++) {
if (*dahdit == '-') {
playtone(chan, tone, 3 * ditlen);
} else if (*dahdit == '.') {
playtone(chan, tone, 1 * ditlen);
} else {
/* Account for ditlen of silence immediately following */
playtone(chan, 0, 2 * ditlen);
}
/* Pause slightly between each dit and dah */
playtone(chan, 0, 1 * ditlen);
}
/* Pause between characters */
playtone(chan, 0, 2 * ditlen);
}
ast_module_user_remove(u);
return res;
}
static int unload_module(void)
{
int res;
res = ast_unregister_application(app_morsecode);
ast_module_user_hangup_all();
return res;
}
static int load_module(void)
{
return ast_register_application(app_morsecode, morsecode_exec, morsecode_synopsis, morsecode_descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Morse code");

View File

@@ -19,20 +19,10 @@
/*! \file
*
* \brief Silly application to play an MP3 file -- uses mpg123
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
/*** MODULEINFO
<depend>working_fork</depend>
***/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <string.h>
#include <stdio.h>
#include <signal.h>
@@ -40,9 +30,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <unistd.h>
#include <fcntl.h>
#include <sys/time.h>
#ifdef HAVE_CAP
#include <sys/capability.h>
#endif /* HAVE_CAP */
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/file.h"
@@ -57,6 +48,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#define LOCAL_MPG_123 "/usr/local/bin/mpg123"
#define MPG_123 "/usr/bin/mpg123"
static char *tdesc = "Silly MP3 Application";
static char *app = "MP3Player";
static char *synopsis = "Play an MP3 file or stream";
@@ -66,15 +59,15 @@ static char *descrip =
"which typically would be a filename or a URL. User can exit by pressing\n"
"any key on the dialpad, or by hanging up.";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int mp3play(char *filename, int fd)
{
int res;
int x;
sigset_t fullset, oldset;
#ifdef HAVE_CAP
cap_t cap;
#endif
sigfillset(&fullset);
pthread_sigmask(SIG_BLOCK, &fullset, &oldset);
@@ -86,23 +79,15 @@ static int mp3play(char *filename, int fd)
pthread_sigmask(SIG_SETMASK, &oldset, NULL);
return res;
}
#ifdef HAVE_CAP
cap = cap_from_text("cap_net_admin-eip");
if (cap_set_proc(cap)) {
/* Careful with order! Logging cannot happen after we close FDs */
ast_log(LOG_WARNING, "Unable to remove capabilities.\n");
}
cap_free(cap);
#endif
if (ast_opt_high_priority)
if (option_highpriority)
ast_set_priority(0);
signal(SIGPIPE, SIG_DFL);
pthread_sigmask(SIG_UNBLOCK, &fullset, NULL);
dup2(fd, STDOUT_FILENO);
for (x=STDERR_FILENO + 1;x<256;x++) {
close(x);
if (x != STDOUT_FILENO)
close(x);
}
/* Execute mpg123, but buffer if it's a net connection */
if (!strncasecmp(filename, "http://", 7)) {
@@ -143,7 +128,7 @@ static int timed_read(int fd, void *data, int datalen, int timeout)
static int mp3_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct ast_module_user *u;
struct localuser *u;
int fds[2];
int ms = -1;
int pid = -1;
@@ -162,11 +147,11 @@ static int mp3_exec(struct ast_channel *chan, void *data)
return -1;
}
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
if (pipe(fds)) {
ast_log(LOG_WARNING, "Unable to create pipe\n");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -176,7 +161,7 @@ static int mp3_exec(struct ast_channel *chan, void *data)
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");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -249,25 +234,40 @@ static int mp3_exec(struct ast_channel *chan, void *data)
if (!res && owriteformat)
ast_set_write_format(chan, owriteformat);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return res;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
return ast_register_application(app, mp3_exec, synopsis, descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Silly MP3 Application");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -19,20 +19,10 @@
/*! \file
*
* \brief Silly application to play an NBScat file -- uses nbscat8k
*
* \author Mark Spencer <markster@digium.com>
*
*
* \ingroup applications
*/
/*** MODULEINFO
<depend>working_fork</depend>
***/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <string.h>
#include <stdio.h>
#include <signal.h>
@@ -41,9 +31,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <fcntl.h>
#include <sys/time.h>
#include <sys/socket.h>
#ifdef HAVE_CAP
#include <sys/capability.h>
#endif /* HAVE_CAP */
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/file.h"
@@ -62,6 +53,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#define AF_LOCAL AF_UNIX
#endif
static char *tdesc = "Silly NBS Stream Application";
static char *app = "NBScat";
static char *synopsis = "Play an NBS local stream";
@@ -70,15 +63,15 @@ static char *descrip =
" NBScat: Executes nbscat to listen to the local NBS stream.\n"
"User can exit by pressing any key\n.";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int NBScatplay(int fd)
{
int res;
int x;
sigset_t fullset, oldset;
#ifdef HAVE_CAP
cap_t cap;
#endif
sigfillset(&fullset);
pthread_sigmask(SIG_BLOCK, &fullset, &oldset);
@@ -93,16 +86,7 @@ static int NBScatplay(int fd)
signal(SIGPIPE, SIG_DFL);
pthread_sigmask(SIG_UNBLOCK, &fullset, NULL);
#ifdef HAVE_CAP
cap = cap_from_text("cap_net_admin-eip");
if (cap_set_proc(cap)) {
/* Careful with order! Logging cannot happen after we close FDs */
ast_log(LOG_WARNING, "Unable to remove capabilities.\n");
}
cap_free(cap);
#endif
if (ast_opt_high_priority)
if (option_highpriority)
ast_set_priority(0);
dup2(fd, STDOUT_FILENO);
@@ -135,7 +119,7 @@ static int timed_read(int fd, void *data, int datalen)
static int NBScat_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct ast_module_user *u;
struct localuser *u;
int fds[2];
int ms = -1;
int pid = -1;
@@ -148,11 +132,11 @@ static int NBScat_exec(struct ast_channel *chan, void *data)
short frdata[160];
} myf;
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
if (socketpair(AF_LOCAL, SOCK_STREAM, 0, fds)) {
ast_log(LOG_WARNING, "Unable to create socketpair\n");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -162,7 +146,7 @@ static int NBScat_exec(struct ast_channel *chan, void *data)
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");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -232,25 +216,40 @@ static int NBScat_exec(struct ast_channel *chan, void *data)
if (!res && owriteformat)
ast_set_write_format(chan, owriteformat);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return res;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
return ast_register_application(app, NBScat_exec, synopsis, descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Silly NBS Stream Application");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

File diff suppressed because it is too large Load Diff

View File

@@ -20,26 +20,19 @@
*
* \brief page() - Paging application
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
/*** MODULEINFO
<depend>dahdi</depend>
<depend>app_meetme</depend>
***/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/options.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
@@ -48,9 +41,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/file.h"
#include "asterisk/app.h"
#include "asterisk/chanvars.h"
#include "asterisk/utils.h"
#include "asterisk/dial.h"
#include "asterisk/devicestate.h"
static const char *tdesc = "Page Multiple Phones";
static const char *app_page= "Page";
@@ -63,48 +56,121 @@ static const char *page_descrip =
"caller is dumped into the conference as a speaker and the room is\n"
"destroyed when the original caller leaves. Valid options are:\n"
" d - full duplex audio\n"
" q - quiet, do not play beep to caller\n"
" r - record the page into a file (see 'r' for app_meetme)\n";
" q - quiet, do not play beep to caller\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
enum {
PAGE_DUPLEX = (1 << 0),
PAGE_QUIET = (1 << 1),
PAGE_RECORD = (1 << 2),
} page_opt_flags;
AST_APP_OPTIONS(page_opts, {
AST_APP_OPTION('d', PAGE_DUPLEX),
AST_APP_OPTION('q', PAGE_QUIET),
AST_APP_OPTION('r', PAGE_RECORD),
});
struct calloutdata {
char cidnum[64];
char cidname[64];
char tech[64];
char resource[256];
char meetmeopts[64];
struct ast_variable *variables;
};
static void *page_thread(void *data)
{
struct calloutdata *cd = data;
ast_pbx_outgoing_app(cd->tech, AST_FORMAT_SLINEAR, cd->resource, 30000,
"MeetMe", cd->meetmeopts, NULL, 0, cd->cidnum, cd->cidname, cd->variables, NULL, NULL);
free(cd);
return NULL;
}
static void launch_page(struct ast_channel *chan, const char *meetmeopts, const char *tech, const char *resource)
{
struct calloutdata *cd;
const char *varname;
struct ast_variable *lastvar = NULL;
struct ast_var_t *varptr;
pthread_t t;
pthread_attr_t attr;
cd = malloc(sizeof(struct calloutdata));
if (cd) {
memset(cd, 0, sizeof(struct calloutdata));
ast_copy_string(cd->cidnum, chan->cid.cid_num ? chan->cid.cid_num : "", sizeof(cd->cidnum));
ast_copy_string(cd->cidname, chan->cid.cid_name ? chan->cid.cid_name : "", sizeof(cd->cidname));
ast_copy_string(cd->tech, tech, sizeof(cd->tech));
ast_copy_string(cd->resource, resource, sizeof(cd->resource));
ast_copy_string(cd->meetmeopts, meetmeopts, sizeof(cd->meetmeopts));
AST_LIST_TRAVERSE(&chan->varshead, varptr, entries) {
if (!(varname = ast_var_full_name(varptr)))
continue;
if (varname[0] == '_') {
struct ast_variable *newvar = NULL;
if (varname[1] == '_') {
newvar = ast_variable_new(varname, ast_var_value(varptr));
} else {
newvar = ast_variable_new(&varname[1], ast_var_value(varptr));
}
if (newvar) {
if (lastvar)
lastvar->next = newvar;
else
cd->variables = newvar;
lastvar = newvar;
}
}
}
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
if (ast_pthread_create(&t, &attr, page_thread, cd)) {
ast_log(LOG_WARNING, "Unable to create paging thread: %s\n", strerror(errno));
free(cd);
}
pthread_attr_destroy(&attr);
}
}
static int page_exec(struct ast_channel *chan, void *data)
{
struct ast_module_user *u;
char *options, *tech, *resource, *tmp, *tmp2;
char meetmeopts[88], originator[AST_CHANNEL_NAME];
struct localuser *u;
char *options;
char *tech, *resource;
char meetmeopts[80];
struct ast_flags flags = { 0 };
unsigned int confid = ast_random();
unsigned int confid = rand();
struct ast_app *app;
int res = 0, pos = 0, i = 0;
struct ast_dial **dial_list;
unsigned int num_dials;
char *tmp;
int res=0;
char originator[AST_CHANNEL_NAME];
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "This application requires at least one argument (destination(s) to page)\n");
return -1;
}
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
if (!(app = pbx_findapp("MeetMe"))) {
ast_log(LOG_WARNING, "There is no MeetMe application available!\n");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
};
options = ast_strdupa(data);
if (!options) {
ast_log(LOG_ERROR, "Out of memory\n");
LOCAL_USER_REMOVE(u);
return -1;
}
ast_copy_string(originator, chan->name, sizeof(originator));
if ((tmp = strchr(originator, '-')))
@@ -114,58 +180,19 @@ static int page_exec(struct ast_channel *chan, void *data)
if (options)
ast_app_parse_options(page_opts, &flags, NULL, options);
snprintf(meetmeopts, sizeof(meetmeopts), "MeetMe|%ud|%s%sqxdw(5)", confid, (ast_test_flag(&flags, PAGE_DUPLEX) ? "" : "m"),
(ast_test_flag(&flags, PAGE_RECORD) ? "r" : "") );
snprintf(meetmeopts, sizeof(meetmeopts), "%ud|%sqxdw(5)", confid, ast_test_flag(&flags, PAGE_DUPLEX) ? "" : "m");
/* Count number of extensions in list by number of ampersands + 1 */
num_dials = 1;
tmp2 = tmp;
while (*tmp2) {
if (*tmp2 == '&') {
num_dials++;
}
tmp2++;
}
if (!(dial_list = ast_calloc(num_dials, sizeof(struct ast_dial *)))) {
ast_log(LOG_ERROR, "Can't allocate %ld bytes for dial list\n", (long)(sizeof(struct ast_dial *) * num_dials));
ast_module_user_remove(u);
return -1;
}
/* Go through parsing/calling each device */
while ((tech = strsep(&tmp, "&"))) {
struct ast_dial *dial = NULL;
/* don't call the originating device */
if (!strcasecmp(tech, originator))
continue;
/* If no resource is available, continue on */
if (!(resource = strchr(tech, '/'))) {
if ((resource = strchr(tech, '/'))) {
*resource++ = '\0';
launch_page(chan, meetmeopts, tech, resource);
} else {
ast_log(LOG_WARNING, "Incomplete destination '%s' supplied.\n", tech);
continue;
}
*resource++ = '\0';
/* Create a dialing structure */
if (!(dial = ast_dial_create())) {
ast_log(LOG_WARNING, "Failed to create dialing structure.\n");
continue;
}
/* Append technology and resource */
ast_dial_append(dial, tech, resource);
/* Set ANSWER_EXEC as global option */
ast_dial_option_global_enable(dial, AST_DIAL_OPTION_ANSWER_EXEC, meetmeopts);
/* Run this dial in async mode */
ast_dial_run(dial, chan, 1);
/* Put in our dialing array */
dial_list[pos++] = dial;
}
if (!ast_test_flag(&flags, PAGE_QUIET)) {
@@ -173,48 +200,47 @@ static int page_exec(struct ast_channel *chan, void *data)
if (!res)
res = ast_waitstream(chan, "");
}
if (!res) {
snprintf(meetmeopts, sizeof(meetmeopts), "%ud|A%s%sqxd", confid, (ast_test_flag(&flags, PAGE_DUPLEX) ? "" : "t"),
(ast_test_flag(&flags, PAGE_RECORD) ? "r" : "") );
pbx_exec(chan, app, meetmeopts);
snprintf(meetmeopts, sizeof(meetmeopts), "%ud|A%sqxd", confid, ast_test_flag(&flags, PAGE_DUPLEX) ? "" : "t");
pbx_exec(chan, app, meetmeopts, 1);
}
/* Go through each dial attempt cancelling, joining, and destroying */
for (i = 0; i < pos; i++) {
struct ast_dial *dial = dial_list[i];
/* We have to wait for the async thread to exit as it's possible Meetme won't throw them out immediately */
ast_dial_join(dial);
/* Hangup all channels */
ast_dial_hangup(dial);
/* Destroy dialing structure */
ast_dial_destroy(dial);
}
ast_free(dial_list);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app_page);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
return ast_register_application(app_page, page_exec, page_synopsis, page_descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Page Multiple Phones");
char *description(void)
{
return (char *) tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -1,7 +1,7 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 1999 - 2006, Digium, Inc.
* Copyright (C) 1999 - 2005, Digium, Inc.
*
* Mark Spencer <markster@digium.com>
*
@@ -22,23 +22,20 @@
/*! \file
*
* \brief ParkAndAnnounce application for Asterisk
*
* \author Ben Miller <bgmiller@dccinc.com>
* \arg With TONS of help from Mark!
*
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
@@ -49,7 +46,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/logger.h"
#include "asterisk/say.h"
#include "asterisk/lock.h"
#include "asterisk/utils.h"
static char *tdesc = "Call Parking and Announce Application";
static char *app = "ParkAndAnnounce";
@@ -57,53 +55,57 @@ static char *synopsis = "Park and Announce";
static char *descrip =
" ParkAndAnnounce(announce:template|timeout|dial|[return_context]):\n"
"Park a call into the parkinglot and announce the call to another channel.\n"
"\n"
"announce template: Colon-separated list of files to announce. The word PARKED\n"
" will be replaced by a say_digits of the extension in which\n"
" the call is parked.\n"
"timeout: Time in seconds before the call returns into the return\n"
" context.\n"
"dial: The app_dial style resource to call to make the\n"
" announcement. Console/dsp calls the console.\n"
"return_context: The goto-style label to jump the call back into after\n"
" timeout. Default <priority+1>.\n"
"\n"
"The variable ${PARKEDAT} will contain the parking extension into which the\n"
"call was placed. Use with the Local channel to allow the dialplan to make\n"
"use of this information.\n";
"Park a call into the parkinglot and announce the call over the console.\n"
"announce template: colon separated list of files to announce, the word PARKED\n"
" will be replaced by a say_digits of the ext the call is parked in\n"
"timeout: time in seconds before the call returns into the return context.\n"
"dial: The app_dial style resource to call to make the announcement. Console/dsp calls the console.\n"
"return_context: the goto style label to jump the call back into after timeout. default=prio+1\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int parkandannounce_exec(struct ast_channel *chan, void *data)
{
int res=0;
char *return_context;
int lot, timeout = 0, dres;
int l, lot, timeout = 0, dres;
char *working, *context, *exten, *priority, *dial, *dialtech, *dialstr;
char *template, *tpl_working, *tpl_current;
char *tmp[100];
char buf[13];
int looptemp = 0,i = 0, res = 0;
char *s;
int looptemp=0,i=0;
char *s,*orig_s;
struct ast_channel *dchan;
struct outgoing_helper oh;
int outstate;
struct ast_module_user *u;
struct localuser *u;
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "ParkAndAnnounce requires arguments: (announce:template|timeout|dial|[return_context])\n");
return -1;
}
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
s = ast_strdupa(data);
l=strlen(data)+2;
orig_s=malloc(l);
if(!orig_s) {
ast_log(LOG_WARNING, "Out of memory\n");
LOCAL_USER_REMOVE(u);
return -1;
}
s=orig_s;
strncpy(s,data,l);
template = strsep(&s,"|");
template=strsep(&s,"|");
if(! template) {
ast_log(LOG_WARNING, "PARK: An announce template must be defined\n");
ast_module_user_remove(u);
free(orig_s);
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -111,14 +113,15 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data)
timeout = atoi(strsep(&s, "|"));
timeout *= 1000;
}
dial = strsep(&s, "|");
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");
ast_module_user_remove(u);
free(orig_s);
LOCAL_USER_REMOVE(u);
return -1;
} else {
dialtech = strsep(&dial, "/");
dialstr = dial;
dialtech=strsep(&dial, "/");
dialstr=dial;
ast_verbose( VERBOSE_PREFIX_3 "Dial Tech,String: (%s,%s)\n", dialtech,dialstr);
}
@@ -146,15 +149,16 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data)
}
if(atoi(priority) < 0) {
ast_log(LOG_WARNING, "Priority '%s' must be a number > 0\n", priority);
ast_module_user_remove(u);
free(orig_s);
LOCAL_USER_REMOVE(u);
return -1;
}
/* At this point we have a priority and maybe an extension and a context */
chan->priority = atoi(priority);
if (exten)
ast_copy_string(chan->exten, exten, sizeof(chan->exten));
if (context)
ast_copy_string(chan->context, context, sizeof(chan->context));
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++;
}
@@ -169,19 +173,16 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data)
/* 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. */
res = ast_masq_park_call(chan, NULL, timeout, &lot);
if (res == -1) {
goto finish;
}
ast_masq_park_call(chan, NULL, timeout, &lot);
res=-1;
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 */
snprintf(buf, sizeof(buf), "%d", lot);
memset(&oh, 0, sizeof(oh));
oh.parent_channel = chan;
oh.vars = ast_variable_new("_PARKEDAT", buf);
dchan = __ast_request_and_dial(dialtech, AST_FORMAT_SLINEAR, dialstr,30000, &outstate, chan->cid.cid_num, chan->cid.cid_name, &oh);
if(dchan) {
@@ -193,12 +194,14 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data)
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);
ast_module_user_remove(u);
free(orig_s);
LOCAL_USER_REMOVE(u);
return -1;
}
} else {
ast_log(LOG_WARNING, "PARK: Unable to allocate announce channel.\n");
ast_module_user_remove(u);
free(orig_s);
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -209,15 +212,15 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data)
ast_verbose(VERBOSE_PREFIX_4 "Announce Template:%s\n", template);
tpl_working = template;
tpl_current = strsep(&tpl_working, ":");
tpl_current=strsep(&tpl_working, ":");
while(tpl_current && looptemp < ARRAY_LEN(tmp)) {
while(tpl_current && looptemp < sizeof(tmp)) {
tmp[looptemp]=tpl_current;
looptemp++;
tpl_current = strsep(&tpl_working,":");
tpl_current=strsep(&tpl_working,":");
}
for(i = 0; i < looptemp; i++) {
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);
@@ -234,27 +237,45 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data)
ast_stopstream(dchan);
ast_hangup(dchan);
finish:
ast_module_user_remove(u);
free(orig_s);
LOCAL_USER_REMOVE(u);
return res;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
/* return ast_register_application(app, park_exec); */
return ast_register_application(app, parkandannounce_exec, synopsis, descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Call Parking and Announce Application");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -19,20 +19,18 @@
/*! \file
*
* \brief Trivial application to playback a sound file
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -43,9 +41,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/utils.h"
#include "asterisk/options.h"
#include "asterisk/app.h"
#include "asterisk/cli.h"
#include "asterisk/localtime.h"
#include "asterisk/say.h"
static char *tdesc = "Sound File Playback Application";
static char *app = "Playback";
@@ -65,329 +62,21 @@ static char *descrip =
"This application sets the following channel variable upon completion:\n"
" PLAYBACKSTATUS The status of the playback attempt as a text string, one of\n"
" SUCCESS | FAILED\n"
"See Also: Background (application) -- for playing soundfiles that are interruptible\n"
" WaitExten (application) -- wait for digits from caller, optionally play music on hold\n"
;
STANDARD_LOCAL_USER;
static struct ast_config *say_cfg = NULL;
/* save the say' api calls.
* The first entry is NULL if we have the standard source,
* otherwise we are sourcing from here.
* 'say load [new|old]' will enable the new or old method, or report status
*/
static const void * say_api_buf[40];
static const char *say_old = "old";
static const char *say_new = "new";
static void save_say_mode(const void *arg)
{
int i = 0;
say_api_buf[i++] = arg;
say_api_buf[i++] = ast_say_number_full;
say_api_buf[i++] = ast_say_enumeration_full;
say_api_buf[i++] = ast_say_digit_str_full;
say_api_buf[i++] = ast_say_character_str_full;
say_api_buf[i++] = ast_say_phonetic_str_full;
say_api_buf[i++] = ast_say_datetime;
say_api_buf[i++] = ast_say_time;
say_api_buf[i++] = ast_say_date;
say_api_buf[i++] = ast_say_datetime_from_now;
say_api_buf[i++] = ast_say_date_with_format;
}
static void restore_say_mode(void *arg)
{
int i = 0;
say_api_buf[i++] = arg;
ast_say_number_full = say_api_buf[i++];
ast_say_enumeration_full = say_api_buf[i++];
ast_say_digit_str_full = say_api_buf[i++];
ast_say_character_str_full = say_api_buf[i++];
ast_say_phonetic_str_full = say_api_buf[i++];
ast_say_datetime = say_api_buf[i++];
ast_say_time = say_api_buf[i++];
ast_say_date = say_api_buf[i++];
ast_say_datetime_from_now = say_api_buf[i++];
ast_say_date_with_format = say_api_buf[i++];
}
/*
* Typical 'say' arguments in addition to the date or number or string
* to say. We do not include 'options' because they may be different
* in recursive calls, and so they are better left as an external
* parameter.
*/
typedef struct {
struct ast_channel *chan;
const char *ints;
const char *language;
int audiofd;
int ctrlfd;
} say_args_t;
static int s_streamwait3(const say_args_t *a, const char *fn)
{
int res = ast_streamfile(a->chan, fn, a->language);
if (res) {
ast_log(LOG_WARNING, "Unable to play message %s\n", fn);
return res;
}
res = (a->audiofd > -1 && a->ctrlfd > -1) ?
ast_waitstream_full(a->chan, a->ints, a->audiofd, a->ctrlfd) :
ast_waitstream(a->chan, a->ints);
ast_stopstream(a->chan);
return res;
}
/*
* the string is 'prefix:data' or prefix:fmt:data'
* with ':' being invalid in strings.
*/
static int do_say(say_args_t *a, const char *s, const char *options, int depth)
{
struct ast_variable *v;
char *lang, *x, *rule = NULL;
int ret = 0;
struct varshead head = { .first = NULL, .last = NULL };
struct ast_var_t *n;
if (depth++ > 10) {
ast_log(LOG_WARNING, "recursion too deep, exiting\n");
return -1;
} else if (!say_cfg) {
ast_log(LOG_WARNING, "no say.conf, cannot spell '%s'\n", s);
return -1;
}
/* scan languages same as in file.c */
if (a->language == NULL)
a->language = "en"; /* default */
lang = ast_strdupa(a->language);
for (;;) {
for (v = ast_variable_browse(say_cfg, lang); v ; v = v->next) {
if (ast_extension_match(v->name, s)) {
rule = ast_strdupa(v->value);
break;
}
}
if (rule)
break;
if ( (x = strchr(lang, '_')) )
*x = '\0'; /* try without suffix */
else if (strcmp(lang, "en"))
lang = "en"; /* last resort, try 'en' if not done yet */
else
break;
}
if (!rule)
return 0;
/* skip up to two prefixes to get the value */
if ( (x = strchr(s, ':')) )
s = x + 1;
if ( (x = strchr(s, ':')) )
s = x + 1;
n = ast_var_assign("SAY", s);
AST_LIST_INSERT_HEAD(&head, n, entries);
/* scan the body, one piece at a time */
while ( !ret && (x = strsep(&rule, ",")) ) { /* exit on key */
char fn[128];
const char *p, *fmt, *data; /* format and data pointers */
/* prepare a decent file name */
x = ast_skip_blanks(x);
ast_trim_blanks(x);
/* replace variables */
memset(fn, 0, sizeof(fn)); /* XXX why isn't done in pbx_substitute_variables_helper! */
pbx_substitute_variables_varshead(&head, x, fn, sizeof(fn));
/* locate prefix and data, if any */
fmt = index(fn, ':');
if (!fmt || fmt == fn) { /* regular filename */
ret = s_streamwait3(a, fn);
continue;
}
fmt++;
data = index(fmt, ':'); /* colon before data */
if (!data || data == fmt) { /* simple prefix-fmt */
ret = do_say(a, fn, options, depth);
continue;
}
/* prefix:fmt:data */
for (p = fmt; p < data && ret <= 0; p++) {
char fn2[sizeof(fn)];
if (*p == ' ' || *p == '\t') /* skip blanks */
continue;
if (*p == '\'') {/* file name - we trim them */
char *y;
strcpy(fn2, ast_skip_blanks(p+1)); /* make a full copy */
y = index(fn2, '\'');
if (!y) {
p = data; /* invalid. prepare to end */
break;
}
*y = '\0';
ast_trim_blanks(fn2);
p = index(p+1, '\'');
ret = s_streamwait3(a, fn2);
} else {
int l = fmt-fn;
strcpy(fn2, fn); /* copy everything */
/* after prefix, append the format */
fn2[l++] = *p;
strcpy(fn2 + l, data);
ret = do_say(a, fn2, options, depth);
}
if (ret) {
break;
}
}
}
ast_var_delete(n);
return ret;
}
static int say_full(struct ast_channel *chan, const char *string,
const char *ints, const char *lang, const char *options,
int audiofd, int ctrlfd)
{
say_args_t a = { chan, ints, lang, audiofd, ctrlfd };
return do_say(&a, string, options, 0);
}
static int say_number_full(struct ast_channel *chan, int num,
const char *ints, const char *lang, const char *options,
int audiofd, int ctrlfd)
{
char buf[64];
say_args_t a = { chan, ints, lang, audiofd, ctrlfd };
snprintf(buf, sizeof(buf), "num:%d", num);
return do_say(&a, buf, options, 0);
}
static int say_enumeration_full(struct ast_channel *chan, int num,
const char *ints, const char *lang, const char *options,
int audiofd, int ctrlfd)
{
char buf[64];
say_args_t a = { chan, ints, lang, audiofd, ctrlfd };
snprintf(buf, sizeof(buf), "enum:%d", num);
return do_say(&a, buf, options, 0);
}
static int say_date_generic(struct ast_channel *chan, time_t t,
const char *ints, const char *lang, const char *format, const char *timezone, const char *prefix)
{
char buf[128];
struct tm tm;
say_args_t a = { chan, ints, lang, -1, -1 };
if (format == NULL)
format = "";
ast_localtime(&t, &tm, NULL);
snprintf(buf, sizeof(buf), "%s:%s:%04d%02d%02d%02d%02d.%02d-%d-%3d",
prefix,
format,
tm.tm_year+1900,
tm.tm_mon+1,
tm.tm_mday,
tm.tm_hour,
tm.tm_min,
tm.tm_sec,
tm.tm_wday,
tm.tm_yday);
return do_say(&a, buf, NULL, 0);
}
static int say_date_with_format(struct ast_channel *chan, time_t t,
const char *ints, const char *lang, const char *format, const char *timezone)
{
return say_date_generic(chan, t, ints, lang, format, timezone, "datetime");
}
static int say_date(struct ast_channel *chan, time_t t, const char *ints, const char *lang)
{
return say_date_generic(chan, t, ints, lang, "", NULL, "date");
}
static int say_time(struct ast_channel *chan, time_t t, const char *ints, const char *lang)
{
return say_date_generic(chan, t, ints, lang, "", NULL, "time");
}
static int say_datetime(struct ast_channel *chan, time_t t, const char *ints, const char *lang)
{
return say_date_generic(chan, t, ints, lang, "", NULL, "datetime");
}
/*
* remap the 'say' functions to use those in this file
*/
static int __say_init(int fd, int argc, char *argv[])
{
const char *old_mode = say_api_buf[0] ? say_new : say_old;
char *mode;
if (argc == 2) {
ast_cli(fd, "say mode is [%s]\n", old_mode);
return RESULT_SUCCESS;
} else if (argc != 3)
return RESULT_SHOWUSAGE;
mode = argv[2];
ast_log(LOG_WARNING, "init say.c from %s to %s\n", old_mode, mode);
if (!strcmp(mode, old_mode)) {
ast_log(LOG_WARNING, "say mode is %s already\n", mode);
} else if (!strcmp(mode, say_new)) {
if (say_cfg == NULL)
say_cfg = ast_config_load("say.conf");
save_say_mode(say_new);
ast_say_number_full = say_number_full;
ast_say_enumeration_full = say_enumeration_full;
#if 0
ast_say_digits_full = say_digits_full;
ast_say_digit_str_full = say_digit_str_full;
ast_say_character_str_full = say_character_str_full;
ast_say_phonetic_str_full = say_phonetic_str_full;
ast_say_datetime_from_now = say_datetime_from_now;
#endif
ast_say_datetime = say_datetime;
ast_say_time = say_time;
ast_say_date = say_date;
ast_say_date_with_format = say_date_with_format;
} else if (!strcmp(mode, say_old) && say_api_buf[0] == say_new) {
restore_say_mode(NULL);
} else {
ast_log(LOG_WARNING, "unrecognized mode %s\n", mode);
}
return RESULT_SUCCESS;
}
static struct ast_cli_entry cli_playback[] = {
{ { "say", "load", NULL },
__say_init, "set/show the say mode",
"Usage: say load [new|old]\n Set/show the say mode\n" },
};
LOCAL_USER_DECL;
static int playback_exec(struct ast_channel *chan, void *data)
{
int res = 0;
int mres = 0;
struct ast_module_user *u;
char *tmp;
int res = 0, mres = 0;
struct localuser *u;
char *tmp = NULL;
int option_skip=0;
int option_say=0;
int option_noanswer = 0;
char *front = NULL, *back = NULL;
int priority_jump = 0;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(filenames);
AST_APP_ARG(options);
@@ -398,16 +87,20 @@ static int playback_exec(struct ast_channel *chan, void *data)
return -1;
}
tmp = ast_strdupa(data);
LOCAL_USER_ADD(u);
tmp = ast_strdupa(data);
if (!tmp) {
ast_log(LOG_ERROR, "Out of memory!\n");
LOCAL_USER_REMOVE(u);
return -1;
}
u = ast_module_user_add(chan);
AST_STANDARD_APP_ARGS(args, tmp);
if (args.options) {
if (strcasestr(args.options, "skip"))
option_skip = 1;
if (strcasestr(args.options, "say"))
option_say = 1;
if (strcasestr(args.options, "noanswer"))
option_noanswer = 1;
if (strchr(args.options, 'j'))
@@ -417,78 +110,72 @@ static int playback_exec(struct ast_channel *chan, void *data)
if (chan->_state != AST_STATE_UP) {
if (option_skip) {
/* At the user's option, skip if the line is not up */
goto done;
pbx_builtin_setvar_helper(chan, "PLAYBACKSTATUS", "SUCCESS");
LOCAL_USER_REMOVE(u);
return 0;
} else if (!option_noanswer)
/* Otherwise answer unless we're supposed to send this while on-hook */
res = ast_answer(chan);
}
if (!res) {
char *back = args.filenames;
char *front;
ast_stopstream(chan);
while (!res && (front = strsep(&back, "&"))) {
if (option_say)
res = say_full(chan, front, "", chan->language, NULL, -1, -1);
else
res = ast_streamfile(chan, front, chan->language);
front = tmp;
while (!res && front) {
if ((back = strchr(front, '&'))) {
*back = '\0';
back++;
}
res = ast_streamfile(chan, front, chan->language);
if (!res) {
res = ast_waitstream(chan, "");
ast_stopstream(chan);
} else {
ast_log(LOG_WARNING, "ast_streamfile failed on %s for %s\n", chan->name, (char *)data);
if (priority_jump || ast_opt_priority_jumping)
if (priority_jump || option_priority_jumping)
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
res = 0;
mres = 1;
}
front = back;
}
}
done:
pbx_builtin_setvar_helper(chan, "PLAYBACKSTATUS", mres ? "FAILED" : "SUCCESS");
ast_module_user_remove(u);
if (mres)
pbx_builtin_setvar_helper(chan, "PLAYBACKSTATUS", "FAILED");
else
pbx_builtin_setvar_helper(chan, "PLAYBACKSTATUS", "SUCCESS");
LOCAL_USER_REMOVE(u);
return res;
}
static int reload(void)
{
if (say_cfg) {
ast_config_destroy(say_cfg);
ast_log(LOG_NOTICE, "Reloading say.conf\n");
}
say_cfg = ast_config_load("say.conf");
/*
* XXX here we should sort rules according to the same order
* we have in pbx.c so we have the same matching behaviour.
*/
return 0;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
ast_cli_unregister_multiple(cli_playback, sizeof(cli_playback) / sizeof(struct ast_cli_entry));
ast_module_user_hangup_all();
if (say_cfg)
ast_config_destroy(say_cfg);
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
say_cfg = ast_config_load("say.conf");
ast_cli_register_multiple(cli_playback, sizeof(cli_playback) / sizeof(struct ast_cli_entry));
return ast_register_application(app, playback_exec, synopsis, descrip);
}
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Sound File Playback Application",
.load = load_module,
.unload = unload_module,
.reload = reload,
);
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -19,20 +19,18 @@
/*! \file
*
* \brief Block all calls without Caller*ID, require phone # to be entered
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/utils.h"
@@ -49,6 +47,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#define PRIV_CONFIG "privacy.conf"
static char *tdesc = "Require phone number to be entered, if no CallerID sent";
static char *app = "PrivacyManager";
static char *synopsis = "Require phone number to be entered, if no CallerID sent";
@@ -74,6 +74,11 @@ static char *descrip =
" SUCCESS | FAILED \n"
;
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int privacy_exec (struct ast_channel *chan, void *data)
{
@@ -82,9 +87,9 @@ static int privacy_exec (struct ast_channel *chan, void *data)
int maxretries = 3;
int minlength = 10;
int x = 0;
const char *s;
char *s;
char phone[30];
struct ast_module_user *u;
struct localuser *u;
struct ast_config *cfg = NULL;
char *parse = NULL;
int priority_jump = 0;
@@ -94,8 +99,7 @@ static int privacy_exec (struct ast_channel *chan, void *data)
AST_APP_ARG(options);
);
u = ast_module_user_add(chan);
LOCAL_USER_ADD (u);
if (!ast_strlen_zero(chan->cid.cid_num)) {
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_3 "CallerID Present: Skipping\n");
@@ -104,13 +108,19 @@ static int privacy_exec (struct ast_channel *chan, void *data)
if (chan->_state != AST_STATE_UP) {
res = ast_answer(chan);
if (res) {
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
}
if (!ast_strlen_zero(data)) {
if (!ast_strlen_zero((char *)data))
{
parse = ast_strdupa(data);
if (!parse) {
ast_log(LOG_ERROR, "Out of memory!\n");
LOCAL_USER_REMOVE(u);
return -1;
}
AST_STANDARD_APP_ARGS(args, parse);
@@ -200,7 +210,7 @@ static int privacy_exec (struct ast_channel *chan, void *data)
}
pbx_builtin_setvar_helper(chan, "PRIVACYMGRSTATUS", "SUCCESS");
} else {
if (priority_jump || ast_opt_priority_jumping)
if (priority_jump || option_priority_jumping)
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
pbx_builtin_setvar_helper(chan, "PRIVACYMGRSTATUS", "FAILED");
}
@@ -208,25 +218,45 @@ static int privacy_exec (struct ast_channel *chan, void *data)
ast_config_destroy(cfg);
}
ast_module_user_remove(u);
return 0;
LOCAL_USER_REMOVE (u);
return 0;
}
static int unload_module(void)
int
unload_module (void)
{
int res;
res = ast_unregister_application (app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int
load_module (void)
{
return ast_register_application (app, privacy_exec, synopsis, descrip);
return ast_register_application (app, privacy_exec, synopsis,
descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Require phone number to be entered, if no CallerID sent");
char *
description (void)
{
return tdesc;
}
int
usecount (void)
{
int res;
STANDARD_USECOUNT (res);
return res;
}
char *
key ()
{
return ASTERISK_GPL_KEY;
}

File diff suppressed because it is too large Load Diff

View File

@@ -23,15 +23,15 @@
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/options.h"
@@ -39,7 +39,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/pbx.h"
#include "asterisk/module.h"
/*! \todo The Random() app should be removed from trunk following the release of 1.4 */
static char *tdesc = "Random goto";
static char *app_random = "Random";
@@ -47,62 +47,80 @@ static char *random_synopsis = "Conditionally branches, based upon a probability
static char *random_descrip =
"Random([probability]:[[context|]extension|]priority)\n"
" probability := INTEGER in the range 1 to 100\n"
"DEPRECATED: Use GotoIf($[${RAND(1,100)} > <number>]?<label>)\n";
" probability := INTEGER in the range 1 to 100\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static char random_state[256];
static int random_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct ast_module_user *u;
struct localuser *u;
char *s;
char *prob;
int probint;
static int deprecated = 0;
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "Random requires an argument ([probability]:[[context|]extension|]priority)\n");
return -1;
}
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
s = ast_strdupa(data);
if (!s) {
ast_log(LOG_ERROR, "Out of memory!\n");
LOCAL_USER_REMOVE(u);
return -1;
}
prob = strsep(&s,":");
if ((!prob) || (sscanf(prob, "%d", &probint) != 1))
probint = 0;
if (!deprecated) {
deprecated = 1;
ast_log(LOG_WARNING, "Random is deprecated in Asterisk 1.4. Replace with GotoIf($[${RAND(0,99)} + %d >= 100]?%s)\n", probint, s);
}
if ((ast_random() % 100) + probint >= 100) {
if ((random() % 100) + probint >= 100) {
res = ast_parseable_goto(chan, s);
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "Random branches to (%s,%s,%d)\n",
chan->context,chan->exten, chan->priority+1);
}
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return res;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app_random);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
initstate((getppid() * 65535 + getpid()) % RAND_MAX, random_state, 256);
return ast_register_application(app_random, random_exec, random_synopsis, random_descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Random goto");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
/* Don't allow unload, since rand(3) depends upon this module being here. */
return 1;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -19,20 +19,18 @@
/*! \file
*
* \brief Trivial application to read a variable
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -43,19 +41,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/translate.h"
#include "asterisk/options.h"
#include "asterisk/utils.h"
#include "asterisk/indications.h"
enum {
OPT_SKIP = (1 << 0),
OPT_INDICATION = (1 << 1),
OPT_NOANSWER = (1 << 2),
} read_option_flags;
AST_APP_OPTIONS(read_app_options, {
AST_APP_OPTION('s', OPT_SKIP),
AST_APP_OPTION('i', OPT_INDICATION),
AST_APP_OPTION('n', OPT_NOANSWER),
});
static char *tdesc = "Read Variable Application";
static char *app = "Read";
@@ -65,131 +52,131 @@ static char *descrip =
" Read(variable[|filename][|maxdigits][|option][|attempts][|timeout])\n\n"
"Reads a #-terminated string of digits a certain number of times from the\n"
"user in to the given variable.\n"
" filename -- file to play before reading digits or tone with option i\n"
" filename -- file to play before reading digits.\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 -- options are 's' , 'i', 'n'\n"
" 's' to return immediately if the line is not up,\n"
" 'i' to play filename as an indication tone from your indications.conf\n"
" 'n' to read digits even if the line is not up.\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"
" attempts -- if greater than 1, that many attempts will be made in the \n"
" event no data is entered.\n"
" timeout -- An integer number of seconds to wait for a digit response. If greater\n"
" than 0, that value will override the default timeout.\n\n"
" timeout -- if greater than 0, that value will override the default timeout.\n\n"
"Read should disconnect if the function fails or errors out.\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
#define ast_next_data(instr,ptr,delim) if((ptr=strchr(instr,delim))) { *(ptr) = '\0' ; ptr++;}
static int read_exec(struct ast_channel *chan, void *data)
{
int res = 0;
struct ast_module_user *u;
char tmp[256] = "";
int maxdigits = 255;
int tries = 1, to = 0, x = 0;
struct localuser *u;
char tmp[256];
char *timeout = NULL;
char *varname = NULL;
char *filename = NULL;
char *loops;
char *maxdigitstr=NULL;
char *options=NULL;
int option_skip = 0;
int option_noanswer = 0;
int maxdigits=255;
int tries = 1;
int to = 0;
int x = 0;
char *argcopy = NULL;
struct tone_zone_sound *ts;
struct ast_flags flags = {0};
char *args[8];
AST_DECLARE_APP_ARGS(arglist,
AST_APP_ARG(variable);
AST_APP_ARG(filename);
AST_APP_ARG(maxdigits);
AST_APP_ARG(options);
AST_APP_ARG(attempts);
AST_APP_ARG(timeout);
);
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "Read requires an argument (variable)\n");
return -1;
}
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
argcopy = ast_strdupa(data);
AST_STANDARD_APP_ARGS(arglist, argcopy);
if (!ast_strlen_zero(arglist.options)) {
ast_app_parse_options(read_app_options, &flags, NULL, arglist.options);
if (!argcopy) {
ast_log(LOG_ERROR, "Out of memory\n");
LOCAL_USER_REMOVE(u);
return -1;
}
if (ast_app_separate_args(argcopy, '|', args, sizeof(args) / sizeof(args[0])) < 1) {
ast_log(LOG_WARNING, "Cannot Parse Arguments.\n");
LOCAL_USER_REMOVE(u);
return -1;
}
varname = args[x++];
filename = args[x++];
maxdigitstr = args[x++];
options = args[x++];
loops = args[x++];
timeout = args[x++];
if (!ast_strlen_zero(arglist.attempts)) {
tries = atoi(arglist.attempts);
if (tries <= 0)
if (options) {
if (!strcasecmp(options, "skip"))
option_skip = 1;
else if (!strcasecmp(options, "noanswer"))
option_noanswer = 1;
else {
if (strchr(options, 's'))
option_skip = 1;
if (strchr(options, 'n'))
option_noanswer = 1;
}
}
if(loops) {
tries = atoi(loops);
if(tries <= 0)
tries = 1;
}
if (!ast_strlen_zero(arglist.timeout)) {
to = atoi(arglist.timeout);
if(timeout) {
to = atoi(timeout);
if (to <= 0)
to = 0;
else
to *= 1000;
}
if (ast_strlen_zero(arglist.filename)) {
arglist.filename = NULL;
}
if (!ast_strlen_zero(arglist.maxdigits)) {
maxdigits = atoi(arglist.maxdigits);
if (ast_strlen_zero(filename))
filename = NULL;
if (maxdigitstr) {
maxdigits = atoi(maxdigitstr);
if ((maxdigits<1) || (maxdigits>255)) {
maxdigits = 255;
} else if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Accepting a maximum of %d digits.\n", maxdigits);
}
if (ast_strlen_zero(arglist.variable)) {
if (ast_strlen_zero(varname)) {
ast_log(LOG_WARNING, "Invalid! Usage: Read(variable[|filename][|maxdigits][|option][|attempts][|timeout])\n\n");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
ts=NULL;
if (ast_test_flag(&flags,OPT_INDICATION)) {
if (!ast_strlen_zero(arglist.filename)) {
ts = ast_get_indication_tone(chan->zone,arglist.filename);
}
}
if (chan->_state != AST_STATE_UP) {
if (ast_test_flag(&flags,OPT_SKIP)) {
if (option_skip) {
/* At the user's option, skip if the line is not up */
pbx_builtin_setvar_helper(chan, arglist.variable, "\0");
ast_module_user_remove(u);
pbx_builtin_setvar_helper(chan, varname, "\0");
LOCAL_USER_REMOVE(u);
return 0;
} else if (!ast_test_flag(&flags,OPT_NOANSWER)) {
} else if (!option_noanswer) {
/* Otherwise answer unless we're supposed to read while on-hook */
res = ast_answer(chan);
}
}
if (!res) {
while (tries && !res) {
while(tries && !res) {
ast_stopstream(chan);
if (ts && ts->data[0]) {
if (!to)
to = chan->pbx ? chan->pbx->rtimeout * 1000 : 6000;
res = ast_playtones_start(chan, 0, ts->data, 0);
for (x = 0; x < maxdigits; ) {
res = ast_waitfordigit(chan, to);
ast_playtones_stop(chan);
if (res < 1) {
tmp[x]='\0';
break;
}
tmp[x++] = res;
if (tmp[x-1] == '#') {
tmp[x-1] = '\0';
break;
}
}
} else {
res = ast_app_getdata(chan, arglist.filename, tmp, maxdigits, to);
}
res = ast_app_getdata(chan, filename, tmp, maxdigits, to);
if (res > -1) {
pbx_builtin_setvar_helper(chan, arglist.variable, tmp);
pbx_builtin_setvar_helper(chan, varname, tmp);
if (!ast_strlen_zero(tmp)) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "User entered '%s'\n", tmp);
@@ -205,30 +192,44 @@ static int read_exec(struct ast_channel *chan, void *data)
}
res = 0;
} else {
pbx_builtin_setvar_helper(chan, arglist.variable, tmp);
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "User disconnected\n");
}
}
}
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return res;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
return ast_register_application(app, read_exec, synopsis, descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Read Variable Application");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -20,20 +20,18 @@
*
* \brief ReadFile application -- Reads in a File for you.
*
* \author Matt O'Gorman <mogorman@digium.com>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/options.h"
@@ -42,6 +40,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/app.h"
#include "asterisk/module.h"
static char *tdesc = "Stores output of file into a variable";
static char *app_readfile = "ReadFile";
static char *readfile_synopsis = "ReadFile(varname=file,length)";
@@ -52,11 +52,15 @@ static char *readfile_descrip =
" File - The name of the file to read.\n"
" Length - Maximum number of characters to capture.\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int readfile_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct ast_module_user *u;
struct localuser *u;
char *s, *varname=NULL, *file=NULL, *length=NULL, *returnvar=NULL;
int len=0;
@@ -65,9 +69,14 @@ static int readfile_exec(struct ast_channel *chan, void *data)
return -1;
}
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
s = ast_strdupa(data);
if (!s) {
ast_log(LOG_ERROR, "Out of memory\n");
LOCAL_USER_REMOVE(u);
return -1;
}
varname = strsep(&s, "=");
file = strsep(&s, "|");
@@ -75,7 +84,7 @@ static int readfile_exec(struct ast_channel *chan, void *data)
if (!varname || !file) {
ast_log(LOG_ERROR, "No file or variable specified!\n");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -96,25 +105,40 @@ static int readfile_exec(struct ast_channel *chan, void *data)
pbx_builtin_setvar_helper(chan, varname, returnvar);
free(returnvar);
}
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return res;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app_readfile);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
return ast_register_application(app_readfile, readfile_exec, readfile_synopsis, readfile_descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Stores output of file into a variable");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -20,22 +20,19 @@
/*! \file
*
* \brief RealTime App
*
* \author Anthony Minessale <anthmct@yahoo.com>
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
@@ -49,54 +46,50 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#define next_one(var) var = var->next
#define crop_data(str) { *(str) = '\0' ; (str)++; }
static char *tdesc = "Realtime Data Lookup/Rewrite";
static char *app = "RealTime";
static char *uapp = "RealTimeUpdate";
static char *synopsis = "Realtime Data Lookup";
static char *usynopsis = "Realtime Data Rewrite";
static char *USAGE = "RealTime(<family>|<colmatch>|<value>[|<prefix>])";
static char *UUSAGE = "RealTimeUpdate(<family>|<colmatch>|<value>|<newcol>|<newval>)";
static char *desc =
"Use the RealTime config handler system to read data into channel variables.\n"
static char *desc = "Use the RealTime config handler system to read data into channel variables.\n"
"RealTime(<family>|<colmatch>|<value>[|<prefix>])\n\n"
"All unique column names will be set as channel variables with optional prefix\n"
"to the name. For example, a prefix of 'var_' would make the column 'name'\n"
"become the variable ${var_name}. REALTIMECOUNT will be set with the number\n"
"of values read.\n";
"All unique column names will be set as channel variables with optional prefix to the name.\n"
"e.g. prefix of 'var_' would make the column 'name' become the variable ${var_name}\n\n";
static char *udesc = "Use the RealTime config handler system to update a value\n"
"RealTimeUpdate(<family>|<colmatch>|<value>|<newcol>|<newval>)\n\n"
"The column <newcol> in 'family' matching column <colmatch>=<value> will be\n"
"updated to <newval>. REALTIMECOUNT will be set with the number of rows\n"
"updated or -1 if an error occurs.\n";
"The column <newcol> in 'family' matching column <colmatch>=<value> will be updated to <newval>\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int cli_realtime_load(int fd, int argc, char **argv)
static int cli_load_realtime(int fd, int argc, char **argv)
{
char *header_format = "%30s %-30s\n";
struct ast_variable *var = NULL, *save = NULL;
struct ast_variable *var=NULL;
if (argc < 5) {
if(argc<5) {
ast_cli(fd, "You must supply a family name, a column to match on, and a value to match to.\n");
return RESULT_FAILURE;
}
var = ast_load_realtime(argv[2], argv[3], argv[4], NULL);
if (var) {
save = var;
if(var) {
ast_cli(fd, header_format, "Column Name", "Column Value");
ast_cli(fd, header_format, "--------------------", "--------------------");
while (var) {
while(var) {
ast_cli(fd, header_format, var->name, var->value);
var = var->next;
}
ast_variables_destroy(save);
} else {
ast_cli(fd, "No rows found matching search criteria.\n");
}
return RESULT_SUCCESS;
}
static int cli_realtime_update(int fd, int argc, char **argv) {
static int cli_update_realtime(int fd, int argc, char **argv) {
int res = 0;
if(argc<7) {
@@ -117,49 +110,45 @@ static int cli_realtime_update(int fd, int argc, char **argv) {
return RESULT_SUCCESS;
}
static char cli_realtime_load_usage[] =
static char cli_load_realtime_usage[] =
"Usage: realtime load <family> <colmatch> <value>\n"
" Prints out a list of variables using the RealTime driver.\n";
static char cli_realtime_update_usage[] =
static struct ast_cli_entry cli_load_realtime_cmd = {
{ "realtime", "load", NULL, NULL }, cli_load_realtime,
"Used to print out RealTime variables.", cli_load_realtime_usage, NULL };
static char cli_update_realtime_usage[] =
"Usage: realtime update <family> <colmatch> <value>\n"
" Update a single variable using the RealTime driver.\n";
static struct ast_cli_entry cli_realtime[] = {
{ { "realtime", "load", NULL, NULL },
cli_realtime_load, "Used to print out RealTime variables.",
cli_realtime_load_usage, NULL },
{ { "realtime", "update", NULL, NULL },
cli_realtime_update, "Used to update RealTime variables.",
cli_realtime_update_usage, NULL },
};
static struct ast_cli_entry cli_update_realtime_cmd = {
{ "realtime", "update", NULL, NULL }, cli_update_realtime,
"Used to update RealTime variables.", cli_update_realtime_usage, NULL };
static int realtime_update_exec(struct ast_channel *chan, void *data)
{
char *family=NULL, *colmatch=NULL, *value=NULL, *newcol=NULL, *newval=NULL;
struct ast_module_user *u;
int res = 0, count = 0;
char countc[13];
ast_log(LOG_WARNING, "The RealTimeUpdate application has been deprecated in favor of the REALTIME dialplan function.\n");
struct localuser *u;
int res = 0;
if (ast_strlen_zero(data)) {
ast_log(LOG_ERROR,"Invalid input: usage %s\n",UUSAGE);
return -1;
}
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
family = ast_strdupa(data);
if ((colmatch = strchr(family,'|'))) {
crop_data(colmatch);
if ((value = strchr(colmatch,'|'))) {
crop_data(value);
if ((newcol = strchr(value,'|'))) {
crop_data(newcol);
if ((newval = strchr(newcol,'|')))
crop_data(newval);
if ((family = ast_strdupa(data))) {
if ((colmatch = strchr(family,'|'))) {
crop_data(colmatch);
if ((value = strchr(colmatch,'|'))) {
crop_data(value);
if ((newcol = strchr(value,'|'))) {
crop_data(newcol);
if ((newval = strchr(newcol,'|')))
crop_data(newval);
}
}
}
}
@@ -167,13 +156,10 @@ static int realtime_update_exec(struct ast_channel *chan, void *data)
ast_log(LOG_ERROR,"Invalid input: usage %s\n",UUSAGE);
res = -1;
} else {
count = ast_update_realtime(family,colmatch,value,newcol,newval,NULL);
ast_update_realtime(family,colmatch,value,newcol,newval,NULL);
}
snprintf(countc, sizeof(countc), "%d", count);
pbx_builtin_setvar_helper(chan, "REALTIMECOUNT", countc);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return res;
}
@@ -181,29 +167,27 @@ static int realtime_update_exec(struct ast_channel *chan, void *data)
static int realtime_exec(struct ast_channel *chan, void *data)
{
int res=0, count=0;
struct ast_module_user *u;
int res=0;
struct localuser *u;
struct ast_variable *var, *itt;
char *family=NULL, *colmatch=NULL, *value=NULL, *prefix=NULL, *vname=NULL;
char countc[13];
size_t len;
ast_log(LOG_WARNING, "The RealTime application has been deprecated in favor of the REALTIME dialplan function.\n");
if (ast_strlen_zero(data)) {
ast_log(LOG_ERROR,"Invalid input: usage %s\n",USAGE);
return -1;
}
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
family = ast_strdupa(data);
if ((colmatch = strchr(family,'|'))) {
crop_data(colmatch);
if ((value = strchr(colmatch,'|'))) {
crop_data(value);
if ((prefix = strchr(value,'|')))
crop_data(prefix);
if ((family = ast_strdupa(data))) {
if ((colmatch = strchr(family,'|'))) {
crop_data(colmatch);
if ((value = strchr(colmatch,'|'))) {
crop_data(value);
if ((prefix = strchr(value,'|')))
crop_data(prefix);
}
}
}
if (! (family && value && colmatch) ) {
@@ -223,41 +207,56 @@ static int realtime_exec(struct ast_channel *chan, void *data)
vname = itt->name;
pbx_builtin_setvar_helper(chan, vname, itt->value);
count++;
}
ast_variables_destroy(var);
} else if (option_verbose > 3)
ast_verbose(VERBOSE_PREFIX_4"No Realtime Matches Found.\n");
}
snprintf(countc, sizeof(countc), "%d", count);
pbx_builtin_setvar_helper(chan, "REALTIMECOUNT", countc);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return res;
}
static int unload_module(void)
int unload_module(void)
{
int res;
ast_cli_unregister_multiple(cli_realtime, sizeof(cli_realtime) / sizeof(struct ast_cli_entry));
res = ast_unregister_application(uapp);
res = ast_cli_unregister(&cli_load_realtime_cmd);
res |= ast_cli_unregister(&cli_update_realtime_cmd);
res |= ast_unregister_application(uapp);
res |= ast_unregister_application(app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
int res;
ast_cli_register_multiple(cli_realtime, sizeof(cli_realtime) / sizeof(struct ast_cli_entry));
res = ast_register_application(uapp, realtime_update_exec, usynopsis, udesc);
res = ast_cli_register(&cli_load_realtime_cmd);
res |= ast_cli_register(&cli_update_realtime_cmd);
res |= ast_register_application(uapp, realtime_update_exec, usynopsis, udesc);
res |= ast_register_application(app, realtime_exec, synopsis, desc);
return res;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Realtime Data Lookup/Rewrite");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -20,19 +20,17 @@
*
* \brief Trivial application to record a sound file
*
* \author Matthew Fredrickson <creslin@digium.com>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -45,6 +43,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/options.h"
#include "asterisk/app.h"
static char *tdesc = "Trivial Record Application";
static char *app = "Record";
@@ -63,17 +62,19 @@ static char *descrip =
" 'n' : do not answer, but record anyway if line not yet answered\n"
" 'q' : quiet (do not play a beep tone)\n"
" 's' : skip recording if the line is not yet answered\n"
" 't' : use alternate '*' terminator key (DTMF) instead of default '#'\n"
" 'x' : ignore all terminator keys (DTMF) and keep recording until hangup\n"
" 't' : use alternate '*' terminator key instead of default '#'\n"
"\n"
"If filename contains '%d', these characters will be replaced with a number\n"
"incremented by one each time the file is recorded. A channel variable\n"
"named RECORDED_FILE will also be set, which contains the final filemname.\n\n"
"Use 'core show file formats' to see the available formats on your system\n\n"
"Use 'show file formats' to see the available formats on your system\n\n"
"User can press '#' to terminate the recording and continue to the next priority.\n\n"
"If the user should hangup during a recording, all data will be lost and the\n"
"application will teminate. \n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int record_exec(struct ast_channel *chan, void *data)
{
@@ -86,7 +87,7 @@ static int record_exec(struct ast_channel *chan, void *data)
char tmp[256];
struct ast_filestream *s = '\0';
struct ast_module_user *u;
struct localuser *u;
struct ast_frame *f = NULL;
struct ast_dsp *sildet = NULL; /* silence detector dsp */
@@ -112,10 +113,15 @@ static int record_exec(struct ast_channel *chan, void *data)
return -1;
}
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
/* Yay for strsep being easy */
vdata = ast_strdupa(data);
if (!vdata) {
ast_log(LOG_ERROR, "Out of memory\n");
LOCAL_USER_REMOVE(u);
return -1;
}
p = vdata;
filename = strsep(&p, "|");
@@ -136,7 +142,7 @@ static int record_exec(struct ast_channel *chan, void *data)
}
if (!ext) {
ast_log(LOG_WARNING, "No extension specified to filename!\n");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
if (silstr) {
@@ -169,8 +175,6 @@ static int record_exec(struct ast_channel *chan, void *data)
option_append = 1;
if (strchr(options, 't'))
terminator = '*';
if (strchr(options, 'x'))
terminator = 0;
if (strchr(options, 'q'))
option_quiet = 1;
}
@@ -189,7 +193,8 @@ static int record_exec(struct ast_channel *chan, void *data)
int i;
/* Separate each piece out by the format specifier */
AST_NONSTANDARD_APP_ARGS(fname, tmp2, '%');
/* AST_NONSTANDARD_APP_ARGS(fname, tmp2, '%'); */
fname.argc = ast_app_separate_args(tmp2, '%', fname.argv, (sizeof(fname) - sizeof(fname.argc)) / sizeof(fname.argv[0]));
do {
int tmplen;
/* First piece has no leading percent, so it's copied verbatim */
@@ -210,10 +215,10 @@ static int record_exec(struct ast_channel *chan, void *data)
ast_copy_string(tmp + tmplen, &(fname.piece[i][1]), sizeof(tmp) - tmplen);
}
count++;
} while (ast_fileexists(tmp, ext, chan->language) > 0);
} while ( ast_fileexists(tmp, ext, chan->language) != -1 );
pbx_builtin_setvar_helper(chan, "RECORDED_FILE", tmp);
} else
ast_copy_string(tmp, filename, sizeof(tmp));
strncpy(tmp, filename, sizeof(tmp)-1);
/* end of routine mentioned */
@@ -221,7 +226,7 @@ static int record_exec(struct ast_channel *chan, void *data)
if (chan->_state != AST_STATE_UP) {
if (option_skip) {
/* At the user's option, skip if the line is not up */
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return 0;
} else if (!option_noanswer) {
/* Otherwise answer unless we're supposed to record while on-hook */
@@ -252,13 +257,13 @@ static int record_exec(struct ast_channel *chan, void *data)
res = ast_set_read_format(chan, AST_FORMAT_SLINEAR);
if (res < 0) {
ast_log(LOG_WARNING, "Unable to set to linear mode, giving up\n");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
sildet = ast_dsp_new();
if (!sildet) {
ast_log(LOG_WARNING, "Unable to create silence detector :(\n");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
ast_dsp_set_threshold(sildet, 256);
@@ -273,7 +278,7 @@ static int record_exec(struct ast_channel *chan, void *data)
goto out;
}
if (ast_opt_transmit_silence)
if (option_transmit_silence_during_record)
silgen = ast_channel_start_silence_generator(chan);
/* Request a video update */
@@ -362,25 +367,40 @@ static int record_exec(struct ast_channel *chan, void *data)
ast_dsp_free(sildet);
}
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return res;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
return ast_register_application(app, record_exec, synopsis, descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Trivial Record Application");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,7 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (c) 2003, 2006 Tilghman Lesher. All rights reserved.
* Copyright (c) 2006 Digium, Inc.
* Copyright (c) 2003 Tilghman Lesher. All rights reserved.
*
* Tilghman Lesher <app_sayunixtime__200309@the-tilghman.com>
*
@@ -19,21 +18,19 @@
/*! \file
*
* \brief SayUnixTime application
*
* \author Tilghman Lesher <app_sayunixtime__200309@the-tilghman.com>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/options.h"
@@ -41,7 +38,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/say.h"
#include "asterisk/app.h"
static char *tdesc = "Say time";
static char *app_sayunixtime = "SayUnixTime";
static char *app_datetime = "DateTime";
@@ -65,55 +64,78 @@ static char *datetime_descrip =
" format: a format the time is to be said in. See voicemail.conf.\n"
" defaults to \"ABdY 'digits/at' IMp\"\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int sayunixtime_exec(struct ast_channel *chan, void *data)
{
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(timeval);
AST_APP_ARG(timezone);
AST_APP_ARG(format);
);
char *parse;
int res = 0;
struct ast_module_user *u;
int res=0;
struct localuser *u;
char *s,*zone=NULL,*timec,*format;
time_t unixtime;
struct timeval tv;
if (!data)
return 0;
LOCAL_USER_ADD(u);
parse = ast_strdupa(data);
tv = ast_tvnow();
unixtime = (time_t)tv.tv_sec;
u = ast_module_user_add(chan);
if( !strcasecmp(chan->language, "da" ) ) {
format = "A dBY HMS";
} else if ( !strcasecmp(chan->language, "de" ) ) {
format = "A dBY HMS";
} else {
format = "ABdY 'digits/at' IMp";
}
AST_STANDARD_APP_ARGS(args, parse);
if (data) {
s = data;
s = ast_strdupa(s);
if (s) {
timec = strsep(&s,"|");
if ((timec) && (*timec != '\0')) {
long timein;
if (sscanf(timec,"%ld",&timein) == 1) {
unixtime = (time_t)timein;
}
}
if (s) {
zone = strsep(&s,"|");
if (zone && (*zone == '\0'))
zone = NULL;
if (s) {
format = s;
}
}
} else {
ast_log(LOG_ERROR, "Out of memory error\n");
}
}
ast_get_time_t(args.timeval, &unixtime, time(NULL), NULL);
if (chan->_state != AST_STATE_UP)
if (chan->_state != AST_STATE_UP) {
res = ast_answer(chan);
}
if (!res)
res = ast_say_date_with_format(chan, unixtime, AST_DIGIT_ANY,
chan->language, args.format, args.timezone);
ast_module_user_remove(u);
res = ast_say_date_with_format(chan, unixtime, AST_DIGIT_ANY, chan->language, format, zone);
LOCAL_USER_REMOVE(u);
return res;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app_sayunixtime);
res |= ast_unregister_application(app_datetime);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
int res;
@@ -123,4 +145,19 @@ static int load_module(void)
return res;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Say time");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -19,20 +19,18 @@
/*! \file
*
* \brief App to send DTMF digits
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -43,7 +41,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/options.h"
#include "asterisk/utils.h"
#include "asterisk/app.h"
#include "asterisk/manager.h"
static char *tdesc = "Send DTMF digits Application";
static char *app = "SendDTMF";
@@ -55,11 +54,14 @@ static char *descrip =
" The application will either pass the assigned digits or terminate if it\n"
" encounters an error.\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int senddtmf_exec(struct ast_channel *chan, void *data)
{
int res = 0;
struct ast_module_user *u;
struct localuser *u;
char *digits = NULL, *to = NULL;
int timeout = 250;
@@ -68,9 +70,14 @@ static int senddtmf_exec(struct ast_channel *chan, void *data)
return 0;
}
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
digits = ast_strdupa(data);
if (!digits) {
ast_log(LOG_ERROR, "Out of Memory!\n");
LOCAL_USER_REMOVE(u);
return -1;
}
if ((to = strchr(digits,'|'))) {
*to = '\0';
@@ -78,66 +85,45 @@ static int senddtmf_exec(struct ast_channel *chan, void *data)
timeout = atoi(to);
}
if (timeout <= 0)
if(timeout <= 0)
timeout = 250;
res = ast_dtmf_stream(chan,NULL,digits,timeout);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return res;
}
static char mandescr_playdtmf[] =
"Description: Plays a dtmf digit on the specified channel.\n"
"Variables: (all are required)\n"
" Channel: Channel name to send digit to\n"
" Digit: The dtmf digit to play\n";
static int manager_play_dtmf(struct mansession *s, const struct message *m)
{
const char *channel = astman_get_header(m, "Channel");
const char *digit = astman_get_header(m, "Digit");
struct ast_channel *chan = ast_get_channel_by_name_locked(channel);
if (!chan) {
astman_send_error(s, m, "Channel not specified");
return 0;
}
if (!digit) {
astman_send_error(s, m, "No digit specified");
ast_mutex_unlock(&chan->lock);
return 0;
}
ast_senddigit(chan, *digit);
ast_mutex_unlock(&chan->lock);
astman_send_ack(s, m, "DTMF successfully queued");
return 0;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
res |= ast_manager_unregister("PlayDTMF");
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
return ast_register_application(app, senddtmf_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
res = ast_manager_register2( "PlayDTMF", EVENT_FLAG_CALL, manager_play_dtmf, "Play DTMF signal on a specific channel.", mandescr_playdtmf );
res |= ast_register_application(app, senddtmf_exec, synopsis, descrip);
STANDARD_USECOUNT(res);
return res;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Send DTMF digits Application");
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -19,22 +19,20 @@
/*! \file
*
* \brief App to transmit a text message
*
* \author Mark Spencer <markster@digium.com>
*
* \note Requires support of sending text messages from channel driver
* Requires support of sending text messages from channel driver
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -46,6 +44,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/options.h"
#include "asterisk/app.h"
static const char *tdesc = "Send Text Applications";
static const char *app = "SendText";
static const char *synopsis = "Send a Text Message";
@@ -63,11 +63,14 @@ static const char *descrip =
"'j' -- jump to n+101 priority if the channel doesn't support\n"
" text transport\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int sendtext_exec(struct ast_channel *chan, void *data)
{
int res = 0;
struct ast_module_user *u;
struct localuser *u;
char *status = "UNSUPPORTED";
char *parse = NULL;
int priority_jump = 0;
@@ -76,14 +79,20 @@ static int sendtext_exec(struct ast_channel *chan, void *data)
AST_APP_ARG(options);
);
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "SendText requires an argument (text[|options])\n");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
} else
} else {
parse = ast_strdupa(data);
if (!parse) {
ast_log(LOG_ERROR, "Out of memory!\n");
LOCAL_USER_REMOVE(u);
return -1;
}
}
AST_STANDARD_APP_ARGS(args, parse);
@@ -92,40 +101,56 @@ static int sendtext_exec(struct ast_channel *chan, void *data)
priority_jump = 1;
}
ast_channel_lock(chan);
ast_mutex_lock(&chan->lock);
if (!chan->tech->send_text) {
ast_channel_unlock(chan);
pbx_builtin_setvar_helper(chan, "SENDTEXTSTATUS", status);
ast_mutex_unlock(&chan->lock);
/* Does not support transport */
if (priority_jump || ast_opt_priority_jumping)
if (priority_jump || option_priority_jumping)
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return 0;
}
status = "FAILURE";
ast_channel_unlock(chan);
ast_mutex_unlock(&chan->lock);
res = ast_sendtext(chan, args.text);
if (!res)
status = "SUCCESS";
pbx_builtin_setvar_helper(chan, "SENDTEXTSTATUS", status);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return 0;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
return ast_register_application(app, sendtext_exec, synopsis, descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Send Text Applications");
char *description(void)
{
return (char *) tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -19,20 +19,18 @@
/*! \file
*
* \brief App to set callerid
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -47,6 +45,9 @@ static char *app2 = "SetCallerPres";
static char *synopsis2 = "Set CallerID Presentation";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static char *descrip2 =
" SetCallerPres(presentation): Set Caller*ID presentation on a call.\n"
@@ -66,28 +67,29 @@ static char *descrip2 =
static int setcallerid_pres_exec(struct ast_channel *chan, void *data)
{
struct ast_module_user *u;
struct localuser *u;
int pres = -1;
u = ast_module_user_add(chan);
/* For interface consistency, permit the argument to be specified as a number */
if (sscanf(data, "%d", &pres) != 1 || pres < 0 || pres > 255 || (pres & 0x9c)) {
pres = ast_parse_caller_presentation(data);
}
LOCAL_USER_ADD(u);
pres = ast_parse_caller_presentation(data);
if (pres < 0) {
ast_log(LOG_WARNING, "'%s' is not a valid presentation (see 'show application SetCallerPres')\n",
(char *) data);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return 0;
}
chan->cid.cid_pres = pres;
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return 0;
}
static char *tdesc = "Set CallerID Application";
static char *app = "SetCallerID";
static char *synopsis = "Set CallerID";
@@ -102,24 +104,23 @@ static int setcallerid_exec(struct ast_channel *chan, void *data)
char *tmp = NULL;
char name[256];
char num[256];
struct ast_module_user *u;
struct localuser *u;
char *opt;
int anitoo = 0;
static int dep_warning = 0;
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "SetCallerID requires an argument!\n");
return 0;
}
u = ast_module_user_add(chan);
if (!dep_warning) {
dep_warning = 1;
ast_log(LOG_WARNING, "SetCallerID is deprecated. Please use Set(CALLERID(all)=...) or Set(CALLERID(ani)=...) instead.\n");
}
LOCAL_USER_ADD(u);
tmp = ast_strdupa(data);
if (!tmp) {
ast_log(LOG_ERROR, "Out of memory\n");
LOCAL_USER_REMOVE(u);
return -1;
}
opt = strchr(tmp, '|');
if (opt) {
@@ -132,24 +133,24 @@ static int setcallerid_exec(struct ast_channel *chan, void *data)
ast_callerid_split(tmp, name, sizeof(name), num, sizeof(num));
ast_set_callerid(chan, num, name, anitoo ? num : NULL);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return res;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app2);
res |= ast_unregister_application(app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
int res;
@@ -159,4 +160,19 @@ static int load_module(void)
return res;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Set CallerID Application");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -19,20 +19,18 @@
/*! \file
*
* \brief Applictions connected with CDR engine
*
* \author Justin Huff <jjhuff@mspin.net>
*
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <sys/types.h>
#include <stdlib.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/channel.h"
#include "asterisk/cdr.h"
#include "asterisk/module.h"
@@ -43,6 +41,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/utils.h"
static char *tdesc = "CDR user field apps";
static char *setcdruserfield_descrip =
"[Synopsis]\n"
"SetCDRUserField(value)\n\n"
@@ -52,8 +52,7 @@ static char *setcdruserfield_descrip =
" can use for data not stored anywhere else in the record.\n"
" CDR records can be used for billing or storing other arbitrary data\n"
" (I.E. telephone survey responses)\n"
" Also see AppendCDRUserField().\n"
"\nThis application is deprecated in favor of Set(CDR(userfield)=...)\n";
" Also see AppendCDRUserField().\n";
static char *setcdruserfield_app = "SetCDRUserField";
@@ -68,19 +67,21 @@ static char *appendcdruserfield_descrip =
" can use for data not stored anywhere else in the record.\n"
" CDR records can be used for billing or storing other arbitrary data\n"
" (I.E. telephone survey responses)\n"
" Also see SetCDRUserField().\n"
"\nThis application is deprecated in favor of Set(CDR(userfield)=...)\n";
" Also see SetCDRUserField().\n";
static char *appendcdruserfield_app = "AppendCDRUserField";
static char *appendcdruserfield_synopsis = "Append to the CDR user field";
STANDARD_LOCAL_USER;
static int action_setcdruserfield(struct mansession *s, const struct message *m)
LOCAL_USER_DECL;
static int action_setcdruserfield(struct mansession *s, struct message *m)
{
struct ast_channel *c = NULL;
const char *userfield = astman_get_header(m, "UserField");
const char *channel = astman_get_header(m, "Channel");
const char *append = astman_get_header(m, "Append");
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");
@@ -106,49 +107,37 @@ static int action_setcdruserfield(struct mansession *s, const struct message *m)
static int setcdruserfield_exec(struct ast_channel *chan, void *data)
{
struct ast_module_user *u;
struct localuser *u;
int res = 0;
static int dep_warning = 0;
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
if (chan->cdr && data) {
ast_cdr_setuserfield(chan, (char*)data);
}
if (!dep_warning) {
dep_warning = 1;
ast_log(LOG_WARNING, "SetCDRUserField is deprecated. Please use CDR(userfield) instead.\n");
}
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return res;
}
static int appendcdruserfield_exec(struct ast_channel *chan, void *data)
{
struct ast_module_user *u;
struct localuser *u;
int res = 0;
static int dep_warning = 0;
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
if (chan->cdr && data) {
ast_cdr_appenduserfield(chan, (char*)data);
}
if (!dep_warning) {
dep_warning = 1;
ast_log(LOG_WARNING, "AppendCDRUserField is deprecated. Please use CDR(userfield) instead.\n");
}
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return res;
}
static int unload_module(void)
int unload_module(void)
{
int res;
@@ -156,12 +145,12 @@ static int unload_module(void)
res |= ast_unregister_application(appendcdruserfield_app);
res |= ast_manager_unregister("SetCDRUserField");
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
int res;
@@ -172,4 +161,19 @@ static int load_module(void)
return res;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "CDR user field apps");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

132
apps/app_setcidname.c Normal file
View File

@@ -0,0 +1,132 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 1999 - 2005, Digium, Inc.
*
* Mark Spencer <markster@digium.com>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
*/
/*! \file
*
* \brief App to set callerid
*
* \ingroup applications
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#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/image.h"
#include "asterisk/callerid.h"
#include "asterisk/utils.h"
static char *tdesc = "Set CallerID Name";
static char *app = "SetCIDName";
static char *synopsis = "Set CallerID Name";
static char *descrip =
" SetCIDName(cname[|a]): Set Caller*ID Name on a call to a new\n"
"value, while preserving the original Caller*ID number. This is\n"
"useful for providing additional information to the called\n"
"party. \n"
"SetCIDName has been deprecated in favor of the function\n"
"CALLERID(name)\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int setcallerid_exec(struct ast_channel *chan, void *data)
{
char *tmp = NULL;
struct localuser *u;
char *opt;
static int deprecation_warning = 0;
if (!deprecation_warning) {
ast_log(LOG_WARNING, "SetCIDName is deprecated, please use Set(CALLERID(name)=value) instead.\n");
deprecation_warning = 1;
}
if (ast_strlen_zero(data)) {
ast_log(LOG_ERROR, "SetCIDName requires an argument!\n");
return 0;
}
LOCAL_USER_ADD(u);
tmp = ast_strdupa(data);
if (!tmp) {
ast_log(LOG_ERROR, "Out of memory\n");
LOCAL_USER_REMOVE(u);
return -1;
}
opt = strchr(tmp, '|');
if (opt) {
*opt = '\0';
}
ast_set_callerid(chan, NULL, tmp, NULL);
LOCAL_USER_REMOVE(u);
return 0;
}
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
return res;
}
int load_module(void)
{
return ast_register_application(app, setcallerid_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

131
apps/app_setcidnum.c Normal file
View File

@@ -0,0 +1,131 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 1999 - 2005, Digium, Inc.
*
* Mark Spencer <markster@digium.com>
* Oliver Daudey <traveler@xs4all.nl>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
*/
/*! \file
*
* \brief App to set callerid number
*
* \ingroup applications
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#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/image.h"
#include "asterisk/callerid.h"
#include "asterisk/utils.h"
static char *tdesc = "Set CallerID Number";
static char *app = "SetCIDNum";
static char *synopsis = "Set CallerID Number";
static char *descrip =
" SetCIDNum(cnum[|a]): Set Caller*ID Number on a call to a new\n"
"value, while preserving the original Caller*ID name. This is\n"
"useful for providing additional information to the called\n"
"party. Sets ANI as well if a flag is used.\n"
"SetCIDNum has been deprecated in favor of the function\n"
"CALLERID(number)\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int setcallerid_exec(struct ast_channel *chan, void *data)
{
int res = 0;
struct localuser *u;
char *opt;
int anitoo = 0;
char *tmp = NULL;
static int deprecation_warning = 0;
LOCAL_USER_ADD(u);
if (!deprecation_warning) {
ast_log(LOG_WARNING, "SetCIDNum is deprecated, please use Set(CALLERID(number)=value) instead.\n");
deprecation_warning = 1;
}
if (data)
tmp = ast_strdupa(data);
else
tmp = "";
opt = strchr(tmp, '|');
if (opt) {
*opt = '\0';
opt++;
if (*opt == 'a')
anitoo = 1;
}
ast_set_callerid(chan, tmp, NULL, anitoo ? tmp : NULL);
LOCAL_USER_REMOVE(u);
return res;
}
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
return res;
}
int load_module(void)
{
return ast_register_application(app, setcallerid_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

132
apps/app_setrdnis.c Normal file
View File

@@ -0,0 +1,132 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 1999 - 2005, Digium, Inc.
*
* Mark Spencer <markster@digium.com>
* Oliver Daudey <traveler@xs4all.nl>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
*/
/*! \file
*
* \brief App to set rdnis
*
* \ingroup applications
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#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/image.h"
#include "asterisk/callerid.h"
#include "asterisk/utils.h"
static char *tdesc = "Set RDNIS Number";
static char *app = "SetRDNIS";
static char *synopsis = "Set RDNIS Number";
static char *descrip =
" SetRDNIS(cnum): Set RDNIS Number on a call to a new\n"
"value.\n"
"SetRDNIS has been deprecated in favor of the function\n"
"CALLERID(rdnis)\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int setrdnis_exec(struct ast_channel *chan, void *data)
{
struct localuser *u;
char *opt, *n, *l;
char *tmp = NULL;
static int deprecation_warning = 0;
LOCAL_USER_ADD(u);
if (!deprecation_warning) {
ast_log(LOG_WARNING, "SetRDNIS is deprecated, please use Set(CALLERID(rdnis)=value) instead.\n");
deprecation_warning = 1;
}
if (data)
tmp = ast_strdupa(data);
else
tmp = "";
opt = strchr(tmp, '|');
if (opt)
*opt = '\0';
n = l = NULL;
ast_callerid_parse(tmp, &n, &l);
if (l) {
ast_shrink_phone_number(l);
ast_mutex_lock(&chan->lock);
if (chan->cid.cid_rdnis)
free(chan->cid.cid_rdnis);
chan->cid.cid_rdnis = (l[0]) ? strdup(l) : NULL;
ast_mutex_unlock(&chan->lock);
}
LOCAL_USER_REMOVE(u);
return 0;
}
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
return res;
}
int load_module(void)
{
return ast_register_application(app, setrdnis_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -19,19 +19,17 @@
/*! \file
*
* \brief App to set the ISDN Transfer Capability
*
* \author Frank Sautter - asterisk+at+sautter+dot+com
*
* \ingroup applications
*/
#include <string.h>
#include <stdlib.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <string.h>
#include <stdlib.h>
#include "asterisk/logger.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
@@ -44,6 +42,9 @@ static char *app = "SetTransferCapability";
static char *synopsis = "Set ISDN Transfer Capability";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static struct { int val; char *name; } transcaps[] = {
{ AST_TRANS_CAP_SPEECH, "SPEECH" },
@@ -64,27 +65,20 @@ static char *descrip =
" RESTRICTED_DIGITAL : 0x09 - Restricted digital information\n"
" 3K1AUDIO : 0x10 - 3.1kHz Audio (fax calls)\n"
" DIGITAL_W_TONES : 0x11 - Unrestricted digital information with tones/announcements\n"
" VIDEO : 0x18 - Video\n"
" VIDEO : 0x18 - Video:\n"
"\n"
"This application is deprecated in favor of Set(CHANNEL(transfercapability)=...)\n"
;
static int settransfercapability_exec(struct ast_channel *chan, void *data)
{
char *tmp = NULL;
struct ast_module_user *u;
struct localuser *u;
int x;
char *opts;
int transfercapability = -1;
static int dep_warning = 0;
u = ast_module_user_add(chan);
if (!dep_warning) {
dep_warning = 1;
ast_log(LOG_WARNING, "SetTransferCapability is deprecated. Please use CHANNEL(transfercapability) instead.\n");
}
LOCAL_USER_ADD(u);
if (data)
tmp = ast_strdupa(data);
else
@@ -102,7 +96,7 @@ static int settransfercapability_exec(struct ast_channel *chan, void *data)
}
if (transfercapability < 0) {
ast_log(LOG_WARNING, "'%s' is not a valid transfer capability (see 'show application SetTransferCapability')\n", tmp);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return 0;
}
@@ -111,26 +105,41 @@ static int settransfercapability_exec(struct ast_channel *chan, void *data)
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Setting transfer capability to: 0x%.2x - %s.\n", transfercapability, tmp);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return 0;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
return ast_register_application(app, settransfercapability_exec, synopsis, descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Set ISDN Transfer Capability");
char *description(void)
{
return synopsis;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -19,26 +19,20 @@
/*! \file
*
* \brief Skeleton application
*
* \author <Your Name Here> <<Your Email Here>>
*
* This is a skeleton for development of an Asterisk application
* This is a skeleton for development of an Asterisk application
* \ingroup applications
*/
/*** MODULEINFO
<defaultenabled>no</defaultenabled>
***/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
@@ -47,87 +41,109 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/app.h"
static char *tdesc = "Trivial skeleton Application";
static char *app = "Skel";
static char *synopsis =
"Skeleton application.";
static char *descrip = "This application is a template to build other applications from.\n"
" It shows you the basic structure to create your own Asterisk applications.\n";
enum {
OPTION_A = (1 << 0),
OPTION_B = (1 << 1),
OPTION_C = (1 << 2),
} option_flags;
enum {
OPTION_ARG_B = 0,
OPTION_ARG_C = 1,
/* This *must* be the last value in this enum! */
OPTION_ARG_ARRAY_SIZE = 2,
} option_args;
#define OPTION_A (1 << 0) /* Option A */
#define OPTION_B (1 << 1) /* Option B(n) */
#define OPTION_C (1 << 2) /* Option C(str) */
#define OPTION_NULL (1 << 3) /* Dummy Termination */
AST_APP_OPTIONS(app_opts,{
AST_APP_OPTION('a', OPTION_A),
AST_APP_OPTION_ARG('b', OPTION_B, OPTION_ARG_B),
AST_APP_OPTION_ARG('c', OPTION_C, OPTION_ARG_C),
['a'] = { OPTION_A },
['b'] = { OPTION_B, 1 },
['c'] = { OPTION_C, 2 }
});
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int app_exec(struct ast_channel *chan, void *data)
{
int res = 0;
struct ast_flags flags;
struct ast_module_user *u;
char *parse, *opts[OPTION_ARG_ARRAY_SIZE];
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(dummy);
AST_APP_ARG(options);
);
struct localuser *u;
char *options=NULL;
char *dummy = NULL;
char *args;
int argc = 0;
char *opts[2];
char *argv[2];
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "%s requires an argument (dummy|[options])\n", app);
ast_log(LOG_WARNING, "%s requires an argument (dummy|[options])\n",app);
return -1;
}
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
/* Do our thing here */
/* We need to make a copy of the input string if we are going to modify it! */
parse = ast_strdupa(data);
args = ast_strdupa(data);
if (!args) {
ast_log(LOG_ERROR, "Out of memory!\n");
LOCAL_USER_REMOVE(u);
return -1;
}
if ((argc = ast_app_separate_args(args, '|', argv, sizeof(argv) / sizeof(argv[0])))) {
dummy = argv[0];
options = argv[1];
ast_app_parse_options(app_opts, &flags, opts, options);
}
AST_STANDARD_APP_ARGS(args, parse);
if (args.argc == 2)
ast_app_parse_options(app_opts, &flags, opts, args.options);
if (!ast_strlen_zero(args.dummy))
ast_log(LOG_NOTICE, "Dummy value is : %s\n", args.dummy);
if (!ast_strlen_zero(dummy))
ast_log(LOG_NOTICE, "Dummy value is : %s\n", dummy);
if (ast_test_flag(&flags, OPTION_A))
ast_log(LOG_NOTICE, "Option A is set\n");
if (ast_test_flag(&flags, OPTION_B))
ast_log(LOG_NOTICE, "Option B is set with : %s\n", opts[OPTION_ARG_B] ? opts[OPTION_ARG_B] : "<unspecified>");
ast_log(LOG_NOTICE,"Option B is set with : %s\n", opts[0] ? opts[0] : "<unspecified>");
if (ast_test_flag(&flags, OPTION_C))
ast_log(LOG_NOTICE, "Option C is set with : %s\n", opts[OPTION_ARG_C] ? opts[OPTION_ARG_C] : "<unspecified>");
ast_module_user_remove(u);
ast_log(LOG_NOTICE,"Option C is set with : %s\n", opts[1] ? opts[1] : "<unspecified>");
LOCAL_USER_REMOVE(u);
return res;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
return ast_register_application(app, app_exec, synopsis, descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Skeleton (sample) Application");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -18,14 +18,9 @@
*
* \brief SMS application - ETSI ES 201 912 protocol 1 implimentation
* \ingroup applications
*
* \author Adrian Kennard
*
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -36,6 +31,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <sys/types.h>
#include <sys/stat.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -61,6 +60,8 @@ static volatile unsigned int seq; /* arbitrary message sequence number for
static char log_file[255];
static char spool_dir[255];
static char *tdesc = "SMS/PSTN handler";
static char *app = "SMS";
static char *synopsis = "Communicates with SMS service centres and SMS capable analogue phones";
@@ -93,6 +94,9 @@ static signed short wave[] = {
static unsigned char wavea[80];
#endif
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
/* SMS 7 bit character mapping to UCS-2 */
static const unsigned short defaultalphabet[] = {
@@ -193,7 +197,7 @@ static void sms_release (struct ast_channel *chan, void *data)
static void sms_messagetx (sms_t * h);
/*! \brief copy number, skipping non digits apart from leading + */
/*--- numcpy: copy number, skipping non digits apart from leading + */
static void numcpy (char *d, char *s)
{
if (*s == '+')
@@ -206,7 +210,7 @@ static void numcpy (char *d, char *s)
*d = 0;
}
/*! \brief static, return a date/time in ISO format */
/*--- isodate: static, return a date/time in ISO format */
static char * isodate (time_t t)
{
static char date[20];
@@ -214,7 +218,7 @@ static char * isodate (time_t t)
return date;
}
/*! \brief reads next UCS character from null terminated UTF-8 string and advanced pointer */
/*--- utf8decode: reads next UCS character from null terminated UTF-8 string and advanced pointer */
/* for non valid UTF-8 sequences, returns character as is */
/* Does not advance pointer for null termination */
static long utf8decode (unsigned char **pp)
@@ -260,7 +264,7 @@ static long utf8decode (unsigned char **pp)
return *p; /* not sensible */
}
/*! \brief takes a binary header (udhl bytes at udh) and UCS-2 message (udl characters at ud) and packs in to o using SMS 7 bit character codes */
/*--- packsms7: takes a binary header (udhl bytes at udh) and UCS-2 message (udl characters at ud) and packs in to o using SMS 7 bit character codes */
/* The return value is the number of septets packed in to o, which is internally limited to SMSLEN */
/* o can be null, in which case this is used to validate or count only */
/* if the input contains invalid characters then the return value is -1 */
@@ -330,7 +334,7 @@ static int packsms7 (unsigned char *o, int udhl, unsigned char *udh, int udl, un
return n;
}
/*! \brief takes a binary header (udhl bytes at udh) and UCS-2 message (udl characters at ud) and packs in to o using 8 bit character codes */
/*--- packsms8: takes a binary header (udhl bytes at udh) and UCS-2 message (udl characters at ud) and packs in to o using 8 bit character codes */
/* The return value is the number of bytes packed in to o, which is internally limited to 140 */
/* o can be null, in which case this is used to validate or count only */
/* if the input contains invalid characters then the return value is -1 */
@@ -362,7 +366,7 @@ static int packsms8 (unsigned char *o, int udhl, unsigned char *udh, int udl, un
return p;
}
/*! \brief takes a binary header (udhl bytes at udh) and UCS-2
/*--- packsms16: takes a binary header (udhl bytes at udh) and UCS-2
message (udl characters at ud) and packs in to o using 16 bit
UCS-2 character codes
The return value is the number of bytes packed in to o, which is
@@ -399,7 +403,7 @@ static int packsms16 (unsigned char *o, int udhl, unsigned char *udh, int udl, u
return p;
}
/*! \brief general pack, with length and data,
/*--- packsms: general pack, with length and data,
returns number of bytes of target used */
static int packsms (unsigned char dcs, unsigned char *base, unsigned int udhl, unsigned char *udh, int udl, unsigned short *ud)
{
@@ -431,7 +435,7 @@ static int packsms (unsigned char dcs, unsigned char *base, unsigned int udhl, u
}
/*! \brief pack a date and return */
/*--- packdate: pack a date and return */
static void packdate (unsigned char *o, time_t w)
{
struct tm *t = localtime (&w);
@@ -452,7 +456,7 @@ static void packdate (unsigned char *o, time_t w)
*o++ = ((z % 10) << 4) + z / 10;
}
/*! \brief unpack a date and return */
/*--- unpackdate: unpack a date and return */
static time_t unpackdate (unsigned char *i)
{
struct tm t;
@@ -467,10 +471,10 @@ static time_t unpackdate (unsigned char *i)
t.tm_min += 15 * ((i[6] & 0x7) * 10 + (i[6] >> 4));
else
t.tm_min -= 15 * ((i[6] & 0x7) * 10 + (i[6] >> 4));
return ast_mktime(&t, NULL);
return mktime (&t);
}
/*! \brief unpacks bytes (7 bit encoding) at i, len l septets,
/*--- unpacksms7: unpacks bytes (7 bit encoding) at i, len l septets,
and places in udh and ud setting udhl and udl. udh not used
if udhi not set */
static void unpacksms7 (unsigned char *i, unsigned char l, unsigned char *udh, int *udhl, unsigned short *ud, int *udl, char udhi)
@@ -521,7 +525,7 @@ static void unpacksms7 (unsigned char *i, unsigned char l, unsigned char *udh, i
*udl = (o - ud);
}
/*! \brief unpacks bytes (8 bit encoding) at i, len l septets,
/*--- unpacksms8: unpacks bytes (8 bit encoding) at i, len l septets,
and places in udh and ud setting udhl and udl. udh not used
if udhi not set */
static void unpacksms8 (unsigned char *i, unsigned char l, unsigned char *udh, int *udhl, unsigned short *ud, int *udl, char udhi)
@@ -546,7 +550,7 @@ static void unpacksms8 (unsigned char *i, unsigned char l, unsigned char *udh, i
*udl = (o - ud);
}
/*! \brief unpacks bytes (16 bit encoding) at i, len l septets,
/*--- unpacksms16: unpacks bytes (16 bit encoding) at i, len l septets,
and places in udh and ud setting udhl and udl.
udh not used if udhi not set */
static void unpacksms16 (unsigned char *i, unsigned char l, unsigned char *udh, int *udhl, unsigned short *ud, int *udl, char udhi)
@@ -575,7 +579,7 @@ static void unpacksms16 (unsigned char *i, unsigned char l, unsigned char *udh,
*udl = (o - ud);
}
/*! \brief general unpack - starts with length byte (octet or septet) and returns number of bytes used, inc length */
/*--- unpacksms: general unpack - starts with length byte (octet or septet) and returns number of bytes used, inc length */
static int unpacksms (unsigned char dcs, unsigned char *i, unsigned char *udh, int *udhl, unsigned short *ud, int *udl, char udhi)
{
int l = *i++;
@@ -589,7 +593,7 @@ static int unpacksms (unsigned char dcs, unsigned char *i, unsigned char *udh, i
return l + 1;
}
/*! \brief unpack an address from i, return byte length, unpack to o */
/*--- unpackaddress: unpack an address from i, return byte length, unpack to o */
static unsigned char unpackaddress (char *o, unsigned char *i)
{
unsigned char l = i[0],
@@ -606,7 +610,7 @@ static unsigned char unpackaddress (char *o, unsigned char *i)
return (l + 5) / 2;
}
/*! \brief store an address at o, and return number of bytes used */
/*--- packaddress: store an address at o, and return number of bytes used */
static unsigned char packaddress (unsigned char *o, char *i)
{
unsigned char p = 2;
@@ -631,7 +635,7 @@ static unsigned char packaddress (unsigned char *o, char *i)
return p;
}
/*! \brief Log the output, and remove file */
/*--- sms_log: Log the output, and remove file */
static void sms_log (sms_t * h, char status)
{
if (*h->oa || *h->da) {
@@ -662,16 +666,14 @@ static void sms_log (sms_t * h, char status)
*p++ = h->ud[n];
*p++ = '\n';
*p = 0;
if (write (o, line, strlen (line)) < 0) {
ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
}
write (o, line, strlen (line));
close (o);
}
*h->oa = *h->da = h->udl = 0;
}
}
/*! \brief parse and delete a file */
/*--- sms_readfile: parse and delete a file */
static void sms_readfile (sms_t * h, char *fn)
{
char line[1000];
@@ -692,8 +694,7 @@ static void sms_readfile (sms_t * h, char *fn)
}
while (fgets (line, sizeof (line), s))
{ /* process line in file */
char *p;
void *pp = &p;
unsigned char *p;
for (p = line; *p && *p != '\n' && *p != '\r'; p++);
*p = 0; /* strip eoln */
p = line;
@@ -713,7 +714,7 @@ static void sms_readfile (sms_t * h, char *fn)
{ /* parse message (UTF-8) */
unsigned char o = 0;
while (*p && o < SMSLEN)
h->ud[o++] = utf8decode(pp);
h->ud[o++] = utf8decode((unsigned char **)&p);
h->udl = o;
if (*p)
ast_log (LOG_WARNING, "UD too long in %s\n", fn);
@@ -757,7 +758,7 @@ static void sms_readfile (sms_t * h, char *fn)
t.tm_min = M;
t.tm_sec = S;
t.tm_isdst = -1;
h->scts = ast_mktime(&t, NULL);
h->scts = mktime (&t);
if (h->scts == (time_t) - 1)
ast_log (LOG_WARNING, "Bad date/timein %s: %s", fn, p);
}
@@ -854,7 +855,7 @@ static void sms_readfile (sms_t * h, char *fn)
}
}
/*! \brief white a received text message to a file */
/*--- sms_writefile: white a received text message to a file */
static void sms_writefile (sms_t * h)
{
char fn[200] = "", fn2[200] = "";
@@ -941,7 +942,7 @@ static void sms_writefile (sms_t * h)
}
}
/*! \brief read dir skipping dot files... */
/*--- readdirqueue: read dir skipping dot files... */
static struct dirent *readdirqueue (DIR * d, char *queue)
{
struct dirent *f;
@@ -951,7 +952,7 @@ static struct dirent *readdirqueue (DIR * d, char *queue)
return f;
}
/*! \brief handle the incoming message */
/*--- sms_handleincoming: handle the incoming message */
static unsigned char sms_handleincoming (sms_t * h)
{
unsigned char p = 3;
@@ -1022,7 +1023,8 @@ static unsigned char sms_handleincoming (sms_t * h)
#define NAME_MAX 1024
#endif
/*! \brief find and fill in next message, or send a REL if none waiting */
/*--- sms_nextoutgoing: find and fill in next message,
or send a REL if none waiting */
static void sms_nextoutgoing (sms_t * h)
{
char fn[100 + NAME_MAX] = "";
@@ -1176,7 +1178,7 @@ static void sms_messagetx(sms_t * h)
static int sms_generate (struct ast_channel *chan, void *data, int len, int samples)
{
struct ast_frame f = { 0 };
#define MAXSAMPLES (800)
#define MAXSAMPLES 800
#ifdef OUTALAW
unsigned char *buf;
#else
@@ -1197,10 +1199,11 @@ static int sms_generate (struct ast_channel *chan, void *data, int len, int samp
f.frametype = AST_FRAME_VOICE;
#ifdef OUTALAW
f.subclass = AST_FORMAT_ALAW;
f.datalen = samples;
#else
f.subclass = AST_FORMAT_SLINEAR;
f.datalen = samples * 2;
#endif
f.datalen = samples * SAMPLE2LEN;
f.offset = AST_FRIENDLY_OFFSET;
f.mallocd = 0;
f.data = buf;
@@ -1252,8 +1255,6 @@ static int sms_generate (struct ast_channel *chan, void *data, int len, int samp
return -1;
}
return 0;
#undef SAMPLE2LEN
#undef MAXSAMPLES
}
static void sms_process (sms_t * h, int samples, signed short *data)
@@ -1359,17 +1360,17 @@ static struct ast_generator smsgen = {
static int sms_exec (struct ast_channel *chan, void *data)
{
int res = -1;
struct ast_module_user *u;
struct localuser *u;
struct ast_frame *f;
sms_t h = { 0 };
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
h.ipc0 = h.ipc1 = 20; /* phase for cosine */
h.dcs = 0xF1; /* default */
if (!data) {
ast_log (LOG_ERROR, "Requires queue name at least\n");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -1382,20 +1383,20 @@ static int sms_exec (struct ast_channel *chan, void *data)
answer = 0;
if (!*d || *d == '|') {
ast_log (LOG_ERROR, "Requires queue name\n");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
for (p = d; *p && *p != '|'; p++);
if (p - d >= sizeof (h.queue)) {
ast_log (LOG_ERROR, "Queue name too long\n");
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return -1;
}
strncpy(h.queue, (char *)d, p - d);
strncpy (h.queue, d, p - d);
if (*p == '|')
p++;
d = p;
for (p = (unsigned char *)h.queue; *p; p++)
for (p = h.queue; *p; p++)
if (!isalnum (*p))
*p = '-'; /* make very safe for filenames */
while (*d && *d != '|') {
@@ -1427,20 +1428,20 @@ static int sms_exec (struct ast_channel *chan, void *data)
}
if (*d == '|') {
/* submitting a message, not taking call. */
/* deprecated, use smsq instead */
/* depricated, use smsq instead */
d++;
h.scts = time (0);
for (p = d; *p && *p != '|'; p++);
if (*p)
*p++ = 0;
if (strlen ((char *)d) >= sizeof (h.oa)) {
if (strlen (d) >= sizeof (h.oa)) {
ast_log (LOG_ERROR, "Address too long %s\n", d);
return 0;
}
if (h.smsc) {
ast_copy_string (h.oa, (char *)d, sizeof (h.oa));
ast_copy_string (h.oa, d, sizeof (h.oa));
} else {
ast_copy_string (h.da, (char *)d, sizeof (h.da));
ast_copy_string (h.da, d, sizeof (h.da));
}
if (!h.smsc)
ast_copy_string (h.oa, h.cli, sizeof (h.oa));
@@ -1457,7 +1458,7 @@ static int sms_exec (struct ast_channel *chan, void *data)
h.rx = 0; /* sent message */
h.mr = -1;
sms_writefile (&h);
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return 0;
}
@@ -1481,13 +1482,13 @@ static int sms_exec (struct ast_channel *chan, void *data)
res = ast_set_read_format (chan, AST_FORMAT_SLINEAR);
if (res < 0) {
ast_log (LOG_ERROR, "Unable to set to linear mode, giving up\n");
ast_module_user_remove(u);
LOCAL_USER_REMOVE (u);
return -1;
}
if (ast_activate_generator (chan, &smsgen, &h) < 0) {
ast_log (LOG_ERROR, "Failed to activate generator on '%s'\n", chan->name);
ast_module_user_remove(u);
LOCAL_USER_REMOVE (u);
return -1;
}
@@ -1506,22 +1507,22 @@ static int sms_exec (struct ast_channel *chan, void *data)
sms_log (&h, '?'); /* log incomplete message */
ast_module_user_remove(u);
LOCAL_USER_REMOVE (u);
return (h.err);
}
static int unload_module(void)
int unload_module (void)
{
int res;
res = ast_unregister_application (app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module (void)
{
#ifdef OUTALAW
{
@@ -1535,4 +1536,19 @@ static int load_module(void)
return ast_register_application (app, sms_exec, synopsis, descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "SMS/PSTN handler");
char *description (void)
{
return tdesc;
}
int usecount (void)
{
int res;
STANDARD_USECOUNT (res);
return res;
}
char *key ()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -19,22 +19,20 @@
/*! \file
*
* \brief SoftHangup application
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
@@ -44,6 +42,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
static char *synopsis = "Soft Hangup Application";
static char *tdesc = "Hangs up the requested channel";
static char *desc = " SoftHangup(Technology/resource|options)\n"
"Hangs up the requested channel. If there are no channels to hangup,\n"
"the application will report it.\n"
@@ -52,10 +52,13 @@ static char *desc = " SoftHangup(Technology/resource|options)\n"
static char *app = "SoftHangup";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int softhangup_exec(struct ast_channel *chan, void *data)
{
struct ast_module_user *u;
struct localuser *u;
struct ast_channel *c=NULL;
char *options, *cut, *cdata, *match;
char name[AST_CHANNEL_NAME] = "";
@@ -66,7 +69,7 @@ static int softhangup_exec(struct ast_channel *chan, void *data)
return 0;
}
u = ast_module_user_add(chan);
LOCAL_USER_ADD(u);
cdata = ast_strdupa(data);
match = strsep(&cdata, "|");
@@ -74,12 +77,12 @@ static int softhangup_exec(struct ast_channel *chan, void *data)
all = options && strchr(options,'a');
c = ast_channel_walk_locked(NULL);
while (c) {
ast_copy_string(name, c->name, sizeof(name));
strncpy(name, c->name, sizeof(name)-1);
ast_mutex_unlock(&c->lock);
/* XXX watch out, i think it is wrong to access c-> after unlocking! */
if (all) {
/* CAPI is set up like CAPI[foo/bar]/clcnt */
if (!strcmp(c->tech->type, "CAPI"))
if (!strcmp(c->type,"CAPI"))
cut = strrchr(name,'/');
/* Basically everything else is Foo/Bar-Z */
else
@@ -97,25 +100,40 @@ static int softhangup_exec(struct ast_channel *chan, void *data)
c = ast_channel_walk_locked(c);
}
ast_module_user_remove(u);
LOCAL_USER_REMOVE(u);
return 0;
}
static int unload_module(void)
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
ast_module_user_hangup_all();
STANDARD_HANGUP_LOCALUSERS;
return res;
}
static int load_module(void)
int load_module(void)
{
return ast_register_application(app, softhangup_exec, synopsis, desc);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Hangs up the requested channel");
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

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