Compare commits

...

3300 Commits

Author SHA1 Message Date
Kevin P. Fleming
e7f790f51d 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.4.0-beta2@212958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-18 20:42:51 +00:00
Kevin P. Fleming
006461e9d0 importing files for 1.4.0-beta2 release
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.4.0-beta2@43408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21 16:17:32 +00:00
Kevin P. Fleming
40e4e281a1 Creating tag for the release of asterisk-1.4.0-beta2
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.4.0-beta2@43407 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21 16:16:06 +00:00
Kevin P. Fleming
44983fae40 remove this change... it requires binutils 2.17
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@43405 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21 16:08:03 +00:00
Kevin P. Fleming
05b0e38f98 remove extraneous property
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@43404 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21 16:02:30 +00:00
Jason Parker
1ec9e85709 fix minor typo in the way version is handled
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@43396 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 23:19:25 +00:00
Kevin P. Fleming
9cf9c1373b merge down mark's users.conf fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@43392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 23:01:50 +00:00
Kevin P. Fleming
1a68406874 make the sounds Makefile actually work again
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@43388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 22:54:55 +00:00
Jason Parker
0a0df5e171 Go back to the old(ish) way of installing sound files.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@43386 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 22:27:54 +00:00
Russell Bryant
97502fdec0 Fix the total allocation count and total byte count in the memory summary
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@43383 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 22:13:16 +00:00
Kevin P. Fleming
31a04cf56e it's time :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@43376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 21:46:52 +00:00
Russell Bryant
28ffdcc783 Fix the memory summary so that it doesn't print the first file in the list over
and over again.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43375 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 21:42:57 +00:00
Jason Parker
0cfaffac96 Fix some chan_zap warning messages, when HAVE_PRI is not defined.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 21:42:45 +00:00
Tilghman Lesher
8e81e20658 One last forgotten constified file
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 21:14:33 +00:00
Russell Bryant
6f442c4a3c fix some breakage from the CLI command changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43372 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 21:14:02 +00:00
Joshua Colp
0a28b21d01 Warning be gone.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 21:11:48 +00:00
Russell Bryant
cb268c0228 resolve compiler warnings from constification
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 21:08:32 +00:00
Joshua Colp
e8b820e743 Magical eightball says warnings be gone.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 21:03:37 +00:00
Tilghman Lesher
d70fe791c2 A few misses from constification
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43366 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 20:57:57 +00:00
Jason Parker
8c16600b0d Minor fixes to sounds installation.
Use latest version number for core-sounds.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 20:43:41 +00:00
Tilghman Lesher
70af28270d Constify the result of a config retrieval function, to avoid mutilation (issue 7983).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 20:40:39 +00:00
Kevin P. Fleming
cc99b22469 add a warning about name changes on some API calls
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 20:36:19 +00:00
Steve Murphy
9ebd2579c9 sounds/Makefile updated to handle the extra-sounds tarball; some optimizations
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43362 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 20:33:15 +00:00
Jason Parker
aefb5c269a Fix a bug in the CLI reverbification, as pointed out by ZX81 in #asterisk-dev
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 20:18:25 +00:00
Kevin P. Fleming
9ae105df1d don't let symbols from included static libraries (like codec/ilbc) pollute the global namespace when those modules are embedded
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 20:13:42 +00:00
Jason Parker
61e4465f49 Fix a segfault that was reported by jcmoore in #asterisk-bugs on IRC.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 19:46:18 +00:00
Paul Cadach
2132e7fd5f Strip quotes from property value
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43356 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 19:24:43 +00:00
Paul Cadach
04ff475902 .cxx files no longer ignored
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 19:22:39 +00:00
Paul Cadach
e57d521462 Split capability definitions into own source file
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43354 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 19:21:15 +00:00
Jason Parker
261e84229d Avoid errors when compiling out of tree modules like asterisk-addons.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 18:50:10 +00:00
Paul Cadach
aa92ebffea Remove unnecessary (long time ago commented out) code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 18:08:42 +00:00
Paul Cadach
a704e298e7 Fix missed extension replacement
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 17:48:52 +00:00
Paul Cadach
84946195e9 Change file naming to be conform OpenH323 rules
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 17:45:25 +00:00
Jason Parker
8bd82ebc0d Add documentation on rtp packetization.
Technically, ooh323 doesn't support it yet, but there is a patch that should be committed very soon.

Issue #7989, patch by DEA, slightly modified.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 17:39:59 +00:00
Joshua Colp
3c6d5053ba Totally break a P2P bridge upon going on hold, and re-establish it upon going off hold.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43343 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 17:08:44 +00:00
Joshua Colp
659d467720 Expand codec check so that raw formats must be equal for a Packet2Packet bridge to occur
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43340 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 16:55:09 +00:00
Jason Parker
75a39b53ad bump the .cleancount up
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 16:40:27 +00:00
Joshua Colp
3f0f48f8bc More property changes that never got merged in
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43336 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 16:36:16 +00:00
Joshua Colp
86421e3a7d Do clean for h323 directory too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43334 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 16:33:42 +00:00
Joshua Colp
1ce4a427d3 Merge in latest round of chan_h323 changes. These are all isolated to chan_h323 so meh.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 16:24:00 +00:00
Jason Parker
3c224654c2 Document member name logging functionality.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 14:47:59 +00:00
Jason Parker
50c1981780 We need to persist the member name also
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43322 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 06:14:05 +00:00
Jason Parker
a7119b522d Add a "member name" to queue members.
Add option to the various methods of adding a queue member, to add the "member name".

Member name is used in (most) queue log records, in place of the interface name.
This makes it consistent, so that you can log in from any device, and still be logged as "member name"


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 05:59:53 +00:00
Kevin P. Fleming
0964265657 Merged revisions 43314 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r43314 | kpfleming | 2006-09-20 00:08:05 -0500 (Wed, 20 Sep 2006) | 2 lines

make some more functions static

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43315 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 05:13:03 +00:00
Kevin P. Fleming
505c465a3b these functions never should have been non-static or in a header file
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43313 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 05:01:03 +00:00
Kevin P. Fleming
32d119746c move ODBC API into ast_ namespace
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 04:57:20 +00:00
Kevin P. Fleming
ea399862c4 move more API into the ast_ namespace
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43310 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 04:45:45 +00:00
Kevin P. Fleming
41d3e99e28 move ADSI functionality into ast_ namespace
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43309 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 04:34:51 +00:00
BJ Weschke
e8606d9c57 Merged revisions 42133 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r42133 | bweschke | 2006-09-06 14:16:41 -0400 (Wed, 06 Sep 2006) | 6 lines

 Look ma! No more deadlocks! <sic>

 As posted from #7458 and others similar to it in Mantis:
 p->app_lock was a mutex really designed for use with agents not in callback mode. That being the case, I've tried to code it so that when callback mode is used, the app_lock mutex will not be locked/unlocked at all. Please let me know how you make out - and if you continue to deadlock now, please reproduce the deadlock logging information and post to Mantis. 


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 03:51:01 +00:00
Matt O'Gorman
02868b1723 thats odd, but just in case it happens again i want to see it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43305 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 00:39:44 +00:00
Matt O'Gorman
f6f7e134be fixed timeout issue as well as some other minor issues
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 23:57:04 +00:00
Kevin P. Fleming
8b79aba992 do this fix properly :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 23:08:35 +00:00
Jason Parker
4c2874b994 Commit the changes from issue #5240.
Original patch by junky, modified by anthonyl, modified again by jcolp (with minor modifications by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43300 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 22:01:23 +00:00
Kevin P. Fleming
1485fa4c24 move this header to include where it belongs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 21:48:57 +00:00
Matthew Fredrickson
81b6e171bd Get rid of zero size old config file
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 21:33:50 +00:00
Matthew Fredrickson
33ddb53663 Various updates from PCadach's chan_h323-live branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43294 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 21:07:49 +00:00
Jason Parker
fc60c151d3 After discussing this with other people, we decided we'd like to try to do this a little differently.
Stay tuned.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 19:58:09 +00:00
Anthony LaMantia
3f3402d69e 5240 update
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43289 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 19:28:57 +00:00
Matthew Fredrickson
2e5118cc49 Add the h323 config file. Arrr!!! for international talk like a pirate's day.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 19:25:18 +00:00
Matthew Fredrickson
1dfc281c40 Work!!!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 19:04:13 +00:00
Joshua Colp
44821e39f8 While this is experimental I don't think it should be experimental enough to be printed out in big capital letters, and Kenny tends to agree too so you know it's right.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 18:48:17 +00:00
Matthew Fredrickson
3c4dc2033f Update configure and closest kin. *Hopes my branch doesn't break*
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 17:09:01 +00:00
Matthew Fredrickson
2cc96500bd Mergeing in Paul Cadach's chan_h323 changes *holds breath*
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 17:07:22 +00:00
Matthew Fredrickson
d4d7a8b132 Let's try this out. Seems silly, but we'll try it anyways
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 16:25:21 +00:00
Matt O'Gorman
d0a1a0033d similar patch for verbose vs debug with minor changes
bug 2617


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 16:23:45 +00:00
Matt O'Gorman
65abfac363 blocking version 43269 from being pushed into trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43271 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 16:23:03 +00:00
Joshua Colp
d544223d02 Warning be gone!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 15:36:25 +00:00
Joshua Colp
3c732537bc Improve output of sip show peers (issue #6624 reported by mavetju with minor code changes by myself)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 15:23:39 +00:00
Jason Parker
ba1a158641 Let's order these better..
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 14:24:14 +00:00
Jason Parker
52ad644087 Add a few more 'generic' platforms
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 14:19:54 +00:00
Jason Parker
8699205857 be a little more consistent with our variable usage
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43257 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 14:16:12 +00:00
Kevin P. Fleming
44f60a288d restore ability for Makefiles to use 'generic' platform names when needed
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 14:04:15 +00:00
Tilghman Lesher
e2253df3ec Merged revisions 43248 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r43248 | tilghman | 2006-09-19 07:28:55 -0500 (Tue, 19 Sep 2006) | 2 lines

cid is passed to a destructive function; thus a copy is needed (issue 7961)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43249 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 12:30:17 +00:00
Jason Parker
e3f0ca05e5 This totally worked when I tested it...
Reverting for now..


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43245 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 23:59:23 +00:00
Jason Parker
3334bdebb7 This was silly. Nowhere else do we use [ or [[
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43244 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 23:37:25 +00:00
Matt O'Gorman
465adf2bf1 allow for packetization on rtp channel drivers, need to add
option for setting our own packetization as apposed to just doing 
what is asked.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43243 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 23:32:57 +00:00
Jason Parker
9177d1143b Change the includes to work on FreeBSD
Linux has sys/soundcard.h, which does a #include <linux/soundcard.h>


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43240 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 22:35:40 +00:00
Kevin P. Fleming
734a3d356e don't need two copies of this
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 22:14:09 +00:00
Kevin P. Fleming
7b43316cbc a little cleanup and simplification, and remove ON_FIRST_USE mode since nobody uses it
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 22:05:53 +00:00
Jason Parker
31d25ac6f3 u_intXX_t is silly
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43236 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 22:02:04 +00:00
Jason Parker
998ac5cab1 Only use alloca.h on OSes that have it.
Reported by jontow on IRC in #asterisk-dev


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 21:24:50 +00:00
Olle Johansson
42a56b7a5a Merging patch from 1.2 - Issue #7682
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 20:13:14 +00:00
Kevin P. Fleming
c97841dbf7 always use fork() when available
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 19:58:27 +00:00
Jason Parker
23def858f7 We have autoconf...let's actually use it.
(note, M4 wasn't used, so...bye)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43215 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 19:57:09 +00:00
Olle Johansson
b93280947a Issue #7351 - sending CANCEL when the call at some point has been in UP state is wrong.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43214 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 19:56:44 +00:00
Kevin P. Fleming
58ca54e68a revert this since, since some unnamed platforms are silly about it :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 19:54:46 +00:00
Kevin P. Fleming
fcb999c01c merge qwell's CLI verbification work
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 19:54:18 +00:00
Kevin P. Fleming
fb23c753d3 handle config.guess name for FreeBSD properly
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43208 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 19:30:10 +00:00
Kevin P. Fleming
5cf1c12796 it appears that current Mac OS/X does not need the poll compatibility module at all, and platforms that do need it also need -DPOLLCOMPAT (or they wouldn't have compiled at all)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 19:20:24 +00:00
Jason Parker
2498ba75ae escape some quotes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43205 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 19:08:40 +00:00
Joshua Colp
57ad1de60b Reference will be kept in the application component only right now. In the future this should be expanded to the channel driver (just like all the other channel drivers) (issue #7975 reported by andrewt)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 17:37:44 +00:00
Matt O'Gorman
ec4bf7a849 seperate jingle and gtalk so it will be easier to track
changes in both of the moving specs.  Currently chan_gtalk is 
compatible with the latest gtalk/libjingle version, and chan_jingle
needs a lot of work.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 16:36:14 +00:00
Kevin P. Fleming
c80d09559f minor performance improvement for platforms where -fPIC and -fpic are actually different (has no effect on x86/x86-64)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 15:54:57 +00:00
Steve Murphy
4ed1578104 Clarified the meaning of the callwaiting variable in the zapata.conf file.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 15:44:18 +00:00
Joshua Colp
6c98f2cf2d Blocked revisions 43163 via svnmerge
........
r43163 | file | 2006-09-18 11:30:26 -0400 (Mon, 18 Sep 2006) | 2 lines

Add deprecation notice about app_math (issue #7957 reported by k-egg)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 15:32:08 +00:00
Joshua Colp
93e161256d Use a better check to ensure database connection is up (pointer to connection must exist, and connection must report status being ok) (issue #7955 reported by sorg)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 15:15:33 +00:00
Joshua Colp
956b837a41 Merged revisions 43159 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r43159 | file | 2006-09-18 11:05:39 -0400 (Mon, 18 Sep 2006) | 2 lines

Add number unobtainable tone for New Zealand (issue #7969 reported by nic_bellamy)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 15:07:59 +00:00
Tilghman Lesher
ee27f9efee Remove the suggestion of realtime hints, since that functionality will not be available until post-1.4
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 14:53:54 +00:00
Mark Spencer
c2d959c2f9 Improve documentation of users.conf items.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 05:40:17 +00:00
Jason Parker
df0963a738 remove a bit of redundant code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43123 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-17 23:04:48 +00:00
Jason Parker
6d5809297b Skinny hold support.
Original patch by wedhorn, with modifications by me.
Issue #7588


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-17 22:24:27 +00:00
Jason Parker
86fcf5a887 Get rid of all the useless (and confusing) typedefs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43099 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-17 21:58:04 +00:00
Tilghman Lesher
e39c9d7619 Merged revisions 43072 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r43072 | tilghman | 2006-09-17 08:54:34 -0500 (Sun, 17 Sep 2006) | 3 lines

Directory used the wrong context for delivery of 0- and *- keypresses
(according to Directory's own documentation) - Issue 7965

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-17 14:00:39 +00:00
Kevin P. Fleming
c2c4f86c72 merge markster's usersconf branch with some slight changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-16 23:53:58 +00:00
Mark Spencer
e887127bf3 Fix the dtmf dialtone thing
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43039 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-16 21:45:35 +00:00
Tilghman Lesher
72265ea79d Merged revisions 43019 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r43019 | tilghman | 2006-09-16 02:57:04 -0500 (Sat, 16 Sep 2006) | 2 lines

When a realtime peer expires, reset the ipaddress in the realtime database back to 0 (Issue 6656)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-16 08:10:55 +00:00
Tilghman Lesher
e16104185a Merged revisions 43003 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r43003 | tilghman | 2006-09-15 23:44:02 -0500 (Fri, 15 Sep 2006) | 2 lines

When the marked user enters the conference, we should no longer timeout

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-16 05:43:54 +00:00
Jason Parker
f18cbf77df Many Solaris fixes - this moves some of the stuff from utils.c to strcompat.c
Every OS uses strcompat now - this was done on purpose.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42982 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-15 17:16:00 +00:00
Anthony LaMantia
e421b69ce6 reveting modifaction to __ast_module_user_remove
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42965 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-15 05:00:27 +00:00
Tilghman Lesher
c35b1df605 Merged revisions 42946 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r42946 | tilghman | 2006-09-14 17:16:31 -0500 (Thu, 14 Sep 2006) | 2 lines

Error message references wrong argument (Issue 7951)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-14 22:18:07 +00:00
Tilghman Lesher
beae56266c Revise documentation to state that mpg123 for music on hold is deprecated.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-14 13:57:40 +00:00
Joshua Colp
10e6fbc3bc Tweak changes that went in on revision 42891
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42910 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-13 22:45:44 +00:00
Tilghman Lesher
5a77011673 Blocked revisions 42892 via svnmerge
........
r42892 | tilghman | 2006-09-13 14:51:24 -0500 (Wed, 13 Sep 2006) | 2 lines

Backport bugfix patch from 7918 to 1.2 - msg_cfg destroyed before used

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42893 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-13 19:52:20 +00:00
Anthony LaMantia
09d8972be6 small fix for 7944
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42891 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-13 19:27:27 +00:00
Russell Bryant
25b0e3a148 use strcpy instead of sprintf
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-12 20:33:09 +00:00
Matt O'Gorman
a3a8442e5c i dont know how msg_cfg got moved around but its all good again
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-12 17:45:42 +00:00
Olle Johansson
948533a791 Issue #7924 - cmaj - Turn off silence suppression if no channel owner
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-12 14:22:55 +00:00
Olle Johansson
50b6a222ef Issue #7928 - Don't send both 404 and 503. Fix by phsultan with a small fix by me, myself or I.
Thanks, Philippe! 
(This was caused by my changes to the transaction handling)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42826 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-12 14:17:33 +00:00
Olle Johansson
d970a07b1c If we've found a T38 SDP line, stop looking for more on the very same line
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-12 00:32:18 +00:00
Tilghman Lesher
979ef8d2ed Merged revisions 42783 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r42783 | tilghman | 2006-09-11 16:47:23 -0500 (Mon, 11 Sep 2006) | 4 lines

When paging, only wait 5 seconds for the marked user to enter the conference.
After that, assume the paging already completed by the time the channel entered
the conference and drop back out.  (Issue 7275)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 22:17:46 +00:00
Olle Johansson
da55c166dc More formatting fixes and doxygen stuff
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 19:49:10 +00:00
Olle Johansson
d37002287b Add comment
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 19:27:11 +00:00
Olle Johansson
8868c4e1ca - Use enum for send-request reliability flags
- Make re-invites CRITICAL 


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 19:24:35 +00:00
Olle Johansson
31fa147b76 More formatting
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 19:14:58 +00:00
Olle Johansson
4c081033b6 More formatting/doxygen updates to keep me occupied
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42766 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 19:04:33 +00:00
Olle Johansson
421f2b076d Ignore this. Only whitespace fixes while being bored.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 18:45:10 +00:00
Olle Johansson
2984fbc068 Change from "r" as a variable name to "dialog". "r" is commonly used for registrations,
not dialogs, in other places of the code...


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42752 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 18:14:02 +00:00
Olle Johansson
e7b882961e Use Timer T1 for dialog timeouts/destruction
(If you have qualify=yes, we will use the actual roundtrip time)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 18:06:44 +00:00
Tilghman Lesher
cfaf938f21 More spelling fixes (issue 7930)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 17:02:37 +00:00
Tilghman Lesher
091e1aed8d Merged revisions 42716 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r42716 | tilghman | 2006-09-11 11:39:06 -0500 (Mon, 11 Sep 2006) | 2 lines

Spelling/grammar fixes (Issue 7929)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 16:41:49 +00:00
Anthony LaMantia
ef879455f5 small fix for issue 007926
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42715 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 16:00:53 +00:00
Tilghman Lesher
b0666488f3 Merged revisions 42697 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r42697 | tilghman | 2006-09-11 09:40:13 -0500 (Mon, 11 Sep 2006) | 2 lines

Two grammar issues (bug 7927)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42698 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 14:41:35 +00:00
Russell Bryant
723448c1f1 fix minor typo in coding guidelines
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42684 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 04:17:23 +00:00
Voicetronix Support
e02897acd4 Board numbers and channel numbers are now 0 based, since vpb driver
version 3.0 (released December 2005)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42671 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 03:29:08 +00:00
Mark Spencer
59c861bc5e Uhm, make Zap actually work again. Did anybody actually test that code?
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-10 20:28:03 +00:00
Tilghman Lesher
237fbf35fc If the leading underscore is not stripped before comparison,
pbx_builtin_getvar_helper() will never find the associated variable.
(Bug 7892)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-10 17:35:08 +00:00
Tilghman Lesher
9e397b6bba In trunk, ast_fileexists now returns 0 for failure, instead of -1, as it did
in 1.2.  This corrected a longstanding confusion about the return value.
Unfortunately, it broke this app in the process.  (Issue 7906)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42621 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-09 21:51:07 +00:00
Joshua Colp
0f3eaaf703 Merged revisions 42600 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r42600 | file | 2006-09-09 16:24:19 -0400 (Sat, 09 Sep 2006) | 2 lines

Only truly consider the channel in the same format if the format matches the raw format OR if a translation path already exists to translate between them. (issue #7887 reported by softins & issue #7803 reported by alvaro_palma_aste). Thanks goes to stubert for giving me access to a box and showing me a scenario where this occured.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42601 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-09 20:25:45 +00:00
Joshua Colp
d2a359e57f Optimize a bit
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42583 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-09 19:12:52 +00:00
Joshua Colp
10e361763c It's another round of RTP updates!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42569 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-09 18:07:59 +00:00
Olle Johansson
a2af69ed6f Add reference to the latest trademark policy on digium.com
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-09 15:09:16 +00:00
Olle Johansson
5a622d032e Don't destruct sessions prematurely. Especially not when we want reliable retransmissions...
If this works properly, we might have to check 1.2 to implement a backport.

The theory is that if you get a final reply in a session, it is ok to destroy the session.
If you send a final reply, you need to keep the session open for potential retransmits
from the other side. If you send a HANGUP/CANCEL, wait to the other side confirms
or until you have a timeout. If you send HANGUP/CANCEL/ACK reliably, don't destroy
the session so that you cancel the needed retransmits.

I will have to change the timer to 64*T1, but that will be a separate patch. That will
mean that if we know the roundtrip time, we can destroy sessions quicker.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42537 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-09 12:44:36 +00:00
Olle Johansson
01714e962b importing rev 42535 from 1.2 (which by mistake was actually imported from svn trunk)
- Maybe the first circular commit?


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-09 12:25:18 +00:00
Olle Johansson
d0cbbaf8d7 Don't destroy pvt prematurely. Wait for answer or timeout.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-09 12:01:59 +00:00
Olle Johansson
562b491a85 Clear proper flag
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-09 12:00:19 +00:00
Olle Johansson
cf22a4526c Add warning about res_adsi not being optional to menuselect
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-09 11:45:55 +00:00
Kevin P. Fleming
be29512d1e more makefile tweaks to keep targets from being run when they don't need to be
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42505 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-09 03:27:21 +00:00
Matt O'Gorman
f4434eba6f Get rid of ugly tmp directory, although I really should
fix the way imap accesses its temporary voice files.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42491 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-08 22:54:28 +00:00
Kevin P. Fleming
c63fe750bb minor performance improvement
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-08 21:33:32 +00:00
Joshua Colp
160cea6139 Merged revisions 42452 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r42452 | file | 2006-09-08 14:50:43 -0400 (Fri, 08 Sep 2006) | 2 lines

Swap spies during masquerading

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42453 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-08 18:53:41 +00:00
Steve Murphy
4c937339e5 As per discussion on bug 7862, the problem wasn't the fact that the documentation differed from behavior, but rather that users are used to REGEX having that space after the double quote in 1.2.x. So, in keeping with history, I investigated a little deeper, and discovered that the change in behavior was due to the modification of the function to use the AST_DECLARE_APP_ARGS and AST_NONSTANDARD_APP_ARGS() to parse the args. The code to skip the blank was left out. So, what I did was add code to throw out the first blank (space or tab) after the double quote, IF IT IS THERE. If not, nothing is done.Verbage is added to the function description saying that the space is optional, and skipped if it is there. If a space is desired, then the documentation advises putting two spaces there. This should make it compatible for 1.2 users, and not mess up new users who are used to using it with no space. It WILL mess up new users who WANT a space. Hopefully, they will double check the doc strings for this func and add the extra space. Hopefully, this class of new user is very small.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-08 16:44:38 +00:00
Tilghman Lesher
ae6795f3ec Merged revisions 42421 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r42421 | tilghman | 2006-09-08 11:06:17 -0500 (Fri, 08 Sep 2006) | 2 lines

Jump logic was backwards:  goto returns 0 if it succeeds, and we should jump if authentication fails.  (Bug #7907)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42422 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-08 16:08:36 +00:00
Joshua Colp
b1418f26d2 Blocked revisions 42402 via svnmerge
........
r42402 | file | 2006-09-08 00:37:07 -0400 (Fri, 08 Sep 2006) | 2 lines

Use ast_best_codec to set the read/write format

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42403 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-08 04:38:43 +00:00
Joshua Colp
ac9e94d0ee Formatting fixes for chan_oss (issue #7808 reported by Mithraen)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42389 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-08 03:51:26 +00:00
Joshua Colp
fd9f37a63f Formatting fixes for chan_alsa (issue #7807 reported by Mithraen with more mods done by myself)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-08 03:46:33 +00:00
Joshua Colp
d597b76c36 whentohangup is already in seconds, just need to convert to milliseconds
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-08 02:54:45 +00:00
Joshua Colp
62e58282eb Destroy msg_cfg after it's used, not before (issue #7618 reported by wvolz with minor mods)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-08 02:00:45 +00:00
Tilghman Lesher
fa12b3c774 Merged revisions 42355 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r42355 | tilghman | 2006-09-07 18:12:29 -0500 (Thu, 07 Sep 2006) | 2 lines

Format vulnerability fix - allowing the user to specify a format is not a good idea (Bug 7811)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42356 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-07 23:15:43 +00:00
Joshua Colp
082f59ff03 Use flags instead of variables on the private structure for things
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-07 21:11:07 +00:00
Matthew Fredrickson
75822388a4 Make sure we give a little warning about the echotraining option
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42324 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-07 20:05:37 +00:00
Joshua Colp
0b93665a71 Code cleaning/updates/potential bug fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-07 19:50:59 +00:00
Joshua Colp
dd0b891e57 Minor cleanup and make sure the tmp variable is clean
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-07 18:54:36 +00:00
Joshua Colp
34eb4f54ba Use lower case 'x' instead of a UTF-8 character (issue #7888 reported by flefoll)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-07 17:09:55 +00:00
Matt O'Gorman
36935ffc42 protect curhst and curusr
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-07 17:05:51 +00:00
Joshua Colp
53cf63c33a Convert some warnings into debug messages since they can exist under perfectly normal circumstances that the user shouldn't care about (issue #7894 reported by stephen_dredge)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-07 16:51:11 +00:00
Kevin P. Fleming
e8ca23608d minor wording fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-07 16:42:04 +00:00
Joshua Colp
bc5dd43635 Set the variable even if the caller disconnects (issue #7896 reported by jsmith)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-07 16:40:15 +00:00
Joshua Colp
8a2dd45283 Merged revisions 42260 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r42260 | file | 2006-09-07 12:30:44 -0400 (Thu, 07 Sep 2006) | 2 lines

Let's use the same thing we use in other places to calculate our time for ast_cond_timedwait (issue #7697 reported by bn999)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-07 16:33:02 +00:00
Matt O'Gorman
1dc7c62ed4 patch to fix several things wrong with voicemail
imap storage.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-07 16:14:53 +00:00
Mark Spencer
47d8e14871 Comment out default from extensions.ael
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42244 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-07 15:35:52 +00:00
Steve Murphy
a7b5ef30e7 With respect to bug 7862, the syntax and description are misleading to users. the syntax included a space after the double quotes between the regex and the data to match. I removed this from the function doc, and added some verbage to make this crystal clear, I hope.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-07 04:23:00 +00:00
Steve Murphy
11a7e38930 Made changes corresponding to those in 1.2 here in main/logger.c for bug 7544.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42208 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-07 03:35:42 +00:00
Kevin P. Fleming
d5f812e0b1 don't try to get the length of the string in the ast_dynamic_str object unless we know there is actually one there
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-07 00:41:27 +00:00
Jason Parker
f0e0963b2e Fix a small typo, to make app_followme.c show properly in "show version files"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42170 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-06 21:37:12 +00:00
Jason Parker
e3bc4c81f9 This one's for you, mog
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-06 21:00:37 +00:00
Joshua Colp
31cc08295c Merged revisions 42148 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r42148 | file | 2006-09-06 16:02:59 -0400 (Wed, 06 Sep 2006) | 2 lines

Don't close the second file descriptor if it's the same as the first one, as it will have already been closed elsewhere and could cause massive panic. (issue #7699 reported by bn999)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-06 20:04:17 +00:00
Christian Richter
b1fca65c77 fixed pipe consuming bug when using chanIsAvail (#7878), also moved a debug log to the very begining of misdn_hangup.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-06 18:02:25 +00:00
Steve Murphy
7c9b6e1d29 These small app documentation changes to app_dial and app_read will hopefully avert any more 7544 type bug reports\!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-06 17:14:50 +00:00
Joshua Colp
ca2b4d407a Make this module fit the guidelines better
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-06 17:05:48 +00:00
Joshua Colp
e77c51f5c6 Merged revisions 42086 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r42086 | file | 2006-09-06 11:55:20 -0400 (Wed, 06 Sep 2006) | 2 lines

Make realtime regseconds work as people expected (0 on registration expiration or release, and actual on normal state) (issue #7684 reported by kshumard)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-06 15:58:21 +00:00
Olle Johansson
228d50806c - Free allocated memory before returning from function
- Fix bad formatting
- Add some comments (more needed to understand what's going on)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-05 20:36:27 +00:00
Joshua Colp
826da1d7b1 Blocked revisions 42054 via svnmerge
........
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/trunk@42055 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-05 20:03:53 +00:00
Tilghman Lesher
bfef0a23ff Missing field terminator
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-05 17:23:50 +00:00
Joshua Colp
4a7947501e Minor tweak - we need to lock the channel when we are removing the spy from it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-05 17:01:02 +00:00
Jason Parker
4ba458e352 Merged revisions 42014 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

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

Small typo in zapata.conf.sample

Reported by ppyy in 7881

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42015 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-05 16:38:22 +00:00
Olle Johansson
bd4e57a873 Make sure we handle CANCEL/ACK properly (imported with mods from 1.2)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-04 15:57:26 +00:00
Joshua Colp
bc5924120d Remove old unused functions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-04 03:18:12 +00:00
Joshua Colp
49cfc19f0a Use tabs instead of spaces (I <3 tabs -- this is for you Qwell)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41960 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 23:45:03 +00:00
Joshua Colp
55d594e9da Make the difference clear about what the responsibilities of the core and a spy are when it comes to spying on a channel. The core is responsible for adding a spy to a channel, feeding frames into the spy, removing the spy from the channel, and notifying the spy that is has been detached. The spy is responsible for reading frames in, and cleaning itself up. Each side will not try to do the other's job.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41959 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 23:30:37 +00:00
Russell Bryant
4de3c0e447 Add the ability to specify that a frame should not be considered for caching
for uses in cases where you *know* that it will do no good.  This patch was
inspired by file for use in some work of his on mixmonitor/chanspy.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 23:14:54 +00:00
Russell Bryant
3057660a79 when calling this function to append to a dynamic string and the buffer was not
large enough and had to be reallocated, cut off the partially appended data.
Otherwise, the function will get called over and over again appending to the
end every time and never thinking it has enough room.

Thanks to jmls for access to his machine for debugging!

(issue #7691)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 22:56:01 +00:00
BJ Weschke
ffd9281db9 Provide a little more protection to make sure that a MOH class is specified when using the 'm' option with WaitExten, and prevent a segfault in the process.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 21:26:04 +00:00
BJ Weschke
bbc9c049ab Fix enum indexing problem with m() in WaitExten. Reported by Pavel J, in asterisk-dev.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41916 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 20:44:14 +00:00
BJ Weschke
7057035ae0 Changes/fixes to the app_waitforsilence app to make it behave more the way the author originally intended for it
to function along with an option to keep backward compatible with "old-style" functionality in 1.2. 
 (#6595 - davetroy reported and patched w/some very minor mods/corrections)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41915 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 20:23:41 +00:00
BJ Weschke
c5c1d4579f This was added to app_dial a while back, and now it's in app_queue as well. Provide an option to prevent members of the queue from forwarding calls from the queue to somewhere else.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 19:32:51 +00:00
BJ Weschke
f1b43be465 Some changes/fixes for func_curl. curl_global_init is only supposed to be called once, and if it returns non-zero, we need to give up on further executions with that instance. Additionally, let's set absolute timeout values for the CURL connections to try and prevent possible Zap (and possibly other channel tech) channel lockouts.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 19:07:58 +00:00
BJ Weschke
06b98dcc77 Merged revisions 41882 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
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)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 17:40:08 +00:00
BJ Weschke
775288c74b Blocking 41880 from coming into /trunk since I already patched it in /trunk first. Ooops!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41881 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 17:15:07 +00:00
BJ Weschke
91f4aa93bb Don't keep trying the same member in certain strategies when members of the queue are unavailable (#7278 - diLLec reported and patched)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41879 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 17:12:30 +00:00
Joshua Colp
6fdd2ef790 Tweak the if statement a bit
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41865 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 16:44:49 +00:00
Russell Bryant
e576ac0930 Don't use ast_frdup() in the AST_LIST_INSERT_TAIL macro directly. That was a
very stupid thing to do.  It ends up duplicating the frame twice, linking in
one of them and setting the tail pointer to the other one.  Sorry ...

Thanks to file for pointing out the breakage!!!  file rocks.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 16:41:02 +00:00
BJ Weschke
c4dac0c1e5 We don't spy on Zap/psuedo channels. Not at all. Never. (#7871 - sxpert reporting)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 15:21:12 +00:00
Russell Bryant
cf5a226c4b remove leading space in Packet manager event header
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 15:04:26 +00:00
BJ Weschke
a17cdb94c0 r41830 isn't going to merge cleanly into /trunk so it is blocked.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 14:54:02 +00:00
BJ Weschke
b6ccca7566 Merged revisions 41827 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
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)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 14:28:25 +00:00
BJ Weschke
a9da7b62cb Block 30546 from coming into /trunk. Some old cleanup.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 14:26:44 +00:00
BJ Weschke
e736c8a27b With the somewhat recent addition (from one of the Astridevcon Europe sessions) of more detailed device states, we need to change strategy in app_queue in how we determine whether a queue member is "in use" or not. Basically, instead of specifically looking for that device state as we did previously, now we're going to observe any other device state aside from the two that we know for sure are "not in use" as "in use". This will cause some other states to fall through that we know will never be available (eg - "INVALID","UNAVAILABLE",etc) but there's other code already within to handle those conditions. (#7433 - tgrman reporting)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-02 18:36:53 +00:00
Jason Parker
ce35c33353 It was pointed out to me, that using two frames is silly.
Thanks Josh.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-02 01:44:50 +00:00
Jason Parker
1d9bf5b1e8 fix some module loader breakage
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-02 01:39:42 +00:00
Jason Parker
696465a002 Fix VLDTMF issues.
It still isn't variable length, but it does let you dial again.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-02 01:39:15 +00:00
Joshua Colp
e43b830a9d Merged revisions 41768 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.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-01 22:51:46 +00:00
Matt O'Gorman
d9d3127ee3 get rid of some useless debug messages and raise debug level of others
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41765 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-01 22:03:33 +00:00
Matt O'Gorman
e31af51923 more staticness, and syntax cleaning
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-01 19:23:07 +00:00
Joshua Colp
f912c9e69f Unbridge the RTP streams at the correct place
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-01 18:57:10 +00:00
Joshua Colp
0be2884d80 If we are doing video and we can't reinvite, then resort to generic bridging instead of Packet2Packet since video isn't supported there yet. (reported by PCadach in #asterisk-bugs)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41718 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-01 17:54:22 +00:00
Kevin P. Fleming
449f311cda block this rev... fix is already present in this branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-01 17:41:52 +00:00
Matt O'Gorman
c13e44eacb whitespace clean up
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41715 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-01 17:20:48 +00:00
Joshua Colp
b4d0f26d2b You see nothing...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-01 16:50:02 +00:00
Steve Murphy
a845587805 Another formatting update for PCadach.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41695 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-01 16:48:06 +00:00
Joshua Colp
043a01e6bd 0 is indeed considered a valid file descriptor (issue #7861 reported by PCadach)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41694 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-01 16:40:18 +00:00
Joshua Colp
9edf55b64d Merged revisions 41690 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r41690 | file | 2006-09-01 12:28:08 -0400 (Fri, 01 Sep 2006) | 2 lines

Don't treat an unexpected control subclass as voice (issue #7858 reported by PCadach)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-01 16:34:57 +00:00
Steve Murphy
2ff2b02eae PCadach wanted better formatting of those 'if' conditions for 7859.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-01 16:33:22 +00:00
Joshua Colp
8ee7419d26 If no number is specified in the SIP_HEADER dialplan function, then just use the first one. (issue #7854 reported by sxpert and issue #7863 reported by hristo)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41689 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-01 16:19:03 +00:00
Steve Murphy
cd8635b9b5 This small tweek will hopefully fix 7859, and silence all possible others
along that line.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-01 15:57:05 +00:00
Russell Bryant
eb3db2fc15 fix some breakage, MOG DID IT!!!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41651 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 21:50:55 +00:00
Russell Bryant
7dfc749551 there is no need for __iax_frame_free ...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41650 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 21:50:07 +00:00
Anthony LaMantia
e553725500 spacing update
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 21:12:26 +00:00
Anthony LaMantia
2161a251a8 small typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 21:06:07 +00:00
Matt O'Gorman
05a695af72 everything that loads a config that needs a config file to run
now reports AST_MODULE_LOAD_DECLINE when loading if config file
is not there, also fixed an error in res_config_pgsql where it 
had a non static function when it should.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 21:00:20 +00:00
Joshua Colp
f2b836ff4f Tweak the DTMF muting stuff a bit to take into account VLDTMF and compensation.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41632 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 21:00:16 +00:00
Anthony LaMantia
7399d40ec7 fix for bugid: 0007830
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 20:49:26 +00:00
Russell Bryant
0c6932eeb4 there is no need to use iax_frame_free here, as it will actually just end up
having a bunch of erroneous messages about attempting to double free frames
spammed to the console.  Problem reported to me by file ...


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 20:39:12 +00:00
Joshua Colp
faf4975122 Ignore DTMF begin frames in the waitstream core so that we don't get duplicate digits in our extension match
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41611 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 19:03:13 +00:00
Joshua Colp
d6096858d0 Don't fail the write if they try to write a NULL or IAX frame as we just ignore these.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 18:47:51 +00:00
Joshua Colp
aaaec0e917 Add new frame types for DTMF
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 18:21:00 +00:00
Joshua Colp
29ee02bfce Only write a received packet out if we are actually bridged to something
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 14:46:46 +00:00
Olle Johansson
3f888b84f3 Use GLOBAL() in dialplan examples
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 10:40:24 +00:00
Russell Bryant
badabb5bb9 oops.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 04:19:54 +00:00
Russell Bryant
42fc890acc The behavior of REGEX when it did not match was not defined by the docs, so
define it to provide a result of "0" and change the code appropriately.
(issue #7805)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41544 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 04:07:35 +00:00
Steve Murphy
6557d250c8 This commit is a basic AEL enhancement: c-style comments
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 02:53:15 +00:00
Joshua Colp
a0cd4f4cc8 Force a rebuild since we mucked with enough stuff to justify it
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 02:03:01 +00:00
Joshua Colp
c6977b9983 Merge in VLDTMF support with Zaptel/Core done by the ever great Darumkilla Russell Bryant and the RTP portion done by myself, Muffinlicious Joshua Colp. This has gone through so many discussions/revisions it's not funny but we finally have it!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 01:59:02 +00:00
Joshua Colp
5418a7a1a8 Update configure script to check for Zaptel VLDTMF support since this will now be required. If you build and don't have Zap stuff, upgrade your zaptel copy. As well - change some minor things so that we get "checking for" and not "checking checking for".
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41505 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 01:48:04 +00:00
Kevin P. Fleming
b281acf0f8 change default setting for autofallthrough
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 21:44:05 +00:00
Olle Johansson
6ca927457d Why check bridgepeer twice?
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 20:24:32 +00:00
Olle Johansson
96fe6cd893 update docs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41456 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 20:20:52 +00:00
Olle Johansson
18164dec14 Don't add headers to an uninitialized eq (from issue 7694 garyhai, but not
a resolution to that bug report)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 19:51:31 +00:00
Olle Johansson
13eb698ce7 Note to myself: Remember Russell's note: Always compile first...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 19:20:29 +00:00
Olle Johansson
2c98238fbe Mark ALERT_INFO as deprecated. This can now be done with the sipaddheader() application and
does not need special code in chan_sip any more.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 19:16:53 +00:00
Russell Bryant
e68c0ff0be add a note about behavior of the "clid" field in the CDR
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41434 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 19:07:59 +00:00
Olle Johansson
0ace854142 Issue #7572 (Boesl) - hangup channel that get buggy 487 response (imported from 1.2)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 19:07:21 +00:00
Russell Bryant
8d1bf3298f Blocked revisions 41411 via svnmerge
........
r41411 | russell | 2006-08-30 14:59:44 -0400 (Wed, 30 Aug 2006) | 6 lines

Restore original functionality of 1.2 in places where ANI was not set, but was
changed to be set.  The original change was done to ensure that the behavior of
the "callerid" option in each channel driver was consistent, but it caused an
unexpected behavior change of CDR records for users, so this change is being
reverted in 1.2.  (issue #7695)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 19:02:34 +00:00
Joshua Colp
f135048ac0 Merged revisions 41390 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r41390 | file | 2006-08-30 13:58:31 -0400 (Wed, 30 Aug 2006) | 2 lines

Properly handle an ETIMEDOUT result from pthread_cond_timedwait (issue #7318 reported by arkadia)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 18:02:53 +00:00
Russell Bryant
1ffff64e66 fix a bug introduced when I merged my frame caching branch. Queue the
translated frame to the spies, *not* the original frame.  Thanks PCadach!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41389 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 17:07:07 +00:00
Joshua Colp
11b5db3d61 Clarify what show translations is displaying a bit more (issue #7772 reported by Mithraen)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 16:04:24 +00:00
Joshua Colp
3028eb1c15 Print what read-only variable is being set so that the user doesn't have to guess and figure it out or look at the list in cdr.c and match it up (issue #7831 reported by sedwards)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 15:15:06 +00:00
Joshua Colp
0855df6a5a Only feed a DTMF frame into the core if we need to
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 14:57:06 +00:00
Olle Johansson
7aa333c9ef Issue #7822 - don't issue SRV lookups if it's disabled. (barthek)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 14:36:46 +00:00
Mark Spencer
35e7066c52 Fix transcoding performance issue
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 03:20:54 +00:00
Joshua Colp
245aa1a62d Only switch the second alert fd (which is RTCP) to callback mode if it is in use
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 03:18:04 +00:00
Joshua Colp
12b6ec4e11 Use an API call (ast_rtp_get_bridged) to return the RTP stream we are bridged to, and also use it in chan_sip so we know to ignore the no RTP activity checking
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 03:16:03 +00:00
Joshua Colp
da7d969ae1 If the RTP stack is already being operated in callback mode, then suspend it upon switching to P2P callback bridging. Once P2P callback bridging has ended, then restore callback mode.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 01:29:59 +00:00
Joshua Colp
ca33d2ecc6 This is the last round of RTP bridge optimizations. Basically it introduces a way that under a straight bridge (ie: no transcoding and no DTMF detection) the core is not touched at all and no frames pass through (not even null frames). This is accomplished by stealing the file descriptors from the channel and using the provided IO context with a custom callback. When a channel is placed on hold this bridge is broken so audio can flow from the core to the other side. When a channel is off hold this bridge is re-established.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 01:22:46 +00:00
Joshua Colp
a2e2a51d8d Move the direct bridge write to after the NAT handling code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-29 23:41:16 +00:00
Kevin P. Fleming
3f189742f6 make menuselect configure process be silent when possible
don't use #ifdef inside a macro call... it appears various versions of gcc have bugs related to this


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-29 23:33:59 +00:00
Steve Murphy
299465336a This change fixes bug 7820. Way back in April this bug was reintroduced, it appears, when a bunch of restructuring was done. This code was basically left out during the restructuring. In the case of the failure in 7820, it is trying to match the extension _x. with _x., and failing, because the 'x' should only match 0 thru 9. I **could** upgrade the code so that that N,Z, and X match not only their intended number ranges, but also N,Z,and X respectively. And, moreover, X could also match N and Z, and Z could also match N. I have no idea why this bug took so long to turn up. I have no idea what a more thorough treatment of the code would do to working code, either. So I left it as it ***was***.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-29 23:08:42 +00:00
Jason Parker
0850bb72ed Kevins last commit made me spot a typo.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-29 21:52:40 +00:00
Kevin P. Fleming
ece7018515 add one remaining bit of functionality to the features.conf applicationmap (from Matt Nicholson in Digium Express Services)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-29 21:20:43 +00:00
Joshua Colp
04bd8c54e8 Limit challenges to 9 digits in length
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41280 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-29 20:53:27 +00:00
Russell Bryant
f7e7161607 Merge team/russell/frame_caching
There are some situations in Asterisk where ast_frame and/or iax_frame
structures are rapidly allocatted and freed (at least 50 times per second
for one call).

This code significantly improves the performance of ast_frame_header_new(), 
ast_frdup(), ast_frfree(), iax_frame_new(), and iax_frame_free() by keeping
a thread-local cache of these structures and using frames from the cache 
whenever possible instead of calling malloc/free every time.

This commit also converts the ast_frame and iax_frame structures to use the
linked list macros.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-29 20:50:36 +00:00
Jason Parker
d22476348a suppress compiler warning
Code shamelessly borrowed from r41271 (it was the same warning/fix)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-29 17:31:15 +00:00
Russell Bryant
6aae631cc9 update to reflect recent rtp changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-29 13:55:54 +00:00
Russell Bryant
1627052cf1 suppress compiler warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41271 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-29 13:48:15 +00:00
Russell Bryant
f7cac071d9 Merged revisions 41269 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r41269 | russell | 2006-08-29 09:33:34 -0400 (Tue, 29 Aug 2006) | 3 lines

clean up last commit ... most notably, there is no reason to do heap
allocations here, and it also included a potential memory leak

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-29 13:40:04 +00:00
Steve Murphy
11cb5a34fd Committed a fix for 7731, suggested by mnehauser.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-29 13:21:47 +00:00
Steve Murphy
8efd121371 Bugfix for 7813 applied to trunk as per patch supplied by stevens
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-29 12:24:01 +00:00
Steve Murphy
7a2c9d9ccc blocking version 41240 from erasing stuff about complement and matching ops from the trunk version
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-28 20:56:52 +00:00
Joshua Colp
c70ed7614a Merge in RTP-level packet bridging. Packet comes in, packet goes out - that's what RTP-level packet bridging is all about!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-28 17:37:56 +00:00
Steve Murphy
d5572fac38 My apologies, I missed the compiler warning in a previous commit for the ael_main.c;
I've fixed this.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-28 15:31:14 +00:00
Kevin P. Fleming
d12f54f90b GNU make already knows how to quietly ignore non-existent files in 'include' directives
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-26 23:58:47 +00:00
Kevin P. Fleming
a757ca2947 ensure that unload_dynamic_module won't continue dereferencing a module pointer after the module has been unloaded from memory
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41196 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-26 19:45:16 +00:00
Russell Bryant
3a83fbed5b menuselect doesn't use asterisk's autoconfig.h anymore, so this ifdef can be
removed


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-26 17:15:38 +00:00
Kevin P. Fleming
3ba8e0a973 ensure that cross-compiler info is removed from the enviroment before configuring menuselect
ensure that the user's LDFLAGS take precedence when linking the final binary


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-26 17:05:38 +00:00
Kevin P. Fleming
aa7b32d175 more optimizations for embedded systems:
when LOADABLE_MODULES is off, don't export symbols from the main binary
  when LOADABLE_MODULES is off, and the compiler/linker support it, strip out code not used in the final binary


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-26 16:45:35 +00:00
Russell Bryant
b374245688 remove some unneeded variables now that the menuselect build is isolated from
the parent project


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-26 16:13:45 +00:00
Steve Murphy
51132bbdbf Changes to fix all problems reported in 7804 are included here.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41150 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-25 20:43:51 +00:00
Luigi Rizzo
379dc24745 we really need BSD make here to understand the -V option.
Fix and document this.
(problem introduced in SVN 40753)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-25 20:10:56 +00:00
Russell Bryant
3a6dfec6c3 fix redirect typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-25 19:10:15 +00:00
Kevin P. Fleming
aad5f19a12 fix a typo and clarify something else
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-25 18:58:52 +00:00
Russell Bryant
3c886e6451 remove the make version check, and instead, check for the actual bug that
causes our build system to blow up.

If anyone still sees problems and configure didn't detect a problem with make,
please let me know.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41119 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-25 18:55:26 +00:00
Russell Bryant
d770396e23 Identify what the columns mean in the output of "show profile"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41118 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-25 18:05:28 +00:00
Tilghman Lesher
d2b7882788 Off by one error in buffer length (issue 7379)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-25 17:48:34 +00:00
Russell Bryant
2eb7c010c7 we use autoconf 2.60.
Note that this only affects people regenerating the configure script.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-25 16:19:58 +00:00
Kevin P. Fleming
970c6876c5 instead of reverting this supposedly 'stupid' change, let's try to get it working properly
also eliminate a warning from dlopen() because some flags were missing on the second dlopen() call


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-25 16:14:00 +00:00
Matthew Fredrickson
b56d1a76ce Note to self, always compile before committing.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41068 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-25 15:20:16 +00:00
Matthew Fredrickson
3113f07570 Don't send proceeding twice (#7800)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-25 15:14:42 +00:00
Kevin P. Fleming
7b65cdc0c7 remove documentation of 'global' section in modules.conf, since it is no longer needed or supported
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41054 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-25 14:14:27 +00:00
Russell Bryant
9aabe41de3 don't seg fault when using dbsecret
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-25 02:55:00 +00:00
Jason Parker
62309a54ef This is a bit safer on some versions of sed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41026 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-25 00:52:19 +00:00
Russell Bryant
5008225fcf get cflags for libcurl as well as libs (patch from qwell)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41023 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-25 00:13:03 +00:00
Jason Parker
310cb52bb4 As per the comments in this file..
The last patch was slightly wrong.  This'll get it for sure.

Solaris (and some others) don't have sed -r.  perl -p is equivalent


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41015 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-24 22:17:12 +00:00
Jason Parker
2a3aaa9818 Fix a small typo I found.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-24 21:30:34 +00:00
Russell Bryant
1ff5a0988d Merged revisions 40994 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r40994 | russell | 2006-08-24 15:41:26 -0400 (Thu, 24 Aug 2006) | 11 lines

Fix a few issues related to the handling of channel variables
 - in pbx_builtin_serialize_variables(), the variable list traversal would stop
   on a variables with empty name/values, which is not appropriate
 - When removing the GROUP variables, use AST_LIST_REMOVE_CURRENT instead of
   AST_LIST_REMOVE
 - During masquerading, when copying the variables list from one channel to the
   other, using AST_LIST_INSERT_TAIL is not valid for appending a whole list.
   It leaves the tail pointer of the list invalid.  Introduce a new macro,
   AST_LIST_APPEND_LIST that appends a list properly.
(issue #7802, softins)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40995 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-24 19:53:43 +00:00
Russell Bryant
9df34a3d40 fix codec_gsm build for powerpc
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40993 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-24 19:07:01 +00:00
Russell Bryant
5266cd75e3 remove CFLAGS that aren't needed anymore
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-24 18:57:46 +00:00
Olle Johansson
cff8073771 Deprecate USERAGENT
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-24 18:49:35 +00:00
Matthew Fredrickson
16157e26d6 Revert stupid RTLD_NOLOAD change that breaks module loading on some systems.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40981 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-24 17:24:33 +00:00
Joshua Colp
236c23269d Merged revisions 40979 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r40979 | file | 2006-08-24 13:13:04 -0400 (Thu, 24 Aug 2006) | 2 lines

I can type english. Honest. Thanks Kenny.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40980 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-24 17:13:57 +00:00
Joshua Colp
e5c0665caf Merged revisions 40971 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r40971 | file | 2006-08-24 12:44:41 -0400 (Thu, 24 Aug 2006) | 2 lines

Minor documentation fix to add the 'dynamic' dialplan option from angler

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40972 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-24 16:46:13 +00:00
Joshua Colp
5345469008 Documentation updates (thanks Shaun for the speechrec.txt one!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-24 15:44:24 +00:00
Jason Parker
2986a59fab Okay, there are 3 reasons why I'm doing this.
1) Solaris sed doesn't have -r, which means things like \s and \S don't work.
2) GNU sed version 4.1.2 failed on a very simple test
     echo "Test   Test" | sed -r -e 's/\s/x/g'
     should have returned "TestxxxTest", but did not (however, 4.1.4 did?).
3) The CFLAGS were never set, so that entire line actually did nothing.  Now it's useful again.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-24 01:21:41 +00:00
Olle Johansson
8b3aeaeae6 Fixing a comment
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40960 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-23 21:19:21 +00:00
Joshua Colp
a9f8c538ef Add a lasting legacy from 1082... a Macro to do a pre acknowledgement message with option to reject. Thanks to patbaker82 for this. (issue #1082 reported by damin)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-23 20:39:23 +00:00
Joshua Colp
3f7b10eab6 Free the filename so we don't have a memory leak. (reported by PCadach in #asterisk-bugs)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-23 20:22:18 +00:00
Kevin P. Fleming
7eecf0bfbc use RTLD_NOLOAD if it's available to make loading dynamic modules a little faster and less resource-intensive
also, keep trying to dlclose() a module until it actually goes away, since it may have other modules it brought in when it was loaded (thanks PCadach for pointing this problem out to me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-23 19:28:13 +00:00
Jason Parker
e690d7d34c move the "muted" svn:ignore to the utils/ directory
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-23 18:51:39 +00:00
Russell Bryant
3155cad50d remove svnmerge-integrated property
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40928 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-23 17:44:33 +00:00
Tilghman Lesher
ec7bd6614a Merged revisions 40901 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r40901 | tilghman | 2006-08-23 11:05:26 -0500 (Wed, 23 Aug 2006) | 2 lines

Revert last change - breaks retrieval of builtin variables

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-23 16:14:18 +00:00
Russell Bryant
4c41a6ccd0 merge menuselect_build ... most of the changes happened in menuselect
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40877 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-23 03:07:34 +00:00
Kevin P. Fleming
e0df1dfd7c generate a message when a module cannot be found and loadable modules are disabled
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-22 23:55:16 +00:00
Kevin P. Fleming
950b3fb070 make platforms that use mutexes in stdio.h happy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-22 23:07:11 +00:00
Kevin P. Fleming
e274fc0b54 minor improvements
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40863 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-22 23:06:13 +00:00
Kevin P. Fleming
804f49e2c9 when loadable modules are disabled, if someone tries to load a module that does not exist, don't dereference a NULL pointer, just stop trying to load it...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40854 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-22 21:57:16 +00:00
Kevin P. Fleming
74fb27c15f add a new include file for out-of-tree modules that need to know where things are located
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40853 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-22 21:45:15 +00:00
Kevin P. Fleming
4cc09eb1e4 remove requirement for libtasn1, which appears to be a Debian thing
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40837 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-22 16:32:41 +00:00
Jason Parker
ec23dcb172 Solaris didn't like this.
Let's just go ahead and make this match every other uintXX_t in Asterisk.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40833 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-22 05:34:44 +00:00
Jason Parker
0264c362b6 a couple Solaris tweaks, to help build properly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-22 05:24:50 +00:00
Tilghman Lesher
312ae9bbdb Blocked revisions 40821 via svnmerge
........
r40821 | tilghman | 2006-08-21 21:59:37 -0500 (Mon, 21 Aug 2006) | 2 lines

Bug 7779 - Using initstate(3) means that we cannot unload this module once loaded.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40826 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-22 03:01:49 +00:00
Joshua Colp
fbe03b3f30 Another compile time warning bites the dust
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-22 02:30:38 +00:00
Joshua Colp
7734efb97b Make a warning about an unused function & variable go away on the stand alone AEL build.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40819 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-22 02:24:46 +00:00
Joshua Colp
cbbbff720b Make doxygen work with the new location of files that now reside in main
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-22 02:15:34 +00:00
Joshua Colp
432e19f2b7 Sorry, but this does not resemble malloc... so GCC was ignoring the attribute and throwing a warning.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40815 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-22 01:57:40 +00:00
Joshua Colp
39e32eb6cf Fix up the props a bit
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-22 01:01:39 +00:00
Matt O'Gorman
30c153cffa Merged revisions 40798 via svnmerge from
https://svn.digium.com/svn/asterisk/branches/1.2

........
r40798 | mogorman | 2006-08-21 17:34:26 -0500 (Mon, 21 Aug 2006) | 4 lines

Move the load_modules call so that if a module needs
realtime support it will work, none do currently but a good
move none the less.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 22:36:15 +00:00
Kevin P. Fleming
26fa229138 restore 'preload' functionality in loader
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40796 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 22:23:26 +00:00
Kevin P. Fleming
a87f710062 oops... missed one
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 20:19:47 +00:00
Kevin P. Fleming
90b0c32c71 another variable to clear out before configuring mxml
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 20:18:36 +00:00
Kevin P. Fleming
a394f4ad64 use a customized configure macro to tell the script that uCLinux does not have fork() that works
drop all startup options and code related to forking if it is not available


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 20:12:18 +00:00
Kevin P. Fleming
ca0a1d3842 don't initialize global variables list twice
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 20:04:59 +00:00
Kevin P. Fleming
6cd063c74d use new configure-provided wrappers for attributes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 19:56:45 +00:00
Kevin P. Fleming
61755115c2 restore printing of module name during loading
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 19:56:30 +00:00
Russell Bryant
283bcf4c9f - simplify and improve astmm by using thread storage instead of a dynamic
allocation and free on every call of the function for preparing the string
  that will be appended.  Then, use the ast_dynamic_str() code instead of the
  open coded version that is appended to when waiting for it to be delivered.
- use for loops for list traversals
- convert the manager sessions list to use list macros
- use atomic operations for num_sessions and usecounts
- convert some defines to the equivalent enum


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 19:42:29 +00:00
Russell Bryant
389c605a67 - use the atomic operations for incrementing the unique int
- free the string fields allocation if ast_create_channel() failes to open the
  alert pipe
- formatting tweaks


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40782 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 19:35:28 +00:00
Joshua Colp
1c182a606a Allow an offset for SIP_HEADER so you can get more then 1 header of the same name if they exist. Why someone would want to grab something like Via headers from dialplan I don't exactly know, but okay. (issue #7563 reported by Corydon76)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40781 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 19:33:42 +00:00
Russell Bryant
5d3869a1c8 various cleanups, including ...
- Create an astmm_log() macro that logs the same message to both stderr as well
  as the mmlog file if it is open instead of duplicating the code everywhere.
- Use for loops for list traversals instead of while loops
- reduce nesting
- ensure locking isn't put around more than is necessary
- localize a struct definition
- change the limit of the path to the mmlog to PATH_MAX instead of 80


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 19:18:09 +00:00
Russell Bryant
d030102eed - use a common error message in all of the memory allocation macros
- add ast_asprintf() and ast_vasprintf()
- tweak doxygen comments
- simplify the definition of a flag macro


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40775 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 17:22:24 +00:00
Kevin P. Fleming
53b1c97c9a build muted by default, since there is no Makefile target for it anymore
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 14:45:58 +00:00
Kevin P. Fleming
5b03b3449b use a safer process for checking if a module wants to export symbols into the global namespace
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 14:42:03 +00:00
Kevin P. Fleming
ff74cbc116 replace a couple of bare 'make' with $(MAKE)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40765 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 13:47:45 +00:00
Kevin P. Fleming
e288ef135e swap module macro arguments to proper order
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40761 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 11:48:08 +00:00
Jason Parker
79dca5ef75 Fix a potential integer signedness problem.
Also fix some locking issues I found at the same time.

Issue 7770, original patch by alamantia


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40757 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 07:34:59 +00:00
Kevin P. Fleming
e044e852c6 ensure that 'make' after 'svn update' that includes a configure script change won't run without making the user run configure first
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 03:58:02 +00:00
Kevin P. Fleming
f3c518a70f don't declare these variables unless needed
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 03:06:41 +00:00
Kevin P. Fleming
b1288df748 document Makefile target changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40728 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 02:54:05 +00:00
Kevin P. Fleming
94302c792a could have sworn i committed this change already...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 02:46:47 +00:00
Kevin P. Fleming
ca6ee66c60 main subdirectory is not dependencies for menuselect input
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 02:31:01 +00:00
Kevin P. Fleming
f62099a4dd oops... no pattern rules for bison/flex
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 02:26:51 +00:00
Kevin P. Fleming
0a27d8bfe5 merge new_loader_completion branch, including (at least):
- restructured build tree and makefiles to eliminate recursion problems
  - support for embedded modules
  - support for static builds
  - simpler cross-compilation support
  - simpler module/loader interface (no exported symbols)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 02:11:39 +00:00
Tilghman Lesher
f60ada0be2 Merged revisions 40692 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r40692 | tilghman | 2006-08-20 17:09:57 -0500 (Sun, 20 Aug 2006) | 2 lines

Reformat to match the contribution style of other contributors

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-20 22:12:50 +00:00
Jason Parker
d371de5bf6 This is just step 1 in taking over the world.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-20 18:03:24 +00:00
Tilghman Lesher
6fec811743 Convert func_odbc to use the prepare_and_execute callback, which helps with a database reconnection issue (bug 7693)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40632 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-20 15:46:00 +00:00
Joshua Colp
2dc0692e86 Blocked revisions 40601 via svnmerge
........
r40601 | file | 2006-08-20 00:49:48 -0400 (Sun, 20 Aug 2006) | 2 lines

Turn media level c= parsing on by default (issue #7725 reported by psm)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40602 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-20 04:51:06 +00:00
Jason Parker
c12f6bcdd4 Converted device2str and control2str to use thread local storage.
Thanks Russell.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-20 04:39:57 +00:00
Joshua Colp
d5152177f3 Properly check to see if parkingnum is a number (issue #7762 reported by robf)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40599 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-20 04:25:28 +00:00
Joshua Colp
60cf653dde kpfleming didn't break trunk, it was the aliens. (fix it so that the Makefile references the new name for the XML tree, menuselect-tree)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-20 01:42:41 +00:00
Jason Parker
6e140aae84 Make the CIPC device string useful
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40563 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-20 01:27:24 +00:00
Jason Parker
1bacbd54f4 Fix minor display issues in "skinny show devices".
Patch by wedhorn with minor modifications by me.

Issue 7766


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-20 01:25:02 +00:00
Kevin P. Fleming
fd0ac387a9 deprecate chan_agent callback mode
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-19 17:05:43 +00:00
Russell Bryant
a583f314dc suppress warnings introduced by putting states in an enum
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-19 03:50:15 +00:00
Jason Parker
81fa4bcf40 Blocking 1.2 rev 40446 from merging to trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-19 01:06:53 +00:00
Jason Parker
7c05e6478d Fix a bug with app_voicemail when trying to use app_directory to leave messages
to another user (options 3, 5, 2).

If the context/extension didn't exist in the dialplan (and why should it have to?),
it would fail, saying that it's an "invalid extension".

(issue BE-71)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-19 00:53:54 +00:00
Russell Bryant
5dc72404ab convert lists of constants in channel.h to enums instead of #defines
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-19 00:33:44 +00:00
Joshua Colp
590591c16e Make a zttest of 20 seconds part of the autosupport script (issue #7752 reported by kshumard)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40395 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-18 19:22:33 +00:00
Kevin P. Fleming
749cd217c3 Merged revisions 40392 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r40392 | kpfleming | 2006-08-18 14:10:51 -0500 (Fri, 18 Aug 2006) | 2 lines

make a feeble attempt to avoid the 'how do I enable my hardware echo canceler' questions

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-18 19:11:34 +00:00
Steve Murphy
3607ab46c2 Updated this as per wishes of Kevin Fleming. Needs review. Any mistakes/misconceptions/glaring errors?
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-18 02:31:12 +00:00
Matt O'Gorman
a95851978b updating configure script and putting comments in the docs
in english. yay!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 22:52:07 +00:00
Matt O'Gorman
57ee805062 changes to configure to support older c-client than the
2004 version.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 22:39:48 +00:00
Joshua Colp
ecb907e010 Use OSAtomicAdd instead of OSAtomicDecrement to decrement the value by 1.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 21:14:03 +00:00
Russell Bryant
4879edbcc1 update configure script to reflect change to make version check
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 21:10:16 +00:00
Russell Bryant
98e1cbb957 a lot of systems use GNU Make 3.81beta4, so only consider the first two characters
in the minor part of the version string


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40280 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 19:38:15 +00:00
Russell Bryant
a8272afb1f fix the use of an uninitialized variable (issue #7746, pointed out by garyhai)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 19:14:20 +00:00
Kevin P. Fleming
50d94fc889 rename to more clearly state what this file shows how to do
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40257 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 18:33:24 +00:00
Kevin P. Fleming
70e665018e typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 18:32:47 +00:00
Russell Bryant
a0e891e63d fix a little typo in the config file name
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 18:16:22 +00:00
Russell Bryant
1d7b202302 add Steve Murphy's guide on setting up call queues using dynamic queue members,
including examples in AEL.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40254 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 18:09:59 +00:00
Russell Bryant
5784d21897 Merged revisions 40227 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r40227 | russell | 2006-08-17 12:36:21 -0400 (Thu, 17 Aug 2006) | 3 lines

revert bogus change to attempt to fix bug 7506 which actually causes half of
the channels not to get "Newchannel" events at all (issue #7745)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40228 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 16:37:39 +00:00
Joshua Colp
08b23695b4 Add 'l' option to CDR dialplan function which will cause it to pass the last CDR record to getvar instead of the first. (issue #7689 reported by voipgate)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 16:29:44 +00:00
Joshua Colp
6110a1a4dc Blocked revisions 40223 via svnmerge
........
r40223 | file | 2006-08-17 12:18:08 -0400 (Thu, 17 Aug 2006) | 2 lines

Make app_macro compile again

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 16:19:26 +00:00
Steve Murphy
c0c6e30a0f Blocking 40220, because I've already made the mod in trunk, and it might have collisioned...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40222 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 16:10:49 +00:00
Steve Murphy
8078aea52b In app_macro, changed the previously changed upper recursion depth limit to a variable, default of the original val of 7. MACRO_RECURSION is a channel variable that will override the limit, but until I can understand and fix why this limit is neccessary, I am not advertising this variable in the docs.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 15:48:49 +00:00
Nadi Sarrar
bd43525f3f fixing the 64bit issue with misdn_l1_task.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 09:14:01 +00:00
Russell Bryant
4173d0fafd tabs to spaces to fix alignment ...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 06:18:42 +00:00
Russell Bryant
6ec6d652bd print a warning at the end of the configure script if the version of GNU Make
in use is a version earlier than 3.81

This is for file :)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 06:16:00 +00:00
Russell Bryant
3409e55603 Fix cookie parsing for Internet Explorer (issue #7454, jeff)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 04:26:28 +00:00
Russell Bryant
c4bd88d655 fix include of tonezone.h to reflect new location (issue #7741, Mithraen)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 04:05:03 +00:00
Matt O'Gorman
e502e644df fixed imap bug and updated syntax.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-16 20:32:19 +00:00
Christian Richter
159d9d2a3b added patch from #7709
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40084 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-16 19:13:47 +00:00
Kevin P. Fleming
e441faab72 Merged revisions 40057 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r40057 | kpfleming | 2006-08-16 13:57:44 -0500 (Wed, 16 Aug 2006) | 2 lines

don't allow AUEP responses to overflow the stack during a string copy (reported by Mu Security)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-16 18:58:43 +00:00
Kevin P. Fleming
7546de3d8e fix some minor stuff
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40055 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-16 18:26:04 +00:00
Joshua Colp
3ef02d79a4 Remove the old ODBC_STORAGE and make EXTENDED_ODBC_STORAGE the one to use. This means that if you're using this and upgrade to the revision where this was committed, you will need to update your table to the schema provided in doc/odbcstorage.txt
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40033 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-16 16:22:13 +00:00
Russell Bryant
60b8d9f7f1 instead of a for loop and ast_cli_(un)register, use ast_cli_(un)register_multiple()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40031 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-16 16:06:19 +00:00
Joshua Colp
59766196ea Move things around a bit more for onhold support, and add a check to only decrement the onhold variable if it's greater then 0. (issue #7740 reported by AuPix)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-16 15:34:50 +00:00
Nadi Sarrar
e5a478e6b1 a static array now holds the cli_entry structs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-16 15:03:09 +00:00
Nadi Sarrar
864c934f53 adding support for AOCD facility messages.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-16 13:19:54 +00:00
Jason Parker
f7d117d24f Fix formatting of "show codecs" CLI command.
Make "show translations" CLI command have dynamic widths.

Also display g726 codec in both commands.
There are probably other places where "11" is hardcoded...


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39965 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-16 03:48:36 +00:00
Russell Bryant
9f9a5f1984 move the calls to ast_jb_configure() to before the PBX thread is started on the
channel to remove the theoretical race condition that the channel could get
bridged before the channel's jitterbuffer gets configured.  This was pointed
out by PCadach on IRC.  Thanks!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-16 03:43:47 +00:00
Russell Bryant
b6a99250ed Merged revisions 39935 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r39935 | russell | 2006-08-15 18:49:41 -0400 (Tue, 15 Aug 2006) | 3 lines

use pbx_builtin_getvar_helper() so that GET VARIABLE can retrieve global
variables (issue #7609)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-15 22:51:49 +00:00
Steve Murphy
7367a43547 block the indicated 1.2 branch from being merged into trunk; it's already here.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39934 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-15 22:37:33 +00:00
Russell Bryant
fff5a55af6 print a more user friendly error message with the text representation of codecs
(issue #7233, Mithraen)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-15 22:28:38 +00:00
Russell Bryant
65373a1987 reduce duplicated code by using print_codec_to_cli in sip_show_user as it is
already used in sip_show_peer (issue #7739, DEA)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-15 22:17:38 +00:00
Steve Murphy
8a0b9236a7 This change fixes bug 7731, macros not executing more than one level deep in a hung-up situation; also increased maximum recursion depth from 7 to 20, to keep serious coders from painful toe-stubbings
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39909 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-15 21:25:19 +00:00
Mark Spencer
5b5220fb77 Make tonepair generated through fixed point
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39886 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-15 20:25:13 +00:00
Christian Richter
7de6ec3337 removed libbnec dependencies.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-15 19:41:14 +00:00
Kevin P. Fleming
aa3947e9fa complete the coding style changes for these frame structures
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-15 17:14:20 +00:00
Nadi Sarrar
0b579cf152 moved the asn1 and facility portions of code to mISDNuser, so removing the files here.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-15 16:49:26 +00:00
Steve Murphy
e648f4ddb4 Made "style" change requested by Kevin Fleming... used initializer in declaration,
brought decl down to block where the variable is used, got rid of memset.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-15 16:35:06 +00:00
Steve Murphy
14beac0408 On behalf of PCadach, " IMHO that was last deadlock in chan_h323..."
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39779 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-15 14:55:30 +00:00
Joshua Colp
e132f14aed SMDI documentation fix (issue #7732 reported by mnicholson)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39776 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-15 14:08:39 +00:00
North Antara
2f07e6d368 fix a typo and a very minor formatting change
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-14 22:38:52 +00:00
Joshua Colp
9f9232ba98 Fix for uninitialized workspace in ast_cdr_getvar, pointed out by sergee
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-14 18:07:21 +00:00
Russell Bryant
259b993cae don't try to ignore the contents of a quoted string in ast_separate_app_args()
if the delimeter is actually the quotation mark (fixes issue #7622)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-14 04:25:13 +00:00
Russell Bryant
bd5ce7362d resolve some compiler warnings ...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39684 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-14 03:34:16 +00:00
Russell Bryant
26731ac99f add the doc file about the MacroExclusive app (issue #7366, Steve Davies)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-14 03:26:02 +00:00
Russell Bryant
9ad9e42c3e add MacroExclusive application, a Macro that only one call can executed at
a time (issue #7366, Steve Davies, with mods by me as discussed in the report)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39681 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-14 03:24:06 +00:00
Russell Bryant
2f2cce01d2 When taking a substring and a negative length is provided, instead of just
ignoring it, allow this to mean that we want that many characters off of
the end of the string so that ${EXTEN:0:$[${LEN(${EXTEN}) - 1]} can become
${EXTEN:0:-1}.  (issue #7586, Corydon)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39659 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-14 02:14:14 +00:00
Russell Bryant
781f9dbcaf don't include files that cause additional targets to get executed if the target
called was clean, distclean, or update


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-14 02:00:28 +00:00
Russell Bryant
87ac16847e - unregister SLA apps on module unload and add sample config (issue #7701, junky)
- rename SLAS to SLAStation, and SLAT to SLATrunk


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-14 01:32:46 +00:00
Russell Bryant
9301bbd3ab add the ability to run an arbitrary command if asterisk crashes
(inspired by issue #7698, which was res_segfault by anthm)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-14 01:13:32 +00:00
Russell Bryant
7d63b7d9ff support ./configure --silent
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39615 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-14 00:08:35 +00:00
Russell Bryant
fd82d4569c increase the maximum length of the mohinterpret/mohsuggest options (issue #7696)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39594 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-13 23:26:06 +00:00
Steve Murphy
834c7265de This commit merges the contents of 7721, as it applied to the trunk version. Added the item that would previously trigger a false error to test1.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39571 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-12 19:28:33 +00:00
Steve Murphy
1d2b76a0f8 added a -q for quiet, option to aelparse
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-11 21:30:03 +00:00
BJ Weschke
2ec3a672e9 Increase the size of the variable space for writing/reading persistent queue member data to allow for larger queues of members. (Matthew Roth #7703)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39516 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-11 17:49:35 +00:00
Joshua Colp
c5e5efb237 Move STD_MOD declaration to end of file as per the norm of everything else (issue #7711 reported by Mithraen)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-11 15:05:19 +00:00
Joshua Colp
eecf43413f Don't completely error out if a config file for chan_phone was not found. (issue #7710 reported by Mithraen)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-11 13:54:58 +00:00
Joshua Colp
524416f37b Make res_snmp fit general coding style (issue #7192 reported by Mithraen)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-11 13:42:49 +00:00
Joshua Colp
4ebd436c85 Add support to see if a peer has someone on hold, and fix a small bug with getting the state name. This one goes out to you mog!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39500 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-10 02:41:20 +00:00
Nadi Sarrar
162e37b2d6 fixing compile warnings, renaming config option "overlap_dial" to "overlapdial"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-09 09:24:21 +00:00
Russell Bryant
1de65767f2 This bug existed in one extra place that is not also in 1.2 ... So, fix it!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39455 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-09 04:12:10 +00:00
Steve Murphy
f56d340b1c This commit adds the enhancemnt per bug 7606, adding
the -w option to aelparse.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39431 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-09 01:17:47 +00:00
Steve Murphy
980a79a24d This bug adds enhancement as per bug 7606, the -w
option to aelparse.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-09 01:16:37 +00:00
Matt O'Gorman
475afdaf39 support for imap in app_voicemail as well as some
credits fixed.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39404 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-08 20:35:59 +00:00
Kevin P. Fleming
348410bb0e Merged revisions 39379 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r39379 | kpfleming | 2006-08-08 13:39:16 -0500 (Tue, 08 Aug 2006) | 2 lines

add explicit listing of anthm's contributions (issue #7683)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-08 18:39:41 +00:00
Nadi Sarrar
958f3726f1 * first bits of decoding facility information elements
* fail on misdn_cfg_init() if elements in the config enum don't match with the config structs in misdn_config.c
* implemented first bits for encoding ISDN facility information elements via ASN.1 descriptions
* using unnamed semaphore for syncing in misdn_thread
* advanced fax detection: configurable detect timeout and context to jump into



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-08 18:13:40 +00:00
Russell Bryant
bec806f25f Blocked revisions 39350 via svnmerge
........
r39350 | russell | 2006-08-08 13:04:10 -0400 (Tue, 08 Aug 2006) | 2 lines

Increase the buffer size for the callid (issue #7675, reported by pssatcs)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39353 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-08 17:29:09 +00:00
Matt O'Gorman
1ef09ebfed some code clean up and catch for a act_hook being called
without a packet.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-08 17:07:41 +00:00
Joshua Colp
a0bd41f79b Add support for Sigma Designs cards. These basically allow you to offload dialtone generation to the board. If you're using a quicknet board where this might work, give it a try as well. (issue #6092 reported by ywalther - minor mods by moi)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-08 17:02:45 +00:00
Joshua Colp
0f0323dbab Clarify volgain option a bit, it needs sox to work.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-08 15:53:51 +00:00
Tilghman Lesher
f37a4e3e12 Bug 6237 - add volgain parameter, such that voicemail messages may be amplified after recording
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-08 15:37:53 +00:00
Olle Johansson
373b633e33 Marking PRI_CAUSE as deprecated to be replaced by hangup(cause)
(Issue #7610)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-08 14:47:17 +00:00
Christian Richter
52e1395690 * added possibility to change echocancel settings during calls
* removed the holded element from the chan_list struct, we know this from the 
  state already
* added a few tweaks to make HOLD/RETRIEVE work again (TRANSFER does not work
  yet)
* added possibility to debug mISDN frames via syslog
* added misdn_lib_port_is_blocked function to check if a port is blocked
* removed ec_training=1 from empty_bc, we don't use ec_training anymore
* removed unused misdn_lib_get_l2_status function
* added the nt bit to dummy misdn_bchannel objects
* setting bc->out_fac_type to FACILITY_NONE defaultly
* removed HANDLER_DEBUG stuff for better readability



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-08 09:19:06 +00:00
Russell Bryant
07c8e65a6d change constant name from MAXSTRLEN to INITLEN since it is not the maximum
length, it is the initial length of the string when first allocated


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-08 06:36:47 +00:00
Russell Bryant
92bd7f19f7 Merge team/russell/ast_verbose_threadstorage
- instead of defining a free() wrapper in a bunch of files, define it as
  ast_free() in utils.h and remove the copies from all the files.

- centralize and abstract the code used for doing thread storage. The code
  lives in threadstorage.h, with one function being implemented in utils.c.
  This new API includes generic thread storage as well as special functions
  for handling thread local dynamic length string buffers.

- update ast_inet_ntoa() to use the new threadstorage API
- update ast_state2str() to use the new threadstorage API
- update ast_cli() to use the new threadstorage API

- Modify manager_event() to use thread storage. Instead of using a buffer of
  4096 characters as the workspace for building the manager event, use a thread
  local dynamic string.  Now there is no length limitation on the length of the
  body of a manager event.

- Significantly simplify the handling of ast_verbose() ...
  - Instead of using a static char buffer and a lock to make sure only one
    thread can be using ast_verbose() at a time, use a thread local dynamic
    string as the workspace for preparing the verbose message. Instead of
    locking around the entire function, the only locking done now is when the
    message has been built and is being deliviered to the list of registered
    verbose message handlers.
  - This function was doing a strdup() on every message passed to it and
    keeping a queue of the last 200 messages in memory. This has been
    completely removed. The only place this was used was that if there were
    any messages in the verbose queue when a verbose handler was registered,
    all of the messages in the queue would be fed to it.  So, I just made sure
    that the console verbose handler and the network verbose handler (for
    remote asterisk consoles) were registered before any verbose messages.
    pbx_gtkconsole and pbx_kdeconsole will now lose a few verbose messages at
    startup, but I didn't feel the performance hit of this message queue was
    worth saving the initial verbose output for these very rarely used modules.
  - I have removed the last three arguments to the verbose handlers, leaving
    only the string itself because they aren't needed anymore. For example,
    ast_verbose had some logic for telling the verbose handler to add
    a newline if the buffer was completely full. Now that the buffer can grow
    as needed, this doesn't matter anymore.
  - remove unused function, ast_verbose_dmesg() which was to dispatch the
    message queue
  - Convert the list of verbose handlers to use the linked list macros.

- add missing newline characters to a few ast_verbose() calls

- convert the list of log channels to use the linked list macros in logger.c

- fix close_logger() to close all of the files it opened for logging

- update ast_log() to use a thread local dynamic string for its workspace
  for preparing log messages instead of a buffer of size BUFSIZ (8kB on my
  system) allocated on the stack.  The dynamic string in this case is limited
  to only growing to a maximum size of BUFSIZ.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-08 06:32:04 +00:00
Matt O'Gorman
33f0232f07 This patch allows for a user to send messages and
monitor a jabber connection over manager.
patches from 7673 and 7666 with minor changes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39248 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07 22:03:50 +00:00
Matt O'Gorman
3f115f8c31 Many many code cleanup changes given to me by Oej
Thanks, sorry I didn't put this in forever ago.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07 21:15:28 +00:00
Kevin P. Fleming
9d26f46fc7 remove some extraneous 'followme' in prompt names
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07 18:47:33 +00:00
Steve Murphy
3042d0e046 This commit folds in changes to both stringfields (some enhancements to the ...field_set() macro, to optimize setting strings to empty, resetting strings to shorter contents, etc.) and to chan_iax2.c, to use stringfields in the user, peer, and pvt structs. Has been running stably on iaxtel, but while iaxtel has a large registration volume, it doesn't seem to have a high call volume. So far, it seems to reduce heap usage by over half. YMMV\! Please report any IAX bugs that might involve stringfields\!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07 18:12:51 +00:00
Olle Johansson
2f69bec40e Add placeholder for sla.conf sample in configs/. Please update with
correct information not to overload the switchboard with calls to sales.
 Thank you! ;-)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07 17:01:40 +00:00
Olle Johansson
a42c164879 Fix accidental removal of if() in commit 38905
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07 16:20:23 +00:00
Steve Murphy
14c12fed9b The contents of branch teams/murf/bug_7598 are being folded in here.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07 12:59:47 +00:00
Olle Johansson
b57c238260 Issue #7651 - always send subscription-state (AuPix)
Small change to the fix in the report.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07 09:22:43 +00:00
Christian Richter
f2178d336b changed naming of mISDN channels, so that hinting works proper
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07 09:09:17 +00:00
Russell Bryant
4d7c67fc72 Merge my applicationmap_fixup branch to address the issues described in this
post to the asterisk-dev mailing list:
  http://lists.digium.com/pipermail/asterisk-dev/2006-August/022174.html

This implements full control over both which channel(s) can activate a dynamic
feature, as well as which channel to run the application on.  I also updated
the documentation on the applicationmap in features.conf.sample in hopes that
the configuration is more clear.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07 04:15:52 +00:00
Russell Bryant
12b3d4a49e Merged revisions 39081 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r39081 | russell | 2006-08-06 21:28:29 -0400 (Sun, 06 Aug 2006) | 7 lines

Fix a crash reported to me by hads on IRC.  This crash would occur with the use
of the "distinctiveringaftercid" option.  Also, on this user's system, the crash
would only occur when built without optimizations.  This is because the bug is
that the code would write past the end of an array that was allocated on the
stack, and the structure of the stack is different with or without optimizations
enabled.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07 01:32:51 +00:00
Russell Bryant
954ed66a0a minor cleanups
- use appropriate types in some assignments
- use ast_strlen_zero()
- don't manually free cid fields since ast_set_callerid() will handle it


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07 00:26:11 +00:00
Joshua Colp
ce72e83a39 Merged revisions 39056 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r39056 | file | 2006-08-06 20:15:51 -0400 (Sun, 06 Aug 2006) | 2 lines

Reset our stream and vstream pointers back to NULL so that any generator that uses them (file based MOH) will not try to close them again. (issue #7668 reported by jmls)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39057 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07 00:17:12 +00:00
Russell Bryant
0f2b43fddc - add DIALING_OFFHOOK and PRERING to ast_state2str
- don't include a newline character when building a response for an unknown
  state
(issue #7645, jonty)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39032 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-05 20:58:47 +00:00
Russell Bryant
b9ee151d22 suppress a compiler warning about the usage of a potentially uninitialized
variable


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39014 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-05 11:25:36 +00:00
Russell Bryant
005107eeb7 Merged revisions 38982 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38982 | russell | 2006-08-05 05:01:37 -0400 (Sat, 05 Aug 2006) | 6 lines

Always generate a Newstate event in ast_setstate() instead of making it a
Newchannel event if the state was AST_STATE_DOWN.  The Newchannel event will
always be generated in ast_request(), so this just causes a duplicated
Newchannel event in some cases.  
(issue #7506, repoted by capouch, fixed by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38994 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-05 09:03:27 +00:00
Russell Bryant
e068c5fcf9 Merged revisions 38972 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38972 | russell | 2006-08-05 04:08:48 -0400 (Sat, 05 Aug 2006) | 3 lines

remove duplicate queue log entry when the caller exits on a timeout
(issue #7616, ppyy)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-05 08:10:20 +00:00
Russell Bryant
9892054414 Merged revisions 38950 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38950 | russell | 2006-08-05 03:21:12 -0400 (Sat, 05 Aug 2006) | 3 lines

don't advertise that this function can set a SIP header when it can only
do reads

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-05 07:22:27 +00:00
Russell Bryant
774bba093b Merged revisions 38928 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38928 | russell | 2006-08-05 02:37:59 -0400 (Sat, 05 Aug 2006) | 3 lines

make sure the priv-callerintros directory exists before trying to create a file
there (issue #7659, patch by hads, with some modifications by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-05 06:39:43 +00:00
Russell Bryant
663adb2b0e Merged revisions 38903-38904 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38903 | russell | 2006-08-05 01:07:39 -0400 (Sat, 05 Aug 2006) | 2 lines

suppress a compiler warning about the usage of a potentially uninitialized variable

........
r38904 | russell | 2006-08-05 01:08:50 -0400 (Sat, 05 Aug 2006) | 10 lines

Fix an issue that would cause a NewCallerID manager event to be generated
before the channel's NewChannel event.  This was due to a somewhat recent
change that included using ast_set_callerid() where it wasn't before.  This
function should not be used in the channel driver "new" functions.
(issue #7654, fixed by me)

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

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-05 05:26:29 +00:00
Joshua Colp
f41f7f8c93 It is better to hold a lock then not hold a lock when you are supposed to.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38887 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-05 00:13:44 +00:00
Joshua Colp
b64b636f7e Minor optimization but use a linkedlists.h macro that pops the head off the list instead of getting the first entry and then removing it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38871 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-04 23:17:40 +00:00
Joshua Colp
e306f812df Don't assume that a referred by URI will always exist (issue #7641 reported and fixed by AuPix)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38853 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-04 18:40:47 +00:00
Joshua Colp
2410854b3c Merged revisions 38825 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38825 | file | 2006-08-03 15:54:02 -0400 (Thu, 03 Aug 2006) | 2 lines

Treat the file as invalid if we have no valid formats for it (issue #7643 reported by KNK)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38826 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-03 19:55:05 +00:00
Tilghman Lesher
0d902b3033 Update documentation on realtime; add a workaround for lack of realtime hints by using func_odbc
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38823 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-03 19:05:06 +00:00
Christian Richter
fc3d27cf6f * removed pp_l2_check (fixed L2 bug in mISDNuser)
* added blocking flag to stack object. A port can be blocked/unblocked from the
  cli
* added EVENT_PORT_ALARM to send alarm infos to the chan_misdn.c layer (later	
  we can add a manager event for that)
* added block_on_alarm option, to block the port whenever a ALARM occurs
* added need_busy flag to indicate if we've sended a CONTROL_BUSY already
* changed a bunch of cb_log(-1,..) to cb_log(0,..) due to funny behaviour in 
  recent asterisk ast_log messages..
* fixed a few ETSI state violations, especially when finishing calls in 
  different seldom states
* changed debug levels a lot to make the log more readable in low debuglevels
* some first fixes for the HOLD/RETRIEVE stuff (doesn't work totally still)
* removed the PRECONNECTED state stuff
* added cause 27 when we get a CLEANUP directly after a outgoing SETUP, this
  creates a CHANISUNAVAIL instead of a NOANSWER
* removed the addr pointer from "misdn show stacks" that's not needed anymore 
  and makes the output more unreadable
* added cause saving on RELEASE/RELEASE_COMPLETE
* set cause to 16 on prepare_bc
* removed stack getting from ph_control functions, we don't really need it 
  there
* added beroec api



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-03 16:38:00 +00:00
Tilghman Lesher
aac4712421 Update statement on FreeTDS with realtime, due to revisions in res_odbc
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-03 13:16:00 +00:00
Tilghman Lesher
91629a8d55 Merged revisions 38761 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38761 | tilghman | 2006-08-03 00:22:19 -0500 (Thu, 03 Aug 2006) | 2 lines

Bug 7648 - Checking wrong count for plurality on new messages for Dutch language

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-03 05:24:43 +00:00
Kevin P. Fleming
1b784cd1f7 Merged revisions 38731 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38731 | kpfleming | 2006-08-02 14:29:56 -0500 (Wed, 02 Aug 2006) | 3 lines

fix brain-damage I introduced when trying to fix the CANCEL/BYE sending mechanism for pending INVITES
accept unknown 1xx responses as 183 responses (as RFC3261 mandates we should do)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-02 19:32:38 +00:00
Matt O'Gorman
a8d7d9123a dtmf support. not everything else, trying to clear out those other bugs
but more to come i guess.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-02 01:00:24 +00:00
Kevin P. Fleming
652d06f998 Merged revisions 38686 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38686 | kpfleming | 2006-08-01 18:07:06 -0500 (Tue, 01 Aug 2006) | 2 lines

ensure that the 'feature digit timeout' value is taken into account when deciding how long the bridge should run (this fixes a problem report where a digit press that did not invoke a feature is never passed across the bridge)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-01 23:09:28 +00:00
Joshua Colp
bec319415f Merged revisions 38654 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38654 | file | 2006-08-01 15:20:05 -0400 (Tue, 01 Aug 2006) | 2 lines

Close the stream when file based MOH stop. This won't get rid of their position in the file but it will cause the translation path to be setup again. (issue #7634 reported by asimpson)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-01 19:21:30 +00:00
Steve Murphy
f67f6b2261 This branch will resolve the bug 7635.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-01 19:03:32 +00:00
Tilghman Lesher
3c581f0e1e Set permissions completely open and modify by umask
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-01 13:15:15 +00:00
Kevin P. Fleming
ec2e7aee56 Merged revisions 38611 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38611 | kpfleming | 2006-07-31 16:14:11 -0500 (Mon, 31 Jul 2006) | 4 lines

don't reissue hangup requests for SIP channels that have expired their RTP timeouts (one time is enough)
don't rescan the SIP private structure list too fast, it can cause channels to not be able to hang up (issue #7495, and probably others)
use ast_softhangup_nolock() since we already hold the channel's lock

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38612 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-31 21:31:44 +00:00
Russell Bryant
93682ec72e make the counting of ingress, outgress, and total frames thread-safe
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-31 17:27:42 +00:00
Joshua Colp
99cbcec567 Blocked revisions 38585 via svnmerge
........
r38585 | file | 2006-07-31 13:09:10 -0400 (Mon, 31 Jul 2006) | 2 lines

Add missing code to bring transferee channel out of MOH/autoservice under certain circumstance (issue #7611 reported by guillecabeza with minor mods by myself)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38586 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-31 17:11:51 +00:00
Joshua Colp
dd2b2d2c24 Poking at a structure when it may not even be allocated is not healthy. Essentially make sure an RTCP structure exists before trying to delete it's scheduled item. (issue #7514 reported by jmls fixed by AuPix)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-31 15:24:05 +00:00
Russell Bryant
aff2bb47b2 Merged revisions 38546-38547 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38546 | russell | 2006-07-31 00:04:02 -0400 (Mon, 31 Jul 2006) | 2 lines

Make the frame counting done with TRACE_FRAMES defined thread-safe

........
r38547 | russell | 2006-07-31 00:06:16 -0400 (Mon, 31 Jul 2006) | 2 lines

one more small tweak for thread-safety of TRACE_FRAMES

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38548 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-31 04:10:43 +00:00
Russell Bryant
1372de4988 suppress some compiler warnings ...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38533 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-30 23:16:23 +00:00
Russell Bryant
dff27908dc allow the gtk console to build and load
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38532 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-30 23:11:07 +00:00
Tilghman Lesher
a9f8f09c19 Add details about flash and wait to doxygen about DTMF.
Reformat the lines to break at column 80.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-30 15:02:34 +00:00
Joshua Colp
5837bed675 Blocked revisions 38501 via svnmerge
........
r38501 | file | 2006-07-29 19:18:00 -0400 (Sat, 29 Jul 2006) | 2 lines

How many attempts does it take to make a SIP URI parser that works well? I'm up to 5 personally. On to the good stuff - parse the domain first, user second, and get rid of port & options/params last. (issue #7616 reported by andrew)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38502 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-29 23:19:36 +00:00
Mark Spencer
f2a6636210 Allow updates to match specific lines, allow specification of object or
no when appending.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-29 22:02:37 +00:00
Kevin P. Fleming
193aab348c update cleancount because the channel structure changed today
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38476 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-29 00:19:18 +00:00
Kevin P. Fleming
21e3c3a561 play a beep tone into the spied-on channel if we are about to whisper to them
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-28 23:47:05 +00:00
Kevin P. Fleming
4bc6613648 add ExtenSpy variant of ChanSpy
implement whisper mode for ExtenSpy/ChanSpy



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-28 23:36:06 +00:00
Russell Bryant
99f9d827c1 the pure attribute was not implemented before gcc 2.96. Since we have this
version check here anwyay, define attribute_pure to be empty if it's an earlier
version.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-28 23:30:18 +00:00
Russell Bryant
450db95711 add macros for the pure and const attributes to compiler.h, in case they ever
need to be handled differently for a specific compiler


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-28 22:50:54 +00:00
Russell Bryant
d6246e579f Add the function attribute "pure" or "const" to various functions that perform
int to string or string to int operations.

"pure" essentially says that this function has no side effects aside from its
result, and the result depends on nothing else other than its arguments and
global variables.  "const" is a more strict form of "pure", where the function
also doesn't access any global variables.

From the gcc manual: "Such a function can be subject to common subexpression 
elimination and loop optimization just as an arithmetic operator would be."
This also tells the compiler that it is safe to call the function fewer times
than the code says to, given the same arguments, since the result will always
be the same.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-28 22:14:49 +00:00
Kevin P. Fleming
88cea437ab just for fun, let's lock the whisper buffer for writing AND reading :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38441 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-28 19:58:53 +00:00
Russell Bryant
b04f059b4a As discussed and decided on the asterisk-dev mailing list ...
- Fix some breakage I introduced a while ago that made the timestamps option
  not functional for CLI verbose output.
- Remove the use of the timestamps option for log output, since it was not
  functional.
- clarify text referring to the timestamps option so that it is clear that it
  only applies to CLI verbose output


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38439 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-28 19:17:56 +00:00
Kevin P. Fleming
3314ea0d59 move slinfactory structure definition back to header... it's just easier to use this way
add infrastructure for whispering onto a channel


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38422 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-28 18:59:59 +00:00
Joshua Colp
48c09ef517 Merged revisions 38420 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38420 | file | 2006-07-28 14:49:00 -0400 (Fri, 28 Jul 2006) | 2 lines

Make a copy of the request URI in check_user_full instead of modifying the one on the structure, and also strip params properly from the user portion of the SIP URI so as to preserve the domain (issue #7552 reported by dan42)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-28 18:53:43 +00:00
Kevin P. Fleming
d079b1c49f more slinfactory structure definition to inside implementation module
make read/write/hold work on samples, not bytes
add an API call to find out how many samples are available in a slinfactory


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38418 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-28 18:03:57 +00:00
Kevin P. Fleming
a8b85fda84 more simplification, and correct a bug i introduced in the last commit
fix prototype for a channel walking function to use a const input pointer
use existing channel walk by name prefix instead of reproducing that code in this app


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38389 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27 23:16:08 +00:00
Kevin P. Fleming
94fa23aaa1 remove local channel finding wrappers
move guts of dialplan application into separate function, so it can be shared bythe new application i'm about to add :-)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27 23:00:27 +00:00
Kevin P. Fleming
878e8fb901 block this patch from 1.2, it's already fixed here as part of a larger commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27 22:24:19 +00:00
Kevin P. Fleming
8af55b34ad restore infinite timeout for ast_waitfor() call
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27 22:21:46 +00:00
Kevin P. Fleming
22d37976f2 various cleanups:
use API call for finding channel by name prefix
  code formatting to match guidelines (lost about half the of the indenting)
  remove useless automatic variable initializations
  don't set the spying channel's read format to SLINEAR when we don't do anything with the voice frames we read from it anyway
  use proper option argument checking for volume argument



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27 22:20:52 +00:00
Kevin P. Fleming
01e006c33c Merged revisions 38347 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38347 | kpfleming | 2006-07-27 10:40:03 -0500 (Thu, 27 Jul 2006) | 2 lines

do a better job avoiding translation path teardown/setup when not needed

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27 15:42:49 +00:00
Russell Bryant
03356c2a4d fix seg fault when the parked call that timed out was the last one in the list
of parked calls (fixes issue #7565)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27 04:44:49 +00:00
Russell Bryant
2842015aca Merged revisions 38328 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38328 | russell | 2006-07-27 00:25:41 -0400 (Thu, 27 Jul 2006) | 4 lines

Fix crash when using the "regexten" option with MALLOC_DEBUG enabled.  This was
not reported in the bug tracker but the same bug has been demonstrated in other
places in the code.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27 04:28:09 +00:00
Kevin P. Fleming
8b603fe8a5 Merged revisions 38310 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38310 | kpfleming | 2006-07-26 21:43:49 -0500 (Wed, 26 Jul 2006) | 2 lines

don't do useless translation destroy/build when the channel is already in the correct format

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27 02:46:22 +00:00
Russell Bryant
1df50be628 Merged revisions 38288 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38288 | russell | 2006-07-26 21:58:41 -0400 (Wed, 26 Jul 2006) | 3 lines

fix a crash when MALLOC_DEBUG is enabled and the regexten is enabled. The crash
would occur when the extension got removed. (fixes issue #7484)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27 02:00:20 +00:00
Russell Bryant
7b8d8c9bb5 fix crashes with MALLOC_DEBUG enabled that were a result of my recent thread
storage changes (fixes issue #7595)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38286 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27 01:49:57 +00:00
Russell Bryant
a43a350c3e fix some breakage of ast_cli() that resulted in seg faults on Josh's machine.
I'm not sure why this never caused problems for me ...


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27 01:29:57 +00:00
Russell Bryant
c1bd5cfe39 fix setting the CFLAGS for building codec libs so that they are built with
astmm support and astmm doesn't get really upset and complain that it is being
asked to free memory that was never allocated


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38271 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-26 23:12:47 +00:00
Tilghman Lesher
cc3029e871 Typo found on the -dev list
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-26 19:59:25 +00:00
Tilghman Lesher
a60a9b6637 Only unlock these if they were locked on entry
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38250 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-26 17:43:17 +00:00
Joshua Colp
6d52c0b559 Merged revisions 38234 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38234 | file | 2006-07-26 11:26:06 -0400 (Wed, 26 Jul 2006) | 2 lines

Put default callerid into contact when the one specified is either NULL or has a zero string length. (issue #7590 reported by key2)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-26 15:27:45 +00:00
Russell Bryant
d3a4d776df merge the changes from my ast_cli_tls branch ...
Instead of having a static buffer size of 16k, start out with 256 bytes and
increase the size of the buffer as needed.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-26 07:48:48 +00:00
Russell Bryant
d86d8ebdff This exact deadlock situation that I observed can't happen in trunk due to the
recent hold changes so that MOH is not started on the bridged channel directly.
However, the change is still not a bad idea.

Merged revisions 38200 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38200 | russell | 2006-07-25 15:43:38 -0400 (Tue, 25 Jul 2006) | 6 lines

This resolves a deadlock that a tech support customer was getting frequently
when his users would answer call waiting. If another thread is currently
holding the zt_pvt lock for the first channel, unlock both channels and let
asterisk retry the native bridge, just like what is done for the second channel
directly below these changes.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38201 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-25 19:51:31 +00:00
Steve Murphy
1bb760f347 Added a small fix to exclude the AMD optimized assembly file from being included in the compile.
I don't particular like the approach, which basically tries to exclude the file based on
NOT being in a list of arches. This, IMHO, is backwards, it should be a list of AMD arches 
instead. "Better to light a candle, than to curse the darkness", is apropo here. But since I don't
have an exhaustive list of what those arches could be, I leave as-is for now.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38187 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-24 20:58:27 +00:00
Steve Murphy
921336593b blocked rev 38167 on the 1.2 branch from trunk, because it's
coded differently on trunk, would conflict and have to be hand-merged
anyway.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-24 17:24:47 +00:00
Joshua Colp
cbf79ca489 Start out with cleared RTP payload structures instead of defaults. This should prevent issues where if a stream (audio/stream) is not present and it's RTP payload structure is combined with the overall capability then the capability would be every codec that Asterisk supports.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-24 15:47:59 +00:00
Luigi Rizzo
2c3bc8b1b3 move middle-of-the-block declaration at the top.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-24 11:46:27 +00:00
Luigi Rizzo
d0ef036696 fix uninitialized variable
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-24 11:45:06 +00:00
Joshua Colp
6810884f60 Only deal with getting the supported payloads on audio if an audio RTP stream exists
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-24 03:42:27 +00:00
Russell Bryant
fb94a4933b ast_malloc is sufficient here, since snprintf is called on the buffer
immediately after it gets allocated, which will automatically NULL terminate
the string


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-23 15:21:44 +00:00
Russell Bryant
a1fb7a2da3 Merge team/russell/ast_cli_tls into the trunk.
This improves the performance of ast_cli() by not doing a heap memory
allocation and deallocation every single time the function is called. Instead,
a thread-specific buffer is allocatted the first time the function is called
and automatically free'd when the thread exits. Also note that this buffer will
only be allocatted in threads that actually call this function, which is 
probably only the threads spawned to service connected asterisk consoles.

This does introduce a new limitation on the maximum length of the resulting
string from the arguments passed to ast_cli. Previously there was no limit
since it was just allocating a buffer big enough every time the function was
called. The current buffer size is 16kB. If there is ever a case where we want
to print more than 16k characters in a single call to ast_cli(), this will have
to be increased.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-23 15:19:16 +00:00
Russell Bryant
4103a6d8d7 fix a seg fault in this application if no context paramater is given
(issue #7571)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38118 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-23 05:20:59 +00:00
Russell Bryant
ee4c121dec resolve another XXX comment by implementing proper handling of control frames
in ast_write(), which is to call the channel's indicate function if it exists


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38117 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-23 05:06:47 +00:00
Russell Bryant
02077a8cae take the advice of an XXX comment and use an atomic operation to decrement a
variable.  Also, change a use of strdup to ast_strdup and remove a duplicated
error message.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-23 04:58:56 +00:00
Russell Bryant
0b6a420520 remove a stray newline
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38099 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-23 03:29:19 +00:00
Russell Bryant
8f08d7cc13 update to mention svn instead of cvs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-23 02:50:25 +00:00
Russell Bryant
5830e9cb4f various cleanups regarding coding guidelines issues
- malloc to ast_malloc
 - malloc + memset to ast_calloc
 - sizeof(struct foo) to sizeof(*bar)
 - remove indentation of the entire body of a function by returning immediately
   on an allocation failure
(issue #7581, tempest1)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-23 02:41:02 +00:00
Russell Bryant
f21d43ad5e ast_pbx_outgoing_cdr_failed() is not used outside of pbx.c so make it static
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-22 00:38:30 +00:00
Russell Bryant
d897bd41c2 use ast_atomic_fetchadd_int in chan_zap, sip, and iax2 for usecount handling
and fix a couple little things in passing
 - usecnt was not initialized in chan_iax2
 - ast_update_use_count() was not called after incrementing the count in chan_sip


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38077 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-22 00:33:56 +00:00
Russell Bryant
41ab9c5015 remove an XXX comment and document that ast_autoservice_start() will return -1
if the channel is already in the autoservice list.

Why is this a valid case to return -1, you ask?  Well, there should never be
any code where it is not clear if the channel is in autoservice or not because
trying to read frames from a channel that is in the autoservice list will lead
to bad results because more than one thread will be waiting on frames to arrive
on the channel and then trying to read them.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-22 00:08:21 +00:00
Russell Bryant
8dad7e730e slightly simplify a loop and replace an open coded version of ast_skip_blanks
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38068 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-21 23:58:14 +00:00
Russell Bryant
83749437a9 make ast_state2str thread safe by using thread local storage instead of a
static buffer for storing the result when the state value is unknown


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-21 22:36:25 +00:00
BJ Weschke
f2611e36c3 This corrects the crash condition present in #7575, but I'm not really sure if it's the "right" fix. Please review and make any adjustments you see necessary.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38051 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-21 19:10:58 +00:00
Russell Bryant
ca9ba719b6 Merge a new implementation of ast_inet_ntoa, our thread safe replacement for
inet_ntoa, which uses thread specific data (aka thread local storage) instead
of stack allocatted buffers to store the result.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-21 17:31:28 +00:00
Joshua Colp
1861dcdff5 Only bitmaskify the RTP payload structure for video if an RTP structure exists for it... otherwise the default values will cause codec combination madness
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-20 18:42:22 +00:00
Russell Bryant
233aab68a6 add a verbose message to the AGI command, STREAM FILE, similar to the
verbose messages when using Playback, Background, or the GET DATA command
(issue #7297, softins)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-20 16:18:07 +00:00
North Antara
346c291a2d Remove "initialization from incompatible pointer type" warnings.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 22:48:00 +00:00
North Antara
1edb21b423 Fix a few doxygen warnings.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 22:40:36 +00:00
Russell Bryant
9dac8f0f09 add menuselect_stub.c to deps list
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 21:52:59 +00:00
Russell Bryant
377ae8d648 add notes on the changes to music on hold handling
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37999 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 21:07:14 +00:00
Kevin P. Fleming
6d0742fc16 merge Russell's 'hold_handling' branch, finally implementing music-on-hold handling the way it was decided at AstriDevCon Europe 2006 (and the way people really want it to be)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 20:44:39 +00:00
Kevin P. Fleming
54e1f06c46 make installation of French and Spanish sounds work properly
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 18:50:55 +00:00
Kevin P. Fleming
dce498f8ce use new sound file version
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 18:33:14 +00:00
Mark Spencer
2b30934535 Fix some reinitialization of prev!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 17:26:47 +00:00
Kevin P. Fleming
a353387ea7 restore buildability
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 17:21:33 +00:00
Kevin P. Fleming
5aad4439e9 Merged revisions 37949 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r37949 | kpfleming | 2006-07-19 12:10:10 -0500 (Wed, 19 Jul 2006) | 2 lines

ensure that global 'maxauthreq' is reset to zero during 'reload'

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 17:16:25 +00:00
Kevin P. Fleming
886a6bd6f9 restore buildability (bad marko!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 17:16:08 +00:00
Kevin P. Fleming
e8d711723a revert this morning's incorrect indentation change
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37937 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 13:50:19 +00:00
Mark Spencer
837910062b First pass at in-place file manipulation via manager
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 13:28:38 +00:00
Steve Murphy
db0b142b06 committing a fix for colons in goto arguments and suppressing operator messages in globals assignments.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 02:55:24 +00:00
Luigi Rizzo
31d0db0e29 move variable declarations to the beginning of a block.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37907 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-18 21:19:59 +00:00
Mark Spencer
566ce7ef26 Eliminate file descriptor leak in built in HTTP server
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-18 20:26:38 +00:00
Joshua Colp
457ec51f8d Expand speech API so that the developer can interact with the engine more directly and use specific functions of the connector even if a generic API call is not available
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37881 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-18 16:22:26 +00:00
Russell Bryant
7dd7291aa0 Merged revisions 37856 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r37856 | russell | 2006-07-17 20:41:47 -0400 (Mon, 17 Jul 2006) | 2 lines

don't crash if the frame has no data, but has a src

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37857 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-18 00:43:57 +00:00
Russell Bryant
da6910c35b if asked to duplicate a frame that has no data, don't set the frame's data
pointer past the end of the buffer allocated for the new frame


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-17 23:31:24 +00:00
Russell Bryant
6f6e7f6f03 Blocked revisions 37828 via svnmerge
........
r37828 | russell | 2006-07-17 19:25:33 -0400 (Mon, 17 Jul 2006) | 3 lines

if asked to duplicate a frame that has no data, don't set the frame's data
pointer past the end of the allocatted buffer for the new frame

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-17 23:26:22 +00:00
Tilghman Lesher
69db447bcf Blocked revisions 37808 via svnmerge
........
r37808 | tilghman | 2006-07-17 17:36:56 -0500 (Mon, 17 Jul 2006) | 2 lines

Backport buffer increase to 1.2

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-17 22:39:02 +00:00
Tilghman Lesher
61c9c25391 H.263 frames can apparently be larger than was originally coded.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-17 16:31:43 +00:00
Tilghman Lesher
83f5766c47 Merged revisions 37765 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r37765 | tilghman | 2006-07-17 10:52:15 -0500 (Mon, 17 Jul 2006) | 2 lines

Overflow bad

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37766 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-17 15:56:16 +00:00
Mark Spencer
f6d03e822a Make app_meetme's do_invite more generic.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37755 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-17 02:17:38 +00:00
Luigi Rizzo
de59e8f655 use a couple of variables to remove duplicate definitions
of the various rules for the NOISY/!NOISY cases.

Approved by: kevin



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37744 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-16 22:24:39 +00:00
Russell Bryant
88627c754a add a QueueLog application that allows for custom entries in the queue_log
(issue #7368, by stevedavies with some modifications)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-16 19:36:29 +00:00
Russell Bryant
c024569f28 malloc + memset to ast_calloc
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-16 19:35:09 +00:00
Luigi Rizzo
541fdacb3c typo LDFAGS -> LDFLLAGS
detected by: noisy build on FreeBSD



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-16 13:01:48 +00:00
Tilghman Lesher
1a396d37f6 Merged revisions 37691 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r37691 | tilghman | 2006-07-15 18:29:28 -0500 (Sat, 15 Jul 2006) | 4 lines

Bug 7513 - ensure that each time we do a query, the results are returned in the
same logical order, so that when we iterate over the list, we get all results,
not some results repeated, due to insufficient sorting.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-15 23:35:21 +00:00
North Antara
2da3b12c51 case consistency in DISA (or is it "disa"?)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-15 21:56:58 +00:00
Kevin P. Fleming
9947a0591e update configure script with new curl version test
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-15 21:41:40 +00:00
Tilghman Lesher
d99e7d4f8e Move curl version test to autoconf script
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-15 21:39:26 +00:00
Kevin P. Fleming
a077853b17 add comments on what special variables are for
put library path into proper variable for *BSD


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37670 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-15 20:12:28 +00:00
North Antara
f83b709821 oops?
This should've been 5 chars..


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37669 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-15 20:02:20 +00:00
Kevin P. Fleming
000ba592b2 more Makefile cleanup and consistency stuff
don't reuse LIBS variable from top-level Makefile (oops)
build Asterisk binary after subdirs (preparing for embedded modules)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37661 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-15 19:59:35 +00:00
Kevin P. Fleming
396ef6f9e7 use LDFLAGS and LIBS properly, and allow dependencies to provide LDFLAGS if needed (although none do today)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-15 16:40:05 +00:00
Kevin P. Fleming
ad2a107e33 update to autoconf 2.60 version
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-15 16:39:17 +00:00
North Antara
e69e056012 config sample for the previous, regarding ADSI
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-14 21:49:40 +00:00
North Antara
5df4228851 There was an issue with ADSI and iax2, where on an iaxy with a normal phone connected,
in vm_authenticate, it was try to start ADSI on the channel, and it WOULD because it
  was "supported", according to the iaxy.  There is now a config option (adsi=yes) for
  this, which defaults to no.  (config sample coming shortly)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-14 21:49:20 +00:00
Russell Bryant
ee4840acdf add missing unregistration of a manager action on module unload
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-14 21:02:55 +00:00
North Antara
7bb38d5ee2 Rename a couple variables, to be consistent with the rest of the functions
Abstract out some common code into a single function

With the recent scheduler "issues", it pointed out a few things I might have been missing,
  so I added some rudimentary vrtp and rtcp stuff

General cleanup...


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-14 20:14:38 +00:00
Tilghman Lesher
88a0996656 Merged revisions 37612 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r37612 | tilghman | 2006-07-14 08:31:11 -0500 (Fri, 14 Jul 2006) | 2 lines

Bug 7526 - previous commit broke app_sms

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-14 13:34:25 +00:00
Tilghman Lesher
954b0dd624 Whitespace fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-14 06:03:41 +00:00
Tilghman Lesher
d8ccfb6711 Whitespace fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-14 05:42:06 +00:00
Russell Bryant
6dd28d9670 fix some typos in the conversion from the old SOONER macro to ast_tvcmp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37586 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13 22:03:47 +00:00
Kevin P. Fleming
3e9edd2702 Merged revisions 37571 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r37571 | kpfleming | 2006-07-13 16:22:11 -0500 (Thu, 13 Jul 2006) | 2 lines

don't fail/abort if the message category sound file cannot be played, just generate a warning message and continue message playback

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37572 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13 21:23:11 +00:00
Kevin P. Fleming
4492cbac8d swap the G726-32 format numbers, so that IAX2 connections with prior versions of Asterisk will still work properly
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13 20:39:34 +00:00
Kevin P. Fleming
4376af0080 actually make the non-standard G726-32 behavior available for SIP clients
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13 20:35:41 +00:00
Tilghman Lesher
e5555bc4eb Whitespace fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37563 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13 20:14:27 +00:00
Russell Bryant
dc2e58073c Blocked revisions 37546 via svnmerge
........
r37546 | russell | 2006-07-13 14:44:17 -0400 (Thu, 13 Jul 2006) | 3 lines

yeah, ummm...  This frame pointer should not be static.  This situation only
exists in 1.2 (pointed out by Constantine Filin on the asterisk-dev mailing list)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13 18:45:21 +00:00
Kevin P. Fleming
ead48c38cb Merged revisions 37531 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r37531 | kpfleming | 2006-07-13 11:44:23 -0500 (Thu, 13 Jul 2006) | 2 lines

report address of peer trying to subscribe to unknown hint

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37532 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13 16:47:20 +00:00
Tilghman Lesher
b558a31a66 Merged revisions 37516 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r37516 | tilghman | 2006-07-13 10:45:33 -0500 (Thu, 13 Jul 2006) | 2 lines

Bug 7532 - Typo in enum example

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37517 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13 15:47:30 +00:00
Kevin P. Fleming
dea45f3aa3 only compare the queue entry's max penalty to the member's penalty when the queue entry actually has a non-zero penalty
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37515 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13 15:37:56 +00:00
Kevin P. Fleming
ce8a649696 Merged revisions 37441-37442 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r37441 | kpfleming | 2006-07-12 10:46:56 -0500 (Wed, 12 Jul 2006) | 3 lines

fix a case where ast_lock_path() could leave a randomly-named lock file hanging around
make ast_unlock_path actually report when unlocking fails

........
r37442 | kpfleming | 2006-07-12 10:53:53 -0500 (Wed, 12 Jul 2006) | 2 lines

fix a weird case where a lock file could be left (but would happen almost never)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13 15:20:02 +00:00
Christian Richter
54ce0f0a22 added even more statefulness for sending out disconnect/release/release_complete messages. added support for incoming presentation/screening. fixed a bug that we generate TONE_EVENTS on hanguptone_indicatem, which caused asterisk to write blocking thread messages. added nodialtone option to prevent dialtone for always_immediate
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13 14:13:24 +00:00
Kevin P. Fleming
fd9c9ec28f allow users of RTP to use G726-32 AAL2 packing even when RFC3551 packing has been requested (Sipura/Grandstream ATAs and others will need this)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37501 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13 01:38:47 +00:00
Kevin P. Fleming
ea1d0c4b33 G726-32 changes:
split support for G726-32 into RFC3551 and AAL2 packing orders, since both are in use
change "G726-32" to be RFC3551 packing order, in spite of devices that use AAL2 order with this MIME type
add ability to directly transcode between packing orders


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37494 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 22:42:13 +00:00
Russell Bryant
f8df42ad97 fix some more app_voicemail breakage
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37492 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 22:10:59 +00:00
Olle Johansson
3b5a2aafa4 - Change filename to current file name
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37485 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 20:56:49 +00:00
Russell Bryant
81dc532887 fix the build options for app_voicemail
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37484 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 20:35:14 +00:00
Russell Bryant
d739107ce1 revert this change for now since it isn't working correctly and there are more
important issues to work on at the moment ...


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37483 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 20:27:46 +00:00
Russell Bryant
407c91a043 add "update" to the list of targets to ignore various included files for and
check the targets in a little bit different way


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 19:48:22 +00:00
Russell Bryant
90098fa198 don't let make run configure or menuselect if the target is either
"clean" or "distclean"


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37476 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 19:36:42 +00:00
Russell Bryant
4316a871ac repeat after me ...
I WILL TYPE "make" BEFORE COMMITTING ANY CODE


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 19:25:50 +00:00
Olle Johansson
8cd5ad1755 Re-enable RTCP quality reports
(Bug found in SIP Master Class, Chicago)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37474 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 19:09:55 +00:00
Tilghman Lesher
55f00d8816 Merged revisions 37458 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r37458 | tilghman | 2006-07-12 13:29:01 -0500 (Wed, 12 Jul 2006) | 2 lines

Merge fixup for asterisk startup script to zaptel startup script

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37459 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 18:39:36 +00:00
Russell Bryant
2355c3ac1d make some counter variables unsigned, use ast_tvcmp instead of a custom
SOONER macro, and some other little cleanups for things like indentation


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 18:28:31 +00:00
Joshua Colp
5d9419304c Merged revisions 37439 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r37439 | file | 2006-07-12 11:23:59 -0400 (Wed, 12 Jul 2006) | 2 lines

Add support to have maxauthreq as a global option

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 15:25:17 +00:00
Kevin P. Fleming
5b639e6135 Merged revisions 37419 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r37419 | kpfleming | 2006-07-12 08:54:10 -0500 (Wed, 12 Jul 2006) | 2 lines

remove some more bad examples of using printf

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 14:04:16 +00:00
Kevin P. Fleming
acfa035afe Merged revisions 37417 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r37417 | kpfleming | 2006-07-12 08:18:21 -0500 (Wed, 12 Jul 2006) | 2 lines

get rid of some more printf's (although most of these were ifdef-ed out)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37418 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 13:29:10 +00:00
Matt O'Gorman
79ecd92f22 Merged revisions 37402 via svnmerge from
https://svn.digium.com/svn/asterisk/branches/1.2

........
r37402 | mogorman | 2006-07-11 22:55:36 -0500 (Tue, 11 Jul 2006) | 2 lines

GRRR no fprintf!

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37403 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 03:58:47 +00:00
Kevin P. Fleming
83873b6a90 say times in spanish properly (using new sound files that are not yet released)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37396 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-11 23:27:51 +00:00
Christian Richter
94274cc26b * Introducing a new way for the l1watcher thread using the ast_sched way. Now l1watcher timeouts can be configured separately for every portgroup.
* added a signal handler to allow waking up the misdn task thread (that may sleep in a poll call) via misdn_tasks_wakeup().
* overlap_dial functionality implemented.
* fixes a bug which leads to a segfault after reordering config elements in the enum or struct



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-11 19:30:35 +00:00
Joshua Colp
ba092c1244 And now the trunk version! Add an option for IAX2 users that allows you to set how many outstanding AUTHREQs chan_iax2 will wait for replies on.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-11 19:03:56 +00:00
Joshua Colp
e87f1a51ef Blocked revisions 37378 via svnmerge
........
r37378 | file | 2006-07-11 14:00:50 -0500 (Tue, 11 Jul 2006) | 2 lines

Add configuration option for IAX2 users that will limit the amount of outstanding AUTHREQs we are waiting for replies on.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-11 19:01:49 +00:00
Kevin P. Fleming
7b968cec0d Merged revisions 37361 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r37361 | kpfleming | 2006-07-10 16:01:35 -0500 (Mon, 10 Jul 2006) | 2 lines

do masquerade-behind-proxy checking with better control over locks

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37362 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-10 21:07:48 +00:00
Christian Richter
6888b0ecba removed mqueue branch reference, because mqueue is head now.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-10 20:53:44 +00:00
Joshua Colp
696275bcc1 Fixed. Done. Good. Make ast_join work like it used to.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-10 19:58:33 +00:00
Joshua Colp
2e58363fed Unbreak ast_join due to whitespace changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-10 19:55:06 +00:00
Joshua Colp
022957ce03 Remove BRIDGE_OPTIMIZATION since it is deprecated or obsolete (take your pick)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-10 19:39:47 +00:00
Tilghman Lesher
229ab7d9cf Whitespace changes only
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-10 19:05:48 +00:00
Tilghman Lesher
4a3e227291 Whitespace changes only
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-10 17:42:12 +00:00
Olle Johansson
0e0059c0f3 Remove configuration option "restrictcid" that is nowhere to
be seen in the code. Did it exist, was it planned to exist
or was it documentationware only? Ask Dr Asterisk.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37324 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-10 11:20:49 +00:00
Christian Richter
46d200f14d removed unnecessary locking, which might have created deadlocks. removed find_chan_by_l3id, since the l3id is not unique over all ports. removed automatic nt_stack reinitialization, since this creates segfaults.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37323 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-10 11:06:47 +00:00
Kevin P. Fleming
300755732c remove skeleton support for G.723.1 codec since we will never ship the rest of what is needed anyway :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37320 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-09 14:32:08 +00:00
Mark Spencer
4c90cf59b7 Support hold/unhold in Zap, update IAX2 parser to know about modern commands, forward hold/unhold in dial, add hold device state
and implement holding in the SLA.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-08 02:24:07 +00:00
Joshua Colp
a7d62fd60c Merged revisions 37307 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r37307 | file | 2006-07-07 19:57:53 -0400 (Fri, 07 Jul 2006) | 2 lines

Change message regarding marker bit forcing when SSRC changes to be shown only during debug so it doesn't overload high capacity systems

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37308 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 23:59:54 +00:00
Russell Bryant
6ff11745ef remove the use of -Wno-pointer-sign. Asterisk now builds without any of these
warnings present on my machine.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 16:22:32 +00:00
Russell Bryant
bb628eac98 pointer signedness warnings
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 16:20:28 +00:00
BJ Weschke
4149f37efa Merged revisions 37212 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r37212 | bweschke | 2006-07-06 15:38:45 -0500 (Thu, 06 Jul 2006) | 3 lines

 Don't do wierd things on a callback agent that has attempted logoff while still on the phone.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37301 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 16:16:41 +00:00
Russell Bryant
092304ffa9 pointer signedness warnings
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37300 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 16:14:23 +00:00
Russell Bryant
4517f3447d pointer signedness warnings
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 16:11:39 +00:00
Russell Bryant
ebbca8319b eliminate warning about unused variable that occurs in some cases
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 16:07:17 +00:00
Kevin P. Fleming
4297d70e5a restore broken properties
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 16:04:29 +00:00
Russell Bryant
8f4ad8f577 pointer signedness warnings elimination
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 16:03:56 +00:00
Russell Bryant
7791079219 pointer signedness warnings cleanup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 16:01:36 +00:00
Russell Bryant
41bfcf3c57 pointer signedness warnings cleanup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37294 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 15:58:20 +00:00
Russell Bryant
05d1de6a1c more pointer signedness cleanup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 15:44:39 +00:00
Russell Bryant
7828780bb7 eliminate some pointer signedness warnings
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 07:03:42 +00:00
Russell Bryant
23a4d0be28 eliminate some pointer signedness warnings
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 07:01:50 +00:00
Russell Bryant
a0f151db99 eliminate a pointer signedness warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37289 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 07:00:28 +00:00
Russell Bryant
a10e1dad07 remove the unused usecount function to eliminate a compiler warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 06:58:16 +00:00
Russell Bryant
d6f9808e7f fix a pointer signedness issue
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 06:57:02 +00:00
Russell Bryant
6e28de8050 fix various pointer signedness issues
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37286 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 06:55:48 +00:00
Russell Bryant
833a8c825c resolve some pointer signedness warnings
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 06:44:40 +00:00
Russell Bryant
b8481e8103 avoid an error from configure by not doing a cat on a file that doesn't exist
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 05:51:29 +00:00
Russell Bryant
0c74fbd04d sort lib info
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 05:32:28 +00:00
Russell Bryant
7f53639331 sort entries in this file
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 05:29:31 +00:00
Russell Bryant
37ceb0126e spaces to tabs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 02:58:53 +00:00
Kevin P. Fleming
b601ff0a3e small cleanup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37280 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 02:33:24 +00:00
Kevin P. Fleming
13ba816edd rename this file so it doesn't appear to be a module by itself
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 02:20:28 +00:00
Kevin P. Fleming
3be4c8d3eb actually do proper searching for c-client and output the results so app_voicemail can be built against it
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 02:20:04 +00:00
Kevin P. Fleming
bc9ed9f5c4 various minor fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 00:48:40 +00:00
Russell Bryant
0b91c08045 dirty hack of a fix to deal with the fact that chan_vpb changed to chan_vpb.cc
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06 23:51:15 +00:00
Kevin P. Fleming
2058183f84 ignore muted if present
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06 23:21:27 +00:00
Kevin P. Fleming
d650e57f0c add missing file
ignore .oo files from C++ modules


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06 23:20:14 +00:00
Kevin P. Fleming
4f826452cf make the build output less noisy (optional, can be controlled by the NOISY_BUILD variable in the top-level Makefile)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06 23:18:45 +00:00
Steve Murphy
04ed725e73 OK, here is everything I changed to fix 7474:
1. ael/ael.flex -- the "fix" is here. In short, I modified the
   pattern for the chars that break args, to exclude those chars that
   would normally break args if they are preceded by a backslash. I did
   this to 3 patterns where really, this kind of exclusion should be placed.

2. ael_lex.c is an updated output from lex.

3. the ael-test stuff -- instituted a regression test for this condition.
   as ael_ntest9. The "n" in the name means that instead of just getting
   the syntax/semantic errors and high-level output from aelparse, we
   also want the compilation results to be in the comparison file.
   (remove the -n option). 



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06 22:49:18 +00:00
Matthew Fredrickson
de03118578 Asterisk portion of the T309 patch. (#7271)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06 21:51:51 +00:00
Matt O'Gorman
21486272e8 Blocked revisions 37224 via svnmerge
........
r37224 | mogorman | 2006-07-06 16:41:23 -0500 (Thu, 06 Jul 2006) | 4 lines

patch resolves issue with when to decide if its right time 
to native bridge, feature redirect was not being checked.
patch from bug #7296

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37225 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06 21:42:09 +00:00
Matt O'Gorman
cf86ee84ca patch resolves issue with when to decide if its right time
to native bridge, feature redirect was not being checked.
patch from bug #7296


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06 21:36:17 +00:00
Kevin P. Fleming
748431f7b6 move rules file to prepare for generic rules file
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37222 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06 21:04:28 +00:00
Joshua Colp
1fb6111c18 Merged revisions 37173 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r37173 | file | 2006-07-06 11:48:07 -0400 (Thu, 06 Jul 2006) | 2 lines

Instead of giving the scheduled item ID on a peer expiration, give the time until they expire (issue #7455 reported by slavon)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06 15:55:05 +00:00
Christian Richter
bd0b801a0d * removed tone_indicate, we genrate only the dialtone by ourself (and the hanguptone of course)
* removed the state handling from release_chan, and simplified the ast_hangup/ast_queue_hangup stuff
* added pp_l2_check option, for pp lines where the pbx does not initially gets the L2 up
* simplified and fixed a bug in the pid generation code 
* fixed a bug in empty_chan, which might cause segfaults and memorry corruptions
* added prepare_bc function, which is sort of the opposite of empty_bc



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37172 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06 15:11:40 +00:00
Tilghman Lesher
ebc9c3765b Merged revisions 37143 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r37143 | tilghman | 2006-07-06 08:47:23 -0500 (Thu, 06 Jul 2006) | 2 lines

Fix spelling/grammar (issue 7493)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37144 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06 13:50:54 +00:00
Kevin P. Fleming
dae3eedb34 make chan_zap use proper test for libpri support
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37141 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06 13:07:47 +00:00
Olle Johansson
435f329682 Include h.264 in "show codecs"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37123 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06 07:25:32 +00:00
Kevin P. Fleming
72c9c5def1 allow codec_gsm to be built using internal GSM library again (oops!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-05 21:28:30 +00:00
Matt O'Gorman
5c30f76ba3 solves issue with bug 7468. but with a patch that works
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-05 20:28:54 +00:00
Kevin P. Fleming
d646abbab7 update OSS so it works again
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-05 20:15:43 +00:00
Kevin P. Fleming
dbf099cdb8 update dependency information to match new names for dependencies
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37085 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-05 20:12:29 +00:00
Kevin P. Fleming
d5b7bf2ab7 massive rework of configure script, and split of AST_EXT_LIB into separate macros, reducing code duplication
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-05 19:59:34 +00:00
Matt O'Gorman
76f85726aa fix a compiler warning and clean up the code a bit.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-05 18:45:40 +00:00
Tilghman Lesher
2127a0b7e5 Change superfluous messages to DEBUG and remove dead code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37046 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-05 18:08:18 +00:00
Kevin P. Fleming
f761d2f6f0 prepare Asterisk for new zaptel.h/tonezone.h installation locations
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37027 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-05 16:44:41 +00:00
Olle Johansson
c5660895a8 Draft became RFC...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-05 15:56:13 +00:00
Joshua Colp
c56acadf7f Merged revisions 36998 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r36998 | file | 2006-07-05 11:31:01 -0400 (Wed, 05 Jul 2006) | 2 lines

Spell extension correctly in documentation for chan_oss dial (issue #7487 reported by flefoll)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36999 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-05 15:33:43 +00:00
Olle Johansson
ec9d4711d7 - Add notes about voicemail depending on res_adsi
- Remove obsolete modules from modules.conf.sample
  (make install will warn if those exist on the machine)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36979 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-05 06:06:23 +00:00
Russell Bryant
95c0ddd674 match the change made to AST_EXT_LIB in asterisk-addons
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36960 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-05 00:01:32 +00:00
Christian Richter
130ce69987 removed the reloading of the ntdebug stuff, since this is a bit buggy, we only set it when loading chan_misdn for now. fixed a litle state problem when receiving RELEASE_COMPLETE. also we may only play tones to a NT when the extension does not match and such cases.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36941 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-04 17:04:21 +00:00
Olle Johansson
f9df5318ce Specify digest algorithm for picky clients
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-04 14:54:55 +00:00
Tilghman Lesher
c929a15b79 Bug 7472 - Change line terminator for header to be RFC-compliant
Also, check to ensure the memory allocation didn't fail.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36892 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-04 00:16:33 +00:00
Christian Richter
5da2848158 removed our own tone creation from misdn_indicate, we just return -1. Now we get a lot fewer blocked in thread blah warnings..
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03 16:47:28 +00:00
Christian Richter
f629ae1872 added misdn show config description[s] to show all the possible misdn.conf settings with a description in the CLI
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36865 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03 16:41:43 +00:00
Olle Johansson
c6ab7e7164 Increase buffer size for routing headers. When routing with enc.keys within
route headers, we're reaching the limimt for what's possible in one UDP packet...



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36839 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03 15:10:22 +00:00
Tilghman Lesher
a58afaa03b Whitespace fixes only.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36819 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03 13:26:10 +00:00
Olle Johansson
fea7dd0b31 Add some comments to the SLA code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03 07:40:08 +00:00
Olle Johansson
2f6f0b19c5 Raise debugging level for message
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03 07:25:33 +00:00
Tilghman Lesher
e3482f7f38 Don't attempt to run a regcomp if we haven't even parsed arguments correctly
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03 06:32:35 +00:00
Russell Bryant
a4c7a1c97c reduce indentation a couple of levels
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03 05:32:08 +00:00
Russell Bryant
b391c098eb Blocked revisions 36751 via svnmerge
........
r36751 | russell | 2006-07-03 01:12:03 -0400 (Mon, 03 Jul 2006) | 3 lines

fix a race condition that caused asterisk to log a *ton* of warnings on mac
osx about poll returning an error because the polled file descriptor was bad.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36752 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03 05:14:06 +00:00
Russell Bryant
73e8e2ab1f Blocked revisions 36725 via svnmerge
........
r36725 | russell | 2006-07-03 00:19:09 -0400 (Mon, 03 Jul 2006) | 4 lines

use ast_set_callerid to be more consistent and to make sure that the
"callerid" option in the conf files is always handled the same way and sets ANI
(issue #7285, gkloepfer)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03 04:25:21 +00:00
Russell Bryant
03a277c5cc - remove an unused variable
- use ast_calloc instead of malloc + memset
- return immediately on ast_calloc failure instead of indenting the whole func
- remove a duplicate ast_strdupa


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36700 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03 03:39:37 +00:00
Russell Bryant
a717eef7c1 add RDNIS to the DumpChan application (issue #7432, junky)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36699 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03 03:34:47 +00:00
Russell Bryant
4075e5721b Merged revisions 36697 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r36697 | russell | 2006-07-02 23:23:36 -0400 (Sun, 02 Jul 2006) | 2 lines

fix the build with BUSYDETECT_TONEONLY defined (issue #7414)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36698 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03 03:24:58 +00:00
Olle Johansson
8affb4c1f8 Issue #7421 - Hold status not working fully. Thanks jmls for a good job debugging!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36679 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-02 19:53:54 +00:00
Olle Johansson
4c8e3bcdca users want code to compile, really.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36661 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-02 17:14:32 +00:00
Olle Johansson
e995afbd10 Formatting and debug output fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36642 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-02 16:42:53 +00:00
Olle Johansson
765e420458 tell the other side that we're using 20 ms packetization for iLBC
- we need to investigate support for refusing offers of 30 ms (like the Nokia
  e-series) or supporting it.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-02 14:18:00 +00:00
Olle Johansson
b971f65978 - Make use of system name in realtime SIP peers optional
- Fix small issue with SIP history


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36602 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-02 12:00:36 +00:00
Mark Spencer
79221df76c First pass at SLA support
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-01 23:54:43 +00:00
North Antara
79f45173fb It might help if this had the right stimulus name
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36562 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-01 17:59:37 +00:00
Tilghman Lesher
2465fd611c Revert the previous change to FILTER and fix the embedded documentation instead.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-01 16:03:51 +00:00
Russell Bryant
5a74ed4fef fix up res_snmp so it builds and loads correctly
- update to current loader
- update to latest build system changes to ensure snmp/agent.o is built
  and linked


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36524 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-01 15:13:56 +00:00
Mark Spencer
d9e8e304b9 Fix chan_nbs to build...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36505 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-01 14:55:29 +00:00
Russell Bryant
df2223416d fix the parsing of options in the FILTER function to match the documentation.
(issue #7465)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36504 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-01 14:42:42 +00:00
Russell Bryant
f54bef6dff fix removing autoconfig.h on distclean (issue #7439, casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36503 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-01 14:29:06 +00:00
Russell Bryant
9bc3976204 swap distclean and dist-clean, since distclean is more commonly used ...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36502 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-01 14:25:43 +00:00
Russell Bryant
5dceb817e6 remove build_tools/menuselelct-deps on distclean
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36483 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-01 04:37:52 +00:00
Russell Bryant
b2f5334746 don't specify this include in the menuselect Makefile, because asterisk-addons
doesn't have an include dir


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-01 03:27:37 +00:00
Russell Bryant
eba0e6731f more pickyness
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-01 03:23:18 +00:00
Russell Bryant
63e4f53ee5 change bracket style because i'm picky
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-01 03:21:56 +00:00
Russell Bryant
03f2685c76 menuselect doesn't pull strcompat.o from asterisk anymore
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36461 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-01 03:21:06 +00:00
Russell Bryant
90f8e459e5 more reasons why solaris sucks
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-30 17:52:49 +00:00
Russell Bryant
7718426316 fix the condition for including the header for osx atomics
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-30 16:02:05 +00:00
Russell Bryant
3ffc032ddc update configure
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-30 15:55:38 +00:00
Russell Bryant
40bae2fba3 add support for atomic operations provided by mac osx
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-30 15:54:13 +00:00
Joshua Colp
59be0b03b7 Fix up a few log messages in chan_sip (issue #7449 reported by tgrman)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-30 15:29:15 +00:00
Matthew Fredrickson
b39cb899d6 Make sure that we build chan_misdn with the object files in the right order
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36407 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-30 15:23:20 +00:00
Matt O'Gorman
109737eb1c Updates from transnexus to osplookup, removes res_osp
and puts all logic into the app, documentation provided now
in osp.txt.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36406 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-30 15:12:35 +00:00
Tilghman Lesher
1c76072e4b Merged revisions 36377 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r36377 | tilghman | 2006-06-30 09:05:53 -0500 (Fri, 30 Jun 2006) | 5 lines

Bug 7349 - Directory did not work correctly when USE_ODBC_STORAGE was defined.

Note: Russell agreed that this should have worked, which is why this is
classified as a bugfix.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-30 14:10:53 +00:00
Christian Richter
6027721510 added a bit logging, when we split the bridge
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-30 14:09:52 +00:00
Christian Richter
4bdeb383e7 added fix, that if the L2 goes down on ptp-NT that we reinitialize the NT Library. Also if we have no ntflags, we don't pass the filename to the debug routines of mISDNuser.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-30 14:05:42 +00:00
Olle Johansson
8d4ace1a0a Store sysname even if we do not store fullcontact (thanks tholo)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36356 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-30 07:22:47 +00:00
Olle Johansson
f3594bd1a0 Removing configuration options that does not do anything yet. No need to
add "promises" to the sip.conf.sample...


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-30 07:18:30 +00:00
Russell Bryant
11eccdb188 make this script work on solaris
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36336 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-30 04:33:18 +00:00
Tilghman Lesher
459b7e25bc Merged revisions 36290 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r36290 | tilghman | 2006-06-29 14:23:18 -0500 (Thu, 29 Jun 2006) | 2 lines

Bug 7388 - compatibility changes for Solaris

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-29 22:01:41 +00:00
Christian Richter
f5c0cd2ddc added better L2 handling for ptp, if it's down we don't try to call on that port in groupdial anymore, also we try to get it up then. Additionally added the configoptions ntdebugflags and ntdebugfile to debug the mISDNuser NT Stack (should have done that ages before..). isdn_lib.c compiles again.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-29 20:12:19 +00:00
Kevin P. Fleming
dec3d7d4c0 Merged revisions 36253-36254 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r36253 | kpfleming | 2006-06-29 02:19:27 -0500 (Thu, 29 Jun 2006) | 2 lines

add documentation for peer-specific 'outboundproxy' setting

........
r36254 | kpfleming | 2006-06-29 02:19:54 -0500 (Thu, 29 Jun 2006) | 2 lines

clarify documentation for 'persistentmembers' setting

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-29 08:01:08 +00:00
Olle Johansson
a38e7f01a9 ...too early in the morning for commits in Bergen, Norway...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-29 07:59:10 +00:00
Kevin P. Fleming
98a465fc09 move FreeTDS version check into configure script
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-29 07:50:01 +00:00
Olle Johansson
d92de40c2f Add support for a=inactive in SDP for holding. This is not very well documented
in RFCs, as they keep referring to each other in a circular pattern in regards
to this item, but since the Nokia SIP/GSM phones use this, we might as well
start supporting it.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36252 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-29 07:15:12 +00:00
Olle Johansson
4177596e8d reformatting sip.conf.sample a bit, adding dumphistory that was not documented
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36251 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-29 07:04:43 +00:00
Russell Bryant
0f875c3664 ?= just checks to see if a variable is not yet defined. If MENUSELECT_CFLAGS
was not found in the user level makeopts file, the variable is defined, but
empty.

I wish we could just require GNU make 3.81  :)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-28 21:33:39 +00:00
Russell Bryant
ecab03293c slight change to pulling out the MENUSELECT_CFLAGS from the user and global
level makeopts files - if MENUSELECT_CFLAGS is set to nothing in the user level
makeotps file, then the Makefile should not look in the global file at all.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36228 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-28 21:26:31 +00:00
Russell Bryant
d17026e670 remove an extra comma
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-28 21:20:15 +00:00
Russell Bryant
c248b690e4 remove the two uses of the $(or ...) function since it is only supported by
GNU make 3.81 which is less than 3 months old (issue #7442, patch by Corydon76)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-28 21:09:02 +00:00
Russell Bryant
9d61f19cee allow menuselect to be a symlink to a checkout
(second part of issue #7436, Corydon76)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-28 19:55:05 +00:00
Russell Bryant
9aa1432b46 fix the case where menuselect.makeopts is getting generated in the same run of
"make" as the current build and some of the MENUELSELECT_CFLAGS are set in the
user or global level asterisk.makeopts file


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36192 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-28 15:10:57 +00:00
Olle Johansson
2d0b212706 Block patch to 1.2 that was by mistake committed to trunk first...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36191 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-28 15:05:06 +00:00
Christian Richter
fc8d55ab15 moved a notice into a log
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-28 14:24:18 +00:00
Christian Richter
727488c81b fixed a few state problems when hanging up the call. also changed a few debug messages to higher log level
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36188 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-28 14:15:29 +00:00
Olle Johansson
dd94255a69 Don't delete initid scheduled item twice... Thanks, vecher, for bugging me about this.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-27 20:54:06 +00:00
Olle Johansson
f48a573439 Code cleanup while trying to understand this channel...
- please check


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-27 20:52:52 +00:00
Olle Johansson
f12f5b7c6c Formatting and doxygen fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-27 19:28:04 +00:00
Jeffrey C. Ollie
5e2ccc9821 menuselect writes both menuselect.makeopts and menuselect.makedeps at once, make sure that the Makefile knows about that.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36179 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-27 18:49:04 +00:00
Olle Johansson
6d86697867 issue #7033 - Don't burst pokes to peers at load or reload.
Open for a cool algorithm to space them out...


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-27 18:00:09 +00:00
Olle Johansson
6895f108bd Inspired by issue 6742, but solved in a different way.
(Yes, I like the system name setting)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36177 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-27 17:30:14 +00:00
Tilghman Lesher
b43f5638ef Missing parenthesis
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36176 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-27 15:53:27 +00:00
Matt O'Gorman
ccc7f662d8 dont copy an id or a message if they dont exist.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-27 14:07:24 +00:00
Christian Richter
5d18356b24 fixes segfault on incoming call which is disconnected in Alerting state
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-27 11:28:48 +00:00
Olle Johansson
6ca399c459 Don't change direction of the dialogue when we send a re-invite
(will confuse to/from headers and to/from tags)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-27 10:54:57 +00:00
Olle Johansson
0dbb924cb5 Found a missing "l" on the left side of the sofa, close to the TV.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-26 20:43:49 +00:00
Olle Johansson
66786a7d53 Issue #7421 - Stop generator on both call legs (patch by tgrman)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-26 20:41:54 +00:00
Olle Johansson
1cbd4effca Issue #7429 - accessing a not allocated structure causes segfault... (tgrman, fix by myself
inspired by suggested fix).


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36128 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-26 19:07:32 +00:00
Olle Johansson
cc43f0bdc7 Speling error. Avoid swenglish :-) (thanks, jtodd!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-26 18:34:29 +00:00
Christian Richter
baad1c266c * fixed the busy state
* fixed tone handling after ast_hangup was called
* optimized the tone_indication function
* removed warnings in favour of log debugs
* improved the round_robin method
* added logs for channel setting/emptying
* fixed channel forgot to set bug





git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-26 17:37:11 +00:00
Olle Johansson
6399ac438d Add explanation and warning about the "s" extension. (Hi Mike :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36080 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-26 17:31:51 +00:00
Kevin P. Fleming
93385c0fab fix for issue #7245
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-26 17:24:14 +00:00
Olle Johansson
f8311adcda METERMAIDS:
-----------
- Adding devicestate providers, a new architecture to add non-channel related
  device state information, like parking lots, queues, meetmes, vending machines
  and Windows 98 reboots (lots of blinking on those lights)
- Adding provider for parking lots, so you can subscribe to the status of a
  parking lot
- Adding provider for meetme, so you can have a blinking lamp for a meetme
  ( Example: exten => edvina,hint,meetme:1234 )
- Adding support for directed parking - set the PARKINGEXTEN before you manually
  call Park() and you will be parked on that space. If it's occupied, dialplan
  execution will continue.

This work was sponsored by Voop A/S - www.voop.com


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36055 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-26 16:43:21 +00:00
Olle Johansson
e2b0c5b558 Add example of permit/deny to sip.conf.sample
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36054 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-26 16:24:43 +00:00
Olle Johansson
693785cd8b Block patch that does not apply to trunk.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-26 16:15:58 +00:00
Russell Bryant
4b64399cc6 don't let the Makefile blow up in menuselect.makeopts is present but
menuselect.makedeps is not.  This would probably only be the case in existing
checkouts ...


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36020 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-26 14:38:55 +00:00
Olle Johansson
71411c6bae - Formatting
- Don't name internal static functions ast_
- Expand the buffer for variables, since I almost always hit the limit on my channels


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-26 08:40:30 +00:00
Olle Johansson
9863bb982c Separate private options so we don't request bug report on those...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-26 08:25:33 +00:00
Olle Johansson
8ee441b649 Update the SIP options list from IANA repository
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35965 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-26 07:45:03 +00:00
Kevin P. Fleming
67ea3b2d22 simplify special rule for channel.o
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-26 06:27:25 +00:00
Tilghman Lesher
b3c6e18a5e Merged revisions 35915 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r35915 | tilghman | 2006-06-25 10:10:06 -0500 (Sun, 25 Jun 2006) | 2 lines

Bug 7425 - Size of buffer is passed in by len

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35916 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-25 15:12:02 +00:00
Kevin P. Fleming
a579371f43 use new (separate) dependencies file from menuselect
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35895 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-25 08:50:14 +00:00
Russell Bryant
2f80e9db74 fix pbx_dundi build (issue #7424, jstrom)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-25 01:25:52 +00:00
Kevin P. Fleming
9d6c30422b commit missing file
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35854 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-24 23:26:19 +00:00
Kevin P. Fleming
51453628a0 clean up some damage from today's commit
convert codecs Makefile to new style


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35852 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-24 23:12:22 +00:00
Kevin P. Fleming
e61d3d91f3 The Eurostar Commit! (it's amazing how much work you can get done on a 150 minute train ride from Paris to London <G>)
support the new location for zaptel.h and tonezone.h
use the dependency information output by menuselect to build Makefile rules for each module for header files and libraries
combine the common rules into a top-level Makefile.rules file
remove all (now) unnecessary stuff from subdir Makefiles
change translator API so that the newpvt() callback returns an int instead of a pointer (it no longer allocates memory)
alphabetize --with-<foo> options in configure script
enhance Net-SNMP support in configure script to provide a --with-netsnmp option
fix support for --with-pq so that if pg-config is not found when --with-pq is specified, an error will be generated
add 'optional package' usage to modules now that menuselect can output it
allow res_snmp to build by default, since the new loader changes coming soon will solve the function naming problem (and users can disable it via menuselect anyway)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-24 19:43:31 +00:00
Kevin P. Fleming
df0ba5ff8b search for Zaptel and libtonezone separately in the configure script
various other minor fixes


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-24 08:45:49 +00:00
Russell Bryant
2e9099934b fix dist-clean and add menuselect to the clean target, too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-24 04:42:35 +00:00
Russell Bryant
b38f45a458 add dependency on menuselect's version of linkedlists.h, list menuselect as
a PHONY target


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-24 04:34:55 +00:00
Russell Bryant
39913c58b7 set the menu name when building makeopts.xml
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-24 04:10:41 +00:00
Russell Bryant
c7024d8a02 ast_calloc, instead of malloc and memset
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-24 04:03:52 +00:00
Russell Bryant
1c17258f4e fix some little issues on big endian platforms to resolve compiler warnings
- don't call the byte swapping macros on single byte numbers
 - don't do a ++ increment in the argument in the argument to the byte swapping
   macros. This gets expanded to incrementing the variable 4 times in a single
   operation, which results in undefined (and obviously undesired) behavior. :)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35766 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-23 23:22:57 +00:00
Russell Bryant
c8ceb92a4f revert my changes that converted the jb on the channel to be dynamically
allocated. These changes caused crashes when using a channel type that did
not support the jitterbuffer. Instead of fixing why it's crashing, I'm going
to implement this in a better way next week. The way I did it caused a
jitterbuffer to be allocated on every channel where the channel type supported
jitterbuffers, even if they were disabled.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-23 16:49:12 +00:00
Kevin P. Fleming
b8518110da add support for Zaptel transcoders
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35745 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-23 16:33:17 +00:00
Kevin P. Fleming
886350c637 ignore doxygen output directory
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-23 15:15:58 +00:00
Russell Bryant
cdbb0e2bf7 merge changes to get menuselect using svn:externals
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-23 14:19:35 +00:00
BJ Weschke
0d0fadc781 Merged revisions 35669 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r35669 | bweschke | 2006-06-23 06:30:17 -0500 (Fri, 23 Jun 2006) | 3 lines

 We should lock the queue before we go making changes to member interface statuses.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35670 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-23 11:33:02 +00:00
Kevin P. Fleming
2f238654de remove any generated doxygen docs during distclean
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35650 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-23 08:32:19 +00:00
Kevin P. Fleming
eaf0524c40 very minor improvement
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-23 08:15:48 +00:00
Russell Bryant
93c833e5d0 remove the autom4te.cache dir on a "make distclean" and add distclean to the
.PHONY list


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-23 02:15:35 +00:00
Russell Bryant
84c37e0c58 reduce indentation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-23 02:08:10 +00:00
Russell Bryant
5e282fef07 reduce indentation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-23 02:03:21 +00:00
Russell Bryant
8ab51d1fb1 delete snmp/agent.o on make clean
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35608 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-23 01:54:07 +00:00
Russell Bryant
268609aa68 add basic autoconf support for res_snmp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35607 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-23 01:50:55 +00:00
Russell Bryant
53a56fcfe7 remove various commands that remove old modules since they have been there a
sufficient amount of time.  Even if they happen to be still present, the main
Makefile will spit out a huge warning telling the user that modules not
installed by that run of "make install" are present in the modules directory.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35605 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-23 01:29:41 +00:00
Russell Bryant
463a3eb45b delete the local copy of mxml and use svn:externals to get it from its own
repo since it is going to be used it more than one place now


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35584 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-23 00:24:12 +00:00
Russell Bryant
7421acaa7e don't blow up if a jitterbuffer is not in use
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 17:49:28 +00:00
Russell Bryant
5941d4d819 - move the increase of the use count to be after the possible failures
- if the pbx fails to start, set the owner channel of the pvt strucutre
  to be NULL
- return immediately if the pbx fails to start so the loop to set all of
  the variables from the "setvar" options aren't set as a bunch of global
  variables instead


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35554 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 17:10:16 +00:00
Russell Bryant
46018d5032 - dynamically allocate the ast_jb structure that is on the channel structure
so that channels not using a jitterbuffer don't waste as much memory
- ensure that the channel drivers that use jitterbuffers can handle a failure
  from configuring a jitterbuffer on a new channel because of a memory
  allocation error
- On passing through these channel drivers, configure the jitterbuffer before
  starting the PBX thread instead of afterwards. If the pbx fails to start for
  whatever reason, this would have caused a crash.
- Also on passing, move the increase of the usecount to after all of the
  possible failure conditions in the function
- fix a place where ast_update_use_count() was not called
- ensure that the owner channel pointer of the channel pvt strcutures is set to
  NULL in failure conditions


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 17:05:17 +00:00
Russell Bryant
cad05d819b actually allow all of the sub directories to be built when running "make", oops
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35533 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 16:26:09 +00:00
Russell Bryant
3daaf2163f use .PHONY instead of FORCE
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35510 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 15:55:13 +00:00
Russell Bryant
e807ea95ab add a couple more targets to .PHONY
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35506 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 15:45:32 +00:00
Tilghman Lesher
89f6ffe1e5 Bug 6589 - option to display channel variables in queue events
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35504 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 15:43:02 +00:00
Russell Bryant
48ae9f0d4f - convert the 'uninstall' target to use separate targets to process each
subdirectory instead of a for loop
- remove the FORCE target from the main Makefile and add the couple places
  I used it to the .PHONY target.  .PHONY does the same thing and is a built-in
  more efficient way of doing it.
- add a bunch more targets to .PHONY ...


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35503 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 15:38:13 +00:00
Olle Johansson
778d0f0c0a Formatting fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35502 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 15:34:20 +00:00
Russell Bryant
55e8a60363 - specify that 'depend' is a .PHONY target
- use separate targets instead of a for loop for doing 'make depend' for
  each sub directory


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35501 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 15:08:08 +00:00
Russell Bryant
c95e633c8a use separate targets instead of for loops to process sub directories for the
'clean' and 'clean-depend' targets


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35481 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 14:31:52 +00:00
Russell Bryant
5ed2edeac4 get rid of another annoying stray space in the gcc commands
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35480 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 14:16:41 +00:00
Russell Bryant
9db0520ff9 - specify that 'all' is a .PHONY target
- add a copyright header to the build_tools Makefile
- remove 'depend' from the 'all' target in agi/ and utils/ since it is handled
  by the main Makefile already


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 14:09:18 +00:00
Russell Bryant
dbfa007d8a clean up a little mess I created by using the 'or' function instead of gross
nested if statements


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35459 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 13:22:07 +00:00
Russell Bryant
a236f488be revert my change to use the AC_PREFIX_DEFAULT macro since it is not something
that is expanded inline, so it didn't do what I wanted it to. The --help output
will be wrong again, but that's better than completely breaking it. :)
(Thanks to jcollie for catching this!)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35439 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 12:55:49 +00:00
Russell Bryant
e217604a44 use a slightly different, but equivalent way of setting the
SUBDIRS_INSTALL variable


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35438 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 12:48:25 +00:00
Russell Bryant
ad721dc2c1 instead of using a for loop to call 'make install' on each subdirectory, use
separate targets


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 12:33:50 +00:00
Russell Bryant
be0d611984 instead of using a for loop to call make on each subdirectory, use a target for
each subdirectory.
 - the shell code in the for loop doesn't have a manually catch errors from
   make on a subdirectory
 - you can now run something like "make apps" or "make channels" from the root
   source directory
 - This should allow for better support for parallel instances of make (the -j
   option) since make can work on each subdirectory target in parallel


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 12:14:29 +00:00
Russell Bryant
ce76568c52 nothing to see here ...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35416 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 11:39:25 +00:00
Russell Bryant
c399a06450 add the 'clean', 'clean-depend', and 'dist-clean' targets as .PHONY targets
since they are targets that do not have resulting files and are never listed
as prerequisites to real targets.  Using .PHONY in this manner improves make
performance by never having to check for resulting files.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35415 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 11:27:03 +00:00
Russell Bryant
f601dd80fa use $(FIND) and $(LN) from configure
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 10:38:45 +00:00
Russell Bryant
ac8bd0f0c0 use $(BASENAME) set by configure
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 10:36:45 +00:00
Russell Bryant
fd0273875a use the AC_PREFIX_DEFAULT macro to set the default prefix instead of setting
the variable directly, so that the configure --help information shows the
correct default prefix


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 10:30:51 +00:00
Olle Johansson
0fdb56425d Add agent to video docs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35366 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-21 20:14:25 +00:00
Olle Johansson
d29e2a58da Add video support to chan_agent.
More ideas for developing better video support in Asterisk?

Join the asterisk-video mailing list to help out in the 
Asterisk Video Task Force!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-21 20:11:09 +00:00
Olle Johansson
a256bcb080 Issue #7380 - Cannot put a one-legged call on hold/off hold
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35336 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-21 19:58:03 +00:00
Joshua Colp
4c066de7cf Merged revisions 35334 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r35334 | file | 2006-06-21 16:25:34 -0300 (Wed, 21 Jun 2006) | 2 lines

Add Venezuelan indications (issue #7402 reported by palillo)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-21 19:26:52 +00:00
Olle Johansson
c011aa8630 Only delete scheduled item if it exists
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-21 19:07:02 +00:00
Joshua Colp
0224dee876 Actually allow realtime queue members to be added (issue #7408 reported by tgrman)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-21 18:39:56 +00:00
Olle Johansson
58c243a6d4 Only formatting changes... (tabs to spaces)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-21 17:05:38 +00:00
Joshua Colp
5ff818f995 Fix timing issue (race) with poke/pong for very close peers that can cause a peer to be declared unreachable (issue #7396 reported by stevedavies)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-21 16:50:24 +00:00
Christian Richter
70a4c98a5a * added support for PID export/import to identify bridging in misdn_call already
* fixed a few inband Alerting issues, sometimes we need to create alerting, some
times it's inband
* beautified the state debugging of misdn_hangup
* removed "real"  bchannel activating/deactivating in chan_misdn.c
* fixed "round_robin" bug when there's only 1 port
* added more informative prints when channel could not be created
* changed some warnings to notices
* reworked the whole bchannel state machine stuff, 
  it is now like in the examples of mISDNuser and therefore a lot easier, 
  and it is now harder to create bugs
* bchannel_activate/deactivate is now only called in setup/cleanup bc, 
  they may merge sometime
* it is very important to setup/cleanup the bchannels under the correct 
  conditions, especially in the NT Side we can only setup the bchannels 
  when we send a Message! 
  In the TE side we can only setup the bchannel when we received the channel 
  of course
	      


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-21 15:21:46 +00:00
Olle Johansson
7876a86e96 - Doxygen and some formatting fixes in res_features
- Get rid of compiler warnings in chan_sip


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-21 07:49:29 +00:00
Olle Johansson
a85fec94fd Finally fix parking and go back to metermaids
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-21 07:13:20 +00:00
Tilghman Lesher
2c3e94f289 Bug 7399 - Sample config showed [general] as the context, so the app should look there, too.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-20 22:26:16 +00:00
Tilghman Lesher
2291834bd5 Bug 7372: Wrong size for the block alignment (should have been 4 bytes;
writing 4 from a 2-byte integer caused extra (wrong) bytes set in the header)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-20 22:22:47 +00:00
Olle Johansson
12164df2fd How many times can we free allocated memory? Many, obviously... ;-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35160 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-20 21:12:58 +00:00
Olle Johansson
b27fff2a9d Hunting crash when parking calls with SIP REFER
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-20 21:09:50 +00:00
Olle Johansson
0195279499 use correct test for checking if sip domains are enabled or not
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35125 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-20 15:46:49 +00:00
Russell Bryant
8686c659a6 $(INSTALL) is determined by configure and set in the makeopts file
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35123 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-20 15:08:44 +00:00
Tilghman Lesher
e704d616a5 Merged revisions 35121 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r35121 | tilghman | 2006-06-20 10:05:23 -0500 (Tue, 20 Jun 2006) | 2 lines

Bug 7398 - Solaris puts its zoneinfo files in a nonstandard place

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-20 15:06:38 +00:00
Olle Johansson
cb4221c7e9 Don't count unknown media streams as media streams in the offer... (Fenlander reported this on irc)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35095 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-20 13:31:42 +00:00
Olle Johansson
e04914b44a parse SDP properly even when we are debugging. (Thanks fenlander!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35094 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-20 13:28:33 +00:00
Olle Johansson
3b910323f3 Issue #6820 - SIP channels hang in semi active state
- Block fix from 1.2
- Implement part of that fix that was not already implemented, but in a different way

basically, don't cancel destruction when we receive re-transmits.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-20 10:34:53 +00:00
North Antara
fb0bb9b195 fix an issue with dtmf not being sent sometimes
slightly modify handling of digits


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35032 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-20 08:09:30 +00:00
Russell Bryant
a3846a727c ensure menuselect fails if the deps file isn't found
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-20 04:04:57 +00:00
Russell Bryant
c260301476 - use $(CC) instead of gcc when building testexpr2
- modify ast_expr2.fl and ast_expr2.y to not try to register the file version
  in a STANDALONE build
- add config.status as a dependency on testexpr2 to ensure configure is
  executed before building it
- add include/asterisk/buildopts.h as a dependency for testexpr2 as well
- add -Iinclude to the gcc commands for building the testexpr2 objects so that
  it can find the local asterisk headers


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34980 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-20 01:06:50 +00:00
Olle Johansson
bce5b8a146 - Formatting
- Create larger buffer for managing long auth headers from clients (adviced by SNOM)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-19 21:09:24 +00:00
Joshua Colp
e6958d9c5e Merged revisions 34911 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r34911 | file | 2006-06-19 17:27:44 -0300 (Mon, 19 Jun 2006) | 2 lines

Call reset_user_pw upon changing the password using externpass (issue #7395 reported by Ryan Cumming)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-19 20:29:08 +00:00
Tilghman Lesher
ea05183652 Merged revisions 34875 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r34875 | tilghman | 2006-06-19 13:07:26 -0500 (Mon, 19 Jun 2006) | 2 lines

Issue 7357 - txt file left behind when going to operator.  Also, fix a possible file descriptor leak.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34876 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-19 18:11:04 +00:00
Kevin P. Fleming
487adb43e2 various cleanups, remove support for CVS checkouts
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-19 15:17:32 +00:00
Russell Bryant
aa8efe1783 copy the definition of ast_strdupa and use it instead of strdupa to fix the
build on systems that don't have it, such as mac


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-19 14:24:35 +00:00
Christian Richter
2302fa58d7 when we get a disconnect, we should stop the tones on te side..
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-19 09:44:04 +00:00
Christian Richter
cdbddf5892 we need to send DISCONNECT on Timeout in the ALERTING/PROCEEDING cases too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-19 07:36:18 +00:00
Russell Bryant
9f2a6516cf don't blow up in the sub Makefiles if menuselect.makeopts is not present. This
is valid in some cases, such as "make clean".


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-19 00:14:16 +00:00
North Antara
e832ae320f No need to have debug enabled by default anymore..
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-18 23:18:34 +00:00
North Antara
a5d6979fac Finally merge chan_skinny fixes into trunk.
ready...set...GO!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-18 22:36:39 +00:00
Russell Bryant
5288621ed4 handle ast_calloc failure and tweak some formatting to comply with coding
guidelines (issue #7341, casper)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34667 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-18 21:45:48 +00:00
Russell Bryant
73ae55698f merge changes from team/murf/AEL-trunk-fixesonly
- fix callerid matching for extensions
 - fix nested switch statements
 - fix compilation with bison 2.1a or higher
(issue #7309)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-18 21:36:24 +00:00
Russell Bryant
c229baa0cf fix a polish voicemail bug with saying dates (issue #7389, supczinskib)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-18 21:26:48 +00:00
Russell Bryant
f75ad9736a bail if ast_calloc fails, this was done before but i accidently removed it when
moving these allocations so duplicate error messages were not produced
(issue #7345)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-18 21:24:35 +00:00
Russell Bryant
a7863b4345 Blocked revisions 34655 via svnmerge
........
r34655 | russell | 2006-06-18 17:03:58 -0400 (Sun, 18 Jun 2006) | 3 lines

don't set state to BUSY if the channel is already in the UP state
(issue #7376, backported from trunk)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34662 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-18 21:05:40 +00:00
Russell Bryant
7ec13047bc fix various coding guidelines issues (issue #7345, with additional changes)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-18 20:51:14 +00:00
Russell Bryant
c18da28251 use the CFLAGS from the main Makefile when building libdb1
(issue #7324, with mods)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-18 20:41:32 +00:00
Russell Bryant
9843e16df2 there is no reason to build and link stdtime/libtime.a because we already
directly include stdtime/localtime.o in the OBJS for asterisk, which is the
only object file for libtime


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-18 20:33:53 +00:00
Russell Bryant
035a8b4278 Merged revisions 34627 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r34627 | russell | 2006-06-18 16:15:15 -0400 (Sun, 18 Jun 2006) | 5 lines

don't store multiple secrets delimited with semicolons for peers because this
is only valid for users. Instead, only keep the last specified secret for a
peer entry. Also, document how multiple secrets are handled in the sample
config. (Reported by PCadach on #asterisk-bugs)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-18 20:18:41 +00:00
Christian Richter
829583a3dc added TONE_HANGUP, also added Tone generation by mISDN_dsp for post hangup tones, therefore the TONE_X defines are in the isdn_lib.h now. changed a REALEASE to a DISCONNECT in NT Stack, to make tones available in that state.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-18 19:09:32 +00:00
Kevin P. Fleming
e49a367ecf commit russell's menuselect/buildoptions work with some changes:
reverted per-directory .cleancount support
  added ability for 'remove_on_change' to support multiple filenames
  add 'remove_on_change' support to members, not just categories
  only do 'remove_on_change' removals if the config is actually saved
  add a 'remove_on_change' entry for each module found by prep_moduledeps so that if it gets turned off any existing .o/.so files will disappear


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-18 12:52:08 +00:00
Christian Richter
d86993b90b * fixed bchannel cleaning race condition with new bchannel state (CLEAN_REQUEST)
* added early bridge-hook, so we know if we need to generate ringing or 
  can take it from the far end chan_misdn channel (if available)
* fixed the issue, that we may not activate the bchannel on PTMP, 
  when we receive ALERTING/PROCEEDING/PROGRESS, only on CONNECT. There might
  be other PTMP devices and we might disturb their bchannel. 



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-17 10:37:35 +00:00
Russell Bryant
4691e6a29e remove IMAP_STORAGE from the build options list for app_voicemail since it's
not in trunk yet


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-16 17:53:26 +00:00
Russell Bryant
2517087aee remove prototypes for static functions and fix some potential memory leaks
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34498 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-16 16:58:51 +00:00
Russell Bryant
b6147a21b9 remove "depend" from the "all" targets in sub Makefiles. The main Makefile
already calls "make depend" for each of the subdirectories


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34497 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-16 16:54:00 +00:00
Joshua Colp
eb5af4b1f3 Fix adsi target in main Makefile and check a variable properly (issue #7369 reported by casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34496 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-16 16:45:52 +00:00
Joshua Colp
0073f0de9e Handle failure of ast_calloc when allocating interfaces in res_smdi (issue #7344 reported by casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34495 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-16 16:30:42 +00:00
Joshua Colp
0e5e744fb2 Add bulgarian indications (issue #7314 reported by KNK)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34494 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-16 16:23:13 +00:00
Russell Bryant
287fce05d0 add support for setting the CFLAGS for voicemail storage options in menuselect
Thanks to kpfleming for the Makefile magic :)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34492 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-16 16:17:43 +00:00
Joshua Colp
65c5d5882c Update the RADIUS CDR module documentation (issue #7377 reported by phsultan)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34491 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-16 16:16:21 +00:00
BJ Weschke
ecabadf2cd Fixed per kpfleming's suggestion to asterisk-dev.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-16 12:56:03 +00:00
BJ Weschke
35a2f14d96 Quit early and print a LOG_WARNING if we are trying to check devicestate on a Local channel that's been improperly defined.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-16 12:55:18 +00:00
BJ Weschke
9cbcf110e1 Make sure agent_tech is unregistered within unload_module(). It's in 1.2, but was lost at some point in /trunk. #7374 (jstorm)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34461 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-16 12:24:14 +00:00
BJ Weschke
2e8a142c85 Don't ast_request a channel structure twice when a call is being forwarded. (#7362 - twlison / vechers confirming fix)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-16 12:18:18 +00:00
Olle Johansson
4c07cb1c60 Don't force a busy state that will break channel signalling if the channel
already is up. (Reported by Steve Davies in e-mail, waiting for 1.2 approval)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-16 06:25:26 +00:00
Joshua Colp
9ebb7c35a2 Merged revisions 34400 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r34400 | file | 2006-06-16 00:37:05 -0300 (Fri, 16 Jun 2006) | 2 lines

Zero out a declared structure so as to not crash if it contains invalid data (reported by Qwell on #asterisk-dev)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34401 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-16 03:38:24 +00:00
Russell Bryant
96bbc5e741 build menuselect objects with -Wall and remove an unused variable
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-16 00:14:46 +00:00
Russell Bryant
aee308b8c3 remove prototypes for private functions and make functions and variables not
used outside of this file static


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-15 23:40:55 +00:00
Olle Johansson
6f0f14af55 Block patch for 1.2 already fixed in trunk, but in another way
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-15 14:14:23 +00:00
Kevin P. Fleming
b5a13cbef8 Merged revisions 34274 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r34274 | kpfleming | 2006-06-15 08:30:22 -0500 (Thu, 15 Jun 2006) | 3 lines

don't use prefixed structure names for internal structures
don't use a plural structure name for a singular object

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-15 13:35:04 +00:00
Olle Johansson
2813d15f52 Hoppsan!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34247 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-15 13:00:55 +00:00
Tilghman Lesher
2ee2b192e3 Merged revisions 34242 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r34242 | tilghman | 2006-06-15 07:40:10 -0500 (Thu, 15 Jun 2006) | 3 lines

VoicemailMain exits on any key, when the language is set to Italian, instead of
properly handling the key (issue 7353).

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34243 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-15 12:41:24 +00:00
Tilghman Lesher
14ebe471c5 ast_calloc() already reports OOM conditions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-15 12:30:45 +00:00
Tilghman Lesher
f5d54051fe ast_calloc already reports out of memory conditions (issue 7343)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34240 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-15 12:26:50 +00:00
Olle Johansson
83e64c7c94 - Do not require a space at the end of the m= string in a T38 re-invite
Bug reported in the t38 issue report, but by mistake ignored before commit.
  Thanks to everyone informing me about this, and Corydon for helping me sort
  out sscanf :-)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34217 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-15 06:35:55 +00:00
Kevin P. Fleming
aba00b66fc use the proper named constants for checking device state, and don't treat UNKNOWN as not available in autofill mode
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34194 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-14 23:24:26 +00:00
Kevin P. Fleming
7518a91032 various coding style cleanup and minor fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-14 23:20:08 +00:00
Kevin P. Fleming
794d0e4d1f make Local channel return sensible device state values
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-14 22:39:19 +00:00
Kevin P. Fleming
11dac47877 Merged revisions 34159-34160 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r34159 | kpfleming | 2006-06-14 17:17:37 -0500 (Wed, 14 Jun 2006) | 2 lines

use existing dial string parser for strings supplied to iax2_devicestate, because they can be complete dial strings, not just device names

........
r34160 | kpfleming | 2006-06-14 17:22:21 -0500 (Wed, 14 Jun 2006) | 2 lines

coding style cleanups on queue interface handling code that was committed for the last release

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-14 22:35:49 +00:00
Olle Johansson
8fd35365f5 Add some debug logging
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-14 15:15:29 +00:00
Olle Johansson
fb8483c430 - Use our standard of doxygen comments, not javadoc style
- small reformatting changes


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-14 14:46:19 +00:00
Kevin P. Fleming
39b9a1c945 Merged revisions 34087 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r34087 | kpfleming | 2006-06-14 09:07:53 -0500 (Wed, 14 Jun 2006) | 2 lines

clarify file headers that mention disclaimer usage

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-14 14:12:56 +00:00
Olle Johansson
4b6d6a1a0b Formatting fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-14 11:40:31 +00:00
Kevin P. Fleming
3aa0f7897f add Grandstream to credits too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34043 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-14 04:03:45 +00:00
Russell Bryant
1021ef7a28 make the compiler's life easier. Thanks Kevin :)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-14 03:19:47 +00:00
Russell Bryant
f0275eaae1 indicate which options are just binary and don't really need a full integer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33997 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-14 03:00:15 +00:00
Kevin P. Fleming
cdfb60f9bc use the proper test for compiler atomics
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33995 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-14 02:23:29 +00:00
Kevin P. Fleming
ea90f8c468 Merged revisions 33993 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r33993 | kpfleming | 2006-06-13 21:20:22 -0500 (Tue, 13 Jun 2006) | 2 lines

don't output 'no format found' when we _did_ find the format but couldn't open the desired file for some other reason

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33994 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-14 02:21:47 +00:00
Jim Dixon
8f77de5ebd Allowed proper tx/rx signal exclusivity for simplex repeater modes
on 2 wire interfaces


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-13 23:46:41 +00:00
Kevin P. Fleming
eddf363a0e use atomic operations provided by the compiler if they are available (yay for gcc 4.1 users!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-13 21:35:29 +00:00
Kevin P. Fleming
fca19e7635 use a compiler builtin (which uses processor instructions) for this operation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-13 20:59:15 +00:00
Matt O'Gorman
a6d0d04141 I am the king of typos....
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-13 19:58:39 +00:00
Joshua Colp
5456f425c6 Allow AST_FRAME_MODEM frames to be dumped, and document T.38 passthrough support
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-13 19:38:41 +00:00
Matt O'Gorman
e749415c4d added thanks to voipsupply and steve underwood
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33911 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-13 19:22:34 +00:00
Matt O'Gorman
b22e7bf558 adds support for t38 pass through patch brought up to trunk from
bug 5090 by josh colp.  Thanks to everyone who help get this patch through
especially to the author Steven Underwood.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-13 18:35:53 +00:00
Kevin P. Fleming
241cd6163a minor fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-13 15:11:29 +00:00
Kevin P. Fleming
0af1edefb6 Merged revisions 33841 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r33841 | kpfleming | 2006-06-13 08:30:06 -0500 (Tue, 13 Jun 2006) | 2 lines

memory allocation optimizations

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-13 13:40:58 +00:00
Russell Bryant
bcb9f8687c Merged revisions 33813 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r33813 | russell | 2006-06-13 08:40:40 -0400 (Tue, 13 Jun 2006) | 2 lines

remove duplicate mutex_unlock

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33814 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-13 12:41:37 +00:00
Russell Bryant
883d0f7a05 destroy the loaded say.conf on module unload
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-13 04:40:15 +00:00
Russell Bryant
50dff0e818 fix a place where code returns without unlocking the vm users list and various
places where code returns without destroying loaded configuration


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-13 04:37:36 +00:00
Russell Bryant
7c491057db Blocked revisions 33783 via svnmerge
........
r33783 | russell | 2006-06-13 00:31:19 -0400 (Tue, 13 Jun 2006) | 3 lines

fix various places where the code returns without unlocking vmlock or
destroying loaded configuration

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-13 04:32:45 +00:00
Russell Bryant
85560a175c Merged revisions 33781 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r33781 | russell | 2006-06-13 00:20:10 -0400 (Tue, 13 Jun 2006) | 3 lines

add a missing close of an open fd, destroy of open config, and removal of the
calling channel from the localusers list

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33782 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-13 04:21:10 +00:00
Russell Bryant
dab3e04ca5 Merged revisions 33753 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r33753 | russell | 2006-06-12 23:55:11 -0400 (Mon, 12 Jun 2006) | 5 lines

revert a change that caused more problems than it fixed and fix the real
problem in this code.  fds was declared as an array of zero size which caused
some weird problems, some of which would only be seen when compiling without
optimizations.  (fixes issues #7071, #7326, and #7305)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33754 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-13 03:56:09 +00:00
Joshua Colp
c311827dc9 Merged revisions 33724 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r33724 | file | 2006-06-12 18:34:38 -0300 (Mon, 12 Jun 2006) | 2 lines

Greatly simply the mixmonitor thread, and move channel reference directly to spy structure so that the core can modify it.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12 21:37:29 +00:00
Russell Bryant
55ffe394a5 only set the QOS variables if the pvt has an owner so that they are not
created as global variables.  (The fact that these were getting created on
my system probably means that these are in the wrong place so oej, you may
want to look at this again.)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12 21:01:48 +00:00
Russell Bryant
a483f6eafc Merged revisions 33693 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r33693 | russell | 2006-06-12 16:40:11 -0400 (Mon, 12 Jun 2006) | 2 lines

fix a place where a frame would be free'd twice

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33694 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12 20:40:56 +00:00
Russell Bryant
60062c3403 update aclocal.m4 as generated by a newer version of aclocal
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12 20:36:46 +00:00
Kevin P. Fleming
b12ab2ad1b bootstrap to include latest configure script change
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12 20:33:01 +00:00
Tilghman Lesher
1dd48ac34a Bug 7339 - check for duplication of strnlen function
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33690 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12 20:21:04 +00:00
Olle Johansson
1ec28daa30 Formatting fix and doxygen update
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33689 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12 20:07:35 +00:00
Olle Johansson
2ab4e12549 Fix typo (Thanks Vechers!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12 20:01:05 +00:00
Russell Bryant
306de10a44 the menu must be redrawn after displaying the help info
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33669 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12 19:26:40 +00:00
Kevin P. Fleming
79f5f61474 Merged revisions 33638 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r33638 | kpfleming | 2006-06-12 11:03:29 -0500 (Mon, 12 Jun 2006) | 2 lines

only allow chan_local to masquerade the outbound channel onto its owner, instead of the other way around (this will ensure that group variables on the outbound channel as preserved)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12 16:07:32 +00:00
Tilghman Lesher
1d8804c117 Merged revisions 33615 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r33615 | tilghman | 2006-06-12 10:27:18 -0500 (Mon, 12 Jun 2006) | 4 lines

Move set priority up, because at this point in the code, stdout is no longer
the console.  If we're unable to set priority, the error goes to Asterisk as
if it were an AGI command (issue 7335).

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12 15:30:32 +00:00
Olle Johansson
5d3d87900e - Remove redundant forward declaration
- Change variable name to make register_verify more readable (p -> peer not pvt in this function)
- Get Contact: header only once instead of twice
- Add some comments to register_verify

Caused by issue #7327... :-)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33614 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12 15:17:18 +00:00
Joshua Colp
ce311227ac Change a bit of logic in peer expiry back to the way it used to be
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12 02:54:32 +00:00
Russell Bryant
1b85726c28 optimize the display of the module selection menus by only clearing the screen
and starting over if a selection has changed or the menu needs to be scrolled.
For moving the cursor up and down the menu, it works a lot faster now.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 22:11:38 +00:00
Russell Bryant
40b3ce5c8f suppress warnings when building with DEBUG_CHANNEL_LOCKS (issue #7330, casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 21:42:13 +00:00
Russell Bryant
9aac1c0035 Merged revisions 33548 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r33548 | russell | 2006-06-11 17:21:23 -0400 (Sun, 11 Jun 2006) | 2 lines

fix another place where a frame does not get free'd

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33549 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 21:23:16 +00:00
Russell Bryant
4cef7b714e fix up some places where frames are not free'd and remove an unnecessary
unlock of the confs list where it is not possible for it to be locked


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 21:12:56 +00:00
Russell Bryant
e5660b2af6 Blocked revisions 33545 via svnmerge
........
r33545 | russell | 2006-06-11 17:08:04 -0400 (Sun, 11 Jun 2006) | 4 lines

fix up five little places where frames would not be free'd and remove an
unnecessary mutex_unlock where there is no way for it to be locked at
that time

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 21:09:08 +00:00
Russell Bryant
f1d5c83b8a Merged revisions 33515 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r33515 | russell | 2006-06-11 16:48:41 -0400 (Sun, 11 Jun 2006) | 4 lines

fix a place that would leak a frame (all of these fixes are in applications
that call ast_read() on a channel but have code paths in them that would not 
free the frame)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33516 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 20:49:16 +00:00
Russell Bryant
67cae6a0c7 Merged revisions 33513 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r33513 | russell | 2006-06-11 16:45:06 -0400 (Sun, 11 Jun 2006) | 2 lines

fix a couple places that would leak a frame

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 20:46:05 +00:00
Olle Johansson
e41fcca65a - Complete addition of forward declarations and grouping of functions
- Change/add comments
- Declare internal function as static
- Remove functionname: in descriptions of functions
- Move Enums to top of file


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 20:42:11 +00:00
Russell Bryant
d13b9e74be Merged revisions 33510 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r33510 | russell | 2006-06-11 16:38:39 -0400 (Sun, 11 Jun 2006) | 2 lines

fix two places that would cause a frame to be leaked

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 20:39:19 +00:00
Kevin P. Fleming
e3ddee7d7f make latest header file changes for this file too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 15:10:26 +00:00
Russell Bryant
7100403fd9 Merged revisions 33480 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r33480 | russell | 2006-06-11 11:08:12 -0400 (Sun, 11 Jun 2006) | 2 lines

fix a case where an HTML frame would be leaked

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33481 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 15:09:06 +00:00
Russell Bryant
e0bd903246 Merged revisions 33466 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r33466 | russell | 2006-06-11 11:02:40 -0400 (Sun, 11 Jun 2006) | 4 lines

Free frames read from the channel when measuring noise.  This resulted in about
9 or 10 seconds of leaked frames in both the TestClient and TestServer
applications

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 15:04:36 +00:00
Russell Bryant
de340b92f3 Blocked revisions 33449 via svnmerge
........
r33449 | russell | 2006-06-11 10:56:55 -0400 (Sun, 11 Jun 2006) | 2 lines

backport a couple of frame leak fixes from the trunk (revisions 33446, 33447)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33450 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 14:59:09 +00:00
Russell Bryant
558d3924ac don't leak a frame when breaking out of the loop on a timeout
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33448 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 14:52:04 +00:00
Russell Bryant
b4e2138311 don't leak a frame when exiting when the user presses '#'
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 14:48:25 +00:00
Russell Bryant
1ab804f0ab don't leak a frame when breaking out of the main loop of this app
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 14:44:58 +00:00
Russell Bryant
171992e505 don't use ast_copy_string when building for an external tool
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-10 04:41:34 +00:00
Russell Bryant
89672b86d0 don't redefine PATH_MAX
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33422 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-10 04:38:04 +00:00
Russell Bryant
0e140be311 convert a few more uses of AST_CONFIG_MAX_PATH to use PATH_MAX
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-10 04:34:48 +00:00
Kevin P. Fleming
3e41331bf3 get rid of some more compiler warnings (thanks tholo for making me fix the lpc10 stuff... that had been a problem for far too long)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33398 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 23:13:52 +00:00
Olle Johansson
8ef5092031 Issue #7325 - Parse string after URI decoding (casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 21:32:48 +00:00
Olle Johansson
90806eb6f2 Add RTP QoS report variables to doc. Catch it in the "h" extension, store it in the CDR
or in a database or... whatever you want to.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33375 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 21:30:31 +00:00
Olle Johansson
d2fa9efdad Store RTCP reports in channel variables and SIP history
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 21:28:52 +00:00
Olle Johansson
6d4ab87321 - RTP debug message formatting
- Add rtcp report to SIP history


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 21:09:42 +00:00
Kevin P. Fleming
8d88bf549d there is no reason to define our own 'maximum path length' when the POSIX headers already define one for us
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 20:40:10 +00:00
Kevin P. Fleming
b31b0be819 various minor portability fixes (mostly from tholo for OpenBSD)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 20:26:25 +00:00
Olle Johansson
13a98f92fe Move payloadtype back home to rtp.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 20:13:47 +00:00
Olle Johansson
8bee8de932 Another try at hanging up the transferer channel after the masq
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 20:09:55 +00:00
Joshua Colp
dcab298cfc Don't double check existence of a variable (issue #7300 reported by foamdino)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 19:05:30 +00:00
Joshua Colp
b42ad64f4d Blocked revisions 33300 via svnmerge
........
r33300 | file | 2006-06-09 15:52:51 -0300 (Fri, 09 Jun 2006) | 2 lines

Allow the format outputted by meetme list to be used for meetme commands (like kick) (issue #7322 reported by darkskiez)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33301 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 18:54:01 +00:00
Matt O'Gorman
76fae31988 oops moved block without renaming a variable correctly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 18:37:26 +00:00
Joshua Colp
6723184a62 Merged revisions 33297 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r33297 | file | 2006-06-09 15:26:42 -0300 (Fri, 09 Jun 2006) | 2 lines

Remove an unneeded double lock (issue #7310 reported by arkadia)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 18:29:58 +00:00
Joshua Colp
5349ae6f46 Wait until we have the lock before getting the pvt structure pointer (issue #7313 reported by arkadia)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 18:20:28 +00:00
Joshua Colp
a23af6559c Merged revisions 33294 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r33294 | file | 2006-06-09 15:08:00 -0300 (Fri, 09 Jun 2006) | 2 lines

Handle hangup during recording of screened name (issue #7304 reported by kulldominique)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 18:12:46 +00:00
Joshua Colp
e3fe7e1c08 Add more missing newlines (issue #7323 reported by darkskiez)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 16:36:54 +00:00
Joshua Colp
68c0ffbe05 Blocked revisions 33264 via svnmerge
........
r33264 | file | 2006-06-09 13:31:29 -0300 (Fri, 09 Jun 2006) | 2 lines

Add missing newlines (issue #7323 reported by darkskiez)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 16:33:34 +00:00
Matt O'Gorman
124357f300 convert one of my linked lists to ast_linklist
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 16:08:33 +00:00
Olle Johansson
bcf82f32d5 Don't force context for domain= setting (imported from 1.2)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33236 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 15:57:28 +00:00
Olle Johansson
2366793c63 Remove the return value from functions that return something that is never checked anywhere.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33215 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 13:35:41 +00:00
Christian Richter
fcb7d3df26 when we don't want the call we need to release_complete it.. ignoring it breaks the ETSI rules ..
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33195 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 10:31:30 +00:00
Olle Johansson
9f5aa13142 Rename ast_rtp_early_media to ast_rtp_early_bridge to avoid confusion.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 09:47:44 +00:00
Olle Johansson
ce10b34ca6 Enabling and disabling debug messages...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 09:38:13 +00:00
Jeffrey C. Ollie
a0bb17434f Move a couple semicolons to a more traditional location. Was pointed out by Steven <critch@basesys.com> on the -dev list.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 02:20:25 +00:00
Kevin P. Fleming
09778b268e move 'struct ast_rtp' back to rtp.c where it belongs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08 23:10:45 +00:00
Russell Bryant
9cdd66dd01 always include inttypes.h and sys/types.h in asterisk/compat.h to fix a build
problem on mac and place asterisk.h back at the top of menuselect.c


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33114 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08 20:49:59 +00:00
Olle Johansson
36506dad2d Debug logging fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33113 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08 20:30:20 +00:00
Olle Johansson
5f286add13 Make menuselect compile on os/x...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08 20:16:19 +00:00
Olle Johansson
fee02a9b7d At least reply if we get a fatal error in handling a packet.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08 20:14:54 +00:00
Olle Johansson
91732256db Don't crash if chan2 does not exist (one-legged call situations, like echo)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08 20:07:05 +00:00
Olle Johansson
b796bf414b Improve SIP history
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08 20:06:04 +00:00
Olle Johansson
e466f202b3 Avoid using the name "early media" for media that is not early
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08 20:05:36 +00:00
Kevin P. Fleming
7b2bd1a069 document the new sound/moh file installation process
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08 19:48:36 +00:00
Olle Johansson
89081c3d06 Issue #7294 - Asterisk sends INVITE instead of BYE. Fix by Philippe Sultan. Thanks!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08 18:13:06 +00:00
Olle Johansson
1ec5d9ec70 Doxygen updates
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08 18:03:08 +00:00
Kevin P. Fleming
4702320f54 handle out-of-memory conditions in ast_frisolate() properly (reported by Slav Kenov on asterisk-dev)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08 16:59:44 +00:00
Kevin P. Fleming
a10dff6a11 try to get keyword substitution working for this file
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33035 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08 16:36:34 +00:00
Christian Richter
05eed16044 Fixed detection of dtmfs with bridged channels.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33011 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08 09:51:13 +00:00
Olle Johansson
f15b38a775 Update doxygen for video formats
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08 08:15:43 +00:00
Olle Johansson
41a5565f3c Add video.txt to doxygen
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08 08:13:32 +00:00
Olle Johansson
dfaa7fd8cf Doxygen update
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08 08:10:58 +00:00
Olle Johansson
7a456987b5 Doxygen formatting
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32971 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08 07:29:46 +00:00
Olle Johansson
fbfe588ee9 Enable doxygen
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32970 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08 07:26:05 +00:00
Mark Spencer
6fc9c13bbf Cleanup formatting a little...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08 05:24:50 +00:00
Russell Bryant
84e1f02f5a move the common wget arguments to a variable and remove --no-verbose so
users will see download progress


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32935 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 23:09:41 +00:00
Kevin P. Fleming
793d7cd4bc ok, new sounds/moh handling stuff should be done... bring on the bug reports!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32919 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 22:55:46 +00:00
Matt O'Gorman
1e530787f3 solves some bugs with memory allocation, and adds
a message stack.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32918 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 22:43:20 +00:00
Kevin P. Fleming
bc49d5bfb3 moh files will now be distributed in native format, not mp3, so...
update sounds/Makefile to download/unpack the proper files
remove all evidence of mpg123 from the main Makefile
change the sample musiconhold.conf file to use native mode instead of mp3


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 22:37:31 +00:00
Kevin P. Fleming
05ffacedf1 ok, now it knows how to auto-download and install
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32916 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 22:03:02 +00:00
Kevin P. Fleming
34cf2c13b8 don't force the sounds to download... only when needed
fix a few buglets i caused in menuselect
remove downloaded sounds on 'dist-clean'


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 21:05:05 +00:00
Kevin P. Fleming
0dd82bc6f1 woo-hoo, now it knows how to download the sound packages... doesn't install them yet though
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32886 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 20:54:30 +00:00
Kevin P. Fleming
6825e80226 prepare for using sound files from out of the source tree
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32885 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 20:19:40 +00:00
Russell Bryant
43b82059a5 fix a typo in an option name in config parsing
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32884 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 20:08:29 +00:00
Russell Bryant
f879fd2a22 simplify the loop that iterates through the categories in followme.conf and
don't try to read the general section as a followme profile


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32878 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 20:02:07 +00:00
Russell Bryant
124b54ca5f fix the build with astmm enabled
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 19:53:03 +00:00
Russell Bryant
89cfbf4673 fix an incorrect usage of scanf, where it should be using sscanf, instead,
which was causing asterisk to hang when loading this module
(reported by blitzrage on IRC)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 19:42:37 +00:00
Kevin P. Fleming
e2383fba8e put the proper filename into the ignore property
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 19:06:30 +00:00
Kevin P. Fleming
274ce731e2 move autoconfig.h to the include/asterisk directory so it will get installed
install asterisk.h include the system's default include directory


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32860 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 19:05:35 +00:00
Kevin P. Fleming
472c1ca282 simplify autoconfig include mechanism (make tholo happy he can use lint again :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 18:54:56 +00:00
Russell Bryant
739385e761 remove the WITH_SMDI define
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32845 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 18:28:29 +00:00
Russell Bryant
66dca5e378 Merged revisions 32818 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r32818 | russell | 2006-06-07 13:53:21 -0400 (Wed, 07 Jun 2006) | 2 lines

fix some broken code with BRIDGE_OPTIMIZATION defined (issue #7292)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32819 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 17:54:26 +00:00
Russell Bryant
39bcaa0773 add an updated patch that adds dnsmgr support for outgoing iax2 registrations
(issue #6305, by ivanfm, with mods)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 17:44:36 +00:00
Russell Bryant
503f99e2e8 remove the need to have to re-run make after a default menuselect.makeopts
file is generated.  This allows a fresh checkout of asterisk to be built
and installed with the standard "./configure && make && make install".


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 16:03:31 +00:00
Christian Richter
7924c21e33 changed the clean_up_bc function to work proper again. fixed the print with the conference nr. when bridged
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32779 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 13:01:02 +00:00
Russell Bryant
efd1fd9829 revert my changes to convert fields of zt_pvt to use stringfields. When I did
this, I was not keeping in mind the fact that after a stringfield is overwritten
by another string, the memory used by the old string can not be recovered.  I
would like to go back through these changes and make sure that stringfields are
not used for fields that are written to many times before these changes are
committed.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 23:22:12 +00:00
Matthew Fredrickson
f809fde426 Add q.921 state information. (#7260)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32740 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 22:19:19 +00:00
Russell Bryant
db7ee8b54b oops.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32720 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 21:03:18 +00:00
Russell Bryant
004848236a move a variable declaration to the beginning of a block
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 20:55:17 +00:00
Russell Bryant
6947fdbf62 use sizeof to determine the size of a buffer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32702 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 20:47:46 +00:00
Russell Bryant
1bd42310a2 use sizeof to get the size of a buffer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 20:45:26 +00:00
BJ Weschke
6dc79b1447 More updates.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32700 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 20:44:50 +00:00
Russell Bryant
66a782e8ce make a global list head static
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32699 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 20:44:10 +00:00
BJ Weschke
61cfff7b82 More cleanup.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32698 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 20:39:11 +00:00
Russell Bryant
204ba36938 move a declaration to the beginning of a block
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 20:37:51 +00:00
BJ Weschke
3c30abc476 Don't leak memory.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 20:34:00 +00:00
Russell Bryant
aee460f50b allocate an int on the stack instead of with ast_calloc
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32695 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 20:18:01 +00:00
BJ Weschke
66e0ff5202 All better now!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32694 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 20:04:52 +00:00
Matt O'Gorman
6c0155e6cb fixes some issues with description loggin on presence
as well as some typos.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 19:51:26 +00:00
Matt O'Gorman
835c77ccfa fix a potential segfault
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 19:18:44 +00:00
Russell Bryant
1f7db8df6a add missing include
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 19:07:52 +00:00
Matt O'Gorman
c04e4bd380 allow presence events to be handled before the
roster is received.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 18:51:37 +00:00
Matt O'Gorman
c7dbc3c166 fixed autoregister bug.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32634 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 17:25:07 +00:00
BJ Weschke
63a271eb55 If the recorded file is found, don't actually start to play it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 17:15:16 +00:00
Tilghman Lesher
95871f201d Merged revisions 32605 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r32605 | tilghman | 2006-06-06 11:55:23 -0500 (Tue, 06 Jun 2006) | 2 lines

Bug 7287 - A too short voicemail with ODBC_STORAGE will cause the first voicemail to be deleted erroneously

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 16:59:13 +00:00
Kevin P. Fleming
e855040110 fix some compiler warnings about variables used before initialization
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 16:54:52 +00:00
Olle Johansson
479181951a Merge of the "sdpcleanup" branch. Thanks to John Martin for a lot of tests
and some patches (all disclaimed).

- Don't change RTP properties if we reject a re-INVITE
- Don't add video to an outbound channel if there's no video on the inbound channel
- Don't include video in the "preferred codec" list for codec selection
- Clean up and document code that parses and adds SDP attachments

Since we do not transcode video, we can't handle video the same way as audio. This is a
bug fix patch. In future releases, we need to work on a solution for video negotiation,
not codecs but formats and framerates instead.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 16:09:33 +00:00
Tilghman Lesher
016034115e Merged revisions 32582 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r32582 | tilghman | 2006-06-06 11:02:43 -0500 (Tue, 06 Jun 2006) | 2 lines

Bug 7268 - Callerid leaks memory on error

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 16:05:29 +00:00
Kevin P. Fleming
22b45aa4d3 Merged revisions 32566 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r32566 | kpfleming | 2006-06-06 10:48:00 -0500 (Tue, 06 Jun 2006) | 2 lines

clean up yesterday's security fix to not cause breakage when video mini frames are received

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 15:48:42 +00:00
Russell Bryant
fa595a8d82 don't return -1 if zapata.conf is not present (part of the patch from
issue #7290, tzafrir)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 14:24:59 +00:00
Christian Richter
24818d53b1 added select before write to avoid deadlock on full buffer. added some defines for deadlock debugging. added code snippet for generating silence if we don't have data to write.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32524 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 09:40:41 +00:00
BJ Weschke
3d973a0686 Introducing app_followme into /trunk!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32499 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 07:29:57 +00:00
Russell Bryant
1eac38db1d fix a channel deadlock in ast_answer
(deadlock reported by and debuged with hads on #asterisk-dev on IRC)
(probably fixes issue #7267, maybe others)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32478 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 05:27:14 +00:00
Russell Bryant
80a153af79 - use stringfields in a bunch of the fields of the zt_pvt structure in chan_zap
- constify some arguments to functions in callerid.c / callerid.h


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32456 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 01:22:47 +00:00
Russell Bryant
bbc584e3d7 fix some typos in the stringfields documentation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32455 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 01:21:52 +00:00
Russell Bryant
06b381a54d add the ability to do the same thing as "make dont-optimize" by enabling the
option in menuselect.  This is very useful for developers if you want to ensure
that all of your builds are done without optimizations.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32434 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 00:25:23 +00:00
Kevin P. Fleming
e856010714 use module names, not file names, in menuselect
work around XML parsing bug in menuselect for default sounds package


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32407 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-05 20:46:27 +00:00
Kevin P. Fleming
8a95a1ddc1 Merged revisions 32373 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r32373 | kpfleming | 2006-06-05 14:53:16 -0500 (Mon, 05 Jun 2006) | 2 lines

ensure that the received number of bytes is included in all IAX2 incoming frame analysis checks (fixes a known vulnerability)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32401 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-05 20:10:06 +00:00
Kevin P. Fleming
b34e3d09ab begin adding support for new sound packages
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32372 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-05 19:16:04 +00:00
Kevin P. Fleming
427df3f6c3 yet another massive performance and memory savings improvement
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-05 18:05:53 +00:00
Russell Bryant
b0260c1039 revert the changes to allow chan_iax2 to use dnsmgr for registrations.
my concerns are listed in issue #6305


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-05 16:17:31 +00:00
Russell Bryant
de0c61807d use the standard Asterisk copyright header
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-05 15:56:35 +00:00
Russell Bryant
db528623ad clean up various formatting issues
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32305 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-05 15:47:36 +00:00
Joshua Colp
2a71835d41 Convert chan_iax2 to use dnsmgr in order to deal with hostnames that can change their resolved IP (aka dynamic dns setups) (issue #6305 reported and fixed by ivanfm)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-05 15:44:37 +00:00
Olle Johansson
723e900bf3 Doxygen updates
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-05 15:20:09 +00:00
Kevin P. Fleming
dd6de5ee4e it's time... only enable global priority jumping if the config file says to do so
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-05 14:00:13 +00:00
Olle Johansson
4ab449be1b Move definition of RTP structure to rtp.h (preparing for future changes)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-05 09:42:28 +00:00
Olle Johansson
e60100750d Issue 7231 - Utility to convert libtonezone indications to indications.conf format
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-05 09:31:02 +00:00
Olle Johansson
4e74b8fb75 Issue #7231 - Missing indications from libtonezone (tzafrir)
- "tuttter" changed to "stutter" ;-)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32252 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-05 09:27:38 +00:00
Olle Johansson
2dc6947144 Issue #2863 - Improved RTCP support (John Martin, Fredrik Olsson)
Thanks to everyone involved in working with this!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-05 08:39:42 +00:00
Olle Johansson
f80bde18be - Add headers to e-mail with caller ID name and number to simplify automatic parsing
- Formatting fixes


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-05 08:06:02 +00:00
Olle Johansson
8bc0599b11 Issue 7208 - Handle ; in userinfo part of URI too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-05 07:43:40 +00:00
Olle Johansson
404f8db694 Do not use ':' as a separator between arguments (kept around for 1.4 for backwards compatibility)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-05 06:36:18 +00:00
Olle Johansson
62dd0dc6f2 Only override callingpres set by rpid if user/peer preference is set. (Issue #7240)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-05 06:23:22 +00:00
Russell Bryant
588b54f8c2 fix a typo in the documentation of how to use string fields
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-05 04:51:10 +00:00
Olle Johansson
02bc3637da Code simplification
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 21:13:48 +00:00
Olle Johansson
d520d238f1 - Fix more problems in transfer code (thanks Tholo!)
- Add debug for hangup not in UP state


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 21:01:13 +00:00
Olle Johansson
b93938de29 - Add information about transcoding to "show channel"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32115 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 19:38:05 +00:00
Olle Johansson
043b765bdc Respond to some of Luigis questions...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 19:18:24 +00:00
Olle Johansson
e97507e8fb Fix potential bug. THanks luigi!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 18:58:27 +00:00
Olle Johansson
b42fbc09c3 - 5 is the highest used debug level, so let's stay there
- Change formatting of RTP debug to align better


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 18:55:16 +00:00
Olle Johansson
0d6906e107 - Doxygen fix
- Debug message change


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 18:35:29 +00:00
Olle Johansson
c2b50fd2bd Show max bitrate in "sip show user" and "sip show channel"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 17:35:30 +00:00
Matt O'Gorman
18b135f215 oops my config file was out of date not the sample
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32064 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 17:08:18 +00:00
Matt O'Gorman
58cd5f2440 oops fixing example config
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32063 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 17:07:09 +00:00
Matt O'Gorman
4e9549c361 oops
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32046 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 17:00:59 +00:00
Matt O'Gorman
24ed170273 solves some issues with jabberstatus app
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32040 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 16:56:16 +00:00
Olle Johansson
7a60aff3b1 Make tonezone writeable in CHANNEL() (from my old func_tonezone.c)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32018 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 11:47:51 +00:00
Olle Johansson
439e4963ab - Typo in chan_sip (: missing)
- Only print formats once in dumpchan()


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 11:09:14 +00:00
Olle Johansson
11c18976fb Add formats in text form to dumpchan()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 11:00:12 +00:00
Olle Johansson
80f2d432cc Doxygen improvements
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31979 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 08:57:34 +00:00
Olle Johansson
1760652f38 Doxygen formatting fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 08:15:41 +00:00
Russell Bryant
006989cbe2 Use a dynamically sized array to store the list of files for moh "files" mode
- Instead of always allocating 64KB of memory for every MOH class, this has
   been reduced to only a single pointer per class, with more memory only
   allocatted when using "files" mode, as needed
 - Instead of imposing a length limit on the full filename, including full
   path, of 127 characters, use PATH_MAX, the maximum length that the system
   can handle
 - There is no longer a limit on the number of files than can be used for a
   single MOH class using "files" mode


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 06:21:43 +00:00
Kevin P. Fleming
998eacf17f Merged revisions 31921 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r31921 | kpfleming | 2006-06-03 22:43:35 -0500 (Sat, 03 Jun 2006) | 2 lines

return bridge exit logic to what it was before i broke it :-(

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31922 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 03:45:54 +00:00
Luigi Rizzo
531ed6f290 add a bit of comment on what build_route does,
plus minor code simplification.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31895 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 00:09:13 +00:00
Luigi Rizzo
88077a4d1f remove some duplicated code;
fix indentation on one line;
mark XXX some unreachable code;
mark XXX another place where we could reduce the nesting depth.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31872 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 23:58:32 +00:00
Luigi Rizzo
2724885b78 small simplification in assignments, and fix a typo in a comment.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31871 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 23:46:23 +00:00
Luigi Rizzo
24d1d23a93 mark XXX some places where there is a return right before
a large "else" block, which is suitable for a reduction of
the nesting depth.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 23:34:01 +00:00
Luigi Rizzo
8dbdd8518b fix indentation of a block
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 23:23:24 +00:00
Luigi Rizzo
d18e363523 some code simplifications using S_OR() to remove some if blocks
and duplicate code.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 23:17:54 +00:00
Luigi Rizzo
ec46b5a4ce use ast_skip_blanks() where appropriate, and use standard
C jargoon  *foo++ = '\0'; instead of two separate statements.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31861 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 23:03:29 +00:00
Luigi Rizzo
b7b716b618 mark XXX a buggy section of code and implement a probable
replacement (leave the original in case my code does not
do what the function was meant to do).
oej, please check this...



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31843 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 22:56:45 +00:00
Luigi Rizzo
7483e1d2b6 simplify logic in a small block of code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 22:29:37 +00:00
Luigi Rizzo
c7a5a96fc6 mark XXX a bug in the code. oej/kevin, any idea what you want
to use here ?



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 22:18:41 +00:00
BJ Weschke
9f9e9a08db Make sure DEBUG is really cranked up before we decide to flood the logs with messages about Internal timing when a channel has to make a decision about generating internal timing (eg - MOH)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31840 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 22:08:25 +00:00
Luigi Rizzo
a63b2e4c53 remove duplicate code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31814 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 20:40:54 +00:00
Luigi Rizzo
1a38041830 Replace '\"' with '"'.
The escape is unnecessary, and makes a bad example
to people reading the code.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 20:34:26 +00:00
Russell Bryant
61d295f187 when using moh files mode, don't look for a file past the number of files
that have been loaded, or worse, past the size of the files array


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31776 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 17:04:51 +00:00
BJ Weschke
0e738a77b3 Merged revisions 31738 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r31738 | bweschke | 2006-06-03 10:48:13 -0400 (Sat, 03 Jun 2006) | 3 lines

 Fix doxygen comment about AST_LIST_HEAD_INIT_NOLOCK


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31739 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 14:49:52 +00:00
Olle Johansson
52eee7c568 Adding John Martin to CREDITS for his video work
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31715 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 10:07:25 +00:00
Tilghman Lesher
53ca50f1c8 Two missed cases
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 02:18:59 +00:00
Tilghman Lesher
73a85ff250 Ooops, those characters weren't really periods (credit to John Olson)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31690 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 02:17:00 +00:00
Russell Bryant
0eb9ea50a0 add credits for cdr_radius
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-02 13:38:37 +00:00
Olle Johansson
b652c06f3e Adding credits for SIP transfer work
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-02 06:24:30 +00:00
Russell Bryant
a6d039cd37 add a comment where some memory usage optimization needs to be done
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-02 03:34:09 +00:00
Russell Bryant
1e8aeba003 use strcpy instead of snprintf in a couple places
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31586 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 22:17:01 +00:00
Kevin P. Fleming
736dc15d0b Merged revisions 31555 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r31555 | kpfleming | 2006-06-01 16:46:50 -0500 (Thu, 01 Jun 2006) | 2 lines

remove pointless forcing of the channel into SLINEAR mode; the write format will be set later based on the file that is chosen to be played to the channel

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 21:47:49 +00:00
Kevin P. Fleming
dfd5fc5605 Merged revisions 31520 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r31520 | kpfleming | 2006-06-01 15:27:50 -0500 (Thu, 01 Jun 2006) | 2 lines

handle Zap transfers behind chan_agent properly so the agent doesn't get stuck waiting for the call to hang up

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 20:53:17 +00:00
Olle Johansson
0760b8244d Formatting fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31497 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 19:48:31 +00:00
Olle Johansson
749d4d959f Doxygen reformatting
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31496 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 19:28:01 +00:00
Olle Johansson
e0a8649273 - Formatting
- Add some comments


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31495 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 19:21:46 +00:00
Olle Johansson
b7cfe5bd08 Minor change to DEBUG and WARNING messages
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31494 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 19:15:40 +00:00
Matt O'Gorman
d591c1b684 changes for base64 to work in multiline instances
as well as being more efficient, patch from jcollie's
base64 branch


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31492 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 19:05:45 +00:00
Matt O'Gorman
fa339925dc more minor fixes thanks Julian on pointing out
potential problems


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 18:48:22 +00:00
Russell Bryant
4508c9fcc0 allow menuselect to display dependencies and conflicts for modules
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31443 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 17:40:50 +00:00
Olle Johansson
4d17451c55 Issue #7103 take two. Thanks Mikael!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 16:58:06 +00:00
Russell Bryant
4c76028de9 - add the ability to configure forced jitterbuffers on h323, jingle,
and mgcp channels
- remove the jitterbuffer configuration from the pvt structures in
  the sip, zap, and skinny channel drivers, as copying the same global
  configuration into each pvt structure has no benefit.
- update and fix some typos in jitterbuffer related documentation
(issue #7257, north, with additional updates and modifications)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 16:47:28 +00:00
Russell Bryant
afb12d043c my last changes to the jitterbuffer files need a forced make clean
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31412 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 16:42:38 +00:00
Christian Richter
4ad840b3c6 the interface needs to be changed as well..
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 16:41:07 +00:00
Christian Richter
840df1f8c0 unified the PH_CONTROL Interface for the mISDN_dsp interface to int
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 16:25:04 +00:00
North Antara
d902bd27ff This is what I get for coding while tired.. sorry ;/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 15:44:35 +00:00
Russell Bryant
eb76f29f0d fix an incorrect comment (issue #7259, tardieu)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 14:18:12 +00:00
Russell Bryant
62b2f320a1 make a global variable static and remove an unused global variable
(issue #7258, tardieu)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31359 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 14:15:16 +00:00
Russell Bryant
e21181dbd4 - add slav, zoa, and royk to the CREDITS for the generic jitterbuffer
- change references to the "scx" jitterbuffer to be called "fixed" and change
  references to the "stevek" jitterbuffer to be called "adaptive", instead


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31356 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 14:07:03 +00:00
Christian Richter
4be235a974 added bearer capability reject support. we send release instead of disconnect in case we have no real channel yet. added support for Restarting channels added support for sending complete decoding. changed some log levels.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31324 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 12:51:41 +00:00
Kevin P. Fleming
6bce269454 Merged revisions 31321 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r31321 | kpfleming | 2006-06-01 07:41:47 -0500 (Thu, 01 Jun 2006) | 2 lines

remove a sample entry that never should have been added (code to support it was not merged)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31322 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 12:43:01 +00:00
Matt O'Gorman
073e346f4e solves bug where reload deleted things it shouldnt have
and adds check into jabberstatus so it cant segfault.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 08:22:44 +00:00
Matt O'Gorman
8cfb992c1e adds statusmessage customization from Julian Lyndon-Smith
and fixes bug with pruneregister


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 07:49:47 +00:00
Olle Johansson
725e285bc4 Commit of the new SIP transfer support (oej/siptransfer branch)
- improved support of attended transfers (REFER with replaces)
- support of INVITE/replaces in the context of a transfer
- improved support of blind transfers (REFER)

Thanks to Voop, Nuvio and Foniris for sponsoring this work.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 07:30:45 +00:00
North Antara
e25c4621b4 Nobody saw this coming, I bet.
jitterbuffer!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31250 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 04:35:00 +00:00
Russell Bryant
a8c1284633 change a warning message to a debug message
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 00:15:25 +00:00
Russell Bryant
d1dfe22397 fix the problem where defaults.h is missing after a forced make clean in a
different way that actually works


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31225 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 00:09:18 +00:00
Russell Bryant
6ff6536f13 Merged revisions 31194 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r31194 | russell | 2006-05-31 19:50:00 -0400 (Wed, 31 May 2006) | 3 lines

if the connection to a FastAGI server fails because of a timeout, log a more
informative log message

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31195 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 23:51:39 +00:00
Joshua Colp
e5753b49ad Documentation changes for Qwell
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 23:10:56 +00:00
Joshua Colp
a69e488812 Fix up meetme some more (thanks TonyM!!!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 22:54:58 +00:00
Kevin P. Fleming
8dbcff6f21 Merged revisions 31161 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r31161 | kpfleming | 2006-05-31 17:26:38 -0500 (Wed, 31 May 2006) | 2 lines

silence a warning message that is not a warning

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 22:28:03 +00:00
Russell Bryant
b9403bee99 remove the "frog" CLI command left over from April 1st
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 20:31:42 +00:00
Russell Bryant
92f6d29fec git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31128 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-05-31 20:27:06 +00:00
Russell Bryant
78ec9a057c clean up various whitespace issues (issue #7236, casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 20:19:50 +00:00
Russell Bryant
647d5062d4 add a missing file, and use an enum for some constants
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31101 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 18:09:52 +00:00
Russell Bryant
414106a3a6 move the includes of abstract_jb.h to be with the rest of the asterisk includes.
These used to be wrapped in a #ifdef


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 17:29:12 +00:00
Russell Bryant
0384330d64 update the rest of the channel drivers that use RTP so that their channel
tech structures indicate that they create jitter


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31077 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 17:21:21 +00:00
Joshua Colp
a74ebe5933 Make the user menu unmute/mute work again, including in combination with the 'l' option.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 17:21:12 +00:00
Russell Bryant
bb7dd96cfe Add support for using a jitterbuffer for RTP on bridged calls. This includes
a new implementation of a fixed size jitterbuffer, as well as support for the
existing adaptive jitterbuffer implementation. (issue #3854, Slav Klenov)

Thank you very much to Slav Klenov of Securax and all of the people involved
in the testing of this feature for all of your hard work!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 16:56:50 +00:00
Joshua Colp
503486e99d OKAY - Only replace our IP address in the outgoing SIP messages if the actual source address is within the specified local network. (issue #7051 reported by Luke-Jr with mods by me)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 16:31:41 +00:00
Kevin P. Fleming
7f3cc8b886 cleanups for commit from issue #5657... set a cause code for a rejected forward request, and actually set tmp->chan to NULL when we reject the forward request
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31049 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 16:11:55 +00:00
Kevin P. Fleming
e69388b3ba a few more control frame types that don't need to generate useless notices in the log
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 16:04:49 +00:00
BJ Weschke
871f08ec07 Add an option to app_dial, 'i', to instruct the application ignore any requests from peers to forward calls elsewhere. #5657 (johnlange w/some minor mods)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31023 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 15:52:32 +00:00
Olle Johansson
c7007e1f55 Add congestion message to SIP history
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 14:36:47 +00:00
Olle Johansson
bc0f0a3226 Use ast_channel_trylock for channels
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 14:28:29 +00:00
Joshua Colp
5e00331abb Tiny documentation fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30959 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-30 22:11:34 +00:00
Kevin P. Fleming
f6a44ed7b3 move processing of 'languageprefix' option to proper section of config file
document that option :-)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30934 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-30 21:37:11 +00:00
Kevin P. Fleming
b77d820a82 remove some files that don't actually get used by the code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30907 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-30 20:25:34 +00:00
Tilghman Lesher
705b5459c1 Bug 7237 - Replace recoded thread_safe_rand with the existing ast_random API
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30906 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-30 20:24:40 +00:00
Kevin P. Fleming
9afb0e1cd2 Merged revisions 30874 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r30874 | kpfleming | 2006-05-30 14:18:30 -0500 (Tue, 30 May 2006) | 2 lines

check the proper variable...

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-30 19:20:20 +00:00
Kevin P. Fleming
4790dd5d9e when we receive an IAX2 registration request with both a plaintext secret and an MD5 challenge, prefer the MD5 challenge for authentation (reported on asterisk-dev)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-30 18:01:52 +00:00
Kevin P. Fleming
7e84433270 officially deprecate the 'roundrobin' queue strategy in favor of 'rrmemory'
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30837 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-30 17:52:49 +00:00
Joshua Colp
f35b95e516 Remove ourselves from the userlist a little bit earlier
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30835 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-30 17:33:37 +00:00
Jeffrey C. Ollie
7e14097415 Get rid of warning about datarootdir at the end of the configure process...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-30 16:36:21 +00:00
Joshua Colp
3872b97683 Be gone foul Makefile usage! er I mean use the correct variable... UTILS instead of TARGET. (issue #7239 reported by casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-30 16:23:34 +00:00
Joshua Colp
6ab22f2268 Be gone unused res! (issue #7238 reported by casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-30 16:10:10 +00:00
Kevin P. Fleming
96016e9206 Merged revisions 30802 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r30802 | kpfleming | 2006-05-30 11:07:16 -0500 (Tue, 30 May 2006) | 2 lines

another S/390 build fix

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-30 16:08:38 +00:00
Kevin P. Fleming
18606233da fix various typos and other bits (from Ian Kinner)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30800 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-30 16:01:50 +00:00
BJ Weschke
d2b2073f08 It's a 1.2 'thang'.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-30 14:59:02 +00:00
Russell Bryant
b0ee67ebdc remove a bunch of duplicated log messages. There is a warning that gets
logged when this function returns an error


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-30 11:23:48 +00:00
Russell Bryant
1203424ce2 remove duplicate static keywords, oops
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-29 14:52:55 +00:00
Luigi Rizzo
2444ea36bd remove unused include
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-29 05:23:59 +00:00
Luigi Rizzo
23233bb115 remove an explicit constant;
add a comment on the need to sort patterns in the standard way.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30700 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-29 05:14:52 +00:00
Luigi Rizzo
7ea0f04a80 this file contained the body twice, so remove the second instance.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30699 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-29 05:13:13 +00:00
Tilghman Lesher
92314f96c5 Deprecate SetGlobalVar, replacing it with a dialplan function
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-28 15:10:19 +00:00
Russell Bryant
1617adb055 make some variables static ... committed from xcode :)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-27 18:47:44 +00:00
Tilghman Lesher
36e31d864a Notate that QUEUEAGENTCOUNT is deprecated, so it can be removed post-1.4
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-27 18:45:15 +00:00
Tilghman Lesher
b68fa7a8f2 Should use the named handle, not one hardcoded
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-27 18:19:16 +00:00
Russell Bryant
0f912e5926 Fix various problems in the addition of the ability to mute log/verbose
output to remove consoles. The prototypes added to logger.h still need
doxygen documentation, as well.

- Add the new command line option to the man page
- make the mute option a flag instead of an int since it is only a binary
  option
- remove useless extern keywords for prototypes added to logger.h
- rename ast_console_mute() to ast_console_toggle_mute() since that is what
  it actually does
- actually apply the mute option to newly created remote consoles instead of
  only working when the CLI command is used
- don't imply the NO_FORK option if the mute command line option is provided
- place the new CLI command in the correct place in the list which has to be
  in alphabetical order
- Finally, clean up a few spacing issues to conform to the coding guidelines


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-26 21:47:52 +00:00
Joshua Colp
79161454a3 Few more expire_registry changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30607 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-26 20:00:48 +00:00
Joshua Colp
9b18892314 Add ability to disable log / verbose output to remote consoles (issue #6524 reported by mavetju)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-26 19:48:17 +00:00
Russell Bryant
fba5d28317 document the changes I made yesterday to the exit behavior of the
AGI applications


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-26 18:33:58 +00:00
Russell Bryant
3e47e08cdc wrap test at 80 characters
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-26 18:25:38 +00:00
Russell Bryant
640285c7a5 add some more text about the build system
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30578 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-26 18:19:37 +00:00
Joshua Colp
10467be4c0 attended transfer use transferer context first and set who is transfering at the beginning (issue #6752 reported by moy -- minor mods done by myself)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30548 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-26 17:59:29 +00:00
Joshua Colp
1c158f0ea4 Add the video stream for AGI function STREAM FILE (issue #5392 reported by areski -- minor mods by me)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-26 17:43:11 +00:00
Mark Spencer
ec42807ebd That goes for jingle too :)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-26 05:21:41 +00:00
Mark Spencer
70defe19fe Lets not commit things that cause Asterisk to break when config files aren't present.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-26 03:08:15 +00:00
Russell Bryant
730f75cc78 only display a debug message if option_debug is in use
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 22:39:57 +00:00
Russell Bryant
f490777c41 regenerate configure after the last fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 22:06:55 +00:00
Russell Bryant
1e61ba6699 restore default paths for FreeBSD (reported by alphaque, fixed by jcollie)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 22:05:12 +00:00
BJ Weschke
295c340164 A new way to try and deal with deadlocks that occur in app_queue at present. Using this approach, we only manipulate the main queue mutexes when we get a dev state change on a device that is actually a member of a queue. Further optimizations are still possible (eg - store and manage pointers to the status integer of the member record that this interface/device has a one-to-one relationship with and then go directly to those pointers to make status modifications rather than the recursive looping that goes on now) BUT first things first. :)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 21:47:03 +00:00
Joshua Colp
8ecf6a7bb1 Merge in branch that adds new features to MeetMeAdmin. See application documentation for more details on the new options. (issue #7131 reported by dmikusa branch by jcollie)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30427 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 21:30:40 +00:00
BJ Weschke
59e1522025 Merged revisions 30424 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r30424 | bweschke | 2006-05-25 17:22:16 -0400 (Thu, 25 May 2006) | 3 lines

 Oops.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 21:24:12 +00:00
Tilghman Lesher
31081f1224 Deprecate SetCallerID (should have happened prior to release of 1.2)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 21:06:43 +00:00
Joshua Colp
0cdb878abb Remove possibility of sending duplicate MeetmeJoin manager events, and only send a MeetmeLeave event if a MeetmeJoin event occured in the first place. (issue #6599 reported by imran - provided patch with few tiny mods)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 21:06:08 +00:00
Joshua Colp
6b185c1bed Merge in branch which gives you the ability to set the hangup causecode using the Hangup application. (issue #7160 reported by kmilitzer branch by jcollie)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 20:51:27 +00:00
Joshua Colp
16d0f580f9 Merged revisions 30373 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r30373 | file | 2006-05-25 17:03:11 -0300 (Thu, 25 May 2006) | 2 lines

Don't play the enter sound twice when a person joins a conference after the leader has joined it. (issue #6138 reported by shanermn)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 20:05:52 +00:00
Kevin P. Fleming
35fa97d1d5 use the proper method for adding a new entry
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 19:26:26 +00:00
Russell Bryant
55d67e71f1 add the ability to be able to echo DTMF_BEGIN/END, HTML, and IMAGE frames, too
(issue #7193, Mithraen, with some mods)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 19:21:09 +00:00
Russell Bryant
d2872c914d - mark some applications deprecated that already have replacements
- add BLACKLIST and mark LookupBlacklist deprecated
- add transfercapability support to CHANNEL and mark SetTransferCapability
  deprecated
(issue #7225, Corydon)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30359 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 19:07:31 +00:00
Russell Bryant
26271fbd3a allow setting a channel variable to disable sending SIGHUP to the AGI process
(issue #6491, original patch by juggie, channel variable patch by corydon,
 committed patch modified to change variable name and update documentation)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 19:01:26 +00:00
Russell Bryant
238cdb249f Add the ability to retrieve the exit code of the forked AGI process. If there
is an error executing the AGI script, or the AGI script itself returns a
non-zero value, the AGISTATUS variable will now be set to FAILURE instead of
SUCCESS.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 18:31:19 +00:00
Joshua Colp
35d729fb40 Add Archive option to call files and add documentation on them. (issue #5426 reported by ezio - props to blitzrage for proof reading the documentation)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 17:58:55 +00:00
Kevin P. Fleming
df814221c1 Merged revisions 30296 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r30296 | kpfleming | 2006-05-25 12:39:33 -0500 (Thu, 25 May 2006) | 2 lines

don't try to use -march=s390 when building on S/390 systems (reported via asterisk-users mailing list)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 17:39:46 +00:00
Kevin P. Fleming
f890cab292 Merged revisions 30293 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r30293 | kpfleming | 2006-05-25 12:18:01 -0500 (Thu, 25 May 2006) | 2 lines

allow SIPCHANINFO(peername) to work for calls from users as well (issue #7215)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30294 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 17:22:26 +00:00
Russell Bryant
0cccaf8408 - add support for setting an AGISTATUS variable that indicates successful
execution, failure, or if the channel requested hangup.
- only return -1 from the application if the application requested hangup. If
  there was just a failure in execution of the AGI, just set the status
  variable appropriately and move on in the dialplan.
(issue #7121, original patch by Alessandro Polverini, updated patch by srt,
 committed patch is heavily modified to allow still returning -1 on hangup)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 16:44:22 +00:00
Joshua Colp
e0612c9835 Safely traverse the thread lists and wait until each thread is done before moving on to the next.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30271 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 16:14:17 +00:00
Joshua Colp
336fd1a2de Only get the low 16 bits if we actually have a message count
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 15:42:11 +00:00
Russell Bryant
a96606b329 add DB_DELETE function for the common case of retrieving and deleting a key in
a single operation (issue #7214, twilson)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 15:40:38 +00:00
Joshua Colp
18248f092f Merged revisions 30239 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r30239 | file | 2006-05-25 12:27:44 -0300 (Thu, 25 May 2006) | 2 lines

Get rid of an incorrect SIP dial string in the sample extensions.conf - I even tried variations... no go (issue #7222 reported by arkadia)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30240 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 15:29:30 +00:00
BJ Weschke
6cfaaf9ac0 Properly initialize destination variables before we send them into pbx_substitute_variables_helper(..). Ya! Testing! Take 2.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 14:32:15 +00:00
BJ Weschke
36cf242f31 Making sure a char ptr is initialized before we strchr on it is a GOOD thing. Ya! Testing!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30194 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 13:51:44 +00:00
BJ Weschke
8d890cb626 Doxygen comment for Qwell
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 01:40:20 +00:00
BJ Weschke
6848d55d85 Make sure we catch all the instances where a member didn't answer the call sent to them rather than just on a timeout after a dial attempt and some minor code cleanup/reuse.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 00:11:30 +00:00
Christian Richter
eefc9193e7 added EVENT_NEW_CHANNEL. We change the channel name now when we got the real channel, also changed name generation to new stringfield api
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 23:21:03 +00:00
Joshua Colp
f35e669a98 Nothing to see here... move along
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 23:08:39 +00:00
Joshua Colp
6f8c704e2b Update some documentation (file internal brain bug #42)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30104 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 22:00:37 +00:00
Kevin P. Fleming
7c3dfeecc3 block chan_sip fix that is not broken here :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30099 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 21:25:46 +00:00
Kevin P. Fleming
57f6093661 don't send CANCEL for an INVITE that we haven't received a provisional response for yet... mark it pending until a response arrives (issue #7079)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 20:37:45 +00:00
Matt O'Gorman
5a005e8ac8 Merged revisions 30037 via svnmerge from
https://svn.digium.com/svn/asterisk/branches/1.2

........
r30037 | mogorman | 2006-05-24 14:55:21 -0500 (Wed, 24 May 2006) | 3 lines

app_meemte used the ast_max_exten instead of path_max
solves bug 6822

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30068 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 20:07:02 +00:00
Joshua Colp
91f9966be3 Merge branch for bug 6264 (Privacy option 2 returns dial-status ANSWER / option_priority_jumping not respected) (reported by jkoopmann and branch by murf)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30040 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 20:00:10 +00:00
Matt O'Gorman
45e83fa7c1 reset timeout on reconnect.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30039 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 19:59:04 +00:00
Olle Johansson
b8b1fda04c Typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30038 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 19:58:36 +00:00
Joshua Colp
d9e60bf15a Blocked revisions 30035 via svnmerge
........
r30035 | file | 2006-05-24 16:44:26 -0300 (Wed, 24 May 2006) | 2 lines

Merge branch for bug 6264 (Privacy option 2 returns dial-status ANSWER / option_priority_jumping not respected) (reported by jkoopmann and branch by murf

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30036 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 19:46:14 +00:00
Joshua Colp
519ee25110 Merged revisions 30033 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r30033 | file | 2006-05-24 16:14:01 -0300 (Wed, 24 May 2006) | 2 lines

Fix deadlock caused by a race condition in the logger when reloading (issue #7195 reported and fixed by softins)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 19:16:07 +00:00
Kevin P. Fleming
0661a76fc7 don't force the compiler name
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30012 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 18:18:14 +00:00
Olle Johansson
625781948a Typo fix. Thanks Peter!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 18:17:50 +00:00
Kevin P. Fleming
dd45d18515 Merged revisions 29973 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r29973 | kpfleming | 2006-05-24 11:59:20 -0500 (Wed, 24 May 2006) | 2 lines

support video recording via AGI 'RECORD FILE' command (issue #7068)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 17:02:54 +00:00
Kevin P. Fleming
6e307c1d81 Merged revisions 29971 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r29971 | kpfleming | 2006-05-24 11:52:08 -0500 (Wed, 24 May 2006) | 2 lines

fix various bugs related to exiting from queue via keypress and moh handling (issue #6776, different fix)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29972 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 16:54:10 +00:00
Kevin P. Fleming
11d13e1d4b Merged revisions 29969 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r29969 | kpfleming | 2006-05-24 11:17:26 -0500 (Wed, 24 May 2006) | 2 lines

respect 'usecallingpres' in zapata.conf even if CLID has not been set for the channel (issue #7123)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29970 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 16:19:57 +00:00
Christian Richter
8122c35675 fixed to early connect bug which came in yesterday.., also added the transmit of progress indicators through channel vars
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29938 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 07:58:52 +00:00
Jim Dixon
f2af2718a6 Added incoming audio notch filtering, plus a bunch of command improvements, etc.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29935 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 07:01:02 +00:00
Kevin P. Fleming
99bd06029f block SIP obscurity fix from merging... trunk version was different
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 03:32:55 +00:00
Kevin P. Fleming
3e99be68d1 add a new option for 'obscuring' SIP user/peer names from fishers
use an enum for authentication results and clean up code
fix a bug where SUBSCRIBE for an unknown user/peer would not generate a response


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 03:28:49 +00:00
Russell Bryant
74cb39729b further codec module optimization based on codec_alaw changes by rizzo
(issue #7190, Mithraen)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29880 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 22:57:03 +00:00
Russell Bryant
7370cb3221 Merged revisions 29849 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r29849 | russell | 2006-05-23 17:44:52 -0400 (Tue, 23 May 2006) | 2 lines

fix the sourceaddress option (issue #7213, alphaque)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 21:46:26 +00:00
Matt O'Gorman
f297f2ec29 get rid of that transport sillyness
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29848 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 21:28:14 +00:00
Matt O'Gorman
d419d41c2e hmm still need a way to get rid of connections
later on.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 21:18:07 +00:00
Matthew Fredrickson
547c6ebd86 Bump up the echo tail length option
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 21:10:55 +00:00
Matt O'Gorman
600d37873d fixes bug where server goes away.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 20:25:23 +00:00
Christian Richter
39ac1a5b83 added a l1watcher timeout, therefore removed the old behaviour of guessing the l1state.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 19:40:16 +00:00
Matt O'Gorman
45107ed763 allows for configurable answer timeout on attended transfer
patch 0006763 with minor changes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29766 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 18:23:05 +00:00
Kevin P. Fleming
b31af470e7 Merged revisions 29764 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r29764 | kpfleming | 2006-05-23 13:16:40 -0500 (Tue, 23 May 2006) | 2 lines

simplify/fix lock retry, and fix comment

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29765 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 18:17:40 +00:00
BJ Weschke
c4227714fd Sanity check code for an extended failure in trying to obtain a channel lock that may have been obtained elsewhere. Prevents the monitor thread of the SIP module from going into an infinite loop, effectively, breaking SIP until you restart Asterisk or the mutex is unlocked, whichever comes first.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 17:31:05 +00:00
BJ Weschke
ede4906f8d What's good for 1.2 isn't good for /trunk. Fix for /trunk coming next...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 17:21:02 +00:00
Russell Bryant
f9e5541689 on a clean, we have to clean out the ael directory too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 17:09:51 +00:00
Kevin P. Fleming
8d74f0ebe6 restore AST_LIST_HEAD_INIT (with no users in the tree right now)
update ast_mutex_init to allow mutexes that are all zero bytes to be initialized (in the case of a dynamically-allocated structure containing a mutex)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29727 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 17:04:07 +00:00
Matt O'Gorman
5d51260c36 finish cleaning up some more stuff before russell
gets a chance to.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29708 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 16:43:58 +00:00
Russell Bryant
a20db7dde6 remove another excess "debug" message
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29707 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 16:37:46 +00:00
BJ Weschke
99fe70da00 Merged revisions 29696 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r29696 | bweschke | 2006-05-23 11:58:24 -0400 (Tue, 23 May 2006) | 3 lines

 Fix a potential leak and correct (hopefully) a segfault under certain conditions. #6784 (vovan and perry testing)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 16:37:40 +00:00
BJ Weschke
6535df3680 app_meetme Muting and Manager API enhancements #6731 (softins w/some minor mods to accomodate recent enum work)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 16:35:46 +00:00
Russell Bryant
cb25b874cb remove an unnecessary error message that is really an old debug message
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 16:33:04 +00:00
Russell Bryant
32a28ed9cf update chan_jingle to reflect the recent change to the indicate prototype
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 16:25:37 +00:00
Olle Johansson
16a648aaf1 Breaking once will stop us... :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29668 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 12:39:48 +00:00
Christian Richter
adfae0960f * export_ies uses now _VAR else the vars are not copied to the dest chan
* when receiving a connect from the NT Side we wait until we have the final
  l3id until we queue the answer to asterisk to avoid bridging conflicts
* when not bridged to misdn we had a segfault after receiving the connect 
  due to a strcasecmp bug.. this didn't happen before, cause we hadn't had
  the bridge before
* cleanup of the bchannels is queued now, due to possible race conditions
* added mISDN_clear_stack when cleaning the bchannel



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29667 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 12:38:06 +00:00
Olle Johansson
883e4d6a9b Code formatting
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 12:14:35 +00:00
Olle Johansson
8c14cffd50 Formatting, typos
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 11:15:57 +00:00
Mark Spencer
fa9e0ed768 Handle ringing (early) state properly on SIP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29619 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 04:49:31 +00:00
Matt O'Gorman
9d15337fa0 patch from bug 0007204 to make bug 5750 follow standard
manager naming convention.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 22:51:56 +00:00
Kevin P. Fleming
3891339581 remove properties from the xmpp merge
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29570 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 22:02:38 +00:00
Joshua Colp
822a3e81c9 Merged revisions 29555 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r29555 | file | 2006-05-22 18:27:12 -0300 (Mon, 22 May 2006) | 2 lines

Increase the silence threshold to 128 to "fix" it, so I'm told. (issue #6595 reported by davetroy fixed by casper)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 21:28:32 +00:00
Kevin P. Fleming
f09942bb08 bootstrap updates to include xmpp related stuff
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29554 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 21:20:01 +00:00
Matt O'Gorman
7aa1a77e75 asterisk-xmpp merge in
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 21:12:30 +00:00
Joshua Colp
64b94dad80 Merged revisions 29512 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r29512 | file | 2006-05-22 17:15:04 -0300 (Mon, 22 May 2006) | 2 lines

Use the correct language when playing the transfer sound (issue #7109 reported by casper)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 20:19:00 +00:00
BJ Weschke
5235890be4 This is part 2/2 of the patches for #7090. Adds one-step call parking to /trunk via builtin functions and 'k' 'K' application options added to app_dial. This also resolves #6340.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29467 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 16:43:43 +00:00
Joshua Colp
a0f95cd526 Merged revisions 29464 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r29464 | file | 2006-05-22 13:33:03 -0300 (Mon, 22 May 2006) | 2 lines

Preserve presentation bit when going through chan_local (issue #7002 reported by acunningham)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 16:36:13 +00:00
Russell Bryant
86205923df add DEBUG_CHANNEL_LOCKS to menuselect
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 16:34:45 +00:00
Joshua Colp
0cc02feae9 Add PICKUPMARK support to app_directed_pickup (issue #7104 reported by thaeger)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 16:08:23 +00:00
Joshua Colp
d2d8052741 don't stop recording until hangup (no terminator) (issue #7168 reported by julien23)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 15:48:22 +00:00
BJ Weschke
d1fc8d4687 Add UniqueID to the leave manager event.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29434 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 15:28:28 +00:00
Christian Richter
19d46333bf added callcounters for incoming and outgoing calls
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 15:02:03 +00:00
Tilghman Lesher
5a8e7415c7 Merged revisions 29398 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r29398 | tilghman | 2006-05-22 09:59:59 -0500 (Mon, 22 May 2006) | 2 lines

Bug 7194 - spelling fix

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29407 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 15:01:36 +00:00
Tilghman Lesher
115e950b2c Blocked revisions 29394 via svnmerge
........
r29394 | tilghman | 2006-05-22 09:34:34 -0500 (Mon, 22 May 2006) | 2 lines

Bug 7196 - month range did not work

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29395 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 14:39:10 +00:00
Tilghman Lesher
9e81cc3e0c Escaping commas within fields isn't always desireable.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 03:40:31 +00:00
Luigi Rizzo
76c47813fe remove code duplication generating some ast_verbose messages .
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 03:16:38 +00:00
Luigi Rizzo
9bb0bfbebc use functional form of time()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 02:51:04 +00:00
Luigi Rizzo
82dbf5a4c1 use the functional form of time(), and mark XXX a couple of places
with dubious assignments.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29334 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 02:43:24 +00:00
Luigi Rizzo
afe7c46924 more constifications
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 02:31:58 +00:00
Luigi Rizzo
322aff00c6 various constification of function arguments to prevent erroneous
usage and to ease understanding of the function themselves.




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 02:27:33 +00:00
Luigi Rizzo
ba195ee2d4 the msg argument of the various transmi_response*() functions is const.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 02:22:39 +00:00
Luigi Rizzo
75c6b453a3 mark const the 'header' argument of gettag
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 02:19:14 +00:00
Luigi Rizzo
1a709886e3 mark const the source of copy_request
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 02:17:52 +00:00
Luigi Rizzo
c76882a94a fix indentation to make a table more readable
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 02:16:04 +00:00
Luigi Rizzo
3ade391d1d simplify register_peer_exten() removing some duplicated code.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29315 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 02:02:57 +00:00
Luigi Rizzo
734535011a use strsep() to trim away ;xxx from SIP messages.
Note that in a couple of places the code overwrites the string
in the buffer - mark the two places with XXX but do not fix the
bug yet.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 01:27:52 +00:00
Luigi Rizzo
8414445108 use a more compact method to trim the trailing ;... from SIP lines.
These are just the first two instances, there are many more to replace.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 01:08:41 +00:00
Luigi Rizzo
917182e286 annotate const parameters of copy_header()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 00:46:04 +00:00
Luigi Rizzo
27f4fb4990 src is const in parse_copy()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 00:32:36 +00:00
Luigi Rizzo
564ca6394a minor logic simplification in get_sip_pvt_byid_locked()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 00:29:12 +00:00
Luigi Rizzo
15b7465cd2 simplify logic in function create_addr()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 00:17:46 +00:00
Luigi Rizzo
a234f92337 simplify logic in realtime_peer(), removing an unnecessary
initialization, an extra variable (newpeername) and a 
variable newpeername, and an 'else' branch.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 00:07:48 +00:00
Luigi Rizzo
94d3a99089 strcmp() is the right function to use here, not strncmp().
On passing simplify an ast_cli message nearby.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-21 23:54:28 +00:00
BJ Weschke
4733732b61 Merged revisions 29196 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r29196 | bweschke | 2006-05-21 10:16:59 -0500 (Sun, 21 May 2006) | 3 lines

 When an application that is executed via applicationmap and exits non-zero, make sure that we pass through the correct return value from the application to make sure a segfault doesn't occur by a bridge trying to continue when it should not. Also, when executing applications via applicationmap, make sure that the application is executed against the channel whose DTMF caused it to be fired off in the first place. (part 1/2 of #7090 - this is the only fix that will be applied to both 1.2 and /trunk) acunningham and blitzrage on testing...


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-21 15:25:31 +00:00
Russell Bryant
99f3f45625 put a bunch of defines in enums, and convert comments to doxygen format
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29195 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-21 15:13:19 +00:00
Russell Bryant
3adeececd7 remove a CLI command that has been marked deprecated since before Asterisk 1.0
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-21 14:06:37 +00:00
Luigi Rizzo
ab5b298805 remove an unused variable, and while at it
add some very minor optimizations.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-21 09:56:38 +00:00
Russell Bryant
4b49f667d2 remove unused variable
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29095 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-20 22:37:18 +00:00
Russell Bryant
1fcc86d905 Add support for logging CDR recrods to a radius server (issue #6639, phsultan)
- with contributions from miconda, jcollie, and sb
 - branch maintained by oej
Thanks everyone!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29094 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-20 22:30:05 +00:00
Russell Bryant
ed0b86c916 fix the possibility of writing one byte past the end of a buffer.
(issue #7189, Mithraen)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-20 19:54:14 +00:00
Russell Bryant
b88c06b8b5 add some code optimizations, see the report for an explanation
(issue #7105, Mithraen)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29018 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-20 13:37:11 +00:00
Russell Bryant
9d53a3e7f5 - add a UserEvent action that allows a manager client to "broadcast" an event
to all connected manager clients
- update the UserEvent application to use the application argument parsing
  macros and to allow headers to be specified as pipe delimeted arguments
  (issue #5324, original patch by outtolunc, committed patch by Corydon)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-20 13:29:22 +00:00
Kevin P. Fleming
db55898c0d Merged revisions 28968 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r28968 | kpfleming | 2006-05-19 21:35:53 -0500 (Fri, 19 May 2006) | 2 lines

don't allow queue member devices to ring longer than the total queue timeout (issue #6423, reported and patched by bcnit)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28970 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-20 02:51:53 +00:00
Russell Bryant
0056379829 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28967 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-05-20 02:32:54 +00:00
Russell Bryant
d8f4a04acc remove an unused variable, and default the user to asterisk if not specified
in the config file (issue #7153, Mithraen)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-20 01:35:12 +00:00
Russell Bryant
f1a97c3b3f various fixes regarding coding guidelines issues
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28935 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-20 01:29:08 +00:00
Russell Bryant
bdc30b8d9d fix up another place where the code made assumptions about how space for
variables would be allocatted on the stack


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28934 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-20 01:28:14 +00:00
Kevin P. Fleming
df6767fa52 Merged revisions 28896 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r28896 | kpfleming | 2006-05-19 19:55:31 -0500 (Fri, 19 May 2006) | 2 lines

don't try to predict where the compiler will place things on the stack... put them in the right place explicitly (issues #7029 and #7100, maybe others)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-20 01:01:20 +00:00
Russell Bryant
0523e82f46 if a hostname is not specified, connect over a unix socket instead of
connecting to localhost (issue #7145, Mithraen)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28897 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-20 00:57:04 +00:00
Russell Bryant
3d022d073a fix the build of func_realtime and aelparse with MTX_PROFILE enabled
(issue #7187, #7188, casper)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28895 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-20 00:41:36 +00:00
Russell Bryant
ebe974e9e4 defaults.h must be listed as a dependency after the cleantest because if it
forces a make clean, it has to be regenerated.  This fixes the problem that
people have been seeing where the build would fail complaining about defaults.h
not being present.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-20 00:36:18 +00:00
Kevin P. Fleming
6d92d53d41 attributes need trailing CR-LF
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28863 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 23:08:47 +00:00
Russell Bryant
0debd3dec2 allow chan_h323 to build (issue #7006, casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28834 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 22:55:09 +00:00
Kevin P. Fleming
429360320d let's use the proper variable here, instead of segfaulting (don't know how this worked for anyone at all)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28833 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 22:55:02 +00:00
Russell Bryant
004885c2fa Make the new behavior where the timestamp is checked on the call file before
deleting it optional, defaulting to the old behavior, where it is always
deleted (issue #6750, jcollie)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 22:51:44 +00:00
Russell Bryant
4a8ed5c136 we have to build local copies of aelflex.o, aelbison.o, and pbx_ael.o as well
to make sure aelparse doesn't use versions of these objects compiled with astmm
support (issue #7122)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28796 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 19:46:10 +00:00
Kevin P. Fleming
42e2cf61d8 Merged revisions 28794 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r28794 | kpfleming | 2006-05-19 14:39:55 -0500 (Fri, 19 May 2006) | 2 lines

use the specified 'subscribecontext' for a peer rather than the context found via the target domain (domain contexts are for calls, not for subscriptions) (issue #7122, reported by raarts)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28795 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 19:43:33 +00:00
Joshua Colp
f6107d6826 Fix tab completion when you just do a plain tab without entering anything, and also fix show application tab completion. (issue #7089 reported by blitzrage)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 19:35:16 +00:00
Russell Bryant
c91382a0a0 Merged revisions 28790 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r28790 | russell | 2006-05-19 15:18:41 -0400 (Fri, 19 May 2006) | 3 lines

fix the build of smsq with -Werror.  I learned something new about format
strings from this patch!  (issue #7141, Mithraen)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 19:19:27 +00:00
Russell Bryant
8029c58409 there is no reason to explicity specify -fomit-frame-pointer when building with
optimization enabled, because it is enabled automatically (issue #7108, casper)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 19:10:06 +00:00
Russell Bryant
6b73b82e5d Merged revisions 28754 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r28754 | russell | 2006-05-19 15:01:17 -0400 (Fri, 19 May 2006) | 6 lines

This explicit poll is only needed on mac.  In fact, it breaks some systems
such as some versions of Fedora, causing 'asterisk -rx' to never exit.  This
has been tested on systems showing the asterisk -rx problem, as well as other
unaffected versions of linux, mac osx 10.4, and FreeBSD 6.
(issue #7071)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 19:04:24 +00:00
Russell Bryant
9993d14f86 add support for more refined ability to set install paths using the standard
options to configure such as --libdir, --sbindir, etc. All of the default paths
are still the same. (issue #7057, jcollie)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 18:54:21 +00:00
Tilghman Lesher
d0c36296d2 As requested by kpfleming, renaming messagecount to inboxcount and messagecount2 to messagecount.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28745 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 18:21:31 +00:00
Russell Bryant
50775a944d only delete call files if the timestamp on the file is not in the future, so
that a call file can be reused (issue #6750, patch by moy, committed patch is
slightly simplified)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 17:25:52 +00:00
Joshua Colp
ebc762c82e Clean up some chan_zap code to make it more readable. (issue #6834 reported by ppyy)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 17:15:29 +00:00
Joshua Colp
fa13a5f113 Merged revisions 28698 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r28698 | file | 2006-05-19 14:04:02 -0300 (Fri, 19 May 2006) | 2 lines

Make the minidle option actually exist as documented (issue #7159 reported by imran)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 17:05:22 +00:00
Joshua Colp
ccf365cc70 Merged revisions 28651 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r28651 | file | 2006-05-19 13:03:33 -0300 (Fri, 19 May 2006) | 2 lines

When forwarding messages use the context that the active voicemail user was found in. (issue #7010)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28657 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 16:04:35 +00:00
Joshua Colp
a7bd988e9b Blocked revisions 28630 via svnmerge
........
r28630 | file | 2006-05-19 12:52:09 -0300 (Fri, 19 May 2006) | 2 lines

Backport of fix for issue #6654 that was fixed in trunk but not here

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 15:53:14 +00:00
Tilghman Lesher
4af14f6c99 Missing messagecount2 function
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 15:44:33 +00:00
Joshua Colp
154774e033 Merged revisions 28627 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r28627 | file | 2006-05-19 12:38:59 -0300 (Fri, 19 May 2006) | 2 lines

Treat paused queue members as unreachable (issue #7127 reported by peterh)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 15:40:39 +00:00
Russell Bryant
5d24426e40 fix up a patch that did not merge properly from 1.2 ... weird
(issue #6866, flefoll)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 14:51:08 +00:00
Olle Johansson
3be9c811f1 Adding some documentation on Asterisk and video telephony. Thanks to the team
on the asterisk-video mailing list for teaching me :-)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 09:28:05 +00:00
Olle Johansson
1783cb3a91 Adding send_text capability to chan_local
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 08:20:01 +00:00
Olle Johansson
908c153840 First stab at supporting video in chan_local
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28502 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 08:03:28 +00:00
Olle Johansson
a3cc752008 Add simple devicestate for chan_local
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28484 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 07:56:56 +00:00
Olle Johansson
cd03597f0c Formatting cleanup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28483 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 07:52:08 +00:00
Russell Bryant
53df01c9cc when displaying the list of registered music on hold classes, only show
the format if the mode is not "files", because the field has no meaning
in that case


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28445 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 03:11:35 +00:00
Kevin P. Fleming
eeb01cda95 revert bogus change
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28395 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 21:11:43 +00:00
Kevin P. Fleming
0c73d47618 Merged revisions 28380,28384 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r28380 | kpfleming | 2006-05-18 15:24:07 -0500 (Thu, 18 May 2006) | 2 lines

handle incoming multipart/mixed message bodies in SIP and find the SDP, if presnet (issue #7124 reported and patched by eborgstrom, but very different fix)

........
r28384 | kpfleming | 2006-05-18 15:43:42 -0500 (Thu, 18 May 2006) | 2 lines

fix up a few more places to find the SDP properly (fallout from fix for #7124)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28394 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 21:02:21 +00:00
Olle Johansson
e274a70d52 Add missing argument to ast_carefulwrite
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 21:01:38 +00:00
Kevin P. Fleming
1ad7b94144 Merged revisions 28337 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r28337 | kpfleming | 2006-05-18 14:35:55 -0500 (Thu, 18 May 2006) | 2 lines

use unsigned counters for handling answer/IE lengths while processing DNS results (issue #7174)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 19:39:39 +00:00
Kevin P. Fleming
169e4797fa block this fix from the 1.2 branch; proper fix will go here and is much more complex
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28336 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 19:18:08 +00:00
Tilghman Lesher
f0b985853a Bug 7167 - Fix VMCOUNT if using USE_ODBC_STORAGE (different fix for trunk than for 1.2)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28300 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 18:28:52 +00:00
Tilghman Lesher
75e3bafdfd Blocked revisions 28257 via svnmerge
........
r28257 | tilghman | 2006-05-18 12:27:59 -0500 (Thu, 18 May 2006) | 2 lines

Bug 7167 - HasNewVoicemail and VMCOUNT() didn't work when USE_ODBC_STORAGE was defined

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 17:29:32 +00:00
Kevin P. Fleming
42cf0b0a8f add another media path reinvite 'flavor', where we will only redirect our media to devices that we know are not behind a NAT (based on the evidence collected when we receive media from them)
also, documented the 'canreinvite=update' option in the sample config file


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28215 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 16:57:59 +00:00
Kevin P. Fleming
48c36f4b89 adding new code should require following the formatting guidelines :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28214 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 16:38:26 +00:00
Joshua Colp
9d4d49cfeb Merged revisions 28212 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r28212 | file | 2006-05-18 13:31:16 -0300 (Thu, 18 May 2006) | 2 lines

Return -1 on error in ODBC messagecount and 0 on success (issue #7133 reported by cfieldmtm)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 16:32:37 +00:00
Joshua Colp
b37f523eff Merged revisions 28169 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r28169 | file | 2006-05-18 11:27:21 -0300 (Thu, 18 May 2006) | 2 lines

Fix endless looping message by checking value of res before doing retries stuff. (issue #7140 reported by tanischen)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28170 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 14:40:20 +00:00
Joshua Colp
6d603ec09c Allow contexts in regexten so that extensions can be added to multiple contexts when peer registers (issue #6869 reported by and created by Marquis)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 14:07:46 +00:00
Olle Johansson
e4bedcd7e8 Remove unsupported, unimplemented, unfunctional "v" option from meetme documentation
(Imported from 1.2)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 12:19:00 +00:00
Christian Richter
4694f5e02e this is not a warning, it might happen during call initialization
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 08:45:43 +00:00
Russell Bryant
1f0e09e81e force a "make clean" because existing .depend files in the subdirectories
may be bogus


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28056 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 06:48:58 +00:00
Russell Bryant
808f26a24d fix file dependency generation so that the resulting files in the subdirectories
are not of zero length (issue #7138, reported/patched by casper, fixed by a
different patch)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28055 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 06:41:53 +00:00
Joshua Colp
5769ed6ea2 Fix receiving message count information from a remote IAX2 peer. (issue #7163 reported by and fixed by akohlsmith)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 00:12:54 +00:00
Joshua Colp
e08dc08ae2 Add SPRINTF dialplan function made by the ever insaneful Corydon (issue #7078 reported by Corydon76)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28016 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 00:00:32 +00:00
Joshua Colp
4edfd20a7a Remove needless check for autofill (issue #7180 reported by Marquis)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27975 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 22:51:28 +00:00
Joshua Colp
a6480b61b0 Merged revisions 27973 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r27973 | file | 2006-05-17 19:34:08 -0300 (Wed, 17 May 2006) | 2 lines

Fix codec priority stuff during authentication (issue #6194 reported by jkoopmann)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 22:35:53 +00:00
Joshua Colp
6eb1d09ad9 Only set the RTP DTMF information of an RTP structure does indeed exist.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27972 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 22:02:15 +00:00
Olle Johansson
10c0ed16f0 Issue #7176 - Crash in expire_register (imported from 1.2)
This is a bad fix, since peer should never be 0. Why is it zero
on Royk's system? 


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27928 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 19:37:51 +00:00
Olle Johansson
270d5f6191 Adding a debug line
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27892 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 18:19:17 +00:00
Joshua Colp
10994f5fbc Merged revisions 27847 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r27847 | file | 2006-05-17 14:07:52 -0300 (Wed, 17 May 2006) | 2 lines

Priority jumping not working on VoiceMail app with new syntax (issue #7164 reported and fixed by alvaro_palma_aste)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27848 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 17:10:44 +00:00
Joshua Colp
15358932ec Add distinctive ring detection with Caller ID for Australia, New Zealand, and other countries. (issue #3596 reported by deon patch by dbowerman with minor mods by moi)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 16:51:47 +00:00
Christian Richter
3fb070853b fixed bug that we've lost the orginator of the call.. now we can hear to disconnect indications again
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 15:29:01 +00:00
Joshua Colp
6137943e4c Blocked revisions 27767 via svnmerge
........
r27767 | file | 2006-05-17 12:17:04 -0300 (Wed, 17 May 2006) | 2 lines

OSPNext does not handle success/failure correctly (issue #7147 reported and fixed by eborgstrom)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 15:19:29 +00:00
Olle Johansson
33729e6954 Block TRANSFER_CONTEXT patch for 1.2 only, since is already implemented in siptransfer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 09:29:55 +00:00
Olle Johansson
770a4a30c5 Use pointer instead of un-needed buffer. Thanks Kevin!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27684 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 06:18:09 +00:00
Tilghman Lesher
ffe4dedf29 Merged revisions 27636 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r27636 | tilghman | 2006-05-16 21:19:50 -0500 (Tue, 16 May 2006) | 2 lines

Bug 7125 - Fix race condition between resequencing and leaving a message

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 02:27:17 +00:00
Joshua Colp
d2da48b156 Inherit channel variables when call forwarding through chan_local (issue #7095 reported by raarts)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-16 23:39:29 +00:00
Kevin P. Fleming
c3dce57d95 mark RTP sessions that are not carrying DTMF
allow native bridging of RTP sessions that are not carrying DTMF even when the bridge needs to listen to DTMF (when SIP INFO is used for DTMF, for example)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-16 22:11:02 +00:00
Kevin P. Fleming
ca8f9083c0 clean up some compiler warnings (no reason to use signed integers for buffer lengths, ever)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27524 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-16 21:45:15 +00:00
Matthew Fredrickson
99648dd713 Add option for enabling and disabling echo cancellation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-16 21:43:20 +00:00
Tilghman Lesher
912f9f9dc7 Argument macro janitor for func_odbc, fixes #7171
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-16 21:14:01 +00:00
Olle Johansson
eeb2184920 Send a=recvonly when put on hold, otherwise a=sendrecv to indicate that we want two streams.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-16 20:13:10 +00:00
Kevin P. Fleming
50a91c69c3 make this app actually compile
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27478 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-16 20:09:30 +00:00
Kevin P. Fleming
e140c0ba9f Merged revisions 27468 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r27468 | kpfleming | 2006-05-16 15:05:17 -0500 (Tue, 16 May 2006) | 2 lines

don't leak frames when deferring DTMF or dropping duplicate ANSWER frames (issue #7041, slightly different fix, reported/patched by clausf)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-16 20:08:29 +00:00
Olle Johansson
28d9dc7997 Typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-16 19:21:20 +00:00
Olle Johansson
185cebac91 Adding check of option_debug
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-16 19:20:50 +00:00
Olle Johansson
e4c0a90649 Show all formats for an active SIP call
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27396 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-16 18:06:27 +00:00
Christian Richter
a309a2db9f fixed very bad memory overwrite which leaded to segfaults on some systems. removed redundant buffer betweend mISDN reading thread and ast_read in favour of the already existing pipe, this clarifies the way a voice frame takes between mISDN and asterisk a lot. centralized debugging of NumberPlan. removed a compiler warning.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-16 14:34:21 +00:00
Olle Johansson
c625a539be One sipfrag attachment is enough...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-16 12:44:04 +00:00
Olle Johansson
ea510a4cf9 - Format fixes
- Adding if(option_debug) in front of complicated debug messages...


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27305 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-16 12:42:59 +00:00
Russell Bryant
43afee3a0c return the result of the cli command registration
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-16 03:18:57 +00:00
Russell Bryant
8047e8067e fix bogus patch to allow setting the CDR amaflags. (The original patch in
issue #7166 was fine.)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-16 03:18:22 +00:00
Matt O'Gorman
dd0ee63009 allow func_cdr to set amaflags patch provided by
bug 7166


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27231 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-15 19:46:26 +00:00
Joshua Colp
80a705c121 Make sure that the channel is answered before doing SpeechBackground. (issue #josh-wait-I-dont-have-issue-numbers)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27194 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-15 15:30:21 +00:00
Russell Bryant
51d5b1fdb2 simplify conference user list handling
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-13 11:06:34 +00:00
Russell Bryant
a3ed43f0dc Move WITH_SMDI from the Makefiles to be handled by menuselect. It will now be
defined in buildopts.h. Also, remove a few more stray spaces in the gcc commands. 


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-13 10:54:40 +00:00
Russell Bryant
cec3a958e4 remove some stuff handled by configure and menuselect
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-13 10:43:11 +00:00
Russell Bryant
2062ab078e remove unnecessary INCLUDE variable which was currently added to ASTCFLAGS
before it was ever set.  This removes another stray space in the gcc
commands  :)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27128 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-13 10:37:26 +00:00
Tilghman Lesher
06882b4232 Merged revisions 27093 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r27093 | tilghman | 2006-05-12 23:08:29 -0500 (Fri, 12 May 2006) | 2 lines

Bug 7134 - File descriptor leak with ODBC storage of voicemail

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27094 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-13 04:18:25 +00:00
Tilghman Lesher
9fd91e0829 Merged revisions 27051 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r27051 | tilghman | 2006-05-11 18:02:57 -0500 (Thu, 11 May 2006) | 2 lines

Bug 7086 - pbx_checkcondition substitution, so that arbitrary strings are true (for regex)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 23:16:27 +00:00
Russell Bryant
ad8ff708de fix the build with astmm (issue #7139)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27023 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 21:24:54 +00:00
Russell Bryant
8a390e342a use config.status instead of include/autoconfig.h as the dependency
for menuselect


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 20:29:00 +00:00
Luigi Rizzo
b91ce5a738 set correct type for lock initializers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 20:21:11 +00:00
Russell Bryant
f9c578a8a0 - The recent change to linklists.h broke the build on linux for some reason.
So, I have removed all of the uses of AST_LIST_HEAD_INIT and replaced them
   with the equivalent static initializations.
 - On passing, fix a memory leak in the unload_module() function of chan_agent.
   The agents list mutex was never destroyed, and the elements in the agents
   list were not freed.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 20:07:44 +00:00
Luigi Rizzo
126ce7882c oops, missing ! in matchcid...
this should fix bug #7142



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 20:03:52 +00:00
Luigi Rizzo
46a9459d57 remove a now useless debugging message about loading new-style modules.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 15:51:43 +00:00
Luigi Rizzo
1f0d723c1e properly initialize non-static locks.
(Thanks Dinesh for tracking the bug and fixing it)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 15:50:25 +00:00
Luigi Rizzo
2b8bc286ef cast sockaddr_in to sockaddr because we need that.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 15:25:21 +00:00
Mark Spencer
c696006923 Go ahead and merge STUN mods for RTP in preparation for some STUN
support in SIP.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26920 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 14:56:52 +00:00
Luigi Rizzo
87e909476d simplify determine_firstline_parts
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26919 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 14:55:34 +00:00
Luigi Rizzo
f3e6fa56ab remove last instance of add_blank_header()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 14:47:12 +00:00
Luigi Rizzo
b87aea8d60 remove almost all useless instances of add_blank_header() but one,
for which i need to investigate a bit more (but i am almost 100%
sure that one is also useless).
I do the commit in two steps so it is easier to track the problem.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26915 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 14:35:06 +00:00
Olle Johansson
5237a0e06d - Use systemname for realm in sip, if we have no configuration for realm
- Optionally send systemname in manager (cool when you have a manager proxy)
- Use systemname in CLI prompt


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26884 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 13:54:00 +00:00
Kevin P. Fleming
76347c8d31 various minor cleanups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26877 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 13:15:10 +00:00
Kevin P. Fleming
74cd80b1a4 use the proper method to get out of the bridge loop
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 10:37:39 +00:00
Russell Bryant
1a8f3dd2d2 forcing a dist-clean in the cleantest was a bad idea. Just change the script
that generates buildopts.h to handle old menuselect.makeopts files


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 10:28:37 +00:00
Kevin P. Fleming
a541309599 initialize the bridge result to 'no result', so that we can check for code paths that set it to AST_BRIDGE_COMPLETE inside the loop (thanks Oskar!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 10:28:22 +00:00
Luigi Rizzo
945ec73b09 remove trailing space
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26848 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 10:26:39 +00:00
Luigi Rizzo
589241e300 remove a duplicate prototype
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 10:26:00 +00:00
Luigi Rizzo
96478ea3a2 remove duplicated code in add_header
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 10:22:18 +00:00
Russell Bryant
476c7a53e1 add messages at the bottom of the menu for each of the defines
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26845 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 10:20:16 +00:00
Russell Bryant
7c6766e67b remove a trailing tab ... now this Makefile is perfect
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26840 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 10:12:34 +00:00
Russell Bryant
44d4ed1b37 change the CFLAGS controlled by menuselect to be placed in a header file
instead of being added to the compiler commands.  This header file will be
installed and modules built outside of the main tree will be able to use the
same build options used to build the rest of Asterisk.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 09:50:41 +00:00
Luigi Rizzo
d06427978c simplify init_req()
As the rest of the chan_sip.c changes i am committing, this is

Approved by: oej



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 09:38:53 +00:00
Luigi Rizzo
5cd1ec4e17 cleanup init_resp with proper variable names and arguments.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 09:36:10 +00:00
Luigi Rizzo
e08e646252 staticize a variable.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 09:32:51 +00:00
Luigi Rizzo
798b82e184 replace list unlinking with UNLINK macro
(when the list becomes an astobj this will be revisited;
however at the moment the change would be too intrusive).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26800 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 09:29:37 +00:00
Luigi Rizzo
067c472abb simplify sip_pretend_ack also removing a bug in the existing
code which called ast_skip_blanks erroneously.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 09:24:35 +00:00
Kevin P. Fleming
0cc5a88350 block revision for fix that was committed here before 1.2
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26781 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 09:07:45 +00:00
Kevin P. Fleming
70a554a264 Merged revisions 26760 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r26760 | kpfleming | 2006-05-11 03:52:46 -0500 (Thu, 11 May 2006) | 2 lines

ensure that we send a response to REGISTER requests that are successfully authenticated but contain invalid Contact URIs

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 09:01:53 +00:00
Mark Spencer
dda130c334 Set "MARK" whenever SSRC changes (bug #6934)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 08:47:37 +00:00
Mark Spencer
c16bf2c7dd Make sure we handle long information elements (bug #6654)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26758 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 08:28:16 +00:00
Olle Johansson
71aabeef4f Ignore CANCEL on call that is already answered
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26757 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 08:25:20 +00:00
Olle Johansson
2dd2865d7b Small formatting fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26756 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 08:20:59 +00:00
Olle Johansson
52cb5c87db Issue #OEJ12399.3 - Set default maxcallbitrate for users too.
(Well, could have opened a branch for this, but felt community pressure not to... ;-)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26755 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 08:08:54 +00:00
Luigi Rizzo
52e35b96bf normalize the code to navigate through extensions and priorities
(use the walk_*() routines so we don't use the link fields
directly, and slightly restructure the blocks to reduce
the nesting depth).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 08:00:35 +00:00
Olle Johansson
9b2d51fb4a - Add more and organize forward declarations (preparing for splitting up this file)
- Doxygen fixes


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26720 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 07:57:03 +00:00
Luigi Rizzo
62caa0be55 fix behaviour for earlymatch and matchmore.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 07:49:12 +00:00
Olle Johansson
d04f0da698 Issue #7081 (kanoop) - use proper cause code for 480
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26716 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 07:25:03 +00:00
Luigi Rizzo
c5e9360e8e replace a macro with actual code;
mark dubious code with XXX.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26686 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 22:14:56 +00:00
Luigi Rizzo
7c415648d1 change macro into a function, remove unused code.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 21:55:25 +00:00
Luigi Rizzo
b09dd8708b start cleanup indentation etc.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 21:12:55 +00:00
Luigi Rizzo
466407e814 lock conlock before accessing the list.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26625 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 20:44:28 +00:00
Luigi Rizzo
8fcae1192d lots of comments trying to document the agreed behaviour of
E_MATCHMORE and '!'.
If the comments are correct, the code must be slightly changed
(simplified).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26624 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 20:34:18 +00:00
Russell Bryant
8f8c2a7052 use ast_calloc instaed of calloc, and remove a couple of duplicated
error messages


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26594 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 19:45:45 +00:00
Kevin P. Fleming
5fb4e7019f and chan_iax2 gets smaller... remove the old jitterbuffer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 16:14:26 +00:00
Russell Bryant
19ca8dc7c1 remove some chekc sof the result of ast_mutex_lock (issue #7119, Mithraen)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 15:41:23 +00:00
Luigi Rizzo
698cead822 support reload say.conf to ease testing
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 15:38:54 +00:00
Russell Bryant
932c5c7fd7 use the channel lock wrappers (issue #7120, Mithraen)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 15:30:59 +00:00
Luigi Rizzo
e0f0f4b4a4 german syntax for numbers from christian richter
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 15:30:37 +00:00
Russell Bryant
6ea26d0bee use the channel lock wrappers (issue #7128)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26526 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 15:17:58 +00:00
Mark Spencer
8e9e1ac6bc Fix buglet on debug
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 15:13:26 +00:00
Kevin P. Fleming
b5a7328dbe update the ->indicate() callback for the new arguments
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26495 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 15:00:33 +00:00
Russell Bryant
a1aefcd03d suppress the output from generating defaults.h and versions.h, as well as
checking the cleancount


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26492 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 14:35:38 +00:00
Russell Bryant
04ecb29d03 remove almost all of the checks of the result from ast_strdupa() or alloca().
As it turns out, all of these checks were useless, because alloca will never
return NULL.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 13:22:15 +00:00
Russell Bryant
8e897e1a53 remove a debug message and make the exit keys not be case sensitive
inside of a category menu


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26441 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 13:05:17 +00:00
Kevin P. Fleming
fdcfd6469b ensure that control frames with payload can be sent to channel drivers via ->indicate()
update iax2_indicate to pass control frame payload to the connected channel
add an API call for sending an indication with payload, and use it for control frames with payload


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 12:24:11 +00:00
Luigi Rizzo
1904069f71 fix indentation of two large blocks
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26416 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 12:17:25 +00:00
Luigi Rizzo
c99f6d4576 fix a couple of misindented lines;
prepare reduce nesting level in a couple of blocks by
inverting an if () statement (indentation change to be committed
separately).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 11:38:43 +00:00
Luigi Rizzo
16ee7c509c add missing rule
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 10:48:29 +00:00
Luigi Rizzo
97c275d768 provide a correct return value in case everything goes well,
so you won't get random failures running menuselect.

Detected by -Wall -Werror



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 10:41:38 +00:00
Luigi Rizzo
298eec4d28 use 'switch' insteaf of multiple 'if'
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 10:10:03 +00:00
Mark Spencer
66ed134473 Allow media to go directly between IAX endpoints while signalling still
goes through the existing path.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 09:09:16 +00:00
Luigi Rizzo
e8dcc5d429 document special character interpretation.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 07:45:14 +00:00
Luigi Rizzo
67fb4f4a02 indentation fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 07:19:29 +00:00
Luigi Rizzo
0b3482cedc prevent a warning for uninitialized variable.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 07:13:23 +00:00
BJ Weschke
2d65bd68f1 Implement new support for "meetme list <confno> concise"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26250 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 02:57:20 +00:00
Luigi Rizzo
eb28827660 implement the new sorting algorithm for extensions,
see the documentation near functions ext_cmp1() and ext_cmp().

All sorting decisions are now in one place so it is easy
to revise them.

NOTE
the major change is that now most specific patterns come first,
so there might be differences in how diaplans behave.
If you really really really need to revert to the old sorting order
while you adapt your dialplan, you can uncomment the '#if 0' line
in ext_cmp().



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 18:34:30 +00:00
Kevin P. Fleming
ed3ffb4b46 various doxygen fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26170 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 16:24:07 +00:00
Luigi Rizzo
674c5e9b0b clear memory before passing to ASTOBJ_INIT
Mayne it is unnecessary, but otherwise there code believes
the mutex is already initialized.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 16:19:24 +00:00
Olle Johansson
2b3ae24942 Formatting fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 15:17:12 +00:00
Mark Spencer
f2bc3c61cc Make sure that we don't accept an answer on an inbound call and don't permit asterisk to answer an outbound call
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 15:01:10 +00:00
Kevin P. Fleming
f429105aae remove rule for running bootstrap, it's only safe to run it manually now
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26094 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 14:43:00 +00:00
Kevin P. Fleming
16f1acc37f use an enum for control frame types
support sending control frames with payload


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 14:25:57 +00:00
Kevin P. Fleming
c22eb692a1 minor cleanups and removal of duplicate prototypes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26092 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 14:25:31 +00:00
BJ Weschke
b2f9ab8f75 This app is deprecated in /trunk, and thus, the change should not come forward.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 14:21:33 +00:00
Luigi Rizzo
dee114ccf1 remove duplicate atof() invokation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26055 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 13:55:33 +00:00
Luigi Rizzo
fbba50a613 normalize code, remove some useless casts
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26054 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 13:52:01 +00:00
BJ Weschke
afa37c0194 Merged revisions 26050 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r26050 | bweschke | 2006-05-09 08:28:39 -0500 (Tue, 09 May 2006) | 3 lines

 Correct memory leak in find_user_realtime #7118 (fnordian)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26051 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 13:33:54 +00:00
Kevin P. Fleming
14ddd6c431 use aclocal version 1.9 instead of 1.4 :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26049 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 13:26:50 +00:00
Kevin P. Fleming
151edabd3d ignore some more auto-generated files
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 13:20:52 +00:00
Kevin P. Fleming
51db174809 update to include latest FreeBSD changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 13:19:43 +00:00
Russell Bryant
5ae2942789 add regenerated configure script
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26046 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 13:14:37 +00:00
Luigi Rizzo
92b7543a8e add default values for CPPFLAGS and LDFLAGS on FreeBSD
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26020 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 11:45:26 +00:00
Mark Spencer
9953f4f40e Make SIP early media work more efficiently without so many reinvites
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 11:44:50 +00:00
Luigi Rizzo
66dda468d1 change some log_warning into log_debug
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 11:29:34 +00:00
Luigi Rizzo
b475987295 do not use a variable name that hides a useful library symbol (time())
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26016 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 11:27:33 +00:00
Russell Bryant
10187179fb change the check for zaptel to only check for linux/zaptel.h on Linux, and
zaptel.h otherwise

If you did ./configure --with-tonezone=/usr/local/ on FreeBSD, it would run
the first macro which would not find it, but it wouldn't make it to the second
macro because the first check saw that --with-tonezone was specified and would
exit with error


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 10:43:08 +00:00
Mark Spencer
3135a35b92 Make sure we update parameters correctly with reinvite
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25959 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 09:47:22 +00:00
Mark Spencer
7b902874f3 Oops
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 08:45:37 +00:00
Mark Spencer
db502da870 Make menuselect be able to show what the modules are
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 08:44:50 +00:00
Luigi Rizzo
7afdb70d31 large rewrite of the extension matching code,
prerequisite to implement the specification defined yesterday.

While I have been using this code for months now, the change is large
so expect some instability.

Also the new specification (sorting extension by match length etc.)
is not implemented yet.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25928 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 08:31:42 +00:00
Luigi Rizzo
052191ec65 misc fixups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 08:16:07 +00:00
Kevin P. Fleming
fdc225920f remove API function that was added and never used
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25924 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 08:11:41 +00:00
Luigi Rizzo
6758577d97 remove trailing whitespace
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25914 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 08:03:52 +00:00
Luigi Rizzo
93ad00ef06 mark a couple of dubious pieces of code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 07:51:55 +00:00
Kevin P. Fleming
0569481a5a don't build strcompat for menuselect except on Solaris
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25893 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 07:51:20 +00:00
Luigi Rizzo
865785bffb more code simplifications.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25892 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 07:49:17 +00:00
Russell Bryant
61aaf4dd14 remove a check of the result of ast_mutex_lock
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25891 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 07:28:01 +00:00
Russell Bryant
4120afc28e put all the QUEUE_STRATEGY values in an enum, and use them in all of the places
in the code where the strategy type is checked, to make the code more readable


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 07:27:03 +00:00
Luigi Rizzo
a7c5ce76f6 simplify matchcid()
define struct pbx_find_info for later use



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25861 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 06:17:42 +00:00
Luigi Rizzo
fd45a19ab4 use S_OR where appropriate, comment an unclear difference in format
between CONCISE and VERBOSE



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25860 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 06:14:30 +00:00
Luigi Rizzo
8d12c56f16 more small simplifications
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25856 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 06:04:45 +00:00
Tilghman Lesher
3890d4e813 Bug 7114 - Originate success/failure indicator was reversed
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 06:00:11 +00:00
Tilghman Lesher
308618585e Bug 7009 - use the actual path, so that a table index can be used
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 05:55:44 +00:00
Tilghman Lesher
badac75c18 Bug 6787 - Allow escaping of newline characters for invoking non-Festival TTS systems
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 05:30:05 +00:00
BJ Weschke
3780d4e7dd strategy "ringall" is really int value of 0, not 1.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 00:21:40 +00:00
Tilghman Lesher
a5e16fe676 Warn user if the custom format is not one of the options
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 23:04:19 +00:00
Luigi Rizzo
eb4ba3b888 another function restructured
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 22:53:57 +00:00
Luigi Rizzo
481cde0294 more code restructuring
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 22:47:03 +00:00
Luigi Rizzo
3b5fccac94 remove some common code in parsing function calls
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 22:15:31 +00:00
Luigi Rizzo
a8379be554 more code restructuring
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 22:06:50 +00:00
Luigi Rizzo
3a9bd2a478 restructure a function reducing nesting depth.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 21:49:22 +00:00
Russell Bryant
57d8591989 remove checks of the result of ast_mutex_lock
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25716 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 21:27:47 +00:00
Luigi Rizzo
8a0476c335 fix indentation of a large block.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25715 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 21:09:03 +00:00
Russell Bryant
92fb3ef889 revert a patch that wasn't supposed to be committed ... oops
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 21:07:12 +00:00
Russell Bryant
962d53732a make sure that the MOD_SUBDIR_CFLAGS and OTHER_SUBDIR_FLAGS come before
ASTCFLAGS so that -Iinclude comes before any system include path


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25686 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 21:00:16 +00:00
Russell Bryant
c85b4a1674 on mac, QUAD_MIN and QUAD_MAX are already defined, so this causes a bunch
of warnings


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25684 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 20:50:43 +00:00
Luigi Rizzo
d54ec2ced4 minor code restructuring in preparation for more work.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 20:49:30 +00:00
Tilghman Lesher
9d07a0ffc6 Don't try to build aelparse if pbx_ael is disabled in menuselect (otherwise the build breaks)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 16:47:49 +00:00
Kevin P. Fleming
123134de11 make Makefile slightly less noisy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 16:17:00 +00:00
Luigi Rizzo
123ebb0c99 localize some variables
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 16:14:29 +00:00
Kevin P. Fleming
401ed356e4 commit the proper configure script
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25651 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 16:11:33 +00:00
Kevin P. Fleming
c0762c064d silly people that don't want to install/run autoconf :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 16:02:42 +00:00
Olle Johansson
ca6cf552f9 Add documentation on "allowtransfer"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25614 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 15:46:02 +00:00
Luigi Rizzo
55c6781c9e document th way extensions are sorted
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 15:32:53 +00:00
Olle Johansson
5a31054599 Issue #7103 (mikma)
- Don't send reply on ACK
- use "require" instead of "required" which is an unknown header
 (Partly imported from 1.2)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25612 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 15:31:58 +00:00
Russell Bryant
684df59844 add smarter checking for termcap support, which fixes a build problem when
ncurses is statically compiled with term info support, which is provided in
the statically compiled editline library that we are including. 
(issue #6948, original patch by casper, modified to use the features 
of AST_EXT_LIB)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25611 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 15:24:52 +00:00
Kevin P. Fleming
65fed8480b use a file that configure will _always_ regenerate as the trigger for running the script
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 15:20:00 +00:00
Russell Bryant
f2e3d8279d add TOPDIR_CFLAGS to the CFLAGS before ASTCFLAGS to make sure that -Iinclude
comes before -I/usr/local/include or something similar


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25590 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 15:03:44 +00:00
Olle Johansson
896362d30c - Issue 7101 (mikma) - Don't crash with no From: header in pedantic mode
- Cleanup of get_destination
- Don't call uri_decode twice on the same string if you're in a rush ... :-)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 14:45:28 +00:00
Mark Spencer
4d73c80fa1 Minor cleanup on dtmf calling (bug #7076)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 14:45:18 +00:00
Kevin P. Fleming
b4b36d6b83 remove incorrect Makefile rule that was causing aelparse to be rebuilt unnecessarily
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 14:43:49 +00:00
Kevin P. Fleming
a4e7ae1537 don't let make use implicit rules for bison/flex output files
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 14:34:32 +00:00
BJ Weschke
ff82a8046d Merged revisions 25563 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r25563 | bweschke | 2006-05-08 10:12:20 -0400 (Mon, 08 May 2006) | 3 lines

 Don't show agents as available when they are in wrap-up time.  #6726 (ZX81)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 14:13:43 +00:00
BJ Weschke
571136b80b Block r25522 from coming into /trunk. /trunk uses list macros now and 1.2 doesn't here.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25524 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 13:39:14 +00:00
BJ Weschke
c0186f6b4d Make QueueStatusComplete manager event thread safe by wrapping it inside the already existing Queue Lock clause. #7013 (bziherl reporting)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 13:38:14 +00:00
BJ Weschke
a7f330a2d2 Merged revisions 25520 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r25520 | bweschke | 2006-05-08 09:15:30 -0400 (Mon, 08 May 2006) | 3 lines

 Oops. :(


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 13:16:06 +00:00
BJ Weschke
415dff6f2a Merged revisions 25518 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r25518 | bweschke | 2006-05-08 09:11:32 -0400 (Mon, 08 May 2006) | 3 lines

 Don't recheck valid_exit() after getting the result from say_position (which already checks it). Should prevent another loop if the caller hits digits during the position announcement. #6776 (tgj reporting)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 13:12:39 +00:00
BJ Weschke
569ecaf5a2 use pid_t instead of long for pid variables. #7099 (casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25488 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 12:32:44 +00:00
BJ Weschke
714aab87bb Fix situation for when there is no monitor_option defined, but there is a monitor_exec defined.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25487 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 12:30:46 +00:00
Russell Bryant
03120e00ad use ast_channel_(un)lock
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25450 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 11:30:32 +00:00
Matt O'Gorman
ad825dcd8e added managerevent meetmemute with status on or off.
patch provided by bug 6811, with modifications for api.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 11:26:06 +00:00
Russell Bryant
fb7757440f remove a check of the result from ast_mutex_lock
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 11:26:01 +00:00
Joshua Colp
3fbd46099e Incorrect log statement when playing transfer sounds (issue #7008 reported and fixed by nathan)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25444 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 11:22:00 +00:00
Russell Bryant
0fd612930a - convert the lists of switches to use the linked list macros
- remove some checks of the result of ast_mutex_lock, since it is not necessary
   (this would be a good project to add to the janitor projects list).


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25443 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 11:20:19 +00:00
Matt O'Gorman
05ea5482d0 woohoo asterdevcon first commit, adds feature to
cli for agents, show agents online , patch from bug
7096


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25441 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 11:08:38 +00:00
Russell Bryant
a252d79484 remove an XXX comment
- we can't use ast_true here because non-empty strings would no longer be
   evaluated as true
document the return values of pbx_checkcondition() in doxygen format


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 10:08:20 +00:00
Mark Spencer
4b3832fc87 VIDUPDATE does not matter during playback.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 07:56:42 +00:00
Christian Richter
019f39f614 in PTMP TE we should set the free state for the B-Channel if we ignore an incoming call
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 07:30:28 +00:00
Russell Bryant
ba2451046e add the asterisk copyright header, doxygen header, and tweak the formatting
of the included strsep to match our coding guidelines


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-07 15:19:52 +00:00
Russell Bryant
b7c2ae9dba - use ast_calloc instead of malloc+memset
- conver one malloc to ast_malloc


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25356 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-07 15:19:13 +00:00
BJ Weschke
ed46a313d0 Merged revisions 25322 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r25322 | bweschke | 2006-05-07 09:38:11 -0400 (Sun, 07 May 2006) | 3 lines

 Fix playback behavior to exit correctly when we receive a hangup during playback of the invalid pin message. #7091 (AntD reporting)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25323 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-07 13:39:32 +00:00
BJ Weschke
7e43ace3d8 Merged revisions 25288 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r25288 | bweschke | 2006-05-07 08:48:09 -0400 (Sun, 07 May 2006) | 3 lines

 Reset the value of ast_mainpid if we fork so future remote unix connections display the correct PID. #7098 (tzafrir reporting)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25289 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-07 12:52:08 +00:00
Russell Bryant
7abda7787e various menuselect fixes as a result of boredom during a 9 hour flight and
now a 9 hour layover ...
- If a module is disabled from being built because of failed dependencies or a
  conflict, automatically re-enable the module if the issues are later
  resolved.
- If a module has been disabled by default, only set this value if there is not
  an existing menuselect.makeopts file.  Previously, this value would get reset
  every time you ran menuselect.
- staticize a bunch of functions and variables that aren't public


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-07 12:00:55 +00:00
Mark Spencer
e080c242f1 Minor AJAM fixups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-07 00:04:12 +00:00
BJ Weschke
3e2079e46c Fix output delimiters and add prefix parameter to func_odbc #7025 (Corydon76)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-06 13:36:29 +00:00
Tilghman Lesher
41b1a82a38 Typo fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-06 04:57:40 +00:00
Russell Bryant
1bea4082a2 fix a problem where the frame's data pointer is overwritten by the newly
allocated data buffer before the data can be copied from it.  This is in
the ast_frisolate() function which is rarely used.  (issue #6732, stefankroon)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-06 02:31:22 +00:00
Russell Bryant
cb263ed3ea git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25162 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-05-06 02:26:38 +00:00
Russell Bryant
24ed662549 add Polish language support to Voicemail, with some minor modifications that
include formatting fixes, making it so variables aren't declared in the
middle of a block, and various other little code cleanups
(issue #6970, supczinskib)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-06 02:05:18 +00:00
Russell Bryant
3b43ddac78 Merged revisions 25123 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r25123 | russell | 2006-05-05 20:05:27 -0400 (Fri, 05 May 2006) | 3 lines

ensure that the appropriate manager events are sent in all of the places where
alarms are detected or cleared (issue #6866, flefoll)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-06 00:06:58 +00:00
Russell Bryant
10b4545ac0 modify the handling of the new temporary greeting reminder feature so that
it works for any language


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25096 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 22:57:11 +00:00
Russell Bryant
272de2c394 add support for installing other init scripts, other than just the redhat
version.  (issue #7093, initial patch by froguz, extended by north)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25095 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 22:49:55 +00:00
BJ Weschke
085a4eaa04 Make the "Avoided Initial Deadlock for '....', X retries!" a LOG_DEBUG msg instead of LOG_WARNING as this only has relevance to developers trying to resolve a possible problem. #6949
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25094 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 22:18:07 +00:00
BJ Weschke
d83bd4d136 Integrate the MixMonitor functionality (introduced in 1.2) as an option for recording queue member conversations with callers. #7084
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 22:02:38 +00:00
Russell Bryant
b6ac5b36c6 document the return value of gettag()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25063 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 21:55:25 +00:00
Russell Bryant
e91afbaef1 fix the return value of gettag() to only return the pointer to the provided
tag buffer if the tag was actually found.  There is code that checks to see
if this result is non-zero to determine whether the tag was found or not.
(issue #7092, mikma)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 21:43:06 +00:00
Russell Bryant
5f856ea997 minor code optimizations to reduce the number of times that the ast_frame
and ast_trans_pvt pointers have to be dereferenced (issue #7069, Mithraen)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 21:36:17 +00:00
Russell Bryant
0794168428 add support for having the user reminded that their temporary greeting
is still set (issue #6120, khaefner)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25057 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 21:22:50 +00:00
BJ Weschke
85e0c889e4 Allow for the execution of an AGI to the caller's channel right before they get bridged with the queue member that is going to take their call. Add the option to set a MEMBERINTERFACE variable on the caller's channel that will contain the interface of the queue member that is going to/did take the call. #6843
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25056 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 21:22:45 +00:00
Russell Bryant
4fe3960478 move ast_carefulwrite from manager.c to utils.c so that cli.c and
res_agi.c no longer depend on manager.h (issue #6397, casper)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25026 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 21:01:39 +00:00
BJ Weschke
8917191953 Blocking r25014 from coming into /trunk as the fix was different for /trunk and was already applied earlier. #7064
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 20:52:25 +00:00
Russell Bryant
9ecb116f23 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25016 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-05-05 20:50:28 +00:00
Russell Bryant
e5b6df5769 move ExecIf from app_while.c to app_exec.c (issue #7094, north)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 20:43:16 +00:00
BJ Weschke
a09110c810 Adding documentation about API change approved in order to fix bug(s).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25012 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 20:12:59 +00:00
Joshua Colp
c1649932ec Minor documentation change regarding authentication. (issue #6644)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24982 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 19:20:58 +00:00
BJ Weschke
6ed0af6fc3 Fix 4 bugs in voicemail. #7064 ( supczinskib and jcollie )
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24981 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 19:10:11 +00:00
Russell Bryant
0f8ea8ddca re-add the initialization of the scheduled item's time to 0. I had removed
this because I checked the sched_alloc function to use calloc instead of
malloc, so I thought it was no longer necessary.  However, the sched structures
are cached, and cached values will have the old values in them, so this still
needs to be done.

Also, wrap the scheduler debug code to only happen if option_debug is enabled.
It spits out a ton of output so it's nice to be able to enable/disable it
during runtime.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 18:11:55 +00:00
Russell Bryant
282c5fd214 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24912 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-05-05 17:39:31 +00:00
Russell Bryant
55aab4cfbd convert the list of scheduled items in a scheduler context to use the
list macros.  Also, use ast_calloc instead of malloc in one place


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24910 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 17:09:27 +00:00
Russell Bryant
326afa4900 use ast_malloc instead of malloc
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24880 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 16:46:46 +00:00
Christian Richter
efccf89eae Added option far_alerting. This option makes it possible to generate a Ringing on other channels if they feel that they should have inband ringing, but there is non in reality. I need this due to the fact that asterisk has not the possibility to transmit progress indicators thus chan_sip and others do not know wether they should generate a Rining tone themselves if they receive AST_CONTROL_RINGING..
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24879 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 16:38:15 +00:00
Russell Bryant
816a7cf13b constify the argument to pbx_checkcondition
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24878 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 16:36:43 +00:00
Russell Bryant
53d09cbaf7 oops :)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24876 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 16:34:35 +00:00
Russell Bryant
110a0aa803 Merged revisions 24837 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r24837 | russell | 2006-05-05 10:44:50 -0400 (Fri, 05 May 2006) | 3 lines

use pbx_checkcondition() instead of ast_true() to evaluate the condition
for MacroIf and WhileIf (issue #7086)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24838 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 14:47:22 +00:00
Russell Bryant
f4f7b74655 - formatting fixes
- don't declare a variable in the middle of a block
- keep track of the result of registration functions in load_module()


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 00:43:28 +00:00
BJ Weschke
7a9472f8a4 New manager action SendDTMF #6682 (squinky86)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24776 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-04 21:33:45 +00:00
BJ Weschke
e7b7d41d73 #6991. Take 3. (casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24775 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-04 21:26:04 +00:00
BJ Weschke
53e8e35d79 Another adjustment for #6991 (casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-04 21:02:26 +00:00
BJ Weschke
c8c8164f13 ast_play_and_prepend and ast_play_and_record cleanup #6991 (casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24745 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-04 20:29:13 +00:00
Tilghman Lesher
7734d20eb5 Merged revisions 24706 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r24706 | tilghman | 2006-05-04 11:27:20 -0500 (Thu, 04 May 2006) | 2 lines

Bug 7023 - reload should not unpause members

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24707 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-04 16:38:32 +00:00
BJ Weschke
c037f1abdd Merged revisions 24669 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r24669 | bweschke | 2006-05-04 06:17:13 -0500 (Thu, 04 May 2006) | 3 lines

 Make sure that only the "|" is a recognized delimiter for Verbose(), as the app documentation already specifies. #7080 (alessiof reporting)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24670 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-04 11:24:47 +00:00
Tilghman Lesher
21789c391b Bug 6989 - updates to the ODBC storage mechanism for compatibility with the new res_odbc
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 22:54:02 +00:00
BJ Weschke
326c82e1c4 Fix "o'clock" from being said twice in French. #6900 (casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 22:53:38 +00:00
BJ Weschke
8ce9bec4ce Documentation / whitespace fix.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 22:40:42 +00:00
BJ Weschke
fd7ca09072 Optionally record audio of the page command for re-pages/playback. #6827 (JeffSaxe)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 22:38:56 +00:00
BJ Weschke
76c9d14bb2 Allow channels in ChanSpy to belong to mutiple spygroups #7072 (anthm)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 22:25:08 +00:00
BJ Weschke
a7b1476058 Provide the ability to adjust txgain/rxgain on a channel level via the CHANNEL() function
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24621 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 22:02:50 +00:00
BJ Weschke
282eb80ed4 Correct call parking behavior when there is no courtesytone specified. #6306 (murf)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24605 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 21:39:24 +00:00
BJ Weschke
bdf2a05aa5 Merged revisions 24567 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r24567 | bweschke | 2006-05-03 15:58:10 -0500 (Wed, 03 May 2006) | 3 lines

 Correct application documentation to make users aware that certain options cannot be used in conjunction with others. #6666 (chotaire) 


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 21:11:23 +00:00
BJ Weschke
80c34d2a91 Make sure that callers kicked from queue because of joinempty and leavewhenempty have an event logged with regard to the reason for their departure. #6559 (Corydon76)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 20:47:34 +00:00
BJ Weschke
944c8cc4a6 Log hold time and talktime in queue_log when blind transfers are made by queue members. #7038 (alphaqueue) w/documentation mods added
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 20:31:58 +00:00
BJ Weschke
ebb7eee9ce Implement and document RINGNOANSWER queue logging functionality to "tattle" on bad queue members.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 20:14:54 +00:00
BJ Weschke
7b3f3db65d Fix autofill behavior in app_queue and document it's functionality in queues.conf.sample and UPGRADE.txt
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 20:01:30 +00:00
Russell Bryant
a21507a60a suppress a compiler warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24534 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 19:10:41 +00:00
Russell Bryant
a10d238d6c Merged revisions 24496 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r24496 | russell | 2006-05-03 14:31:20 -0400 (Wed, 03 May 2006) | 6 lines

fix up "make rpm"
- don't reference the gzipped man page, because we don't store them
  compressed anymore
- add some files that currently were not listed
(issue #6837)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24497 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 18:33:10 +00:00
Luigi Rizzo
2d5900391b remove variable declarations in the middle of two blocks.
While at it, normalize the surrounding code.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24495 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 18:22:04 +00:00
Luigi Rizzo
5522238a7e remove useless variables, and argument checks for functions
that can safely handle a NULL argument.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 17:44:30 +00:00
Luigi Rizzo
d7a2c4547b document that ast_cdr_answer is happy with a NULL argument
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 17:37:47 +00:00
Luigi Rizzo
d1caf26728 no point in clearing a local variable just before return
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 17:30:37 +00:00
Luigi Rizzo
b569ebd593 more simplifications
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24460 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 17:07:56 +00:00
Luigi Rizzo
5f612f9ae6 consistent rule for goto...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24431 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 16:58:16 +00:00
Luigi Rizzo
e5b0c721e5 remove another useless nonterminal
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 16:46:55 +00:00
Luigi Rizzo
34d67f7d09 remove a useless nonterminal
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 16:38:50 +00:00
Luigi Rizzo
49227c7ba1 more simplifications
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24428 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 16:37:14 +00:00
Luigi Rizzo
7695df3896 remove more shift-reduce conflicts
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24427 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 16:34:31 +00:00
Luigi Rizzo
820ef22951 remove a redundant rule
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 16:33:00 +00:00
Luigi Rizzo
673607f87a reduce shift/reduce warnings
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 16:28:48 +00:00
Luigi Rizzo
9ebc190fdc simplify case_statements
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 16:12:31 +00:00
Luigi Rizzo
e2e92e49a6 switch statement in one place
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 16:08:35 +00:00
Joshua Colp
b82b277790 Update chan_iax2 to use linkedlists.h for users and peers. Modify the way get_from_jb and expire_registry works to get rid of certain crash scenarios. Finally - change the way expire_registry works when realtime autoclear is enabled to be a bit more efficient.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24422 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 16:07:03 +00:00
Luigi Rizzo
7cc4511fa2 common syntax for context name
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 16:00:49 +00:00
Olle Johansson
9c60f78ea1 Issue #7074 - Problem with long contact lines
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 12:46:29 +00:00
BJ Weschke
094a5b2974 Remove the svnmerge-integrated property accidentally merged in from the func_realtime branch merge last night.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 12:31:26 +00:00
Kevin P. Fleming
0abc9b0bd7 test commit to ensure the server is happy again
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 12:29:39 +00:00
BJ Weschke
a9281a1142 Introducing the REALTIME() dialplan function
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 22:46:12 +00:00
Luigi Rizzo
34dcc89e24 another instance of context name
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 20:50:18 +00:00
Luigi Rizzo
7a625b894d fix a bug previously introduced in the handling of timespec.
Fortunately we have regression tests!



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24343 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 20:44:56 +00:00
Olle Johansson
7bbb6bd3aa - fix typo in rtp.c, devicestate.h
- add information about subscriptions and realtime dial plans in sip.conf.sample


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24342 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 20:31:39 +00:00
Luigi Rizzo
0cf25becb9 simplify case statements
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 20:18:02 +00:00
Luigi Rizzo
05d2b78132 one more instance of assignment
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24340 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 20:13:58 +00:00
Luigi Rizzo
0e8e343e1f global_statement is really an assignment statement
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 20:11:24 +00:00
BJ Weschke
30bb866a42 Make certain ast_stopstream() sets the channel's stream members to NULL after closing them. #7067 (jcomellas)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 20:06:21 +00:00
BJ Weschke
844205f3f9 Don't bring in r24295 into /trunk since it's going to have it's own different patch.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 20:03:35 +00:00
BJ Weschke
857f2e8d41 Record bridge channel unique id in "CONNECT" queue_log entry and the corresponding manager event. #6522 (nording) w/ documentation additions where appropriate
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 19:18:36 +00:00
Luigi Rizzo
b222d1247f expressions used in if, while, switch are all of the same kind
(it remains to see why 'random' gives 16 shift/reduce conflicts...)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24292 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 19:17:49 +00:00
Luigi Rizzo
99dec41a4c macro statements can be empty
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 18:51:33 +00:00
Luigi Rizzo
65b8f8365e empty arglists are valid
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24257 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 18:48:47 +00:00
Luigi Rizzo
3173305448 rename the rule for context names properly
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 18:45:18 +00:00
Luigi Rizzo
9eaa57bebc simplify handling of 'include' lists
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 18:41:57 +00:00
Luigi Rizzo
827abbf46e ... and use a single rule for timespec
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24254 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 18:33:15 +00:00
Luigi Rizzo
7b10b81a58 use a single rule to parse timeranges hh:mm-hh:mm
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24252 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 18:23:41 +00:00
Luigi Rizzo
5c940c74a6 if/ifTime/random statements are all the same thing
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24248 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 18:08:27 +00:00
Luigi Rizzo
16f94523ad includedname is just a regular word_or_default name,
no need for a separate nonterminal


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 17:58:57 +00:00
Luigi Rizzo
df3f8aa2b9 remove useless 'extern' declaration
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 17:37:33 +00:00
Russell Bryant
7c46ef67ad instead of just building local object files for ast_expr2.o and ast_expr2f.o,
actually link to them as well


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 17:17:19 +00:00
Russell Bryant
5c63335486 allow for a non-optimized build that does not get installed
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 17:15:37 +00:00
Luigi Rizzo
5cbf333fee remove some unneeded local variables.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 14:27:19 +00:00
Christian Richter
7f58902bf3 use set_callerid to update callerid with prefix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24177 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 14:26:40 +00:00
Luigi Rizzo
f262d06975 more usage of nword(). I think the references to source
line/columns are also correct now.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 14:25:01 +00:00
Luigi Rizzo
d8e1ad052a more simplifications involving linku1
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 14:12:01 +00:00
Luigi Rizzo
182a536722 correct linku1() to handle the case tail = NULL correctly.
Now the function can be used to simplify other conditional blocks.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 14:08:18 +00:00
Christian Richter
63b0baa757 returning 128 emtpy Frames instead of null frame.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 14:00:37 +00:00
Russell Bryant
0765f065ca staticize the list heads from my recent conversions to list macros
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 04:40:09 +00:00
Russell Bryant
34e0ae0e6a The build of aelparse was still broken in some cases, so instead of having to
keep figuring out workarounds for build issues on various platforms, just go
ahead and remove what started all of this.  Two instances of ast_calloc have
been changed to calloc in pbx/ael/ael.y.

ast_copy_string isn't actually needed here because the only place it is used is
in ast_expr2f.c.  However, the utils Makefile already builds its own
ast_expr2f.o with -DSTANDALONE, which makes it use strncpy instead of
ast_copy_string.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24115 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 03:03:27 +00:00
Tilghman Lesher
6e24fb7a37 Merged revisions 24097 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r24097 | tilghman | 2006-05-01 21:12:52 -0500 (Mon, 01 May 2006) | 2 lines

Prompt does not request '#' to end input, so the application should not require it

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 02:24:58 +00:00
Tilghman Lesher
9be0f34a3e Bug 7062 - Rename ael2 CLI commands to ael
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 22:07:18 +00:00
Tilghman Lesher
aeed5ca05d Merged revisions 24019 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r24019 | tilghman | 2006-05-01 15:44:24 -0500 (Mon, 01 May 2006) | 2 lines

Bug 6864 - drop realtime priority on ALL external processes

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 21:48:30 +00:00
Luigi Rizzo
e635b463fc add missing functions - see the comment in the file explaining
in detail why this is needed and that hopefully this is a
temporary workaround.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24020 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 20:44:26 +00:00
BJ Weschke
7f0cc4786b Merged revisions 23988 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r23988 | bweschke | 2006-05-01 14:34:29 -0500 (Mon, 01 May 2006) | 3 lines

 Correct a condition from the prior patch that could happen in rare circumstances and cause a core dump. Thanks Qwell! 


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 19:35:53 +00:00
BJ Weschke
649052f980 Merged revisions 23985 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r23985 | bweschke | 2006-05-01 14:26:43 -0500 (Mon, 01 May 2006) | 3 lines

 Make sure that when someone 0's out while recording a msg and then chooses to DELETE the recorded file, the .txt file isn't left around by itself to cause problems later. #7061 (dimitripietro reporting, blitzrage confirmed)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 19:32:47 +00:00
Russell Bryant
d2e78c7b35 make sure non-inlined versions of ast_copy_string and _ast_calloc are available
in the cases where they are needed (issue #7054)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23984 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 19:23:43 +00:00
Russell Bryant
b530857eba git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23952 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-05-01 15:13:10 +00:00
Russell Bryant
992e0c1eed - convert the list of dialplan function to the list macros
- add missing locking of the functions list in the "show functions" CLI command


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 15:09:51 +00:00
Russell Bryant
48b812829d remove \n from the end of a couple of synopsis fields
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 14:57:48 +00:00
Kevin P. Fleming
ae685fd1b6 don't put bogus paths like -L/lib into link commands
do the QT check properly


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23897 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 10:34:20 +00:00
Kevin P. Fleming
44b96e9ba6 do the check for VoiceTronix support using C++
set the library/header include parameters properly for the search


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 10:03:44 +00:00
Kevin P. Fleming
523d899f3d do check for ixjuser.h in a way that can actually succeed :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 09:38:32 +00:00
Tilghman Lesher
dfdf6e1f76 Don't return stack pointers from functions (especially since the code will attempt to free() them later)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23854 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 03:58:13 +00:00
Russell Bryant
205d0aa430 convert the applications list to the list macros
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23853 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 03:14:21 +00:00
Russell Bryant
8582a58955 remove an extra newline, none of the other synopsis fields for apps have one
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23852 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 03:02:06 +00:00
Russell Bryant
02eda146ac - convert permission lists to use list macros
- remove unused precachesend and precachereceive variables from dundi_peer

This concludes the visit to pbx_dundi ...


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 01:26:37 +00:00
Russell Bryant
5a60431c29 conver the lists of dundi packets to use the list macros
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 00:56:04 +00:00
Luigi Rizzo
072e1b8a83 move some code used only --with-pri in the proper
conditionally-compiled area.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 00:51:38 +00:00
Russell Bryant
7ce2726c09 - convert the dundi precache list to use the list macros
- change an instance of malloc+memset to ast_calloc


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 00:33:24 +00:00
Luigi Rizzo
c305fb082d more simplifications
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 00:31:47 +00:00
Luigi Rizzo
01360f6440 always trim the trailing ';'
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 00:27:27 +00:00
Luigi Rizzo
33167fc41c comment usage of contexts
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 00:20:11 +00:00
Luigi Rizzo
2c2f7e817b fix dereferencing freed memory
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23795 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 00:02:12 +00:00
Luigi Rizzo
595955ea98 switch a couple of operands.
This gives slightly different results from the previous code
on syntax errors, but it actually makes fewer mistakes so
i think it is an improvement. Additionally, it makes the
code more uniform (the other call of reset_argcount
occurs after LP and not before).
 


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 23:53:22 +00:00
Luigi Rizzo
8faa2e7d44 put back some simplifications, this time really tested
(ael_lex.c manually deleted, runtest passed)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23782 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 23:31:43 +00:00
Luigi Rizzo
db14f6b107 revert ael.flex to the last correct version.
For some reason the makefile did not regenerate the
ael_lex.c file correctly so i was not testing the changes.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23781 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 23:21:49 +00:00
Luigi Rizzo
44f43f9eb1 another small set of simplifications
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 23:04:58 +00:00
Russell Bryant
b992d92742 - convert the lists of dundi_transactions to the list macros
- remove an unused variable, keypending, from the dundi_peer struct


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 23:01:50 +00:00
Luigi Rizzo
c22ef69d1f simplify logic (runtest passed).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23758 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 22:56:41 +00:00
Kevin P. Fleming
f3eaae4593 remove macro defined that is no longer needed
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23737 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 17:53:37 +00:00
Kevin P. Fleming
0adfa8c635 use proper method of detecting OSS support on Linux and FreeBSD
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23736 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 17:49:50 +00:00
Kevin P. Fleming
70a2a3eaba remove remaining MFC/R2 stuff
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 17:25:01 +00:00
Kevin P. Fleming
51382b3712 Merged revisions 23705 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r23705 | kpfleming | 2006-04-30 10:46:22 -0500 (Sun, 30 Apr 2006) | 2 lines

remove a pointless comparison, since the buffer is smaller than the length being checked for

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 15:48:56 +00:00
Russell Bryant
48c659cf0e fix a libtonezone detection issue on FreeBSD
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 15:29:38 +00:00
Kevin P. Fleming
eb38f13a2e add a command-line flag and option to force forking, even with -v or -d
rename a flag to have the proper name


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 14:55:05 +00:00
Kevin P. Fleming
d7aead737d Merged revisions 23673 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r23673 | kpfleming | 2006-04-30 09:27:56 -0500 (Sun, 30 Apr 2006) | 2 lines

allow top-level OPTIMIZE setting to affect builds in these subdirectories too

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 14:28:25 +00:00
Russell Bryant
367f227d89 fix up the app_rpt.o target. oops! (Thanks to Denis Smirnov on the -dev list)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23672 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 14:12:14 +00:00
Kevin P. Fleming
4ebb58b3e2 document the removal of MFC/R2 support
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23671 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 14:10:48 +00:00
Kevin P. Fleming
26753f77b0 remove unusable MFC/R2 support
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23670 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 14:09:13 +00:00
Luigi Rizzo
85480376f7 more nword() usages, and mark some dubious places.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23669 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 14:06:04 +00:00
Luigi Rizzo
f239ec2080 introduce a new frontend to npval for the very common case
of creating an object for a tring value PV_WORD.
Start using it.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 13:57:08 +00:00
Kevin P. Fleming
44c5e823e6 Merged revisions 23638 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r23638 | kpfleming | 2006-04-30 08:55:59 -0500 (Sun, 30 Apr 2006) | 2 lines

let the compiler determine whether hardware or software floating point should be used (like we do in the editline subdirectory)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 13:56:37 +00:00
Kevin P. Fleming
1a979290a0 Merged revisions 23636 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r23636 | kpfleming | 2006-04-30 08:38:22 -0500 (Sun, 30 Apr 2006) | 4 lines

remove extraneous -m64 flag that is not needed
(these are coming from Debian patches <G>)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 13:39:49 +00:00
Luigi Rizzo
5e746bf38f another client for switchlist_block
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23615 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 12:46:15 +00:00
Luigi Rizzo
813f565de7 more merge of common blocks through intermediate rules.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23614 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 12:44:54 +00:00
Luigi Rizzo
f4b05f86cc make destroy_pval able to handle a NULL value
(the warning should be removed);
define a 'elements_block' rule to simplify some other rules
removing duplicated code - runtests seems happy with this.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 12:30:08 +00:00
Luigi Rizzo
ce05a548c3 remove some commented-out code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23612 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 12:14:33 +00:00
Luigi Rizzo
36a26a9197 simplify updating the token position markers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23611 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 12:12:39 +00:00
Kevin P. Fleming
7343d311f1 simplify CFLAGS handling for subdirectories
don't put paths into the include search path when they are not needed
don't auto-rebuild the AEL bison/flex output based on make dependencies (the generated files are already checked in, and the timestamps generated by a checkout will usually cause them to be overwritten)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 11:40:06 +00:00
Kevin P. Fleming
6ec91a102c Merged revisions 23580 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r23580 | kpfleming | 2006-04-30 06:19:04 -0500 (Sun, 30 Apr 2006) | 2 lines

ensure that the script output is correctly generated when the system's character set does not use the English lowercase/uppercase character groups

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 11:20:09 +00:00
Luigi Rizzo
c5f779d0a0 more comments
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 09:24:04 +00:00
Luigi Rizzo
9a8a037250 comment some code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 09:06:28 +00:00
Kevin P. Fleming
8e9058679a remove T38_SUPPORT define that is no longer needed
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 08:47:47 +00:00
Luigi Rizzo
2dd3d523d3 when compiling ast_expr2 from utils/ the current directory
is utils/ so the compiler fails to find the header which is in ../
(at least on FreeBSD; this works on linux but it may be due to
differences in gmake).
For the time being, fix it by adding -I.. to the includes.
However i think a proper fix is to make sure that ast_expr2
is built using the rules in the top-level makefile instead
of those in the subdirectory.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 08:35:49 +00:00
Luigi Rizzo
6eb6343d9a more simplifications in the bison sources,
more annotation with XXX of dubious code.
(The code still passes tests)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23534 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 08:21:46 +00:00
Kevin P. Fleming
1669a4b321 remove attribute checking... it was an attempt to support older GCC compilers but is not worth the effort :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 06:50:53 +00:00
Russell Bryant
31cd56f76e remove unneeded define - it is already in asterisk.h
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23494 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 05:27:57 +00:00
Russell Bryant
03d005e472 convert the dundi_request list to use the list macros
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 05:24:10 +00:00
Russell Bryant
dbbe944da8 convert existing comments to doxygen format
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23492 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 05:15:53 +00:00
Russell Bryant
149e45924a fix indentation for this function
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23491 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 05:09:34 +00:00
Russell Bryant
fcb2809e45 immediately handle ast_strdupa result so that one more level of indentation
can be removed from this function


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 05:07:52 +00:00
Russell Bryant
ef775bbd66 fix the indentation of a large block
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 05:06:14 +00:00
Russell Bryant
ed320702d9 handle a memory allocation failure immediately so the following large block
does not have to be indented


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23480 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 05:02:07 +00:00
Russell Bryant
4cfcacf6c9 - convert the list of dundi mappings to use the list macros
- change an instance of malloc+memset to use ast_calloc, instead


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23468 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 04:59:36 +00:00
Russell Bryant
9109371f7d use the INSTALL variable instead of "install" directly
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23467 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 04:34:04 +00:00
Russell Bryant
d9fa5f3c89 change a list traversal to use a for loop
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 04:28:47 +00:00
Russell Bryant
c7fea723a3 fix the indentation of a large block of code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 04:26:11 +00:00
Russell Bryant
059f0bd108 immediately handle a memory allocation failure so the rest of the function
doesn't have to be indented (indentation still to be fixed)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 04:23:09 +00:00
Russell Bryant
d66de679d9 - convert some comments to doxygen format
- convert the list of dundi peers to use the list macros
- convert a use of malloc+memset to use ast_calloc


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 04:20:20 +00:00
Christian Richter
835dfe67b3 added an up-queue message mechanism to avoid buffer fillups in the kernel, also changed some strdups to ast_strdupa
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23443 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29 22:56:00 +00:00
Russell Bryant
b97d58024e revert the last change to this Makefile which removed the rules to build
app_apt.  These rules *are* needed beacause this module uses libtonezone,
so it needs this information from autoconf in case it is located in a
non-standard location.  Also, without it, app_rpt.so would not be linked
with libtonezone at all.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23422 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29 19:26:53 +00:00
Luigi Rizzo
28efe8a845 remove now useless rule for app_rpt (bug 7059)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23402 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29 18:22:08 +00:00
Russell Bryant
fcfd663049 oops, i modified the Makefile isntead of Makefile.in
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29 15:44:02 +00:00
Russell Bryant
1d22a653d8 - the configure script should never be regenerated for mxml
- also remove an unneeded .cvsignore


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23381 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29 15:34:33 +00:00
Kevin P. Fleming
3878a2a9fb and now with the correct filenames
add basic support for checking for C compiler attribute support


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29 15:31:45 +00:00
Kevin P. Fleming
24f241bc72 add the other two files that should have been on this target... oops
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29 15:15:21 +00:00
Russell Bryant
2d2b4aaba5 add aelparse to svn:ignore
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29 15:07:16 +00:00
Russell Bryant
8085f4e14b a bunch of conversion to ast_channel_*lock (issue #7058)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29 14:50:18 +00:00
Kevin P. Fleming
54d6194340 fix up dependencies for aelparse so that bison/flex will not be run to rebuild source files (that should _only_ be done manually)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23354 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29 14:48:32 +00:00
Russell Bryant
1209c0ea58 if the "action-if-found" is left empty, AC_CHECK_LIB will add a default result
instead which can break things in the rest of the script (issue #7043)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29 13:32:38 +00:00
Russell Bryant
00f9884604 - convert lists to use linked list macros
- instead of allocating a frame on the stack every time the music on hold
  generator is called, put a frame in the mohdata structure.  Also, initialize
  the parts of the frame that will never change when the mohdata struct is
  allocatted and only change the necessary parts in the generator function.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23334 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29 13:15:05 +00:00
Kevin P. Fleming
379e426b25 Merged revisions 23305 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r23305 | kpfleming | 2006-04-29 06:40:04 -0500 (Sat, 29 Apr 2006) | 3 lines

do installation in subdirs as a separate target (so external modules can use the Makefile more easily)
generate final messages -after- running any post-install script that may be present

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29 11:42:31 +00:00
Russell Bryant
711f35fdc3 - don't create duplicate log messages
- note when the data part of the tech/data pair is missing not only when using
  the app version, but the exten version as well
- instead of logging syntax errors, just output them to the CLI


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29 05:02:17 +00:00
Luigi Rizzo
532e552c1f add reload() (bug 9981)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29 04:55:47 +00:00
Luigi Rizzo
96e015a239 partial adaptation to the new module loading
(not sure if it compiles, partly inspired by #9981 but
with adaptations)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29 04:54:05 +00:00
Russell Bryant
8682a7378d add a small optimization for deleting all the members of a list
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23271 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29 04:13:07 +00:00
Russell Bryant
f461c5d160 - convert the list of zones to use the list macros, and add locking (issue #7027, with mods)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23250 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29 01:05:13 +00:00
Russell Bryant
6cdf51f58f move the "show version" CLI command from cli.c to asterisk.c so that only one
file depends on version.h, and thus, only one file has to be rebuilt when
version.h gets regenerated (issue #6942)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29 00:15:28 +00:00
Russell Bryant
e5b5dce811 support "make distclean" as well as "make dist-clean" for the picky people
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23208 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-28 17:39:54 +00:00
Russell Bryant
9b1bff6379 fix spelling typo -- what's a Diaplan?
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-28 17:17:46 +00:00
Russell Bryant
d649d03170 fix sending the group numbers for a sip peer over the manager interface
(issue #7046)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-28 16:50:32 +00:00
Russell Bryant
c38fbd246e note that group assignments must be from 0 to 63 (issue #7048)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23177 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-28 16:42:42 +00:00
Luigi Rizzo
8d46a41cb0 whitespace - format the source in a more readable way;
On passing, define the macros as do {... } while (0) to
be free of unwanted side effects.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-28 16:39:25 +00:00
Luigi Rizzo
c7a892d5f9 make the 'runtest' filter less strict on line numbers.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-28 15:51:31 +00:00
Luigi Rizzo
d30ead1474 simplify handling of line numbers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-28 15:42:13 +00:00
Luigi Rizzo
dad2812867 fix last known bug in computing columb numbers in error messages
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-28 15:33:05 +00:00
Luigi Rizzo
c1366df3d5 fix a bug in computing line numbers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-28 15:24:30 +00:00
Luigi Rizzo
799126216e - fix miscalculation in column numbers when multiple tabs
or empty lines are involved;
- change linku1() to return the head of the list (unused at the moment);
- ignore the source line number in runtests as they change with the
  source and cause mismatches in the comparison with the reference output.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-28 14:17:03 +00:00
Luigi Rizzo
43bfe82828 last batch of npval -> npval2 changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-28 11:20:21 +00:00
Luigi Rizzo
5291b89f30 more npval -> npval2 changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-28 10:06:10 +00:00
Luigi Rizzo
899cdda8cb minor cleanup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-28 06:40:40 +00:00
Luigi Rizzo
c9816d135d more npval -> npval2 conversions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-28 06:26:27 +00:00
Russell Bryant
9a77832583 remove this option for now, because it can only be enabled when
optimizations aren't being used


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-28 00:59:30 +00:00
Russell Bryant
a4bb5dbd08 add STACK_BACKTRACES to the CFLAGS selectable in menuselect
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23012 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 21:26:24 +00:00
Luigi Rizzo
304fbbd1b6 fix destructor for pval objects (thanks to Steve Murphy);
rearrange initial part of ael.flex for flexibility.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23011 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 21:09:52 +00:00
Russell Bryant
bfcab55f49 when doing the checks necessary for chan_phone, look for all of the linux
headers it uses, not just ixjuser.h (issue #7049, different fix)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 20:34:48 +00:00
Luigi Rizzo
85ea0974f8 always call the destructor
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 20:23:49 +00:00
Luigi Rizzo
456e27b453 document variable and options used.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 20:08:42 +00:00
Luigi Rizzo
810e701b1e document options, move objects of the same type close to
each other so it is evident what they are.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 19:51:59 +00:00
Luigi Rizzo
9033ecfaa2 slightly restructure a block to reduce nesting,
mark some missing error checks



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 19:29:14 +00:00
Joshua Colp
c88294aba0 Blocked revisions 22954 via svnmerge
........
r22954 | file | 2006-04-27 16:11:47 -0300 (Thu, 27 Apr 2006) | 2 lines

Queue(somequeue,,,,) -> interpreted as Queue(somequeue,,,,0) (issue #7044 reported nathan fixed by jsmith - sort of)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22956 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 19:14:59 +00:00
Luigi Rizzo
f0d3175793 imore npval -> npval2 conversions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 19:14:07 +00:00
Matt O'Gorman
89673ff2a1 dont free unallocated block ,and dont close a fd
we never opened. bug #7045


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 18:57:45 +00:00
Matt O'Gorman
d830dbabf8 allows for chan_zap to have all channels reloaded
via zap restart patch from bug 6955


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 18:53:47 +00:00
Joshua Colp
bffe7b29ec Add option 'I' which allows you to record your name, but not review it. This rocks! (issue #7037 reported by jon with minor mods done by moi)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22931 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 18:51:45 +00:00
Luigi Rizzo
cbbcc2047c more npval2 replacement, mark XXX dubious arguments
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 18:26:37 +00:00
Luigi Rizzo
5c34366afc more npval -> npval2 replacement, and a fix for a likely
bug (marked XXX)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 18:18:12 +00:00
Luigi Rizzo
dadafb65cf introduce a simplified interface for npval and start using it
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22928 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 18:09:20 +00:00
Luigi Rizzo
54616839d7 formatting fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22906 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 17:59:09 +00:00
Joshua Colp
6016d3703d Change channel locking to API, nifty janitor project. (issue #7039 reported by Mithraen)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 17:53:52 +00:00
Russell Bryant
3f0d9eeed0 - add missing IXJUSER to menuselect-deps.in
- don't check for a private function when looking for nbs
- fix the path to ixjuser.h


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 17:52:12 +00:00
Luigi Rizzo
776a3da1a7 use ast_calloc for memory allocations
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 17:43:49 +00:00
Luigi Rizzo
73ea5316b5 fix a couple of bugs in arguments to npval
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22902 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 17:39:55 +00:00
Luigi Rizzo
b37af2f16c remove some commented-out code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 17:16:41 +00:00
Luigi Rizzo
a5fdd0d6b0 finish packing yylloc into macros
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 17:10:15 +00:00
Luigi Rizzo
e51725d6d4 add some comments to the code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 17:00:09 +00:00
Luigi Rizzo
7422c5495b more formatting cleanup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 16:40:25 +00:00
Matthew Fredrickson
173e8b14cd Make sure we use the correct event type when we're moving channels around :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 16:20:39 +00:00
Luigi Rizzo
5591294c5e more dup removal
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 11:43:34 +00:00
Luigi Rizzo
98d769c7c0 more duplicate removal
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22843 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 11:34:44 +00:00
Luigi Rizzo
ef8f9a28a3 remove duplicated code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 11:20:26 +00:00
Luigi Rizzo
53715e59cf staticize c_prevword()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 10:13:39 +00:00
Luigi Rizzo
073391cc63 more indentation fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 08:37:40 +00:00
Luigi Rizzo
20314914e8 use asprintf instead of malloc
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 08:31:18 +00:00
Luigi Rizzo
f7e55f9a47 more formatting cleanup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22796 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 08:24:00 +00:00
Christian Richter
0b6bd0073b put the default misdn.trace to /var/log/asterisk/misdn.log for better integration of existing log structure
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22795 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 08:23:53 +00:00
Luigi Rizzo
c740982bef more indentation fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 06:44:38 +00:00
Luigi Rizzo
6c8c83c106 more formatting cleanup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 02:29:32 +00:00
Luigi Rizzo
c081c8bdf7 cleanup formatting to emphsize common code blocks
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22730 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 02:00:35 +00:00
Luigi Rizzo
a8995c0bfd move similar blocks close to each other to make similarities
more evident



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22727 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 01:35:52 +00:00
Luigi Rizzo
e7d6df39d0 normalize and simplify the code for keeping track of line and column number.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 01:27:07 +00:00
Luigi Rizzo
2d33128385 define some flex constants for character sets.
partly fix indentation and normalize code layout.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 01:07:24 +00:00
Russell Bryant
74aecc640b only define HAVE_SOMELIB if somelib's header file was found as well
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 00:10:56 +00:00
Luigi Rizzo
d19f767c3c uncomment some functions in the flex code that were actually
used in the bison code - detected by making aelparse compile
again.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22702 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 00:05:05 +00:00
Luigi Rizzo
a857016551 use \t to indicate a tab, and fix indentation for
the whitespace-handling rules



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-26 23:36:05 +00:00
Luigi Rizzo
f52022fc6f remove common blocks of code with a macro (waiting for a better
solution).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22679 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-26 23:18:03 +00:00
Luigi Rizzo
df5635d844 staticize some variables
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-26 23:08:47 +00:00
Luigi Rizzo
e141352fd9 comment behaviour of pbcwhere in preparation for its use
in more places.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-26 22:56:18 +00:00
Luigi Rizzo
2904c6956d remove unused variable
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-26 22:45:37 +00:00
Luigi Rizzo
aaf99191c8 include/asterisk/ael_structs.h:
- protect against multiple includes of ael_structs.h
  - remove prototypes for unused or undeclared functions

pbx/ael/ael.y
  - staticize functions as appropriate
  - constify arguments
  - remove useless extern

pbx/ael/ael.flex
  - ifdef out unused functions

pbx/pbx_ael.c
  - constify some variables and arguments
  - ifdef out unused functions
  - staticize functions as appropriate

update generated files accordingly 



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-26 22:41:16 +00:00
Matt O'Gorman
7212fa80ad adds new function QUEUE_WAITING_COUNT and a few
warnings if the queue you are looking for in this 
function and other queue functions is not found.
patch from 7036


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-26 22:04:42 +00:00
Matt O'Gorman
6fd00ee7ec more janitor work, patch from bug 6975.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-26 21:44:25 +00:00
Matt O'Gorman
367de1a73d Merged revisions 22596 via svnmerge from
https://svn.digium.com/svn/asterisk/branches/1.2

........
r22596 | mogorman | 2006-04-26 14:18:55 -0500 (Wed, 26 Apr 2006) | 3 lines

do not allow for users to forward voicemail to
themselves, patch from 7001

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-26 19:22:55 +00:00
Matt O'Gorman
d5892657fe adds two new applications, exitwhile, and continuewhile
patch from bug 6994.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-26 18:49:07 +00:00
Luigi Rizzo
55a24ef8cc whitespace-only change:
partly fix indentation/formatting of the bison source,
and of the generated file



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22572 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-26 18:43:29 +00:00
Luigi Rizzo
2de9dcb345 whitespace-only change:
fix formatting and indentation of the flex file,
and regenerate the ael_lex.c



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22571 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-26 18:40:09 +00:00
Christian Richter
2bde492ea9 Facility decoding doesn't work proper yet
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22549 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-26 14:51:32 +00:00
Russell Bryant
c2d851de2b add the missing prototype for the included asprintf
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22526 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-26 13:18:32 +00:00
Russell Bryant
046375190a another Solaris compatability fix - this makes sure u_int64_t is defined
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22504 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-26 02:16:30 +00:00
Tilghman Lesher
823f464a5a Bug 7032 - Remove deprecated use of ${CALLERIDNUM}
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-25 22:38:31 +00:00
Russell Bryant
c9d5466773 AEL is no longer considered experimental :)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22460 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-25 20:51:55 +00:00
Kevin P. Fleming
dcccc2ed71 don't rely on default search paths for finding local include files
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22438 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-25 18:29:02 +00:00
Russell Bryant
5b6e2d16e3 if an external library is found, but the associated header file is not, just
move on without including support for this library.  However, if --with-lib
is explicitly specified, then error out noting the situation.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22415 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-25 17:22:38 +00:00
Luigi Rizzo
36807ad092 wrong path in include file.
Maybe it compiled on some platform because of extra -I
statements in the Makefiles.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-25 17:08:41 +00:00
Luigi Rizzo
d85048d692 fix variable declaration in the middle of a block
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-25 17:06:37 +00:00
Russell Bryant
e7dfb41cce don't list strcompat.o as a dependency in the build_tools Makefile. It is
already listed in the target in the main Makefile.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-25 13:45:43 +00:00
Russell Bryant
68835cd455 remove a bashism ...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-25 06:07:43 +00:00
Russell Bryant
e386a192ee apparently some systems may have ncurses that doesn't provide backwards compat
with curses.  So, check for both and use whatever is found


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-25 05:53:58 +00:00
Russell Bryant
7918a7a1fd another little Solaris fix, unset LIBS before building libmxml
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-25 05:35:11 +00:00
Russell Bryant
5267a6e6a2 menuselect needs strcompat.o for strsep on Solaris
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-25 05:26:02 +00:00
Russell Bryant
ed2918cfd1 check for automake before aclocal, so that the error message says automake
is missing instead of aclocal, since that's where aclocal comes from


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-24 21:32:41 +00:00
Tilghman Lesher
b2d355d07f Move clueful 'h' more central; alias ESC to left arrow and make ESC quit on main menu
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22308 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-24 20:01:14 +00:00
Russell Bryant
72f2bf8135 add a note indicating that you can press 'h' for help
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-24 19:15:43 +00:00
Russell Bryant
73e6f89994 remove properties added as a part of the AEL merge
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-24 18:47:05 +00:00
Russell Bryant
7b6a016c07 remove some files we don't need
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-24 18:41:44 +00:00
Kevin P. Fleming
5f58cc8770 Merge Steve Murphy's (murf) complete re-implementation of AEL, which is now no longer considered experimental :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-24 17:41:27 +00:00
Russell Bryant
bc50c527f8 print a message before running the autotools
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-24 17:34:35 +00:00
Russell Bryant
d255a98243 fix kevin's silly typos
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-24 17:24:03 +00:00
Tilghman Lesher
e3f569532f Deprecate prefixed options in voicemail
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-24 17:20:41 +00:00
Kevin P. Fleming
574e14cbea Thanks to the fine work of Russell Bryant and Dancho Lazarov, we now have autoconf and menuselect tools for Asterisk!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-24 17:11:45 +00:00
Mark Spencer
746c984500 Fix CDR builds when includes are in freetds directory off include
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-24 03:40:12 +00:00
Tilghman Lesher
dc8bc37d76 Bug 6710 - Move default datetime string to each language function, so each language can have its own default
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22201 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-23 15:26:55 +00:00
Olle Johansson
5873462c2e - Add doxygen documentation for sipsock_read locking
- Improve documentation of pedantic
  (related to issue #7016)

  From the air above Russia...


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-23 06:22:29 +00:00
Jim Dixon
a83297d85f Added "Operator Services" connection mode for Zap channels, and the 'O' option
in app_dial to support the use of this mode.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22128 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-22 11:30:06 +00:00
Luigi Rizzo
b560433a36 convert to use ast_stream_and_wait
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 20:57:29 +00:00
Luigi Rizzo
d4eea1066b convert to use ast_strem_and_wait
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 20:51:55 +00:00
Luigi Rizzo
e48275fea3 convert to use ast_stream_and_wait
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 20:39:50 +00:00
Luigi Rizzo
7e0d402e88 move wait_and_stream to ast_wait_and_stream() because equivalent
code is replicated in way too many places not to have a global
function for that.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 20:28:32 +00:00
Luigi Rizzo
5fa0dc4316 more stncpy/ast_copy_string replacement.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22046 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 18:34:38 +00:00
Luigi Rizzo
11551079cf more strncpy/ast_copy_string replacement.
On passing, simplify code by using strsep() as appropriate



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 18:26:54 +00:00
Luigi Rizzo
66c4068149 more strncpy/ast_copy_string replacement
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 18:13:21 +00:00
Luigi Rizzo
8a63187145 replace some strncpy with ast_copy string,
on passing fix some potential null pointer dereference,
and normalize some loops



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22043 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 18:08:57 +00:00
Luigi Rizzo
5928df2a48 replace strncpy with ast_copy_string.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22016 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 17:53:39 +00:00
Luigi Rizzo
491c64457a replace strncpy with ast_copy_string and fix the -1 offset which
is not needed now.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22015 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 17:47:44 +00:00
Luigi Rizzo
23c6d5eff8 comment a possible memory leak
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 16:18:12 +00:00
Luigi Rizzo
6553aa3a36 merge some common code into a function
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21986 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 16:04:25 +00:00
Luigi Rizzo
68730ba487 update configuration, generalize date format and
start mapping digit strings



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21960 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 15:49:14 +00:00
Luigi Rizzo
0dbf814a79 - use symbolic constants and macros to play with the debug flag
on the frame counters. Document it in the header file.
- provide a single exit point for a function;
- mark XXX some unclear parts of the code.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 14:49:21 +00:00
Luigi Rizzo
e61e34e8a1 simplify pbx_builtin_execiftime
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21906 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 13:44:15 +00:00
Luigi Rizzo
a702e1f001 simplify a function
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21879 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 12:58:39 +00:00
Luigi Rizzo
97d1c9a3c6 minor cleanup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21878 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 12:12:42 +00:00
Luigi Rizzo
eb6dca850d one more client for find_context_locked()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 11:30:02 +00:00
Luigi Rizzo
73c8b06dcc localize a variable, and make a minor code rearrangement.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 11:19:48 +00:00
Luigi Rizzo
b5e6162359 more NULL "" equivalence in cid fields.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 11:05:54 +00:00
Luigi Rizzo
7ecc442d77 more NULL "" equivalence in cid fields.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21835 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 11:02:28 +00:00
Luigi Rizzo
1a6572c4e6 more NULL "" equivalence,
mark a couple of inconsistencies (missing CallerIDnum,
"unknown" instead of "<unknown>") - there are more of the same.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 10:57:03 +00:00
Luigi Rizzo
652ccf5037 more NULL "" equivalence in CLI fields.
Mark a place where we don't clear a buffer while we probably should.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 10:51:31 +00:00
Luigi Rizzo
4cef4ef720 more NULL / "" equivalence for CID fields.
Mark an inconsistency in empty string handling.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21819 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 10:47:07 +00:00
Luigi Rizzo
965ff42bed more NULL "" equivalence in CID fields.
Mark a potentially missing item in managerevent



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 10:41:13 +00:00
Luigi Rizzo
ef619f6dd8 ast_strdup can handle NULL args well, so use it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 10:37:59 +00:00
Luigi Rizzo
7d9c26dfea more NULL and "" equivalence in cid fields
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21816 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 10:31:23 +00:00
Luigi Rizzo
309f16bd07 make NULL and "" equivalent in cid fields, mark some missing NULL checks.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21814 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 10:05:45 +00:00
Luigi Rizzo
91df5c2e62 make NULL and "" equivalent for some cid fields.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 10:00:58 +00:00
Luigi Rizzo
2d0ff2cf1a Replace three replicas of the same code with a function.
Consider NULL and "" as equivalent in cid strings.

On passing, also remove an extra data copy.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 09:54:23 +00:00
Luigi Rizzo
08220b9073 comment that for callerid field, NULL and "" should be considered
equivalent (the reason is, when passing these strings through a
statically allocated buffer, we have no way to tell between NULL and ""
so we would be unable to preserve the difference, if any).

No code changes yet.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21743 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-20 17:39:44 +00:00
Olle Johansson
6149e82b6c Clarify result of sipsock_read
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21707 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 23:49:36 +00:00
Russell Bryant
d722e66e07 add the malloc attribute to the memory allocation wrappers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21681 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 22:32:07 +00:00
Kevin P. Fleming
2af019970f Merged revisions 21638 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r21638 | kpfleming | 2006-04-19 16:10:41 -0500 (Wed, 19 Apr 2006) | 2 lines

support system-specific scripts in safe_asterisk, before starting Asterisk proper

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 21:11:31 +00:00
Tilghman Lesher
efc4a4708c Merged revisions 21597 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r21597 | tilghman | 2006-04-19 13:43:17 -0500 (Wed, 19 Apr 2006) | 2 lines

Bug 6553 - plug memory leaks when ODBC connection is down

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 18:56:38 +00:00
Tilghman Lesher
493c71f3f7 Oops, wasn't revised the way I thought it was
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21599 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 18:50:51 +00:00
Tilghman Lesher
1522635e0e Blocked revisions 21597 via svnmerge
........
r21597 | tilghman | 2006-04-19 13:43:17 -0500 (Wed, 19 Apr 2006) | 2 lines

Bug 6553 - plug memory leaks when ODBC connection is down

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21598 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 18:44:58 +00:00
Luigi Rizzo
b9f3e4e0f3 move a replicated block of code in the one place where it belongs.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 18:15:20 +00:00
Luigi Rizzo
bd01d66909 merge two nested 'if' which are really a single block.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 18:07:19 +00:00
Luigi Rizzo
9476cb356e fix indentation of a large block
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21572 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 18:00:32 +00:00
Luigi Rizzo
501c9e181c start sorting out the duplicated code in the privacy handler
for future removal



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 17:58:07 +00:00
Luigi Rizzo
b3343aecdf merge two nested 'if' which are really a single block.
(indentation still to be fixed)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 17:29:15 +00:00
Luigi Rizzo
73f2d344fb more localization and variable removal
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 16:54:04 +00:00
Luigi Rizzo
c9f669e56d more localization of variables
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21537 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 16:36:15 +00:00
Luigi Rizzo
c6a8784e95 localize one more variable;
use ast_strdup as it can handle the NULL argument well.
mark a dubious piece of code with XXX



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 16:19:52 +00:00
Luigi Rizzo
0f4a1bc9ac localize some variables
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 16:10:11 +00:00
Luigi Rizzo
2bdcaa4849 extract a common condition.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 15:15:03 +00:00
Luigi Rizzo
25eb0525d9 fix indentation of some large blocks after previous changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21481 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 14:53:18 +00:00
Luigi Rizzo
25c6ab22f9 more simplifications - use a local variable c instead of o->chan,
use S_OR as appropriate.

Still need to fix the indentation of some blocks.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21480 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 14:50:17 +00:00
Luigi Rizzo
acf0f038dc more simplifications
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 14:14:40 +00:00
Luigi Rizzo
3aaaa41609 start cleaning up this code so we can split the 900 lines function
into manageable chunks.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21468 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 14:02:49 +00:00
Luigi Rizzo
2745be5b26 support 'languageprefix' in asterisk.conf to modify the algorithm
to build pathnames for language-specific files (see file.c for
a description)

Default, of course, to the standard behaviour.

We don't have an asterisk.conf.sample to put an example of use!



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 13:59:34 +00:00
Luigi Rizzo
d93234c25b add experimental code for new-style "say" application.
The rules for spelling out numbers and dates are in the config
file "say.conf", which can be edited to implement national
or even local language rules.

The new code can be enabled through the cli command
'say load new'
while the old code can be restored with
'say load old'

Eventually, this code should go to a better place,
but for the time being we keep here as it provides
very similar functions.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 10:27:31 +00:00
Luigi Rizzo
64fbe4cbc5 add example syntax for new-style number and date spelling
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21420 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 10:21:58 +00:00
Luigi Rizzo
da7721169d one more client for find_context_locked(),
plus a few minor fixes.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 09:31:41 +00:00
Luigi Rizzo
065367db37 use a function, set_ext_pri(), to assign extension and priority.
On passing, fix a bug in __ast_pbx_run() where the wrong priority
was used in a call to ast_exists_extension() (see comment in the code).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 09:18:30 +00:00
Luigi Rizzo
91b441abdf replace repeated code to walk contexts with a function,
find_context_locked()



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 08:52:15 +00:00
Luigi Rizzo
585e50fb38 move to a different file (channel.c for the time being) the
wrappers around the basic 'say' functions, and redeclare these
wrappers as ordinary functions rather than function pointers.

This way, alternative implementations of the 'say' functions
will only have to implement the basic functions and not the
wrappers.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 07:23:22 +00:00
Luigi Rizzo
52430bda0d - use ast_calloc instead of ast_malloc
- use ast_channel_lock/unlock in a few places
- comment some dubious pieces of code
- use memset to zero a buffer



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 06:58:20 +00:00
Olle Johansson
4403905c2d Add reference to RFC for mailbox notification
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 00:45:37 +00:00
Olle Johansson
d0f254ef61 Cosmetic fixes to code...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 00:04:03 +00:00
Kevin P. Fleming
cc2fb34bb3 fix obvious breakage
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 23:50:59 +00:00
Kevin P. Fleming
bcecc3d863 doh! don't double-increment the bracket count for embedded references
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21236 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 23:25:22 +00:00
Kevin P. Fleming
c87f4bd7a8 don't ignore left-curly-braces when searching for the end of a variable/function reference; match them up with right-curly-braces so we choose the proper brace to end the reference (will still fail to parse properly if the reference contains unbalanced braces)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 23:24:02 +00:00
Kevin P. Fleming
d85073dc1f correct array index calculation (thanks mtaht3!)
update header file comments to reflect new usage of structure field


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 21:39:20 +00:00
Russell Bryant
501ac5189c update res_odbc to support pooled connections
(from tilghman's developer branch, res_odbc_rewrite)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 18:16:32 +00:00
Olle Johansson
fc2d28805b - call parking improvements (part of the siptransfer branch)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 15:09:01 +00:00
Olle Johansson
2af3d42e9b Implement somewhat improved support for 481 Call leg does not exist responses...
- There are some questions on what to do here, but it is a first step.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 14:50:30 +00:00
Joshua Colp
021876711f Do not depend on having an end sound for stopping the bridge when time runs out. (issue #6979 reported by ppyy)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 14:43:32 +00:00
Olle Johansson
910c44b1b6 Clean up handle_response_peerpoke
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 14:41:57 +00:00
Olle Johansson
60d91caa23 Change sip show channels to include refer status
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21128 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 14:37:54 +00:00
Olle Johansson
1fec0e47e7 - Deallocate refer structure at sip_destroy time
- Implement new sip_transfer() function


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 14:35:15 +00:00
Luigi Rizzo
52ac09f78f simplify logic in iax2_bridge()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 14:23:14 +00:00
Luigi Rizzo
9df5296c9b simplify logic in various functions, remove unnecessary variables
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21099 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 13:37:07 +00:00
Luigi Rizzo
c14427878a remove a line that was added by mistake
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 13:17:44 +00:00
Luigi Rizzo
51743a4aea simplify the flow of builtin_atxfer().
There is still a lot of similarity with builtin_blindtransfer()
which should be removed by definining functions for the common
pieces of code (eg in the first part).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21097 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 13:05:48 +00:00
Olle Johansson
177b8e9143 It's critical that we get an ACK on a 200 OK to an INVITE. If we do not get the ACK,
tear down the call. (Discovered at SIPit18)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21061 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 07:03:36 +00:00
Olle Johansson
2c73c08f5a use XMIT_RELIABLE ...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21043 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 07:00:27 +00:00
Olle Johansson
40161ae947 - Move subscribeuri away from refer-to, since refer-to is moving away from sip_pvt
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21039 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 06:40:01 +00:00
Tilghman Lesher
8a066de957 Merged revisions 21037 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r21037 | tilghman | 2006-04-18 01:26:04 -0500 (Tue, 18 Apr 2006) | 2 lines

Bug 6984 - off by one error in Random()

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21038 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 06:29:30 +00:00
Tilghman Lesher
5bcdea5102 Merged revisions 20966 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r20966 | tilghman | 2006-04-17 12:00:16 -0500 (Mon, 17 Apr 2006) | 2 lines

Bug 6544 - when we remove a music class, the thread servicing it should die

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21002 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-17 17:17:41 +00:00
Kevin P. Fleming
fc071a182b actually return the number steps... not the number of steps minus 1
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-17 16:43:55 +00:00
Kevin P. Fleming
2229586d71 more module loader related fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20963 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-17 16:42:21 +00:00
Kevin P. Fleming
987f24840c add an API so that the number of steps required for a translation path can be acquired
don't transcode via SLINEAR when the option is enabled but there is a direct path from the source to the destination


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20962 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-17 16:42:03 +00:00
Olle Johansson
080298dad4 Set timeout timers to Timer A and F in rfc 3261, section 17
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-17 14:22:16 +00:00
Olle Johansson
ea7f924b30 Change transmit_invite(). SIP Transfers are now broken officially, while
waiting for the rest of the patches... This is the dev branch, after all.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20931 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-17 14:07:50 +00:00
Olle Johansson
5320c6b76a - Add supported header
- Send cause codes as well


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20908 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-17 14:00:44 +00:00
Olle Johansson
42918c225a Add more history on masqs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-17 13:52:53 +00:00
Olle Johansson
b124cf4c80 - Implementing the new SIP transfer data structure
- Changing SIP call to support sending INVITEs as part of call transfers


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20902 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-17 13:47:30 +00:00
Olle Johansson
bdb2332621 - Documentation update
- Formatting change


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-17 13:22:31 +00:00
Olle Johansson
bedd0c2ed3 Documentation update
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-17 13:08:24 +00:00
Olle Johansson
382fd7260c Remove ignore from handle_respons_refer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20872 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-17 09:21:56 +00:00
Olle Johansson
a5e5fb18e2 Clean up handle_response_invite
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-17 08:15:38 +00:00
Olle Johansson
92ac73fe3b - Drop too bad SIP requests in order to avoid some UDP misuse (hello Edwin)
- Clean up initialization of initatial request initialization


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20816 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-17 05:32:22 +00:00
Olle Johansson
39b530f4d6 - Doxygen formatting
Please place a Doxygen todo marker before things that needs to be checked up later
  by someone - it's like /*! \todo We really need to implement this in C++ */

- option_debug checking before logging to DEBUG channel


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-17 04:31:21 +00:00
North Antara
659cb5ea5a whitespace and spelling (recieve instead of receive) fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-17 01:17:03 +00:00
Luigi Rizzo
b7e36b50cc preparation for reduction of the nesting of a large function
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 23:05:42 +00:00
Luigi Rizzo
7cb4a9df38 more usages of stream_and_wait
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20707 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 22:46:00 +00:00
Luigi Rizzo
db107f93e1 more usages of function 'finishup()'
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 22:22:53 +00:00
Luigi Rizzo
2c7b77814c one more instance of stream_and_wait, and remove an extra
'error = 1' line put in by miustake



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 22:02:30 +00:00
Luigi Rizzo
9d825a2126 simplify a couple of functions.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20679 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 21:57:02 +00:00
Luigi Rizzo
6e6315099c more replaceemnt of dup code with functions.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 21:41:06 +00:00
Luigi Rizzo
ed8f2e43f6 localize several variables, and simplify the last part of park_exec()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 20:32:14 +00:00
Luigi Rizzo
3e20f8d75d more formatting cleanup including removal of a useless check
for f == NULL



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 20:09:01 +00:00
Luigi Rizzo
09a1511672 rename a variable same as used in a very similar function,
to reduce code differences.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 19:56:08 +00:00
Luigi Rizzo
4ca8c0fc8d s/pu->chan/chan in a few places;
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 19:41:12 +00:00
Luigi Rizzo
36ea51ecd7 put some common code into functions (still more instances to be replaced)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20625 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 19:26:57 +00:00
Luigi Rizzo
70109abc39 properly reindent a large block.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20624 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 19:12:51 +00:00
Luigi Rizzo
e304a986fd more readability fixes - localize some variables and invert
a condition in an 'if' statement to reduce the nesting depth.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 19:05:19 +00:00
Luigi Rizzo
d29f8a677e introduce a function to set context, extension and priority
replacing some common blocks of code (there are still a few
instances where it can be used)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20598 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 18:49:46 +00:00
Luigi Rizzo
81ed862e67 minor readability fixes in preparation for more work on this file:
- replace nested 'if' with '&&'
- fix indentation
- annotate the end brace of some huge block
- remove useless parentheses



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 18:37:01 +00:00
Luigi Rizzo
bdfa578990 minor formatting fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 18:10:10 +00:00
Luigi Rizzo
3d7e2145b8 move some duplicated code outside an if/then/else block
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20570 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 17:59:37 +00:00
Luigi Rizzo
3469287168 make sure there is [almost] only a single exit point for a very long
function so the flow is easier to follow.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20569 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 17:41:05 +00:00
Luigi Rizzo
8f80cbea14 simplify the ast_channel walking routines.
(the previous version was mine, but this way it is definitely
more readable).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 16:58:56 +00:00
Luigi Rizzo
ebc152c0da move common conditions to the outside block.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 16:04:24 +00:00
Luigi Rizzo
7783a7a7e6 simplify logic in ast_generic_bridge()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 15:51:53 +00:00
Luigi Rizzo
9807aab483 move common code in one place
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 15:27:58 +00:00
Luigi Rizzo
ba7c8dbd73 avoid returning in the middle of a switch() in ast_answer()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 15:22:13 +00:00
Luigi Rizzo
ad5cfd80c0 simplify function __ast_request_and_dial() as follows:
- handle immediately failures in ast_request();
  This removes the need for checking 'chan' multiple times afterwards.
- handle immediately failures in ast_call(), by moving the one-line
  case at the top of the 'if' statement;
- use ast_strlen_zero in several places instead of expanding it inline;
- make outstate always a valid pointer;
On passing mark an unclear statement and replace a magic number
with sizeof(tmp).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 15:13:39 +00:00
Luigi Rizzo
5a6cc1ea4e properly reindent a block
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20484 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 14:14:16 +00:00
Luigi Rizzo
577b740f17 add a missing ast_channel_unlock() evidenced by previous commits.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 14:03:43 +00:00
Luigi Rizzo
5afbcc4f86 remove an extra lock.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20456 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 14:00:17 +00:00
Luigi Rizzo
845298a7b3 - replace some nested 'if' with '&&'
- bring the short case at the top of an 'if' statement
  (also fix misformatting)
- replace several 'if' with the '?' operator;
 
- invert the condition on an 'if' to reduce the nesting depth 
  (reindentation to be done later).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 13:58:43 +00:00
Luigi Rizzo
ed6def5c46 Localize some variables documenting their usage.
Comment a possible problem with locking.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20453 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 13:27:58 +00:00
Olle Johansson
4a312a044d - Fixes to ast_channel_lock functions
- New get_sip_pvt_byid function (not really used correctly yet...)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 12:57:15 +00:00
Luigi Rizzo
4c9c289a5d localize some variables, add some comments.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20396 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 08:01:10 +00:00
Luigi Rizzo
429025db22 implement ast_waitfordigit() and ast_readstring() in terms
of their '_full()' version, so we can remove the replicated
implementation and, especially, the risk that they get out of sync.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20389 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 07:53:25 +00:00
Joshua Colp
5c05128777 Move a bit more stuff over to the datadir (issue #6967 reported by tzafrir patch by north)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20358 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-15 23:37:29 +00:00
Joshua Colp
e8a94a71e2 Allow the attachment format to be specified differently for different mailboxes (issue #6961 reported by the ever fabulous Corydon76)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-15 23:05:18 +00:00
Joshua Colp
4657dc770c We are shaking up trunk tonight! allow data dir to be specified (issue #6967 reported by tzafrir)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-15 22:53:53 +00:00
Russell Bryant
8a5436c72f add indications for Thailand (issue #6971)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-15 22:49:45 +00:00
Russell Bryant
717445c1d8 add the ability to turn off the feature that allows agents to end calls
by pressing '*'.  This is still on by default. (issue #6897)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-15 22:32:23 +00:00
Russell Bryant
825d6d7c99 Big oops. I did this from my trunk directory instead of autoconf_and_menuselect ...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-15 15:34:57 +00:00
Russell Bryant
aade174330 include autoconfig.h (casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-15 15:33:00 +00:00
Olle Johansson
e75fa47099 More ast_channel_lock fixes
- Update lock.h with definitions of ast_channel_lock, ast_channel_unlock and ast_channel_trylock
- Convert some functions (but not all) in channel.c
- Fix some bugs in chan_sip.c
- Convert rest of chan_sip.c


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-15 15:07:39 +00:00
Olle Johansson
6b3367bf5c New functions for locking a channel - these simplify debugging
when you have channel locking issues.
(Part of the SIP transfer patch, where I had a *lot* of
channel locking problems)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-15 08:07:50 +00:00
Luigi Rizzo
9250a6d129 applied two of the 3 chunks in #6907, and a similar one
(replace nested 'if' with '&&')
I cannot make sense of the first chunk of the proposed patch,
i think the original is correct.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20225 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-15 00:53:04 +00:00
Luigi Rizzo
7c1b1cc29e - use '=' to copy struct sockaddr_in
- localize a variable
- replace three replicas of the same code with a much simpler construct
  removing replicated var = var->next;
- use '?' instead of 'if' for an assignment



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-15 00:36:05 +00:00
Luigi Rizzo
e42087f5e3 - normalize for() loops to navigate through variables,
removing replicated var = var->next;
- remove a potential infinite loop and document the problem
- remove useless checks and document why
- mark XXX a possible bug (to be investigated)
- use ast_strlen_zero() instead of expanding it inline
- fix indentation in one place   
- replace a nested 'if' with '&&'



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-15 00:05:08 +00:00
Luigi Rizzo
1417b3498d - use '?' instead of if statements for assignment;
- fix indentation in a few places
- use a variable to store the 'other' channel, thus removing
  the need for some duplicated code;
- use '=' instead of memcpy to copy struct sockaddr_in



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 23:30:18 +00:00
Luigi Rizzo
d043954dc1 - remove some unnecessary casts and braces;
- add braces around a nested 'if'
- use S_OR and '?' to remove some duplicated function calls;
- replace nested 'if' with &&
- move out a common term in a sequence of 'if'
- add a comment on a potentially dangerous string manipulation



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20196 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 23:20:29 +00:00
Luigi Rizzo
f32e294300 remove some unnecessary braces
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20170 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 22:55:58 +00:00
Luigi Rizzo
147c9e5e73 misc. code cleanup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 22:48:05 +00:00
Luigi Rizzo
ca9e77fe46 code simplifications
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 22:32:13 +00:00
Luigi Rizzo
8977378288 use ast_strdup instead of strdup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 22:22:13 +00:00
Luigi Rizzo
b20429bd6b normalize cli completion code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 22:17:27 +00:00
Luigi Rizzo
62712ea668 constification and code simplifications
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 22:02:19 +00:00
Luigi Rizzo
1029b57707 constify a couple of function arguments
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 21:00:59 +00:00
Luigi Rizzo
160031b7be code cleanup (for loop normalization, remove useless casts and parentheses)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 20:47:06 +00:00
Luigi Rizzo
6d574f36ca partial fix of the module API to use the new method.
Still not complete as we need to take care of the usecount stuff.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20104 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 19:35:37 +00:00
Luigi Rizzo
8d98d44e82 fix another svn merge bug
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 18:45:08 +00:00
Tilghman Lesher
b8317169d0 Compatibility fixes for loader changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 18:44:24 +00:00
Kevin P. Fleming
006357f671 Merged revisions 20037 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r20037 | kpfleming | 2006-04-14 12:21:09 -0500 (Fri, 14 Apr 2006) | 2 lines

uncomment files that actually do exist (oops)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20038 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 17:25:31 +00:00
Luigi Rizzo
1f46755f75 fix a mostly harmless error introduced by svn merge.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20036 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 17:19:57 +00:00
Kevin P. Fleming
b433dc1917 Merged revisions 20034 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r20034 | kpfleming | 2006-04-14 12:00:32 -0500 (Fri, 14 Apr 2006) | 2 lines

update text to match actual prompts being distributed (thanks to Kinsey in the support department for reviewing all the prompts!)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20035 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 17:01:07 +00:00
Luigi Rizzo
e43bc6634d This rather large commit changes the way modules are loaded.
As partly documented in loader.c and include/asterisk/module.h,
modules are now expected to return all of their methods and flags
into a structure 'mod_data', and are normally loaded with RTLD_NOW
| RTLD_LOCAL, so symbols are resolved immediately and conflicts
should be less likely.  Only in a small number of cases (res_*,
typically) modules are loaded RTLD_GLOBAL, so they can export
symbols.
 
The core of the change is only the two files loader.c and
include/asterisk/module.h, all the rest is simply adaptation of the
existing modules to the new API, a rather mechanical (but believe
me, time and finger-consuming!) process whose detail you can figure
out by svn diff'ing any single module.

Expect some minor compilation issue after this change, please
report it on mantis http://bugs.digium.com/view.php?id=6968
so we collect all the feedback in one place.

I am just sorry that this change missed SVN version number 20000!



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 14:08:19 +00:00
Luigi Rizzo
33a3a7375a temporarily revert the way mutex are initialized on BSD systems.
This fixes the compilation on OS/X (the change exposed a wrong
assumption on mutex types on OS/X), but still leaves open the
bugs in initializing mutex on bsd systems, which you will see
reported as 'locking failures' on certain operations.
I need to investigate the issue further, but the best thing
i can do now is leave things as they have been for months.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 13:54:53 +00:00
Tilghman Lesher
4a1e3b66a6 Bug 6927 - CLI command has 3 args, not 2.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19941 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 04:59:11 +00:00
Tilghman Lesher
492e68dab3 Merged revisions 19891 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r19891 | tilghman | 2006-04-13 15:37:50 -0500 (Thu, 13 Apr 2006) | 2 lines

Bug 6947 - Allow vm broadcasts to more than 256 characters worth of mailboxes

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19892 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-13 20:40:23 +00:00
Tilghman Lesher
4897c72d6b Fix format for big endian systems
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-13 20:19:02 +00:00
Joshua Colp
92bd72903f Fix the grammar that Kevin broke
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-13 19:58:45 +00:00
Tilghman Lesher
33adff8a2b Bug 6896 - Fix for garbled wav49 format
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19814 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-13 17:46:06 +00:00
Kevin P. Fleming
70bf3715a6 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/trunk@19813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-13 17:41:43 +00:00
Tilghman Lesher
8410bbf7bf Unregister format says it's already unregistered
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19811 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-13 17:22:16 +00:00
Tilghman Lesher
a9d8b4a553 Typo fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-13 17:20:28 +00:00
Tilghman Lesher
64d201a086 Blocked revisions 19768 via svnmerge
........
r19768 | tilghman | 2006-04-13 10:56:35 -0500 (Thu, 13 Apr 2006) | 2 lines

Bug 6957 - variable names beginning with CALLERID weren't substituted correctly

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-13 15:58:22 +00:00
Kevin P. Fleming
1dbf98061e remove extraneous warning message
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-13 15:28:24 +00:00
Olle Johansson
5af687b83b Issue #6951 - Show last successful registration time in "sip show registry" (ivanfm) with mods for svn trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19736 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-13 12:48:03 +00:00
Olle Johansson
79dc77ea33 Formatting fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-13 07:08:44 +00:00
Tilghman Lesher
3042c79182 Document the MSGSM format, and fix the uncalculated number of samples
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-13 01:29:54 +00:00
Joshua Colp
5e43f18529 Updates to speech recognition API and dialplan utilities. Moved to using dialplan functions, and some other misc things.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19645 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-13 00:18:52 +00:00
Josh Roberson
e95c757521 fix caffiene-induced typo.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-12 23:57:39 +00:00
Josh Roberson
b04c61eeb3 Note that the res_speech module will need to be loaded first, and add a conveient line to uncomment to do so for the time being.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19615 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-12 23:47:51 +00:00
Kevin P. Fleming
371e0316f0 simplify macro usage
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19614 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-12 23:33:47 +00:00
Russell Bryant
a015d0b36f make sure uint64_t is available on mac
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-12 21:22:00 +00:00
Olle Johansson
d4b5393eeb - Adding some refer state definitions from the siptransfer branch
- A bit more URI conversions 
- Changes to sip_dual and the SIP invite structure
- Add Supported: headers to more requests


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19578 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-12 21:21:44 +00:00
Olle Johansson
9468e5cd06 Fix for Polycom bug...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19549 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-12 21:00:31 +00:00
Olle Johansson
ea4235c56c Implement a setting for denying/allowing transfer requests. At this stage,
we only have open/closed. Well, at least you can deny transfers from unknown
callers or at least incoming calls.
(Part of the SIPtransfer branch)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-12 20:57:07 +00:00
Luigi Rizzo
f841fe7d11 whoops... remove an extra line.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-12 20:42:02 +00:00
Luigi Rizzo
2876a25505 add 'show threads' and 'show profile' commands.
These are momstly debugging tools for developers,
a bit documented in the header files (utils.h),
although more documentation is definitely necessary.

The performance impact is close to zero(*) so there is no
need to compile it conditionally.
(*) not completely true - thread destruction still needs
to search a list _but_ this can be easily optimized if we
end up with hundreds of active threads (in which case, though,
the problem is clearly elsewhere).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19544 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-12 20:40:46 +00:00
Kevin P. Fleming
8f09c4345f fancify the sample grammar a bit
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-12 20:39:09 +00:00
Olle Johansson
975ddb8552 Doxygen docs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19542 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-12 20:32:40 +00:00
Joshua Colp
416cd5d8a0 Add ability to see if the person calling said anything or not.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-12 19:57:21 +00:00
Luigi Rizzo
b24bc86fc2 reindent block properly
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-12 00:17:37 +00:00
Luigi Rizzo
86e8094c3c localize some variables, remove useless parentheses
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-12 00:15:57 +00:00
Luigi Rizzo
3579d11dc1 remove useless \0, and fix formatting.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 23:54:33 +00:00
Tilghman Lesher
e462f79205 Bug 6943 - transition away from using CallerID header, when we really mean CallerIDNum
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 23:23:16 +00:00
Tilghman Lesher
020305fb58 Merged revisions 19397 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r19397 | tilghman | 2006-04-11 17:39:59 -0500 (Tue, 11 Apr 2006) | 2 lines

Bug 6490 - telco intercept should report NOANSWER instead of CHANUNAVAIL

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19398 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 22:51:10 +00:00
Luigi Rizzo
d20575d2af fix various bugs in the DEBUG_THREADS code including:
- misspelled ast_mutex_logger() instead of __ast_mutex_logger()
- misplaced #define ast_mutex_init(pmutex)
- wrong arguments to __ast_mutex_logger() in one instance.

Clearly this code is too spaghetti!



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19396 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 22:37:27 +00:00
Tilghman Lesher
e5bb12ac83 Merged revisions 19394 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r19394 | tilghman | 2006-04-11 17:24:46 -0500 (Tue, 11 Apr 2006) | 2 lines

Bug 6061 - Fix ODBC storage of VM on PGSQL and MSSQL

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19395 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 22:25:57 +00:00
Kevin P. Fleming
fb4d5fb6a6 fix logic error; don't test for rtcache flag unless asked to (issue #6923)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 22:07:52 +00:00
Kevin P. Fleming
677347edab Merged revisions 19353 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r19353 | kpfleming | 2006-04-11 16:58:47 -0500 (Tue, 11 Apr 2006) | 2 lines

don't create a 'voicemail' symlink in the sounds directory; app_voicemail has not needed it since January of 2005 (issue #6613)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19354 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 21:59:40 +00:00
Tilghman Lesher
2374e4c77a Merged revisions 19351 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r19351 | tilghman | 2006-04-11 16:55:51 -0500 (Tue, 11 Apr 2006) | 2 lines

Bug 6097 - possible descriptor leak

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19352 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 21:58:44 +00:00
Kevin P. Fleming
1e9ac855d3 Merged revisions 19348 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r19348 | kpfleming | 2006-04-11 16:50:18 -0500 (Tue, 11 Apr 2006) | 2 lines

don't call the originating device as part of the Page() operation (issue #6932)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 21:51:17 +00:00
Kevin P. Fleming
7bf8d36c8b Merged revisions 19347 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r19347 | kpfleming | 2006-04-11 16:35:52 -0500 (Tue, 11 Apr 2006) | 2 lines

simplify spy queue flushing logic, and always force a flush when one side gets full, even if the other side is not empty (issue #6457)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 21:50:48 +00:00
Kevin P. Fleming
f515078c53 Merged revisions 19345 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r19345 | kpfleming | 2006-04-11 16:14:42 -0500 (Tue, 11 Apr 2006) | 2 lines

don't destroy the entire dialplan during 'reload', just atomically replace it like 'extensions reload' does (issue #6047)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 21:18:27 +00:00
Luigi Rizzo
94e5209dba remove unused variable (discovered by the compiler)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 20:52:05 +00:00
Joshua Colp
d7f01e051b No need to do this in here any longer since the linkedlists macro is fixed
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19305 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 20:51:45 +00:00
Joshua Colp
2f854fabc6 Merged revisions 19303 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r19303 | file | 2006-04-11 17:46:38 -0300 (Tue, 11 Apr 2006) | 2 lines

Minor linked lists bug fix. When you're dealing with swapping entries around a lot it can cause a seg fault.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 20:48:57 +00:00
Kevin P. Fleming
77e998a20d Merged revisions 19301 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r19301 | kpfleming | 2006-04-11 15:11:01 -0500 (Tue, 11 Apr 2006) | 2 lines

handle call time limit properly when warning is requested _after_ call would hae already ended (issue #6356)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 20:11:36 +00:00
Kevin P. Fleming
df365777e7 typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 17:03:26 +00:00
Joshua Colp
afcefc4a68 Convert chan_iax2 to use linked lists for multithreading, and add dynamic threads. These are used when all pool threads are in use, and will stick around until load dies down. The theory is that during high load you'll have more threads available, and during low load you'll only have the normal pool threads sticking around.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19254 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 16:44:10 +00:00
BJ Weschke
0b438958df Minor cleanups and error handling for app_dial #6935 (casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 16:15:11 +00:00
Luigi Rizzo
08d6fd6e17 remove an unused function
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 16:00:23 +00:00
Luigi Rizzo
e785b81c5d as discussed with kevin, move
ast_register_atexit()/ ast_unregister_atexit() into asterisk.h
These are general functions, not restricted to modules, so move
them in a more proper place.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 15:55:56 +00:00
Kevin P. Fleming
63de32ac00 use proper type
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19222 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 15:52:06 +00:00
BJ Weschke
d2480538d2 Provide the ability to read extension number after name #6938 (delink)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 15:38:17 +00:00
Luigi Rizzo
7ba1b92a04 normalize code preparing for loader changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19220 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 15:19:34 +00:00
Luigi Rizzo
68b136c263 remove unused fields
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 15:09:24 +00:00
Luigi Rizzo
7507309732 normalize code in preparation to module changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19189 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 10:01:00 +00:00
Luigi Rizzo
6b2d947b62 staticize a function, and normalize code in preparation to module changes.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19188 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 10:00:24 +00:00
Christian Richter
baab6e1c27 mISDN Messages must be freed with free_msg \!\!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19160 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 08:31:19 +00:00
Olle Johansson
8318cddd8e - First stab at removing debug and ignore variables that
we pass along function calls, instead implementing them as
  flags on the incoming packet.
- Adding forward declarations of handle_request functions


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19128 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 06:09:01 +00:00
Olle Johansson
91d7e66454 Add new documentation files to index file 00README.1st and to doxygen
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19097 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 05:54:55 +00:00
Tilghman Lesher
a55f8848bf Bugs 6883, 6930: compiler warnings
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19095 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 05:37:05 +00:00
Joshua Colp
0f1321d423 Data stores do not need a lock. As well change the way they are removed from the channel when it is destroyed (thanks Russell Wussell) and finally... because C++ is silly... change our list macro info thing to be "entry" instead of "list".
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19062 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 03:50:17 +00:00
BJ Weschke
44b98afdcd Merged revisions 19008 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r19008 | bweschke | 2006-04-10 20:05:01 -0500 (Mon, 10 Apr 2006) | 3 lines

 When using the silence detector in ast_play_and_record() and ast_play_and_prepend(), the truncation code never gets called to remove the detected silence, because the value of res is zero when control gets to that point. #6903 w/some mods (softins)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 01:12:13 +00:00
Joshua Colp
e4811a8248 Presenting a revised data stores and oh my, a generic speech recognition API! I wonder what we can do with this now...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18979 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 23:29:50 +00:00
Kevin P. Fleming
cf15740eaf remove support for BYEXTENSION (which nobody even knows about anymore)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 23:01:22 +00:00
Olle Johansson
26198e8826 Fixup fixup - add some debugging and error handling
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18940 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 20:18:14 +00:00
Olle Johansson
8b1543974f Resolve conflicts, prepare for next batch of conflicts
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18909 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 19:55:39 +00:00
BJ Weschke
70e407c5be Merged revisions 18866 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r18866 | bweschke | 2006-04-10 12:29:51 -0500 (Mon, 10 Apr 2006) | 2 lines

 Don't say that we can pass an 'exten' argument in the documentation of Park() when we really cannot. #6902 (opsys)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 17:32:29 +00:00
Christian Richter
52cf26255a fixed some issues, that appear at higher load
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18835 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 16:50:20 +00:00
Christian Richter
cb6f278393 we send nearly everytime a RELEASE, only if we for sure know, that it's a TE and we did create the call we don't to hear the Inband Info
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18800 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 14:09:17 +00:00
Olle Johansson
fed57c1eb2 Making sure that cancel destroy is only executed once...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 13:43:54 +00:00
Olle Johansson
f74538df11 Small fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 13:19:36 +00:00
Luigi Rizzo
c3b3feab76 - staticize gettag() complete_sip_peer() get_calleridname() arguments;
- use strsep() instead of strchr() where appropriate
- constify some args and add comments. 
- remove a conditional near line 1940 - we already know what to use.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 12:20:57 +00:00
Luigi Rizzo
8731b6386d - constification of some functions (args and return values):
transmit_response_reliable()
        hangup_cause2sip()
- remove useless braces;
- add comments on some slightly cryptic code segments
- mark XXX possible critical pieces of code.
- remove an unneeded string termination after ast_copy_string
- mark usage of some rarely used functions;
- use strsep() instead of emulating it inline;
- replace magic constants with sizeof(array)




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 11:57:40 +00:00
Luigi Rizzo
7e5e2ffb5f - localize 'struct cfalias' into the only function using it;
- remove duplicate code to walk through sdp packets, replacing
  sdpLineNum_iterator_init(&foo); with  "foo = 0";
- remove duplicate code to test ast_test_flag(&p->flags[0], SIP_NAT_ROUTE);



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 11:36:02 +00:00
Luigi Rizzo
25e9168fea constify get_sdp*() and friends.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 11:19:14 +00:00
Luigi Rizzo
87890e75ba constify get_header(), which let me find out and fix one bug (overwriting
a string in the buffer) and finding out another one (not fixed yet,
just marked XXX).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 11:04:04 +00:00
Luigi Rizzo
47df1e2020 - describe how sip packets are stored internally;
- remove useless braces or local variables;
- simplify some code sequences;
- mark with XXX a possible locking issue.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 10:40:13 +00:00
Luigi Rizzo
20d1876617 struct sip_request cleanup:
- remove a debug field that was read but never set, so it was basically
  unused as well as the code testing it (also removed);

- make scalar fields contiguous so any array overflow will be
  less harmful;



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18787 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 10:30:38 +00:00
Luigi Rizzo
104c2b0a3a more cleanup: remove useless braces, replace "if" with "?",
localize a couple of variables, remove trailing whitespace.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 10:22:42 +00:00
Olle Johansson
9b4e335439 Re-instate removed comment
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 10:01:14 +00:00
Luigi Rizzo
e081b42cd6 another batch of minor code simplifications
(moving repeated expressions into a function, const on
some arguments)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 09:53:22 +00:00
Tilghman Lesher
2cd46d59ea Bug 6829 - asprintf for Solaris
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18755 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 07:48:52 +00:00
Russell Bryant
f7c5aee2ad remove a couple more unnecessary "out of memory" error messages
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 02:19:58 +00:00
Russell Bryant
7878538953 use ast_*alloc and don't create duplicated error messages.
... as stated in the coding guidelines.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 02:15:47 +00:00
Russell Bryant
9a5c7c75a3 Instead of using strncpy, use ast_copy_string. Also, in the case of copying a
constant string into a buffer that we know is big enough, don't use a length
limited copy at all, use strcpy.

... as stated in the coding guidelines.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 02:05:59 +00:00
Russell Bryant
d13bc3fc83 run the module through indent to fix the formatting issues that violate the
coding guidelines


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 02:01:39 +00:00
Russell Bryant
d146e7b92c fix typo in the provided indent command
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18694 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 01:54:13 +00:00
Russell Bryant
d203e9c6c0 add back braces that were removed in a recent commit that leave a bunch of
nested statements in a block without branches, which is a violation of the
coding guidelines.

As a matter of fact, this module violates the coding guidelines in multiple
ways that including formatting and code issues.  In my opinion, this module
should not have been merged into the trunk in this form.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 01:51:47 +00:00
Luigi Rizzo
e468d9011d a bunch of trivial code normalizations (removal of unnecessary
casts and parentheses, formatting fixes, pointing out replicated
code and so on). No functional changes.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18666 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-09 23:16:29 +00:00
Luigi Rizzo
957fff010c rename FR_SET_BUF to AST_FRAME_SET_BUFFER
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-09 22:31:38 +00:00
Olle Johansson
70f18e5f31 Issue 6917 - some cleanups for res_config_pgsql.c (mithraen)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18607 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-09 18:57:25 +00:00
Olle Johansson
6843c5ddc6 Issue 6919 - clarify error message
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-09 18:53:46 +00:00
Kevin P. Fleming
628a3e8d1b update module license key text and update loader to accept it
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-08 22:37:30 +00:00
Kevin P. Fleming
699f55071b a few cleanups from the last commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18572 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-08 22:16:34 +00:00
Kevin P. Fleming
f10f427d49 since the module API is changing, it's a good time to const-ify the description() and key() return values
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-08 22:01:19 +00:00
Kevin P. Fleming
1bba6ec6fc merge rizzo's codec module rework (very similar to the format module rework)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-08 21:40:57 +00:00
Tilghman Lesher
1481e53ba8 Merged revisions 18494 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r18494 | tilghman | 2006-04-08 14:20:45 -0500 (Sat, 08 Apr 2006) | 2 lines

Bug 6914 - .txt file fails to rename on operator out

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18495 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-08 19:22:29 +00:00
Russell Bryant
af2609dfbe fix bug in smdi config parsing (issue #6908)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-08 19:16:38 +00:00
Russell Bryant
e27f756be4 remove traces of "look", something that does not exist in the tree
(issue #6904)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18492 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-08 19:13:37 +00:00
Tilghman Lesher
bdff9c973d Merged revisions 18436 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r18436 | tilghman | 2006-04-07 17:07:38 -0500 (Fri, 07 Apr 2006) | 2 lines

Bug 6913 - fix for possible buffer overflow

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-07 22:11:12 +00:00
Olle Johansson
8159124572 -Fixing some debugging messages in history and console
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18403 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-07 20:19:44 +00:00
Olle Johansson
aefba4ad7d Add history events for re-invites
(need to nail this issue...)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-07 19:46:50 +00:00
Olle Johansson
f235bbe5a5 make history easier to read
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-07 19:36:44 +00:00
Olle Johansson
8cd506cdfd Add some more information to SIP history
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-07 19:25:19 +00:00
Olle Johansson
7089dc1341 Issue #6899 - remove OSP support code from chan_sip.c and app_dial.c
- implement all functions through internal APIs in res_osp.c and app_osplookup.c
(homesick)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-07 19:11:22 +00:00
Olle Johansson
fd54f36509 Hmm. What is that keyword?? Let me see... Wait... Maybe... Ahh! OOPS!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18342 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-07 18:52:23 +00:00
Russell Bryant
3808318cff change a couple uses of !strlen() to ast_strlen_zero(). Oddly enough, one of
these used to be this way and got changed ...


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18309 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-07 16:28:50 +00:00
Olle Johansson
839ebd8e03 - sip_alloc failures are also caused by too few available file descriptors, so we can not
open socket for RTP (audio/video/rtcp).
  Error message change to clarify.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-07 16:22:28 +00:00
Olle Johansson
b479a91e97 - Add cause code for format error
- Change to SWITCH_CONGESTION instead of CONGESTION
(imported from 1.2)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-07 14:42:25 +00:00
Olle Johansson
48ca2c82bf Import of revistion 18250 from 1.2
- Fix minor memory leak
- Add proper cause codes on memory allocation failures


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-07 14:30:14 +00:00
Christian Richter
ece21c3019 sorry litle mistake
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-07 12:03:51 +00:00
Christian Richter
47b8610f70 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18192 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-04-07 09:46:38 +00:00
Christian Richter
7788d5061c fixed a bridging-endless-loop also fixed the rdnis is not exported issue
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-07 09:31:27 +00:00
Olle Johansson
b7d32b9e0b Issue #6674: Set the URI correctly on BYEs when we have an incoming call
Reported by aubergine, fix by oej


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-07 08:19:52 +00:00
Olle Johansson
255e77ae6e Issue #6580 - Unify directory definitions to one section of Makefile (casper)
- Maybe we should define proper directories for OS/X too?
- Should OpenBSD and NetBSD follow the FreeBSD rules?


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-07 07:04:05 +00:00
Kevin P. Fleming
65e9dce01f Merged revisions 18087 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r18087 | kpfleming | 2006-04-06 17:04:58 -0500 (Thu, 06 Apr 2006) | 3 lines

don't try to support 'i' or 'r' options if chan_zap is not loaded, and warn the user when they attempt to use them (issue #6675)
update application help text to more clearly define when Zaptel and chan_zap are required

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 22:16:23 +00:00
Olle Johansson
4ded41daa5 Cosmetic update for outbound REFERs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 21:49:24 +00:00
Olle Johansson
965394e4c2 Add "NewChan" event to history to track the birth of a new ast_chan from a
SIP invite


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 21:33:39 +00:00
Olle Johansson
009e081199 Improved handling of 491 responses
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 21:29:54 +00:00
Olle Johansson
518c4b295d Small changes to parse_sip_options
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18057 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 21:18:12 +00:00
Olle Johansson
be4ac5e57a Small fixes to handle_request_invite
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18056 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 21:13:32 +00:00
Olle Johansson
62128ba7b7 - Don't change channel direction on re-invites
- Don't re-initialize initreq on re-invites


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18033 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 21:01:06 +00:00
BJ Weschke
3b89edc066 More code optimizations. Thanks kpfleming!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18025 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 20:37:29 +00:00
Olle Johansson
5483288048 - Implement handle_request_notify to handle incoming NOTIFY requests
and respond properly to them.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 20:36:25 +00:00
BJ Weschke
d42357fae1 Fix a problem where if the channel was hungup during detection, the application wouldn't block indefinitely looking for another frame from that channel. Don't try to do frame size analysis on a frame that isn't voice, only report DEBUG and VERBOSE msgs to the logger channels when the DEBUG and VERBOSE settings are high enough to require it, and some other minor cleanups.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18023 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 20:23:18 +00:00
Olle Johansson
9bd9bceef7 Implement a handle_response_refer function to take care of responses
to outbound REFERS. Not that common, but still needed.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 20:16:08 +00:00
Olle Johansson
1e8d1dda7d Change transmit_notify_sipfrag to handle other messages than 200 OK, needed for
SIPtransfer improvement


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17993 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 19:59:21 +00:00
Olle Johansson
ddcd16e519 - doxygen
- debug message control


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 19:39:27 +00:00
Luigi Rizzo
4408c0e6b5 structures can be copied with the '=' operators, no need to
use memcpy.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 19:31:59 +00:00
Russell Bryant
712d0fc8b9 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17946 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-04-06 17:25:34 +00:00
Russell Bryant
87b1cf5618 various cleanups to the Makefile
- remove unused OSREV varibale
- move various CROSS_COMPILE variables to the top and group them together
- move various PROC definitions to the top as a group
- remove usused MARCH variable
(issue #6892)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 17:13:00 +00:00
Luigi Rizzo
6f09a652dd normalize some for() loops.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17943 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 17:09:00 +00:00
Joshua Colp
1749971753 Merged revisions 17905 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r17905 | file | 2006-04-06 14:00:10 -0300 (Thu, 06 Apr 2006) | 2 lines

Update email address to my Digium one

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17914 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 17:01:47 +00:00
North Antara
0a24923596 skinny debug/verbose cleanup.
Thanks casper!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 16:50:33 +00:00
Luigi Rizzo
a36a1c8e2a minor formatting changes again
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17902 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 16:44:31 +00:00
Luigi Rizzo
c3249e2cb4 normalize repeated instances of code as follows:
-       if (res >= 0)
-               return RESULT_SUCCESS;
-       else
-               return RESULT_FAILURE;
+       return (res >= 0) ? RESULT_SUCCESS : RESULT_FAILURE;

 
(we should probably create a macro for this,

#define	RET(r) ((r) >= 0) ? RESULT_SUCCESS : RESULT_FAILURE)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17899 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 16:17:04 +00:00
Luigi Rizzo
590e21393e optimize move_variables() so that two lists can be created
in constant time instead of scanning the entire list.
 
On passing, minor formatting fixes.    



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17898 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 16:06:57 +00:00
Luigi Rizzo
e245d3a975 + create function cdr_get_tv to replace several duplicated
instances of the same code to generate a time entry in
  raw or localtime format;
 
+ create functions check_post() and check_start() to check whether
  a record has been already posted or started, replacing
  several duplicated instances of the same code;
 
+ localize some variables;
 
+ normalize some for() loops

Especially the former two changes should make the code a lot
more consistent and easier to read.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17878 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 16:01:56 +00:00
Luigi Rizzo
85548cccb0 minor code cleanup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 15:55:15 +00:00
Luigi Rizzo
e9b428e121 convert one more file...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 15:48:06 +00:00
Luigi Rizzo
1d92bbc09b remove traces of previously merged files
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17865 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 15:43:06 +00:00
Olle Johansson
9d8260c68e Formatting fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 15:41:37 +00:00
Luigi Rizzo
5d34c2bbe1 minor formatting cleanup and removal of trailing whitespace.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17863 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 15:40:12 +00:00
Olle Johansson
8e22245b09 Formatting fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17862 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 15:25:56 +00:00
Olle Johansson
023e27f695 Formatting fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17861 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 15:23:14 +00:00
Luigi Rizzo
e5d48fd45f use the new module interface for this module, but make it
of type MOD_0 as it exports symbols so it should be loaded as RTLD_GLOBAL.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17860 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 15:10:29 +00:00
Luigi Rizzo
c9834f6187 make sure that file calls other than OPEN work on all formats
if called with a NULL 'fmt' argument.
(SVN 6898)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17859 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 15:08:31 +00:00
Olle Johansson
7fb5de23d9 Make "show http" CLI command follow new guidelines - now "http show status"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 14:43:06 +00:00
Luigi Rizzo
08dfc15553 whitespace and formatting fix postponed from last commit:
fix indentation of a large function, localize some variables
and add/remove whitespace where needed.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 14:40:47 +00:00
Luigi Rizzo
25a61b9e08 split pbx_load_module so we can reduce the indentation depth.
Also convert to MOD_1 style.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 14:23:37 +00:00
Luigi Rizzo
38f14cbca7 use FREE instead of free as pointer to the destructor function.
This way the MALLOC_DEBUG code will always get the correct argument.

(bug introduced in SVN15818)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17824 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 14:02:19 +00:00
Luigi Rizzo
1fd898bd84 convert a couple of applications to the new module style
(STATIC_MODULE) to show what needs to be changed.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 09:24:02 +00:00
Luigi Rizzo
a60d8196df small cleanups to module.h and loader.c to start playing with
new-style modules using static symbols.

Everything will still work as before, but new-style modules
can now be defined by putting a '#define STATIC_MODULE' somewhere
before including module.h, then declaring STATIC_MODULE the
various methods (load, unload, key...) that the module is
supposed to supply, and adding a 'STD_MOD(MOD_1, reload_fn, NULL, NULL)'
macro call at the end.
A module compiled in this way will be loaded RTLD_NOW|RTLD_LOCAL
so symbol pollution is reduced, and symbols are resolved immediately.
Removing just the '#define STATIC_MODULE' will restore the old
behaviour.

In order for a module to be loaded RTLD_NOW|RTLD_LOCAL, it must not
export any symbol[1], and all the modules it depends on (e.g. res_*)
must be loaded already.

[1] Mechanisms are in place, and will be enabled later, to still
allow such modules to 'export' symbols and resolving the dependencies
irrespective of the load order.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 09:10:31 +00:00
Luigi Rizzo
e57131511e the fix for bug #6399 makes sense. thanks wrmem for the report.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 08:02:35 +00:00
Olle Johansson
d75fed39ca Issue #6893 - Compiler warnings for PostgreSQL ARA driver
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17740 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 06:55:38 +00:00
Olle Johansson
2efcfc1549 Issue #6610 - build on Intel Mac
(Wish I could try this at home :-)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05 20:14:51 +00:00
Joshua Colp
3f76f9e442 Merged revisions 17702 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r17702 | file | 2006-04-05 17:01:19 -0300 (Wed, 05 Apr 2006) | 2 lines

Unlock channel on failure so that ast_mutex_destroy doesn't throw a fit (issue #6647 reported by casper)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05 20:05:09 +00:00
Olle Johansson
e4c129c1b6 - Doxygen fixes
- Typos corrected


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17694 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05 19:32:40 +00:00
Joshua Colp
1001cc0656 Unbreak res/Makefile (issue #6891 as reported by casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17661 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05 18:37:29 +00:00
Olle Johansson
ef6b50b706 Issue #5637 - Realtime driver for PostgreSQL (mguesdon)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05 17:46:09 +00:00
Tilghman Lesher
756c7cbb12 Bug 6873 - Finish moving from the non-threadsafe (and poor randomness) rand() to threadsafe ast_random()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05 17:44:44 +00:00
Tilghman Lesher
701b49027d Bug 6508 - if priority was a number, then findlabel fails
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05 17:03:30 +00:00
Christian Richter
7028946605 some final fixes for cpn
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17594 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05 15:54:15 +00:00
Christian Richter
ce8fc47ffc * advanced the error Handling routine for wrong frames from mISDN
* added more code for connected party number handling
* fixed the portinfo program, it can now be used to test mISDN again



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17562 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05 14:51:48 +00:00
Olle Johansson
414702f562 Add some documentation and a todo for enum.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05 13:53:06 +00:00
Olle Johansson
4b27966e71 Issue #6654: Enum crash on ADDRESS record, possibly bad record, but still a crash (imported from 1.2)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05 06:52:41 +00:00
Olle Johansson
a62aea97c6 Add reference pointers to RFCs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17488 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05 06:43:14 +00:00
Tilghman Lesher
e019a106c7 Bug 6886 - Add application TryExec, which does mostly the same thing, but returns differently
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05 03:53:41 +00:00
Olle Johansson
3cf9339a6d Fix formatting
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17415 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 19:48:42 +00:00
Christian Richter
d7a839a299 fixed some essential segfaults happening under heavy load. Added a bit more error handling if we receive wrong data form mISDN (e.g. if we crashed before => handle_err() ). Added first steps to implement the parseing of the connected party number.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17404 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 19:09:26 +00:00
Olle Johansson
f8f83ff9b8 Issue #6884 - manager.c formatting (casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17389 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 19:03:12 +00:00
Olle Johansson
42fddfa075 Formatting cleanup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 18:34:21 +00:00
Olle Johansson
654500ebca Block 17367 from trunk, since it's already fixed (me bad)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 18:30:31 +00:00
Olle Johansson
0a1898d8d6 Issue #6878 - Manager event DNDstate hidden under verbose option (casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17366 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 18:26:24 +00:00
Olle Johansson
37ff50a890 - Don't return AST_DEVICE_UNKNOWN to devicestate engine, since this will
cause a channel walk...
- Doxygen fixed for devicestate.c


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 18:24:41 +00:00
Olle Johansson
982a66a93a Issue #6882
- move "res=-1" out of verbose block. 
- minor code cleanup
Imported from 1.2 branch


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 18:02:40 +00:00
Luigi Rizzo
66adefc789 these files are now unused, corresponding functions are merged
into format_pcm.c



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 17:13:37 +00:00
Luigi Rizzo
6aa460f81d remove an unused function.
Funny enough, compiling with -O6 gives no warning, whereas -O2 gives
a warning for an unused function declared static.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 17:12:35 +00:00
Matthew Fredrickson
a868675e2f chan_iax2 cleanups and optimizations (#6858)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 17:05:01 +00:00
Matt O'Gorman
a536eb6ec7 minor code clean up from 6880
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 16:59:27 +00:00
Matt O'Gorman
b9e7287ce6 adds manager event when an iax2 peer loses registration.
also some minor code clean up. patch from 6868 with minor
changes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 16:15:40 +00:00
Luigi Rizzo
7261d52be1 ogg_vorbis now compiles so put it back in.
On passing, remove an unnecessary initializazion in format_sln.c



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 15:40:47 +00:00
Matt O'Gorman
28fd3a4ef1 Merged revisions 17283 via svnmerge from
https://svn.digium.com/svn/asterisk/branches/1.2

........
r17283 | mogorman | 2006-04-04 10:24:50 -0500 (Tue, 04 Apr 2006) | 3 lines

Adds documentation to show what the w flag.
Patch from Ian Kinner at Digium.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 15:27:47 +00:00
Luigi Rizzo
ac0395fac3 temporarily disconnect ogg_vorbis from the build while i update it
(should be a matter of a couple of hours).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 14:39:22 +00:00
Luigi Rizzo
4beb6deeaa Largely simplify format handlers (for file copy etc.)
collecting common functions in a single place and removing
them from the individual handlers.
The full description is on mantis,
http://bugs.digium.com/view.php?id=6375
and only the ogg_vorbis handler needs to be converted to
the new structure.

As a result of this change, format_au.c and format_pcm_alaw.c
should go away (in a separate commit) as their functionality
(trivial) has been merged in another file.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17243 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 12:59:25 +00:00
Luigi Rizzo
ec67c650ad some fields are const
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 10:57:31 +00:00
Olle Johansson
95de51526a Added information on call-limit and realtime
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 08:01:46 +00:00
Olle Johansson
a0b9439bee Clarify syntax of new manager events that reports a status.
We do not longer approve "ThisEventOn" and "ThisEventOff" named events,
they need to be named "ThisEvent" with a status header showing the
current status.
(Approved by Mark)
Old events won't be changed to keep backwards compatibility,
until we have a revision plan for the AMI.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 07:59:02 +00:00
Mark Spencer
f11fb65262 Does nobody know how to write a linked list properly? I mean seriously!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 05:53:48 +00:00
Olle Johansson
bf4b484e62 Clarify the need for numeric parking positions (imported from 1.2)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-03 20:45:45 +00:00
Olle Johansson
878c88f899 Add tag to NOTIFY headers (imported from 1.2)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-03 20:40:08 +00:00
Matt O'Gorman
234d8cece6 updating cleancount to coincide with 17130
didnt know you are supposed to update that. now i do


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-03 20:23:46 +00:00
Matt O'Gorman
3112b3b49f list word cant be used with g++ and causes problems
with h323.  patch from bug 6446, renames list to chan_list


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-03 19:42:26 +00:00
Christian Richter
a096fbd87d * removed unneeded bc->state field
* added statefullness for bchannel activation/deactivation
* fixed a lot PCM bridging issues
* some debugging logs are now on a higher loglevel



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17128 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-03 19:17:59 +00:00
Olle Johansson
1b6d24a09e Add misdn.txt to doxygen docs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-03 18:42:58 +00:00
Olle Johansson
141d9b693a - Doxygen additions
- Formatting fixes (read guidelines :-) )
- Removing compilation warnings


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-03 18:38:28 +00:00
Matt O'Gorman
319945c922 bug updates chan_h323 to some api changes it
also allows for it to compile once more patch
taken from 6446 with minor mods, similar bugs 6521
and 6560


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17104 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-03 18:36:30 +00:00
Olle Johansson
5fbe9f80e8 Don't add hangup cause on non-final responses. (Imported from 1.2)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-03 17:52:11 +00:00
Olle Johansson
67b460d43c Issue #6848 - Accept MWI subscriptions with no Accept: header
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-03 10:50:56 +00:00
Olle Johansson
f4da579201 Include new README files in index
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-03 07:44:29 +00:00
Tilghman Lesher
5c1268c29d Bug 6861 - Routine should use the specified writetimeout, rather than the default
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-03 07:34:40 +00:00
Tilghman Lesher
552fb750f0 Bug 6862 - No need to initialize memory to zero twice
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-03 07:30:07 +00:00
Mark Spencer
628537c7a8 Minor demo cleanups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-03 01:48:59 +00:00
Mark Spencer
8b53dd0b7e Cleanup URI (when none is specified) and make sure threads are stand alone
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-02 23:55:15 +00:00
Mark Spencer
77a48c6266 Minor cleanup in wakeup logic
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16975 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-02 20:11:55 +00:00
Mark Spencer
6cfd28423c Unify manager behind a single event queue
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-02 19:59:55 +00:00
Mark Spencer
f69e6b9206 Properly handle empty prefix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-02 09:10:43 +00:00
Tilghman Lesher
8a366ba988 Reduce debugging messages from WARNING to DEBUG
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16922 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-02 06:27:54 +00:00
Tilghman Lesher
defd50c63e Fix formatting of the frog code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16921 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-02 06:17:47 +00:00
Mark Spencer
c1d5485fe4 Make excessive debug optional
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-01 20:39:33 +00:00
Luigi Rizzo
872fe43af1 fix style and printf format errors in the frog command.
(it's april first i guess...)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16886 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-01 18:18:20 +00:00
Jim Dixon
44d1382a05 Removed "frog" command (so it could be moved to cli.c)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-01 12:56:50 +00:00
Jim Dixon
554cc322ed Added "frog" CLI command, which performs frog-in-a-blender calculations.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-01 12:54:04 +00:00
Mark Spencer
bfba044b5f Flesh out the remainder of the manager + http changes and create a sample application to partially
demonstrate the capability of manager over http.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-01 08:49:54 +00:00
Olle Johansson
46a1b7c73b Don't add ast_extension_state on re-subscribes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-01 00:44:36 +00:00
Olle Johansson
2240245389 Reverse revision 16804 that disables authentication
and a lot of other issues...


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-01 00:24:05 +00:00
BJ Weschke
225d8d5270 Don't process re-subscribes as new subscriptions.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 21:02:23 +00:00
Olle Johansson
b7c52b3416 Typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16775 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 19:41:35 +00:00
Olle Johansson
1a492e675f - Reference to doc/security.txt instead of SECURITY
- Instruct people to READ THE DOCUMENTATION!!!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16774 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 19:40:27 +00:00
Russell Bryant
e536a9c6df move a NULL check to before the first time the pointer is dereferenced (issue #6832)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 19:14:28 +00:00
Russell Bryant
a13ab2f377 - code formatting tweaks
- use the callno stored in a local variable
- store the result of atoi() so it's only called once
(issue #6833)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 19:02:27 +00:00
Russell Bryant
813c445686 Merged revisions 16744 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r16744 | russell | 2006-03-31 13:42:09 -0500 (Fri, 31 Mar 2006) | 2 lines

fix the situation where bindport is specified but bindaddr is not (issue #6616)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16745 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 18:43:45 +00:00
Kevin P. Fleming
2de95d53bc Merged revisions 16742 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r16742 | kpfleming | 2006-03-31 12:24:22 -0600 (Fri, 31 Mar 2006) | 2 lines

ensure that hint watchers (subscribers) cannot be added or removed while the dialplan is being modified

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16743 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 18:28:52 +00:00
Russell Bryant
a4bbb3ff90 make an error message more descriptive (issue #6855)
M    rtp.c


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 17:46:03 +00:00
Olle Johansson
83b7de9463 Doxygen fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 16:02:29 +00:00
Olle Johansson
2994fa390c Make REG_STATE_* enum
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16690 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 15:19:04 +00:00
Olle Johansson
40b71d4b39 Don't accept new INVITE if we already have one pending.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 15:07:36 +00:00
Luigi Rizzo
03ac858251 trailing whitespace/ useless extern removal
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 15:02:52 +00:00
BJ Weschke
cc0b49d927 Provide warning about current behavior of autofill = yes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 13:51:37 +00:00
Luigi Rizzo
50fd665c09 more trailing whitespace and extern removal
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 10:35:25 +00:00
Luigi Rizzo
7b06841395 removal of trailing whitespace and useless 'extern'
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 10:29:50 +00:00
Luigi Rizzo
0b655c3ce9 minor cleanup: localize a variable and replace i++; i++ with i +=2;
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 10:13:22 +00:00
Luigi Rizzo
0ff1c42675 useless 'extern' and trailing whitespace removal
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16651 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 10:11:10 +00:00
Luigi Rizzo
8d14d291ce another batch of whitespace removal
(trailing space-tabs, and useless 'extern')



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16650 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 10:06:42 +00:00
Luigi Rizzo
106b76940f remove useless 'extern' and trailing whitespace.
(this is a whitespace-only change)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16646 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 10:02:52 +00:00
Luigi Rizzo
94b886650c fix formatting
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 09:53:05 +00:00
Luigi Rizzo
ad47951739 minor code simplifications - no need to use temporary
variables.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 09:50:54 +00:00
Joshua Colp
5880a7f513 Do not leave a thread in limbo if an error occurs, or if testing packet loss.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16617 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 00:53:32 +00:00
Olle Johansson
d80f3bc20e Issue 5852 (casper) Code clean up, adding documentation on new switches. Thanks!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 00:33:28 +00:00
Olle Johansson
adf8c8deda - Change AST_INLINE_AP to AST_INLINE_API for non-386 systems :-)
- Doxygen changes


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16615 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 00:25:50 +00:00
Luigi Rizzo
7dbeaa4ef0 remove useless 'extern' in function declarations.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16611 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 00:11:45 +00:00
Mark Spencer
f073e16896 Add NetBSD for credits for editline
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16602 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 23:42:57 +00:00
Luigi Rizzo
a7ec530a64 initial implementation of support for native atomic ops.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16601 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 23:26:22 +00:00
Tilghman Lesher
9a9ab4e7cf Merged revisions 16581 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r16581 | tilghman | 2006-03-30 16:56:35 -0600 (Thu, 30 Mar 2006) | 2 lines

Bug 6853 - Manager fixes: 1) extra ActionID, 2) missing colon

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 23:05:58 +00:00
Tilghman Lesher
24bc847e9d Merged revisions 16579 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r16579 | tilghman | 2006-03-30 16:46:06 -0600 (Thu, 30 Mar 2006) | 2 lines

Bug 6849 - trivial typo fix

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 22:47:11 +00:00
Joshua Colp
5b1069f262 Add more 64-bit detection goodness (issue #6850 reported by evilbunny)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 21:57:49 +00:00
Joshua Colp
dc43a00d19 Block 1.2 fix for amd64, trunk version coming soon
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16563 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 21:52:04 +00:00
Luigi Rizzo
7e2b1c539a localize a variable
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16562 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 21:49:24 +00:00
Luigi Rizzo
b7467d7d09 use ast_strdup instead of strdup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 21:47:22 +00:00
Luigi Rizzo
c163911efe don't use 8000, use DEFAULT_SAMPLE_RATE
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 21:45:43 +00:00
Luigi Rizzo
6c232811c0 as discussed with Mark a few weeks ago, the 'newstack' argument
in pbx_exec is always 1 so it can be removed.

This change also takes away ast_exec_extension(), and lets all
switch functions (exists, canmatch, exec, matchmore) all use the same
prototype, which makes the code a bit cleaner.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 21:29:39 +00:00
Olle Johansson
c6d1bfbb31 Doxygen doc updates
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 19:05:00 +00:00
Kevin P. Fleming
4e5ea82b7e deprecate insecure=very and insecure=yes, since we have more explicit versions available now
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16548 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 18:17:36 +00:00
Joshua Colp
bf7f1ec0f8 Merged revisions 16534 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r16534 | file | 2006-03-30 13:55:28 -0400 (Thu, 30 Mar 2006) | 2 lines

Do not exceed the array size for maximum allowed moh files. (issue #6842)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 17:58:16 +00:00
Luigi Rizzo
1de8b16b1e remove AST_MUTEX_DEFINE_EXPORTED, which now has no more clients.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16533 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 17:11:49 +00:00
Luigi Rizzo
48864ab877 do not export the tzlock and the list head, and introduce a new method,
ast_walk_indications(), to walk through the list of indications.
The new method returns an unlocked record, which is no different from the
behaviour of other existing methods in indications.c
(i.e. they all need to be fixed, with refcounts or some similar
method).

Note that ast_walk_indications() uses the pointer argument only as a
search key, so its implementation is completely safe.

In turn, this change allows the removal of AST_MUTEX_DEFINE_EXPORTED.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16532 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 17:10:11 +00:00
Luigi Rizzo
6d2fbc0b90 document why there are so many versions of the mutex functions,
with their pros and cons, and that we should converge to a single method.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 16:09:23 +00:00
Kevin P. Fleming
4ee62f1bcd be more careful when merging in a branch with automerge properties :-(
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 14:19:25 +00:00
Russell Bryant
03ce34e1aa convert internal timing to be stored as a flag in the ast_options flags
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 06:26:16 +00:00
Olle Johansson
50f0b12880 Issue #5374 - Enable internal timing of generators (cmantunes)
Thanks everyone involved for hard work, testing and testing!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 06:07:04 +00:00
Olle Johansson
2c4ebe356e Issue #6450 - Don't remove characters from SIP uri's when not needed
Patch by jcomellas, heavily modified by oej


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 04:16:38 +00:00
Joshua Colp
0c134c5cba Fix IAX2 multithreaded scheduling (issue #6840)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16386 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 03:16:09 +00:00
Olle Johansson
dfc9952986 Set default value of adsipark (import from 1.2)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 01:35:56 +00:00
Olle Johansson
7ffb04a7ec Block patch on app_groupcount.c from 1.2
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 01:30:15 +00:00
Olle Johansson
eb94c40702 Typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16305 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 00:32:01 +00:00
Olle Johansson
3d1f9b747e Formatting fix.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 00:30:49 +00:00
North Antara
139b07c76c whitespace "fixes", and general cleanup
It's nice to have consistency in sample configs too.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 21:08:13 +00:00
Luigi Rizzo
c01fc0ee03 the comment character is ';' not '#' ...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 20:09:10 +00:00
Olle Johansson
16728da6a7 Whitespace fix forgotten by someone who added a note about needing to fix this...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 20:08:14 +00:00
Russell Bryant
aa029f44f0 convert calloc and malloc+memset to ast_calloc and remove duplicate error messages
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16195 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 19:54:41 +00:00
Tilghman Lesher
a532c787f2 Merged revisions 16192 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r16192 | tilghman | 2006-03-29 13:11:18 -0600 (Wed, 29 Mar 2006) | 2 lines

Bug 6830 - Let GosubIf work with the same conditions as a GotoIf (change in API approved by Russell)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 19:30:57 +00:00
Olle Johansson
13bcb6ed7d Update to code documentation and developer guidelines.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 17:09:33 +00:00
Luigi Rizzo
b5c5446ec4 another batch of cli simplifications.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 16:51:51 +00:00
Luigi Rizzo
8f5bf61ef8 mention issues with the protection of the list used in indications.c
(part of work done to figure out what is used and what is not in lock.h)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 16:00:51 +00:00
Christian Richter
acacae4e68 fixed no dtmf detect on 64 bit
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16085 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 14:26:43 +00:00
Tilghman Lesher
0f48e2ba9e Merged revisions 16082 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r16082 | tilghman | 2006-03-29 08:10:23 -0600 (Wed, 29 Mar 2006) | 2 lines

Bug 6835 - Updates to GotoIf help text

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 14:24:30 +00:00
Mark Spencer
8b5670d8f1 Fix build of asterisk again (ahem, committers!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16051 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 05:12:24 +00:00
Olle Johansson
9e9db42562 Doxygen updates
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16012 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 04:42:07 +00:00
Olle Johansson
a6a0a8a287 - Formatting fixes
- Doxygen


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16011 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 04:34:55 +00:00
Russell Bryant
1caeee1c61 oops! :)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 04:19:23 +00:00
Russell Bryant
d8b204563f git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16009 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-03-29 04:16:09 +00:00
Russell Bryant
9b436eecb7 fix the provided unsetenv for solaris to return an int like it's supposed to
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 04:14:12 +00:00
Russell Bryant
6601f4deba conversion from malloc to ast_malloc
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 04:09:31 +00:00
Luigi Rizzo
705ccb2218 Introduce an utility macro to set base, offset and
datalen of a frame, which is a very common operation.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15970 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 02:14:38 +00:00
Luigi Rizzo
68ab41ebfe Add two widely used constants
#define DEFAULT_SAMPLE_RATE 8000
#define DEFAULT_SAMPLES_PER_MS  ((DEFAULT_SAMPLE_RATE)/1000)

to the main header, and remove equivalent ones from plc.[ch]

This will simplify the cleanup of the codec/ and formats/ files.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15969 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 02:12:31 +00:00
North Antara
150e0b72cc Added more "valid" phone types to skinny sample config.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15938 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 01:08:01 +00:00
Olle Johansson
b366c4062e Issue #6823 - Registration and port numbers. (from 1.2)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 01:01:09 +00:00
Kevin P. Fleming
c379ae8896 Merged revisions 15896 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r15896 | kpfleming | 2006-03-28 18:32:10 -0600 (Tue, 28 Mar 2006) | 2 lines

ensure that list traversal loops which skip entries properly update the 'previous entry' pointer so when entries _are_ removed the list does not get damaged

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15897 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 00:32:52 +00:00
Luigi Rizzo
c0f2f5b5b8 Normalize some cli completion code.
On passing, replace strdup with ast_strdup() and remove
the now useless checks for NULL since ast_strdup() can handle
it correctly.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15895 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 00:30:29 +00:00
Olle Johansson
7058495f97 Doxygen fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15860 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 23:55:52 +00:00
Luigi Rizzo
f148a4df0f more command completion normalization.
also change some explicit constant with sizeof()



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15859 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 23:52:21 +00:00
Luigi Rizzo
e735f507b7 more command completion normalization
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 23:40:28 +00:00
Luigi Rizzo
096bf1511f another batch of cli simplifications
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15857 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 23:33:02 +00:00
Luigi Rizzo
b94f6a6df4 normalize/simplify a bit of the command completion code.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15856 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 23:20:13 +00:00
Luigi Rizzo
fb75d34e70 use ast_cli_complete() to largely simplify the command completion code.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15852 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 23:06:46 +00:00
Luigi Rizzo
595775c6e6 black magic to make sure we recompile things after the changes to cli.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 22:59:34 +00:00
Kevin P. Fleming
bb87cd151b make 'sip show subscriptions' include context for subscribed hints
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15819 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 22:47:02 +00:00
Luigi Rizzo
4ca73f8ae4 as reported in mantis #6066, fix a bunch of cli bugs and
inconsistencies.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 22:44:55 +00:00
Luigi Rizzo
e5c455e15a bring in the code that was discussed on Mantis #6068,
which is the basis for several simplifications and fixes
to the CLI interfaces.

The core is in cli.c, some documentation on a new function
to help command completion is in cli.h, and one line of
glue code in the other two files.

Next step is to bring in the patches described in #6066 and
other simplifications.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 22:25:08 +00:00
Kevin P. Fleming
e255a172f0 let's format that output sanely instead :-(
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15816 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 22:14:50 +00:00
Kevin P. Fleming
4bf8e92c1d make 'show hints' CLI command show context name for each hint
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15815 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 22:09:38 +00:00
Luigi Rizzo
e9b7424737 The condition to check the zaptel version was too strict.
If you are compiling with WITHOUT_ZAPTEL=1, you can also
work with older version of zaptel, and there is no reason
not to allow that.

This should help various people mentioning on the -dev
list that there were issues with newer zaptel versions
on FreeBSD, and so they had to use older version.
(This includes me, btw!)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 21:24:48 +00:00
Luigi Rizzo
2326d0d499 Bring in the new loader code as described in mantis #4377
and updated to today's version.

The core of the patch is only two files, loader.c
and include/asterisk/module.h, with the other files
touched only to adapt non-standard usages of the
reference counts and localuser lists.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 21:15:10 +00:00
Russell Bryant
f7debd1823 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15745 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-03-28 20:24:08 +00:00
Luigi Rizzo
f84e5cfd43 fix a bug introduced in 15187 that scrambled the flags and
among other things prevented proper handling of NAT.
Don't think it exist in 1.2 but be careful if 15187 is merged.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15744 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 20:22:25 +00:00
Russell Bryant
3de0204481 Merged revisions 15703 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r15703 | russell | 2006-03-28 14:47:03 -0500 (Tue, 28 Mar 2006) | 2 lines

fix Bus Error on sparc (issue #6354)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 19:49:30 +00:00
Russell Bryant
1ddae90e53 only display a debug message if iaxdebug is enabled as well (issue #6673)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15702 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 19:31:41 +00:00
Olle Johansson
147ae336d2 Fix NAT support breakage for peers with qualify=yes (imported from 1.2)
- Blame KLM, still jetlagged :-)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 19:09:51 +00:00
Kevin P. Fleming
f7c2eed26a ensure that 'zap show channel' will indicate that the echo canceler has been disabled when CED has been detected on the channel
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15662 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 19:00:21 +00:00
Russell Bryant
7298d3feb3 Merged revisions 15658 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r15658 | russell | 2006-03-28 13:09:05 -0500 (Tue, 28 Mar 2006) | 2 lines

fix the order in which for loops are expanded (issue #6810)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15659 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 18:13:53 +00:00
Russell Bryant
78f7235d04 store f->callno in a local var (issue #6818)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15619 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 18:00:05 +00:00
Kevin P. Fleming
584ab24577 oops :-(
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15618 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 17:53:27 +00:00
Russell Bryant
dea8078eef conversions to S_OR (issue #6817)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15617 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 17:52:50 +00:00
Tilghman Lesher
17938ac026 Merged revisions 15615 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r15615 | tilghman | 2006-03-28 11:48:18 -0600 (Tue, 28 Mar 2006) | 2 lines

Bug 6815 - Adding quotes to make bash happy

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 17:49:39 +00:00
Olle Johansson
5edae1cba0 Fix typo (thanks, North) and update docs for IP-tos settings
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15614 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 17:18:02 +00:00
Luigi Rizzo
d0bc6c20a7 - remove an unnecessary cast and recomputation of (timeout - now);
- remove useless recomputations of strlen(word) in a loop, and
  normalize the form of complete_peer_helper();
- move LOCAL_USER_ADD() to after the verification of arguments,
  thus removing the need for one LOCAL_USER_REMOVE() call.

The three chunks of the patch are fully disjoint.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 15:19:32 +00:00
Luigi Rizzo
387d37469d remove a few unneeded calls to strlen, and replace a while()
loop with the equivalent function strchr()



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 14:30:31 +00:00
Luigi Rizzo
0159823ede Use the standard macros to manipulate usecount.
This is in preparation to the import of the new loader.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 14:15:13 +00:00
Luigi Rizzo
08df3610a6 update example file
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 14:04:27 +00:00
Luigi Rizzo
59f0e4c7dd remove trailing whitespace
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 13:58:34 +00:00
Russell Bryant
41f8e3728e disable the http server by default at the request of people on IRC
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15518 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 13:52:57 +00:00
Luigi Rizzo
606c7dcb93 remove the long since unused STANDARD_LOCAL_USERS macro
so that new apps will not try to use it by mistake.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15517 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 13:52:04 +00:00
Luigi Rizzo
45edaa4c3a optimize a bit name completion by avoiding repeated calls to
strlen(word), localize variables and normalize the test
for finding the candidate string.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15516 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 13:46:04 +00:00
Luigi Rizzo
bf2ae44338 fix documentation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 13:23:05 +00:00
Kevin P. Fleming
8410e0d681 support subscription-based MWI, and use proper Call-ID on NOTIFY messages (issue #6390)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15476 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 04:21:21 +00:00
Kevin P. Fleming
0b5f2a5d3f use proper file name
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 03:36:17 +00:00
Kevin P. Fleming
278b8e8fc7 improve IP TOS support for SIP and IAX2 (issue #6355, code from jcollie plus modifications)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 03:28:52 +00:00
Olle Johansson
ddaeaae214 Issue #6736 - use flags for OPTIONs messages
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-27 23:49:44 +00:00
Olle Johansson
2c9ecd7baa Reverting previous patch. Ok, let's take this from 1.2 instead... :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-27 23:41:21 +00:00
Olle Johansson
e4c8021b7d Issue #6736 - Enable NAT flags for OPTIONs requests (Thanks casper!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-27 23:39:48 +00:00
Olle Johansson
0b39c35161 Issue #6597 - Show correct port in "sip show registry" - import from 1.2 branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-27 23:32:34 +00:00
Olle Johansson
450bc8dad6 Issue #6409 - Make calls to URI without username go to "s" extension (imported from 1.2)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15375 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-27 23:13:31 +00:00
North Antara
e9cf7dbfff Changed some "register" methods to the proper "unregister" method. This is in a #if 0 block, but it may still be useful someday.
Thanks eliel.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-27 21:13:54 +00:00
Matt O'Gorman
a5ece3388a Janitor work converting !ast_strlen_zero(a)?a:b
to S_OR functions. from bug note 6805 with minor
modifications.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-27 19:31:54 +00:00
Christian Richter
f274b642aa fixed bug that we don't allocate the bchan in setup_acknowledge already .. wonder why this wasn't fixed eearlier ..
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15249 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-27 16:15:44 +00:00
Christian Richter
bd4715f3bc fixed hicom busy bug, we now see if the systemphone is busy, also fixed the immediate=yes does not work anymore issue
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15220 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-27 10:13:11 +00:00
Kevin P. Fleming
15873eb39c simplify flags/page2_flags stuff by using arrays instead
enhance handle_common_options to be able to set flags in the second set of flags (what used to be page2_flags)
various other minor fixes


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15187 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-27 04:54:06 +00:00
Kevin P. Fleming
767b42b6b6 remove accidentally merged properties
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-27 03:40:17 +00:00
Olle Johansson
83d9331261 Issue #5427
- Enable videosupport per device
- Implement maxcallbitrate setting for video calls

Patch by John Martin, thanks!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-27 03:35:49 +00:00
Olle Johansson
18de2b7787 Issue #6705 (oej)
- Implement option for allow/disallow subscriptions
- Implement option for allow/disallow overlap dialling
- Set default to disable overlap dialling in sip.conf.sample for new installations
- Remove overlap dialling from subscription logic


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-27 02:57:17 +00:00
Kevin P. Fleming
968af1b45d rename file to match new application name
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-26 23:46:06 +00:00
Kevin P. Fleming
5c6c266aa9 rename application to have a more logical name
various code cleanups
don't steal copyright from author


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-26 23:45:53 +00:00
Russell Bryant
e85d63aa11 use ast_calloc instead of calloc, and do a little bit of tweaking on the code formatting
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15026 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-26 16:55:34 +00:00
Russell Bryant
813ab1aff0 fix asterisk header include format and add the doxygen header
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-26 16:48:47 +00:00
Russell Bryant
d0b003a427 conversions to S_OR (issue #6803)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-26 16:08:42 +00:00
Russell Bryant
eaeb8abc59 suppress some compiler warnings on mac
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-26 06:59:10 +00:00
Mark Spencer
9164eac21a Add micro-http server and abstract manager interface, make snmp not die
on reload.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-25 23:50:09 +00:00
Kevin P. Fleming
b0ac62573a revert loader changes that have clearly not undergone adequate testing before commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-25 23:22:44 +00:00
Tilghman Lesher
d104a6d622 Bug 6508 - Redirect arbitrary channel to another extension from the dialplan
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14915 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-25 06:14:10 +00:00
Tilghman Lesher
bdd24455b4 Bug 4377 - Round 2 of the loader updates
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14886 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-25 06:02:46 +00:00
Tilghman Lesher
0af770edd1 Bug 6670 - Additional parameters to the CHANNEL func
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-25 05:24:52 +00:00
Tilghman Lesher
67aa4a721d Merged revisions 14868 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r14868 | tilghman | 2006-03-24 23:07:52 -0600 (Fri, 24 Mar 2006) | 2 lines

Bug 6601 - More configuration abilities for the RH init script

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-25 05:10:07 +00:00
Tilghman Lesher
ff9fc4f606 Merged revisions 14830 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r14830 | tilghman | 2006-03-24 23:01:16 -0600 (Fri, 24 Mar 2006) | 2 lines

Fix incorrect size of zeroing (left over from when maxmsg was hardcoded at 100)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14837 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-25 05:02:19 +00:00
Tilghman Lesher
39a99c65c2 Merged revisions 14821 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r14821 | tilghman | 2006-03-24 22:09:04 -0600 (Fri, 24 Mar 2006) | 2 lines

Bug 6783 - When context is specified, voicemail should look for mailboxes in that context

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14822 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-25 04:10:35 +00:00
Luigi Rizzo
82b0400322 Do the (expensive) LOCAL_USER_ADD only after we are sure
that arguments are valid.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-24 18:33:48 +00:00
Luigi Rizzo
b3ad3a7556 as discussed on the -dev list, introduce a macro to simplify the
writing of common constructs like

	chan = !ast_strlen_zero(cdr->channel) ? cdr->channel : "<unknown>";

(or the if/then/else form) into

	chan = S_OR(cdr->channel, "<unknown>");

The name can be changed if we find a better (and not too long) one;
currently, it is S as String, OR as it mimics the behaviour of
the || operator, but applied to strings.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-24 15:06:42 +00:00
Luigi Rizzo
574e9ae7a8 Add missing
#include "asterisk.h"  
    ASTERISK_FILE_VERSION(__FILE__, "$Revision$")

to these files.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-24 15:01:22 +00:00
Russell Bryant
b314ed621f Merged revisions 14704 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r14704 | russell | 2006-03-24 09:48:11 -0500 (Fri, 24 Mar 2006) | 2 lines

use the correct variable in an error message (issue #6791)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-24 14:51:15 +00:00
BJ Weschke
6d22be794f Merged revisions 14659 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r14659 | bweschke | 2006-03-23 22:53:42 -0600 (Thu, 23 Mar 2006) | 3 lines

 Fix a typo in the app description


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14660 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-24 04:55:09 +00:00
BJ Weschke
d09b5ff20b Doxygen typo fix.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14612 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-24 00:55:06 +00:00
BJ Weschke
f2aef53f84 Block r14610 from /trunk as it conflicts with sched.h in /trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14611 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-24 00:54:27 +00:00
Kevin P. Fleming
322f53d8b8 don't treat timeouts as errors in ast_cond_timedwait
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-24 00:03:21 +00:00
Kevin P. Fleming
c26786fd81 compute scheduler thread timeout properly
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-23 23:57:18 +00:00
Kevin P. Fleming
39464dfe09 commit file's work to convert iax2 multithreading to use pthread conditions instead of signals (with some modifications)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14570 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-23 23:11:09 +00:00
Joshua Colp
539f8a6502 Merged revisions 14523 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r14523 | file | 2006-03-23 17:51:50 -0400 (Thu, 23 Mar 2006) | 2 lines

Issue #6764 - Return BUSY signal when other party is busy at Attended Transfer (Reported by mnachev)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-23 22:00:11 +00:00
Matthew Fredrickson
ba8f7b8819 Allow channels to be moved if channel change is requested in SETUP_ACK, also add a WAY cool new field to the nsf option
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-23 21:41:23 +00:00
Kevin P. Fleming
be537d95eb ensure global variables lock is held during 'show globals' CLI command
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-23 21:16:46 +00:00
Kevin P. Fleming
4b6ab497c8 correct typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-23 21:06:26 +00:00
Kevin P. Fleming
2b408e88a9 don't wrap this in ifdef... using va_start is safe on all platforms :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-23 21:01:19 +00:00
BJ Weschke
fb8ff8ed57 Merged revisions 14467 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r14467 | bweschke | 2006-03-23 14:43:05 -0600 (Thu, 23 Mar 2006) | 3 lines

 Bug #5884 - fix a possible race state in app_meetme when a channel has gone away and we are reading continuously for more frames. (mneuhauser)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-23 20:48:08 +00:00
Russell Bryant
4c1d49f5c8 Merged revisions 14462 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r14462 | russell | 2006-03-23 15:13:48 -0500 (Thu, 23 Mar 2006) | 2 lines

don't crash when asked to read from a file that doesn't exist (issue #6786)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-23 20:15:01 +00:00
Olle Johansson
f554c03652 - In response to asterisk-users discussion - show which peers in "sip show peers" and "sip show peer" that are cached realtime peers.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-23 19:58:32 +00:00
Luigi Rizzo
dde76c531c Replace ast_say_* functionn with function pointers, so that modules
can override them.
On passing, fix a potential problem in the top level Makefile:

if a static library is not referenced by any of the core objects,
it is not linked in the main program, and will not be available
to modules, which leads to failure at runtime when the modules
are loaded.
This is the case of stdtime/localtime.o, which supplies some core
symbolx, but is only linked in as a library. Fix the problem by
linking in the object.

NOTE: this is intended as a temporary aid to replace the
existing say.c with a newer implementation. Once the
task is completed, we may decide whether or not the ast_say*()
functions should be pluggable or not and possibly revert
part of this change.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-23 14:28:16 +00:00
Luigi Rizzo
408a6e25e4 remove duplicate CFLAGS and SOLINK definitions that are
already in the top level Makefile



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-23 13:39:36 +00:00
Luigi Rizzo
6be9f52948 Fix a compile problem on FreeBSD for a missing header.
In this specific case the problem triggered on app_amd.c,
but it keeps coming out from time to time so it is better
to fix it in a more central place.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14320 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-23 12:47:50 +00:00
Joshua Colp
b60145bbf7 Merged revisions 14276 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r14276 | file | 2006-03-22 18:18:32 -0400 (Wed, 22 Mar 2006) | 2 lines

Fix a minor code issue

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-22 22:28:36 +00:00
Joshua Colp
7b54d83b1e Merged revisions 14275 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r14275 | file | 2006-03-22 18:13:30 -0400 (Wed, 22 Mar 2006) | 2 lines

Issue #6781 - Verbose levels not enforced in app_voicemail (Reported by flobi)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-22 22:27:11 +00:00
Joshua Colp
6cda4c3b8b Merged revisions 14234 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r14234 | file | 2006-03-22 17:38:32 -0400 (Wed, 22 Mar 2006) | 2 lines

Issue #5918 - Disposition showing FAILED even though call is answered successfully (Reported by tracinet)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-22 21:43:38 +00:00
Joshua Colp
ca27f447e0 Issue #6780 - ast_pbx_outgoing_cdr_failed description fix. (Reported and fixed by casper) - imported from 1.2
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14220 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-22 21:05:24 +00:00
North Antara
2ccaab2ad1 More whitespace and typo fixes for chan_skinny - yay!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14188 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-22 20:45:00 +00:00
Olle Johansson
19af878bac Issue #6766 - Make ;user=phone work again - imported from 1.2
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14141 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-22 09:14:42 +00:00
Olle Johansson
9e1e47450a Issue #6759, generate warning when refusing connection requiring unsupported SIP extensions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-22 08:00:32 +00:00
Jim Dixon
7cfb9b3515 Added separate outsignalling specification, and fixed FEATDMF to allow for
international inbound calls.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 22:31:36 +00:00
Russell Bryant
5bf927546c update enum documentation to reflect recent changes to the ENUMLOOKUP function (issue #6513)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 21:52:30 +00:00
Russell Bryant
1abe304427 add a CLI command that allows converting files to other formats using
the Asterisk file format and codec translator modules (issue #6062)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14027 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 20:45:29 +00:00
Matthew Fredrickson
eb368fdd93 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14001 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-03-21 19:28:12 +00:00
Russell Bryant
cfea89a29a update LOCAL_USER_ADD to use ast_calloc
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 19:19:35 +00:00
Russell Bryant
f882197157 Merged revisions 13964 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r13964 | russell | 2006-03-21 13:59:29 -0500 (Tue, 21 Mar 2006) | 3 lines

add a note explaining how to set the DYNAMIC_FEATURES variable to allow the use
of custom features (issue #6747)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13967 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 19:00:26 +00:00
Russell Bryant
d56674b341 Merged revisions 13961 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r13961 | russell | 2006-03-21 13:21:47 -0500 (Tue, 21 Mar 2006) | 3 lines

fix crash when using the ParkAndAnnounce application.  When using this application,
there will be no peer channel to play the parking announcement to. (issue #6756)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13962 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 18:22:38 +00:00
Russell Bryant
c4601f6235 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13926 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-03-21 17:49:50 +00:00
Russell Bryant
56e532b5ed Merged revisions 13888 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r13888 | russell | 2006-03-21 11:22:16 -0500 (Tue, 21 Mar 2006) | 2 lines

fix spelling of whiskey

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 16:24:19 +00:00
Russell Bryant
19191d1442 add note about phonetic sounds being removed from asterisk-sounds
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13887 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 16:18:54 +00:00
Russell Bryant
0f03e0ef17 Merged revisions 13851 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r13851 | russell | 2006-03-21 10:53:27 -0500 (Tue, 21 Mar 2006) | 2 lines

don't add conference participant if the user hangs up while recording their name (issue #6661)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13852 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 15:55:38 +00:00
Russell Bryant
2a00b76ace spelling and formatting fixes (issue #6760)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 15:12:41 +00:00
Russell Bryant
399f78fe21 This was from issue #6765
Merged revisions 13814 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r13814 | russell | 2006-03-21 09:20:28 -0500 (Tue, 21 Mar 2006) | 3 lines

re-add the Account parameter to the sample call file since it's not really
deprecated since the CDR function is no longer built in

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13815 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 14:23:06 +00:00
Christian Richter
939dda2d6c removed unneeded debugs in level=0
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13787 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 09:47:51 +00:00
Tilghman Lesher
81a70f668e Merged revisions 13748 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r13748 | tilghman | 2006-03-21 00:24:56 -0600 (Tue, 21 Mar 2006) | 2 lines

Bug 6714 - Workaround to avoid retrieving incomplete voicemail message

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 06:28:19 +00:00
Russell Bryant
c114587344 add indications for Malaysia (issue #6758)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 06:04:49 +00:00
Tilghman Lesher
f35aeb0312 Meetme file is parsed with comma-delimiters, not vertical bars
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 06:03:58 +00:00
Tilghman Lesher
98d91f0464 Bug 6699 - Fix for ENUMLOOKUP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13710 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 05:54:04 +00:00
Tilghman Lesher
96ec20c0fc Bug 6745 - Fix for ranges that wrap around the ends
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13709 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 05:48:17 +00:00
Tilghman Lesher
3e6c1cab59 Merged revisions 13707 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r13707 | tilghman | 2006-03-20 23:27:33 -0600 (Mon, 20 Mar 2006) | 2 lines

Do away with some warnings and fix some indentation

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13708 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 05:30:32 +00:00
BJ Weschke
b4ee40d7b8 Fix more svn properties on files that need it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-20 21:25:50 +00:00
BJ Weschke
df444c6a7a Set correct SVN properties on these files.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-20 21:08:10 +00:00
Christian Richter
52eb1ad9d1 removed dynamic switching from transparent to hdlc mode. Instead we've got a config option hdlc=yes now which enables the hdlc controller for a data call
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-20 18:04:05 +00:00
Olle Johansson
3cb5768016 Don't overwrite ANI if it's already sent with IES (imported from 1.2 branch)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-20 17:39:14 +00:00
Christian Richter
a0800bd179 these traceing option do not exist anymore
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-20 10:00:34 +00:00
Russell Bryant
4fa231ed03 fix astmm on sparc or any other architecture that doesn't allow unaligned
memory access


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-20 02:00:30 +00:00
Russell Bryant
419bc78aa3 fix the build of eagi-test on Solaris in combination with astmm
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-19 21:40:42 +00:00
Russell Bryant
4c82ac2e7a fix the return value for the provided unsetenv() for Solaris
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-19 21:28:55 +00:00
Russell Bryant
a3fe92b352 fix memory leak due to not freeing the channel's string fields in
ast_channel_destroy() (issue #6746)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-19 21:01:04 +00:00
Olle Johansson
2654b12320 - Doxygen fixes.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-19 20:23:16 +00:00
Russell Bryant
dfb45b71df convert a few more uses of strlen where ast_strlen_zero should be used
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-19 15:53:40 +00:00
Russell Bryant
222afff88a convert a couple uses of strlen() to use ast_strlen_zero()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13621 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-19 15:42:49 +00:00
Russell Bryant
fc9d3ba21b Merged revisions 13550 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r13550 | russell | 2006-03-19 04:59:55 -0500 (Sun, 19 Mar 2006) | 4 lines

revert the change made in revision 12927 in favor of keeping the original
behavior of the option.  The documentation has now been updated to reflect
the actual behavior.  (issue #6523)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-19 10:11:29 +00:00
Olle Johansson
d7b5a18f4c Fix reference to README files
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13549 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-19 09:35:11 +00:00
Olle Johansson
8bb397b439 Import revision 13547 from branch 1.2 - reset global_rtautoclear at reload
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13548 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-19 09:32:36 +00:00
Olle Johansson
7296dd030e - Remove comment about non-existing XML format ;-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-19 09:08:57 +00:00
Olle Johansson
dbd3fa49fd - change "regcontext" to "global_regcontext" to mark it as a global setting
- show regexten in "sip show peer <name"


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-19 09:07:29 +00:00
Russell Bryant
45651441ec When astmm is in use, define ast_malloc and friends to malloc, etc., so that
it doesn't report that all allocations are coming from utils.h.  Also, add some
more information to the error message astmm reports when a memory allocation
failure occurs.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-19 01:39:14 +00:00
Russell Bryant
ce2d61cc62 suppress compiler warning on mac
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13483 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-19 00:38:02 +00:00
Russell Bryant
df09af8ee3 use ast_calloc instead of malloc+memset and remove some unnecessary initializations
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13453 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-18 19:16:36 +00:00
Russell Bryant
f0a0c8eb29 convert malloc+memset to ast_calloc
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-18 18:55:35 +00:00
Russell Bryant
92f7c2d82d - remove some unnecessary extern keywords
- cleanups to doxygen formatted documentation


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-18 17:38:51 +00:00
Russell Bryant
0838e30076 move the definition of the mappings between extension states and their text
representation into pbx.c so that every file that includes pbx.h does not
unnecessarily get a copy of it


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-17 21:39:36 +00:00
Olle Johansson
0efbe1aa5d Add reference to examples for files and custom, too make it more obious
that you're required to read on... (hello xrobau)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13323 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-17 08:46:31 +00:00
Tilghman Lesher
829135bed3 Merged revisions 13279 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r13279 | tilghman | 2006-03-16 14:05:00 -0600 (Thu, 16 Mar 2006) | 2 lines

Bug 6737 - Fix compile warning on OS X

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-16 20:16:56 +00:00
Russell Bryant
e2b353fca9 fix compiler warning on mac (issue #6737)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13280 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-16 20:11:05 +00:00
Olle Johansson
1a206c1bf8 Clarify documentation for "progressinband" - imported from 1.2
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-16 18:01:08 +00:00
Russell Bryant
4c49c78e2e Merged revisions 13237 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r13237 | russell | 2006-03-16 12:42:46 -0500 (Thu, 16 Mar 2006) | 3 lines

always use the callerid signalling method set in the zt_pvt strucutre as
opposed to the last one read from the config file (issue #6734, with mods)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13238 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-16 17:46:15 +00:00
Olle Johansson
1bad801595 Importing "oops" fix from 1.2 branch.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-16 08:40:45 +00:00
Russell Bryant
971169a2aa git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13162 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-03-15 22:24:11 +00:00
Russell Bryant
cde3711d7c Furthermore, set the disposition to FAILED if the CDR was never even started
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13160 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-15 22:04:49 +00:00
Russell Bryant
62d5f5a7ea don't calculate a duration if the CDR wasn't started, as it will result in a
totally bogus value.  Thanks, Luigi!  :)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-15 21:59:08 +00:00
Tilghman Lesher
cb73379319 Merged revisions 13095 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r13095 | tilghman | 2006-03-15 12:07:06 -0600 (Wed, 15 Mar 2006) | 2 lines

Reverting patch from bug 6667

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13096 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-15 18:15:33 +00:00
Tilghman Lesher
b97c3dd6ae Bug 6316 - Add flag to not speak single user announcement
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-15 17:12:15 +00:00
Olle Johansson
8864646870 Import of rev 13026 from 1.2 branch: Fix parameters to event: header
in SUBSCRIBE request


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13027 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-15 13:06:48 +00:00
Russell Bryant
1bcfff48e4 remove calculations that always evaluate to zero, thanks Luigi!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12995 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-15 00:29:25 +00:00
Russell Bryant
9d2f8b284d add a CLI command that allows conversion of files to other formats using
the Asterisk file format and codec translation modules (issue #6062)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12962 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-14 19:50:27 +00:00
Russell Bryant
9063466dfb update to reflect conversion of the accountcode to use stringfields (issue #6722)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-14 19:09:13 +00:00
Russell Bryant
5db6838b52 update UPGRADE.txt to reflect the last change to chan_iax2
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12960 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-14 19:06:25 +00:00
Russell Bryant
686b512e23 Merged revisions 12927 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r12927 | russell | 2006-03-14 13:41:05 -0500 (Tue, 14 Mar 2006) | 3 lines

when using the G() option to Dial, fix sending the called channel to 1 priority
beyond what was specified (issue #6523)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12928 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-14 18:42:56 +00:00
Russell Bryant
f28abd4020 Merged revisions 12925 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r12925 | russell | 2006-03-14 13:28:39 -0500 (Tue, 14 Mar 2006) | 3 lines

fix a problem with not loading realtime queue members by always reloading a 
realtime queue from the database even if it is found in the list (issue #6680)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12926 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-14 18:30:52 +00:00
Russell Bryant
63056dcb8f add a couple of variables to clarify some code (issue #6700)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12924 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-14 18:11:35 +00:00
Russell Bryant
9df72acbe9 deprecate the mailboxdetail option and always use its behavior, instead (issue #6665)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12923 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-14 18:05:22 +00:00
Russell Bryant
4279bf18f8 clarify which global options are enabled by default
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12897 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-14 16:57:35 +00:00
Russell Bryant
4e6af293f9 add an option to cdr.conf that enables ending CDRs before executing
the "h" extension as opposed to afterwards (issue #6193)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-14 16:49:34 +00:00
Russell Bryant
d3527e5020 add header to fix building with -Werror (issue #6718)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12895 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-14 16:18:20 +00:00
Russell Bryant
9bf08efa16 add a missing header to fix building with -Werror (issue #6717)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-14 16:16:14 +00:00
Russell Bryant
688e355873 catch read/write errors and exit if they occur (issue #6721)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12893 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-14 16:10:44 +00:00
Russell Bryant
48c85e83bd fix build without SCHED_MULTITHREADED defined (issue #6719)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12878 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-14 16:00:06 +00:00
Olle Johansson
7aeb45a0da Small fixes to the messagecount function (while trying to understand
a bug report...)
- Remove unused variable "ret"
- Declare char* pointers in the block where they are used


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12843 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-14 07:17:30 +00:00
Olle Johansson
b4a0e2a8bb - Formatting fix in musiconhold
- One extra doxygen comment in res_features


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-14 07:09:57 +00:00
Tilghman Lesher
fcc0ca8627 Merged revisions 12792 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r12792 | tilghman | 2006-03-13 09:28:35 -0600 (Mon, 13 Mar 2006) | 2 lines

Bug 6667 - Fix for RFC2833 issues

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-13 15:30:02 +00:00
Tilghman Lesher
f86476dd68 Bug 6526 - Add a reference count to avoid crash
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12766 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-13 13:56:34 +00:00
Olle Johansson
f942e6365c Issue 6710: saydate crash. Fix by Luigi Rizzo. Thanks!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12740 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-13 09:02:55 +00:00
Tilghman Lesher
adef31698f Bug 6709 - Simplify extensive embedded ifneq logic (and fix missing endif's)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-13 05:24:13 +00:00
Russell Bryant
a6f2a3899b add some missing braces
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-12 21:17:58 +00:00
Russell Bryant
03163d7753 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12648 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-03-12 19:29:35 +00:00
Russell Bryant
556469d48d add locking to protect the list of global dialplan variables
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-12 19:28:57 +00:00
Russell Bryant
083a9627b5 Merged revisions 12577 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r12577 | russell | 2006-03-12 12:57:37 -0500 (Sun, 12 Mar 2006) | 2 lines

fix build on parisc (issue #6704)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-12 18:07:23 +00:00
Olle Johansson
d61a6c9a1c README files have changed names, better change references too :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12572 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-12 17:27:57 +00:00
Olle Johansson
3b67da1362 - Adding some hangupcauses before hangups
- Removing double warning


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-12 16:47:55 +00:00
Kevin P. Fleming
77fc5f5110 update reference to doc file whose name has changed
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12544 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-12 16:29:24 +00:00
Tilghman Lesher
30a806010a Bug 6459 - tell manager when queue is abandoned
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12501 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-11 15:17:50 +00:00
Christian Richter
0a47c7c240 mISDN mqueue is now head, not a branch anymore
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12497 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-10 14:37:30 +00:00
Olle Johansson
9bbfae80e0 Issue #5937 - Make sure that SIP CANCEL's are retransmitted properly
Importing revision 12495 from 1.2 with changes for svn trunk


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12496 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-10 12:18:00 +00:00
Olle Johansson
11126fee1d Implement enum for retransmit options to various functions.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12494 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-10 12:13:05 +00:00
Olle Johansson
f01ad20393 Doxygen fixes (we renamed a lot of README's recently)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-10 10:41:34 +00:00
Olle Johansson
c169429c63 Update the readme with AstriBank and mISDN support
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12492 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-10 10:38:12 +00:00
Olle Johansson
0cbc59563f Doxygen reformatting
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12491 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-10 10:28:08 +00:00
Mark Spencer
1134f00403 Minor typo fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12483 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-09 21:02:58 +00:00
Christian Richter
8e7dd52695 added option to change the connected party number dialplan (ton)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12481 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-09 18:01:27 +00:00
Olle Johansson
b27fa8bfc7 Support SIP_CODEC channel variable for early media. (Imported from 1.2, with a small
change for const char* channel variables)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12478 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-09 17:41:38 +00:00
Mark Spencer
0752f8e41e Make sure we clear our sched value before we actually schedule the
dereg.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12476 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-09 12:28:07 +00:00
Matt O'Gorman
dad9d7709b allows the table field to be configurable for
cdr_tds.conf.  patch provided by bug 6629 with
minor change.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-08 22:12:20 +00:00
Olle Johansson
52812c2917 Formatting fix.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-08 20:42:47 +00:00
Matt O'Gorman
f553e282e8 minor typo in UPGRADE.txt bug number 6679
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-08 18:52:55 +00:00
Olle Johansson
137422ba91 - Doxygen formatting
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-08 17:41:03 +00:00
Olle Johansson
5a2b0d6c2b Issue #6657 - Ignore 183 Session Progress without SDP (imported from 1.2 rev 12458)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12459 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-08 10:54:40 +00:00
Olle Johansson
06abc680dd Set SIPDOMAIN on 302 redirects.
This way you can catch 302 redirects in the dial plan and see if
the redirect is to a local extension or a remote URI.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12456 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-08 08:36:40 +00:00
Matt O'Gorman
09ea61fc73 added show globals and set global from oej's patch
bug 6506


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-07 22:57:52 +00:00
Olle Johansson
9a475567bd Issue #6627 - Don't reset port number of active peers at reload
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-07 20:47:24 +00:00
Christian Richter
2c1cd943d0 fixed #6642 in trunk as well, sorry i really didn't want to copy this issue ... grrrr
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-07 19:34:23 +00:00
Olle Johansson
5ed117e976 Doxygen changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-07 17:55:33 +00:00
Christian Richter
5cd1828467 when receiving disconnect with inband info, we don't send release immediately, we also don't inform asterisk with hangup or congestion, since we want to hear the inband message.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12315 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-07 12:17:35 +00:00
Christian Richter
bcbcdaa67c added misdn port down to send a L1 Deactivate to a NT Port. changed some default values regarding jitterbuffer.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-07 11:16:56 +00:00
Christian Richter
21735de56d added a bit more detailed description for the echotraining parameter, also changed the default from 1 to 2000. The default for the upper_threshold is now 0
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-07 11:08:09 +00:00
Olle Johansson
e3f05acab2 Add accountcode to sip_peer dialplan function
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-07 09:57:22 +00:00
Tilghman Lesher
bb92e0ec1f Bug 5702 - Realtime patch for meetme
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-07 01:12:09 +00:00
Tilghman Lesher
9756cec534 Merged revisions 12195 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r12195 | tilghman | 2006-03-06 18:05:27 -0600 (Mon, 06 Mar 2006) | 2 lines

Bug 6020 - Race condition where packet could be lost if first packet on list is acked

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-07 00:07:27 +00:00
Tilghman Lesher
cd295a3e4e Oops, didn't get the right meaning of what keywords is supposed to be
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 23:45:37 +00:00
Tilghman Lesher
3d483224c2 Bug 4489 - Jukebox AGI
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 23:39:39 +00:00
Tilghman Lesher
34f64d0891 Bug 6304 - Add Park command to the manager interface
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 23:12:48 +00:00
Tilghman Lesher
d930fdbd61 Merged revisions 12161 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r12161 | tilghman | 2006-03-06 17:03:54 -0600 (Mon, 06 Mar 2006) | 2 lines

Bug 6664 - More fixes for Solaris

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 23:04:56 +00:00
Tilghman Lesher
bbbd23e2bd Bug 6195 - Deadlock solution by Matti
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12136 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 21:16:25 +00:00
Olle Johansson
6e75518b8c Issue #6659 - bad syntax in the Asterisk mib (fix by tholo)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 18:47:43 +00:00
Olle Johansson
6fa84dc4ce Add credit for the poll.c emulation layer for BSD
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 18:43:10 +00:00
Olle Johansson
aaf783fb51 Blocking patch for ast_strundup in 1.2
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12073 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 14:27:48 +00:00
Olle Johansson
9675cd2d42 Make astmm compile (imported from 1.2)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12041 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 11:11:11 +00:00
Olle Johansson
cfbce6db40 Revert, needs to be fixed in 1.2 first
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12031 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 11:03:08 +00:00
Olle Johansson
1bda384bb8 Fix compilation with astmm
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12025 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 11:02:12 +00:00
Olle Johansson
ab758ab2ed Portability issue - make stringfields work on FreeBSD 4.x (oej/rizzo)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12012 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 10:49:15 +00:00
Olle Johansson
9c35741e5f Issue #6628 - Disable res_snmp on incompatible platforms until
we have a resolution for the conflict. (Corydon's patch)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12011 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 10:46:36 +00:00
Olle Johansson
7d3ef37477 Initialize variable (fix by Luigi Rizzo)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11983 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 09:43:59 +00:00
Russell Bryant
99206286fb Merged revisions 11946 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r11946 | russell | 2006-03-05 21:32:35 -0500 (Sun, 05 Mar 2006) | 2 lines

fix a typo in the description of the ringtimeout option

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 02:33:36 +00:00
Olle Johansson
5bf234f2ba Fix bad fix.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11914 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-05 14:07:06 +00:00
Olle Johansson
1bff19f219 Some days... Sorry.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-05 13:52:58 +00:00
Olle Johansson
13a3c7299a Oops
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-05 13:52:26 +00:00
Olle Johansson
6730f817fd Clear almost all of page2 flags at reload (different fix from 1.2 branch)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-05 12:57:34 +00:00
Mark Spencer
24c1501690 Fix some whitespace issues
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-04 18:12:02 +00:00
BJ Weschke
c88e03113f Merged revisions 11778 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r11778 | bweschke | 2006-03-04 06:45:37 -0500 (Sat, 04 Mar 2006) | 3 lines

 Substitute variables in the post_process string (if it exists) before those variables could possibly disappear (channel hangup) #6462


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11779 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-04 11:51:45 +00:00
Matt O'Gorman
02aadcc8ae Russian locale for voicemail from bug patch 6603
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-03 19:14:18 +00:00
Tilghman Lesher
21a8d15be4 Merged revisions 11715 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r11715 | tilghman | 2006-03-03 11:13:37 -0600 (Fri, 03 Mar 2006) | 2 lines

Bug 6638 - Solaris is starting to remind me of RedHat...

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11716 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-03 17:15:51 +00:00
Olle Johansson
d42dc41c96 Adding res_snmp to Tholo's list
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11689 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-03 10:39:51 +00:00
Olle Johansson
a2902c14a2 Imported revision from 1.2 branch.
------------------------------------------------------------------------
r11659 | oej | 2006-03-03 09:12:33 +0100 (Fri, 03 Mar 2006) | 2 lines
Changed paths:
   M /branches/1.2/README

Change of URL 




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11660 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-03 08:27:11 +00:00
Tilghman Lesher
ffe5ffda17 Merged revisions 11634-11635 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r11634 | tilghman | 2006-03-02 18:34:52 -0600 (Thu, 02 Mar 2006) | 2 lines

Bug 6638 - Change from a historic BSD command to a POSIX command for determining username

........
r11635 | tilghman | 2006-03-02 18:38:14 -0600 (Thu, 02 Mar 2006) | 2 lines

Bug 6638 - Use POSIX command for Solaris

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-03 00:41:19 +00:00
Tilghman Lesher
81811a3a27 Merged revisions 11609 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r11609 | tilghman | 2006-03-02 16:26:30 -0600 (Thu, 02 Mar 2006) | 2 lines

Bug 6637 - Fixes for Solaris

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-02 22:27:50 +00:00
Tilghman Lesher
47881bd74f Merged revisions 11607 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r11607 | tilghman | 2006-03-02 16:19:52 -0600 (Thu, 02 Mar 2006) | 2 lines

If debugging, the frame pointer is helpful

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11608 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-02 22:24:44 +00:00
Matt O'Gorman
3775835bd0 informs people of changes made in commit 11586, and
bug 5015, uniqueid, userfield, and usegmt are 
definable from cdr.conf now.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-02 21:26:45 +00:00
Matt O'Gorman
7377ebbd2e cdr_csv logging parameters in cdr.conf
usegmtime, log date/time in GMT
 loguniqueid log uniqueid
 loguserfield log user field
 patch provided by bug 5015


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11586 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-02 21:04:04 +00:00
Russell Bryant
30a972341a Merged revisions 11561 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r11561 | russell | 2006-03-02 14:05:40 -0500 (Thu, 02 Mar 2006) | 2 lines

fix inaccurate ack message to ChangeMonitor action (issue #6630)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11562 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-02 19:07:17 +00:00
Russell Bryant
82889579d7 Merged revisions 11530 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r11530 | russell | 2006-03-02 01:16:26 -0500 (Thu, 02 Mar 2006) | 2 lines

make the terminology used in the synopsis match the option description

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-02 06:17:01 +00:00
Russell Bryant
031f10fdbd Merged revisions 11528 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r11528 | russell | 2006-03-02 01:11:53 -0500 (Thu, 02 Mar 2006) | 2 lines

add the -L option to the synopsis on the man page

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-02 06:13:33 +00:00
Tilghman Lesher
8c737ce8b8 Sun's shell: just different enough to cause problems
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11505 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-01 17:57:43 +00:00
Tilghman Lesher
c6f691fbcc Merged revisions 11503 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r11503 | tilghman | 2006-03-01 11:41:52 -0600 (Wed, 01 Mar 2006) | 2 lines

Bug 6615 - Fix 64bit conversion errors by using a long int

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11504 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-01 17:53:05 +00:00
Tilghman Lesher
37a3bdce2a Merged revisions 11479 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r11479 | tilghman | 2006-03-01 00:39:10 -0600 (Wed, 01 Mar 2006) | 2 lines

Bug 6618 - Solaris compatibility fix

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11480 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-01 06:42:04 +00:00
Tilghman Lesher
4cdf248d82 Bug 6619 - Fix Solaris issue with doubled [[
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11478 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-01 06:15:35 +00:00
Olle Johansson
6b8701cffa Whitespace changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11455 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-28 21:04:17 +00:00
Mark Spencer
2639b0a397 Handle disappearing calls for registers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-28 20:58:21 +00:00
Russell Bryant
6cff0b11f0 Merged revisions 11410 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r11410 | russell | 2006-02-28 14:46:04 -0500 (Tue, 28 Feb 2006) | 2 lines

fix the output that indicates whether qualify smoothing is on or not (issue #6608)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-28 19:51:23 +00:00
Russell Bryant
b816ed75b1 Merged revisions 11408 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r11408 | russell | 2006-02-28 14:31:10 -0500 (Tue, 28 Feb 2006) | 2 lines

adjust the keys directory when astvarlibdir is specified in asterisk.conf (issue #6602)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-28 19:32:39 +00:00
Russell Bryant
f3b1b80b93 fix some build issues on FreeBSD (issue #6614)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11407 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-28 19:22:25 +00:00
Russell Bryant
0e611cb4b4 Merged revisions 11382 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r11382 | russell | 2006-02-28 13:31:04 -0500 (Tue, 28 Feb 2006) | 2 lines

add a missing newline in the agi app description (thanks wunderkin!)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11383 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-28 18:34:45 +00:00
Olle Johansson
060ddb9a9d Documentation update
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11354 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-28 12:21:26 +00:00
Christian Richter
bd9c89a710 better default values for jitterbuffer in code and config
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11334 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-28 11:46:55 +00:00
Mark Spencer
ce263dfb94 Oops
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11315 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-28 04:55:37 +00:00
Mark Spencer
6e9d6fdd0f Fix for GCC 3.2.2
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-28 04:32:04 +00:00
Mark Spencer
a26b7f3400 Make sure we clear up schedule numbers before we process schedule
entries.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11313 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-28 04:27:56 +00:00
Mark Spencer
8913eac229 Keep track of the function we're in the middle of doing
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-28 04:20:14 +00:00
Russell Bryant
c9d89b26ee don't try to print the help text for a CLI command when RESULT_SHOWUSAGE is
returned if there is no help text available (issue #6604)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-27 15:23:44 +00:00
Russell Bryant
750e43c016 Block 11279 from merging to the trunk, it was fixed here in rev 8560
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11280 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-27 15:16:05 +00:00
Russell Bryant
1323c7be91 Merged revisions 11250 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r11250 | russell | 2006-02-26 21:50:09 -0500 (Sun, 26 Feb 2006) | 2 lines

don't hang up the channel if its state is set to UP before we return from ast_call (issue #6569)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11251 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-27 02:51:03 +00:00
Russell Bryant
442785f3e2 conversions to allocation wrappers and coding guidelines fixes (issue #6592)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-27 01:43:42 +00:00
Russell Bryant
5c38240187 conversions to allocation wrappers and various other coding guideliens fixes (issue #6582)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11231 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-27 01:37:56 +00:00
Mark Spencer
03e2e423d5 Fix the make file *again*
svsvn commit --This line, and those below, will be ignored--

M    res/Makefile


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-26 23:04:41 +00:00
Mark Spencer
3a1c0b9e5c Fix snmp build
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-26 23:02:40 +00:00
Mark Spencer
6a86c7c5c9 Add SNMP support (bug #6439)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-26 20:46:11 +00:00
Mark Spencer
16109b9d2c Make IAX2 multithreaded
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11192 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-26 20:27:14 +00:00
Tilghman Lesher
83f3233f5f Merged revisions 11165 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r11165 | tilghman | 2006-02-26 10:26:39 -0600 (Sun, 26 Feb 2006) | 2 lines

Bug 5950 - reenable queue log rotation; also, eliminate redundant code

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-26 16:40:39 +00:00
Jim Dixon
60c5b80818 Fixed nasty lockup bug and added command macros (not to be confused with
macro-oni).


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-26 05:11:34 +00:00
Matthew Fredrickson
a39c09e2c2 Bug fix for translation updates. Thanks Josh!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11119 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-25 19:53:45 +00:00
Kevin P. Fleming
50794ec318 Merged revisions 11062,11089 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r11062 | kpfleming | 2006-02-24 22:59:50 -0600 (Fri, 24 Feb 2006) | 3 lines

reformat code to fit guidelines
remember which translation paths are multi-step paths

........
r11089 | kpfleming | 2006-02-24 23:08:46 -0600 (Fri, 24 Feb 2006) | 2 lines

factor the number of translation steps required into translation path decisions, so that equal cost paths that require fewer translations are preferred

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-25 05:11:44 +00:00
Kevin P. Fleming
50765d9aa5 Merged revisions 11058 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r11058 | kpfleming | 2006-02-24 22:23:48 -0600 (Fri, 24 Feb 2006) | 2 lines

ensure that spy frame queueing is able to deal with translation failing for any reason (issue #6546)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-25 04:32:21 +00:00
Kevin P. Fleming
9e2f19ee8e block fix already present in this branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-25 04:31:28 +00:00
Christian Richter
61f1bf14fa added export and import of RDNIS channel variable
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-24 17:38:43 +00:00
Olle Johansson
acfc219733 Reverting revision 10998 that was accidentaly committed to trunk. My apologies.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-24 10:50:43 +00:00
Olle Johansson
dd5222fd30 Update to trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-24 10:17:40 +00:00
Tilghman Lesher
e912ad9d35 Move conditional compilation for CURL from apps/ to funcs/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-23 23:43:06 +00:00
Kevin P. Fleming
af1331ad56 correct documentation typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10960 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-23 23:38:05 +00:00
Matt O'Gorman
5f446b24ea minor fixes to commit 10934 from bug#6257
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10959 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-23 23:36:53 +00:00
Tilghman Lesher
418a8664e5 Blocked revisions 10952 via svnmerge
........
r10952 | tilghman | 2006-02-23 17:06:42 -0600 (Thu, 23 Feb 2006) | 2 lines

Oops, this was broken in 1.2, too.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-23 23:13:43 +00:00
Tilghman Lesher
53936916ec Bug 6417 - Allow retrieval of raw CDR values
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-23 23:12:41 +00:00
Matt O'Gorman
a4734960e7 added function QUOTE into strings, which allows
for quoted strings, and escapes them properly.
slightly modified patch from bug #6257


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10934 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-23 22:59:16 +00:00
Tilghman Lesher
c05fc829d3 Bug 6581 - Move definition of PWD higher than where it is initially used
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-23 22:38:47 +00:00
Tilghman Lesher
61d4406b69 Move CURL function from apps/ to funcs/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-23 22:27:49 +00:00
Christian Richter
df6e9dbd4e removed the misdn Makefile target from channels/misdn/Makefile in favour of a short howto install mISDN/mISDNuser in the doc/misdn.txt file. This helps to make asterisk completely compileable by non-root users
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10914 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-23 20:52:39 +00:00
Tilghman Lesher
516d690aca Some sick individuals use SQL queries longer than 512 bytes in the dialplan. ;-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10895 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-23 19:26:22 +00:00
Kevin P. Fleming
98dbc95533 silence some more compiler warnings
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10877 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-23 18:00:50 +00:00
Kevin P. Fleming
302c943001 add 'consumed' argument to ast_get_time_t, so callers can know how many characters were used in the parser
update pbx_dundi to use ast_get_time_t
eliminate some compiler warnings


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10871 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-23 17:13:57 +00:00
Mark Spencer
c3447c7cce Fix a few compile warnings (turned errors) and disable -Werror on the
normal build.  If people want this they can turn it on, and don't anyone 
turn it on by default until you fix building on GCC 4.x


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-23 04:38:38 +00:00
Kevin P. Fleming
850397b334 revert change to ENUM functionality (go back to supplying a default zone)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10823 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-22 23:07:34 +00:00
Kevin P. Fleming
6204abdae2 merge rizzo's patch to make compiler warnings stop the build, and fix a bunch of warnings found
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-22 22:53:49 +00:00
Christian Richter
fdd33866b4 * changed some strncpys to ast_copy_str
* added copying of some IEs (user,rate,urate) with channel vars
* added #6251 



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10787 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-22 21:59:46 +00:00
Kevin P. Fleming
a3580ffdeb use a symbolic constant instead of a magic number (tholo!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-22 21:53:56 +00:00
Matt O'Gorman
3ae4285d17 Solved problem where talker hears himself when
talk optimization is on in app_meetme.
bug #6266


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-22 21:40:00 +00:00
Tilghman Lesher
9a55cf9bc1 Typo: should have been changed to a constant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-22 21:20:28 +00:00
Matt O'Gorman
cff3864fa5 bug in the linkedlists macros where the prev node
was improperly managed when doing removals or insertions.
also solved issues with app_voicemail init. and reload
solves bug #6557


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10766 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-22 20:13:05 +00:00
Kevin P. Fleming
7092b4475c Merged revisions 10511,10535,10736 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r10736 | kpfleming | 2006-02-22 11:32:15 -0600 (Wed, 22 Feb 2006) | 2 lines

add comment warning people about trying to use hostnames/IPs in the sample config

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10737 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-22 17:33:38 +00:00
Christian Richter
c7e0abdfed fixed a ETSI violation (after RELEASE we need to RELEASE_COMPLETE (network side) one needs to upgread mISDNuser for that fix as well. also fixed the reload issue #6547
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10713 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-22 16:48:25 +00:00
Tilghman Lesher
800c3982df Updating skel application to use current parsing constructs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-22 03:04:42 +00:00
Russell Bryant
97d748b235 converstions to allocation wrappers, use calloc instead of malloc+memset,
and various other changes to conform with current coding guidelines (issue #6518)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10661 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-21 19:24:01 +00:00
Russell Bryant
3b215d0df7 suppress some compiler warnings due to recent format changes to use off_t
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-21 19:20:30 +00:00
Kevin P. Fleming
bb7325ade8 set keywords property correctly
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-21 17:15:17 +00:00
Tilghman Lesher
f2be8b518d Bug 6554 - Show all spans statuses with a single command
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10607 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-21 05:41:37 +00:00
Tilghman Lesher
159711c838 Bug 6552 - Be a little more descriptive about which span has the PRI error
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-21 05:34:52 +00:00
Tilghman Lesher
aa20c556f7 Bug 5984 - Convert file offsets to 64 bit
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-20 23:35:12 +00:00
Tilghman Lesher
67e55d4d67 Merged revisions 10577 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r10577 | tilghman | 2006-02-20 17:01:12 -0600 (Mon, 20 Feb 2006) | 2 lines

Would be nice to tell people to look in the right file to increase a constant

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10578 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-20 23:02:31 +00:00
Matt O'Gorman
fecae4f64e Changing syntax once again slightly and standardizing
config to other asterisk samples , bug note 6530


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-20 18:30:49 +00:00
Mark Spencer
894c8401d8 Remove gratuitous -1 (bug #6426)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-20 06:18:18 +00:00
Mark Spencer
72465ade16 Remove several uses of freed memory
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-20 05:58:50 +00:00
Tilghman Lesher
206883d12f Merged revisions 10487 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r10487 | tilghman | 2006-02-19 12:29:16 -0600 (Sun, 19 Feb 2006) | 2 lines

Okay, fseek doesn't return an offset

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10488 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-19 18:30:38 +00:00
Tilghman Lesher
55b1d07a97 Merged revisions 10464 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r10464 | tilghman | 2006-02-19 11:26:31 -0600 (Sun, 19 Feb 2006) | 2 lines

Fix possible lack of initialization of useadsi

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-19 17:27:39 +00:00
Tilghman Lesher
5ef84a55a0 Merged revisions 10462 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r10462 | tilghman | 2006-02-19 11:11:02 -0600 (Sun, 19 Feb 2006) | 2 lines

Bug 6539 - Division by two negates error flag

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-19 17:17:28 +00:00
Russell Bryant
d4480e9c59 remove unused variable
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-18 16:34:04 +00:00
Russell Bryant
df05e39e84 fix up some doxygen formatted comments
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-18 02:45:38 +00:00
Tilghman Lesher
08132bdf00 Merged revisions 10409 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r10409 | tilghman | 2006-02-17 18:17:09 -0600 (Fri, 17 Feb 2006) | 2 lines

Bug 6529 - memory leak in ast_play_and_prepend

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-18 00:32:10 +00:00
Russell Bryant
f369bbdac3 fix up the summary and help text for the mixmonitor cli command
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-17 04:17:35 +00:00
Russell Bryant
9bf4f16408 Merged revisions 10368 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r10368 | russell | 2006-02-16 20:55:10 -0500 (Thu, 16 Feb 2006) | 2 lines

fix incorrent index calculation for jitterbuffer history (issue #6517)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-17 01:59:59 +00:00
Matt O'Gorman
d442f57537 add 'blindtransfer' variable to chan iax2 like chan_sip and res_features bug note 6407
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10354 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-16 23:44:09 +00:00
Tilghman Lesher
92679bc761 Bug 6503 - Change wording from mailbox to folder when referring to the subfolders of a mailbox (less confusing)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10353 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-16 23:13:48 +00:00
Tilghman Lesher
697d3208dd Bug 6516 - u->chan not defined
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-16 22:59:38 +00:00
Tilghman Lesher
e8877446f6 Bug 6515 - extra semicolon
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-16 22:53:56 +00:00
Russell Bryant
938f7ddc0f remove -lssl for asterisk, and add it for res_osp (issue #6496, different patch)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10323 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-16 20:38:21 +00:00
Russell Bryant
39fbbe1c25 Merged revisions 10301 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r10301 | russell | 2006-02-16 13:07:52 -0500 (Thu, 16 Feb 2006) | 3 lines

when executing the Directory application from voicemail and a context is not
specified, use the "default" context, not the channel's current context (issue #6507)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-16 18:19:05 +00:00
Russell Bryant
118b277ab1 add StopMixMonitor application (issue #6122, with mods)
Rename and export ast_complete_channels for use by cli completion functions
that want to complete from the list of active channels


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-16 17:37:03 +00:00
Russell Bryant
2b357881a7 suppress compiler warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10286 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-16 17:21:56 +00:00
Olle Johansson
98d0d296fb Whitespace cleanup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10271 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-16 08:19:34 +00:00
Tilghman Lesher
6f8cdb5c03 Define the initial values separate from the STATIC definitions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 23:00:07 +00:00
Russell Bryant
a0d438fb6c remove the uses of the deprecated STANDARD_LOCAL_USER
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 20:11:56 +00:00
Christian Richter
afaf8e4c04 adde incoming_early_audio option, to avoid sending tone indications to the remote party on incoming calls from the pstn, this shouldnt be enabled, only if the provider allows it
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 19:51:33 +00:00
Christian Richter
f6bd1b8559 added pmp_l1_check option, to avoid l1 checking for group calls on PMP ports
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10225 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 19:32:45 +00:00
Russell Bryant
5f3af13a97 now that there are no modules that define their own version of
'struct localuser' (see issue #6216), redefine STANDARD_LOCAL_USER 
to empty, and define the localuser structure in module.h (issue #6494)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 19:07:48 +00:00
Russell Bryant
5c95b9955c Fix the retrieval of the new SYSTEMNAME variable. Also, clarify some
documentation of how pbx_retrieve_variable works. (issue #6493)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 18:39:52 +00:00
Matt O'Gorman
3d394586da changed LOG_WARNING to LOG_DEBUG for backtrace
messages (issue #6497)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10195 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 17:37:57 +00:00
Olle Johansson
fa27bf695c Small typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10179 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 07:01:19 +00:00
Kevin P. Fleming
f0495e8944 add option to avoid calling members whose channels are 'in use' (issue #6315, plus documentation)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 02:52:19 +00:00
Kevin P. Fleming
0a9c957764 remove code that does not appear to do anything useful (issue #6059)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 01:55:20 +00:00
Kevin P. Fleming
a1e703fb01 more memory allocation wrapper conversion
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10141 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 01:48:54 +00:00
Kevin P. Fleming
5c7bdb22fa various cleanups (issue #6389)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 01:38:20 +00:00
Kevin P. Fleming
6573167768 don't dereference memory that has been freed (issue #6405)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 01:31:21 +00:00
Kevin P. Fleming
0aaad7b8b9 Merged revisions 10137 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r10137 | kpfleming | 2006-02-14 19:21:33 -0600 (Tue, 14 Feb 2006) | 2 lines

ensure that agents logged in via the manager interface are stored in the persistence database (related to issue #6301)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 01:22:54 +00:00
Kevin P. Fleming
c1e19165b4 add channel's uniqueid to manager 'join' event (issue #6458)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 01:01:35 +00:00
Kevin P. Fleming
c5ff2c4f42 add KEYPADHASH dialplan function (issue #6441)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10113 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 00:59:01 +00:00
Kevin P. Fleming
be6eea0cc1 handle longer ENUM lookup results (issue #6476)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 00:51:21 +00:00
Kevin P. Fleming
62a24acfcf block func_enum fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 00:47:08 +00:00
Kevin P. Fleming
e6ca0f1fab Merged revisions 10021,10108 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r10108 | kpfleming | 2006-02-14 18:36:57 -0600 (Tue, 14 Feb 2006) | 2 lines

ensure that FastAGI launcher can handle system call interruption (issue #6449)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 00:38:27 +00:00
Kevin P. Fleming
42314e6160 force a cleanup due to today's ast_channel change
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 00:33:30 +00:00
Kevin P. Fleming
5845408aab update app to use args parser
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 00:33:07 +00:00
Kevin P. Fleming
4662d58b01 add API function for parsing strings to time_t (issue #6320, with mods)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 00:24:24 +00:00
Kevin P. Fleming
124b00c4a4 add 'systemname' option to prefix channel unique IDs with (issue #5825)
convert chan->uniqueid to a stringfield from a fixed-size buffer


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 23:42:36 +00:00
Matt O'Gorman
ec7df7e557 Now Kevin will be really happy!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 23:38:27 +00:00
Matt O'Gorman
49a04b91a2 changed naming scheme for variables so it matches
asterisk standard, changed it so it can take frames
 of sizes other than 20ms, allowed for the app to reload
 properly, and finalyl changed sample to general section
 as to follow standards.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 23:30:18 +00:00
Kevin P. Fleming
6081d770c3 use a delimiter for 'show channels concise' that will not appear in the field contents (issue #6086, with UPGRADE.txt addition)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10085 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 23:22:52 +00:00
Tilghman Lesher
f1209276fd Bug 4377 - Initial round of loader changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10084 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 23:08:06 +00:00
Kevin P. Fleming
ff7a90829d more list macro conversion (issue #6361, plus documentation for new macro)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 22:44:20 +00:00
Kevin P. Fleming
1c7126664d more memory allocation wrapper conversion (issue #6365)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 22:28:01 +00:00
Kevin P. Fleming
5e6019c61c warn people about ENUMLOOKUP counting change
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 22:20:14 +00:00
Kevin P. Fleming
da1f7f0f8c ensure that ENUM count requests that are invalid return zero, not blank (issue #6371)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10064 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 22:18:13 +00:00
Kevin P. Fleming
c8b087ffcb don't force a default zone for ENUM() lookups, use the configuration file (issue #6036, with update to UPGRADE.txt)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 21:57:26 +00:00
Kevin P. Fleming
2f46cb9198 don't use localuser structure for outbound calls (issue #6216)
various code cleanup and reorganization (issue #6216)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10046 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 21:50:35 +00:00
Kevin P. Fleming
c6ddfef02d list macro conversion (issue #6328, with bugfix)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10020 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 20:39:56 +00:00
Kevin P. Fleming
918cab0e08 Merged revisions 9961,9964,9990,10018 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r10018 | kpfleming | 2006-02-14 14:20:15 -0600 (Tue, 14 Feb 2006) | 2 lines

don't double-increment abandon counter for calls that are hung up while dialing members (issue #6289)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 20:21:38 +00:00
Kevin P. Fleming
e6fb895741 remove file for testing
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9994 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 19:37:19 +00:00
Kevin P. Fleming
e9a9823e94 test pre-commit script
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9993 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 19:28:07 +00:00
Kevin P. Fleming
4ed461db16 set proper mime-type and eol-style on all files
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 19:14:15 +00:00
Mark Spencer
c3b0828c00 Properly stopsteram on meetme (bug #6137)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 19:08:51 +00:00
Mark Spencer
59990fc904 Fix build issues...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 19:08:12 +00:00
BJ Weschke
6255f76212 #ifdef the include too.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9963 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 18:49:37 +00:00
BJ Weschke
0edfb0eb39 #ifdef'd the prctl fix to only try and compile on linux systems. Thanks rizzo for pointing this out, and credit to Armin for identifying a solution to the original problem.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9962 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 18:47:16 +00:00
Kevin P. Fleming
b9918fb16b set properties for new files (i need to get this documented)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9960 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 18:44:18 +00:00
Kevin P. Fleming
7616d69a63 Merged revisions 9958 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r9958 | kpfleming | 2006-02-14 12:30:10 -0600 (Tue, 14 Feb 2006) | 2 lines

when answering INVITE, don't send codecs the peer didn't offer (issue #6052)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9959 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 18:30:32 +00:00
Kevin P. Fleming
50db59c5d1 block meetme fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 18:29:10 +00:00
Kevin P. Fleming
8ac2a55783 block revs for core dump fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9956 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 18:27:06 +00:00
Kevin P. Fleming
5c332ae95e use proper property name for blocked revs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 18:25:29 +00:00
Kevin P. Fleming
e59d1baf69 block reversal of yesterday's blocked fix :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 18:23:54 +00:00
Matt O'Gorman
f57ae73d62 bug 6485 fixed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9935 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 17:08:06 +00:00
Matt O'Gorman
dacbca4699 Commiting 5959 with minor formatting and typo
fixes.  Thanks to all those involved.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9918 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 16:42:50 +00:00
Christian Richter
b7804137d9 fixed a certain 64bit segfault
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 11:25:35 +00:00
Christian Richter
8d3f63f467 fixed the occasional no audio issue, still need deeper investigation .. echotraining is off by default
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9882 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 10:44:00 +00:00
BJ Weschke
5f8017bc22 Make sure that PR_SET_DUMPABLE is set to make certain that we still dump core if Asterisk has setuid'd to run as non-root
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 02:41:42 +00:00
Kevin P. Fleming
618800484b block issue 6052 fix, needs a better fix here
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9819 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 00:46:43 +00:00
Tilghman Lesher
073885e1ea Shouldn't have been a public function
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-13 20:55:13 +00:00
Russell Bryant
2f2530b8e6 remove LOCAL_USER_ACF_ADD since it is now the same as LOCAL_USER_ADD
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9800 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-13 20:12:50 +00:00
Tilghman Lesher
973c12effd Bug 6477 - minor syntax error, plus a few other syntax fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-13 19:08:05 +00:00
Josh Roberson
c09ad4e192 Don't set the formats before we stop indications. (issue #6380)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-13 17:50:53 +00:00
Russell Bryant
4d3c5e39b0 declare function_sipppeer as static (issue #6466)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9758 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-13 17:46:34 +00:00
Russell Bryant
46e43a6a90 remove unneeded var (issue #6466)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9757 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-13 17:43:38 +00:00
Russell Bryant
febbc165a1 fix codec_ilbc.so build - it would build before, but libilbc.a was not linked
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-13 01:58:33 +00:00
Russell Bryant
5869d96050 use the zone and options set by the arg parsing macros
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-12 19:26:15 +00:00
Russell Bryant
7946efea57 set peername after recent function updates
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9718 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-12 19:19:19 +00:00
Russell Bryant
c93149c635 fix a little typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-12 17:07:45 +00:00
Kevin P. Fleming
e7c198453d ensure that dependencies are rebuilt after 'make update' so that builds don't break when files are removed/renamed
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-12 16:52:42 +00:00
Kevin P. Fleming
96bf384e7d major dialplan functions update
deprecate LANGUAGE() and MUSICCLASS(), in favor of CHANNEL()


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-12 04:28:58 +00:00
Tilghman Lesher
3d2404c62c Make the ditlen and tone configurable at runtime
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9658 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-12 03:38:50 +00:00
Russell Bryant
1f23480472 Makefile updates for renaming of chan_misdn_config
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 22:09:31 +00:00
Russell Bryant
1a23f4d092 rename chan_misdn_config.c to misdn_config.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 22:08:12 +00:00
Russell Bryant
8232b40884 eliminate warning on older versions of gcc
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 20:54:21 +00:00
Kevin P. Fleming
80b1a19566 don't blow up if multiple copies of the headers are found
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 20:48:48 +00:00
Russell Bryant
452f87a465 Merged revisions 9609 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r9609 | russell | 2006-02-11 14:23:20 -0500 (Sat, 11 Feb 2006) | 2 lines

fix memory leak from not destroying the scheduler context on module unload

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 19:31:11 +00:00
Russell Bryant
b949837dc8 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9608 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-02-11 19:17:42 +00:00
Russell Bryant
303a9855b3 update for change to ast_pbx_outgoing_exten
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9601 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 19:02:14 +00:00
Kevin P. Fleming
4b4ef55a49 don't try to include non-existing (and unneeded) header file
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9586 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 18:45:03 +00:00
Russell Bryant
20c87064c1 don't try to build a chan_misdn_config.so
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 18:40:42 +00:00
Russell Bryant
95151cead2 Merged revisions 9581 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r9581 | russell | 2006-02-11 13:15:00 -0500 (Sat, 11 Feb 2006) | 2 lines

now that CDR is a loadable module, don't depend on it elsewhere (issue #6460)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 18:31:59 +00:00
Kevin P. Fleming
1f06418500 remove unused header and channel module
use auto-build for channels


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9569 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 17:58:21 +00:00
Kevin P. Fleming
407d3c289c use auto-build for pbx modules
correct install variable for format modules


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 17:48:44 +00:00
Kevin P. Fleming
a2551346f4 use auto-build for formats
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 17:43:54 +00:00
Kevin P. Fleming
1f5555735a use auto-build for codecs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 17:41:36 +00:00
Kevin P. Fleming
764b5d8686 use auto-build for cdr modules
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 17:24:44 +00:00
Kevin P. Fleming
6aa6819c41 use auto-build for apps, simplify variable setting
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 17:12:05 +00:00
Kevin P. Fleming
52c23802d6 use auto-build for res modules too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 16:44:15 +00:00
Kevin P. Fleming
90cca08247 prepare to use auto-build rules in other Makefiles
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 16:30:23 +00:00
Kevin P. Fleming
e42c6c4f9e set standard properties on all non-binary files
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9549 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 16:15:11 +00:00
Tilghman Lesher
ada97b3723 Fix compile time warnings
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9548 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 16:13:03 +00:00
Kevin P. Fleming
99f10b2e26 Merged revisions 9493,9528 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r9493 | bweschke | 2006-02-11 00:29:34 -0600 (Sat, 11 Feb 2006) | 3 lines

 kpfleming's fix from r9472 backported to 1.2


........
r9528 | kpfleming | 2006-02-11 09:22:55 -0600 (Sat, 11 Feb 2006) | 2 lines

clean up my mess from thread-starting change

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 15:27:38 +00:00
Mark Spencer
4a80fe5022 Add capability to retrieve list of channel types
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 07:06:47 +00:00
Mark Spencer
c74856b173 Make IAX2 not try to authenticate when registration info is not changing
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 07:06:23 +00:00
Mark Spencer
7dc0bdf35b Fix SMDI to not blow up asterisk when there's no config file.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9506 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 07:05:49 +00:00
Kevin P. Fleming
bd8d1bf5e3 ignore archives in this directory
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 04:02:50 +00:00
Kevin P. Fleming
7a4b31e515 doh!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9472 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 03:28:59 +00:00
Kevin P. Fleming
ad7f3e78e4 remove last vestiges of pbx_functions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 03:21:09 +00:00
Kevin P. Fleming
a38a7eec61 build function modules independently (no more pbx_functions.so)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 03:14:05 +00:00
Kevin P. Fleming
c7da92d2ea fix compiler warnings
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9468 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 03:13:25 +00:00
Kevin P. Fleming
845a5dc75d one more copyright/file header and version string support
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-10 23:58:11 +00:00
Kevin P. Fleming
7b2988821a clean up SMDI support commit:
copyright header format and dates
code formatting and guidelines conformance
use of timeval wrapper functions
use of memory allocation wrappers
propery unref created interface objects during config load
document new variable set by chan_zap in doc/channelvariables.txt
remove useless 'extern' on function prototypes and definitions


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-10 23:55:47 +00:00
Matthew Fredrickson
4f803dfda0 Lots of little fixes for doing MSVC compiling codecs in windows (#6022)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9450 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-10 23:37:27 +00:00
Matthew Fredrickson
c344781c4b Add boost gain option to microphone, also minor bug fixes (#6388)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-10 23:19:05 +00:00
Matthew Fredrickson
5dd0b76b2d Minor bugfix for #6386
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-10 22:45:03 +00:00
Matthew Fredrickson
af07dc8883 Add smdi support for asterisk (see doc/smdi.txt for config info) (#5945)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-10 21:50:56 +00:00
Kevin P. Fleming
cadfcdfe8e Merged revisions 9404 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r9404 | kpfleming | 2006-02-10 14:38:59 -0600 (Fri, 10 Feb 2006) | 2 lines

don't create monitor threads in detached mode, when we need to be able to pthread_join() them later if the module is unloaded (solve crash-on-unload problem for these channel modules)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9405 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-10 20:40:00 +00:00
Kevin P. Fleming
b40bd71a9a restore 'rfc2833' naming for DTMF mode in chan_sip
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-10 16:33:47 +00:00
Christian Richter
fd9fe21d2c * jb can be configed by misdn_set_opt
* reload does misdn_reload as well



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-10 14:17:28 +00:00
Christian Richter
0058f40ed5 added Proceeding state, to be more ETSI conform with outgoing setups on the Network side (no release_complete but disconnect or release in proceeding state)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-10 10:10:58 +00:00
Tilghman Lesher
4f1e5d1aef Bug 6387 - janitor cleanup for linked lists
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-10 00:20:43 +00:00
Tilghman Lesher
154e107d06 Blocked revisions 9326 via svnmerge
........
r9326 | tilghman | 2006-02-09 15:10:10 -0600 (Thu, 09 Feb 2006) | 2 lines

Revert behavior change from previous commit (fixes only)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-09 21:11:13 +00:00
Tilghman Lesher
3665cabca3 Blocked revisions 9323 via svnmerge
........
r9323 | tilghman | 2006-02-09 15:02:05 -0600 (Thu, 09 Feb 2006) | 2 lines

Backport 5929 to 1.2

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9324 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-09 21:08:29 +00:00
Russell Bryant
b96af335d8 conversions to memory allocation wrappers, remove duplicated error messages,
remove unnecessary casts, malloc+memset to calloc (issue #6395)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9310 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-09 16:59:50 +00:00
Christian Richter
091a14754d still some L1 related fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9309 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-09 16:58:13 +00:00
Olle Johansson
4d07b89fdd - Change "rfc2833" to "rtp" in sip.conf. Keeping backwards compatibility.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9294 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-09 15:40:53 +00:00
Olle Johansson
24ceb84434 - Adding example on using european time zones in voicemail.conf
- Moving the timezone section to below the documentation section

Example written and contributed by Henrik Olsen, Astricon Training student.
Thanks!



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9292 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-09 15:25:34 +00:00
Russell Bryant
9f7097b004 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9263 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-02-09 02:35:34 +00:00
Russell Bryant
3f37ece516 remove some Makefile targets for things that don't exist in the tree
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-09 02:27:30 +00:00
Russell Bryant
7529e12ab4 remove unnecessary format check in zt_request so that we will actually accept
a requested format of ALAW (issue #6421, different patch)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-09 02:21:57 +00:00
Russell Bryant
e13567b0c9 various code cleanup changes including changing #define'd constants to enums,
comments to doxygen style, memory allocation to use ast_ wrappers, use calloc
instead of malloc+memset, and removing duplicated error messages (issue #6435)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-09 02:08:04 +00:00
Russell Bryant
a8d24df108 clarify return value (issue #6434)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9248 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-09 01:52:09 +00:00
Russell Bryant
14906b3cfc Merged revisions 9246 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r9246 | russell | 2006-02-08 20:24:55 -0500 (Wed, 08 Feb 2006) | 2 lines

reload peercontext on iax2 reload (issue #6442)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9247 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-09 01:33:50 +00:00
Matt O'Gorman
5f0de64f78 Merged revisions 9232 via svnmerge from
https://svn.digium.com/svn/asterisk/branches/1.2

........
r9232 | mogorman | 2006-02-08 16:12:34 -0600 (Wed, 08 Feb 2006) | 4 lines

Make logger report error,warning,notice if logger.conf
not found, also updated chan_oss to give correct
error message if its config file is not found.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-08 23:14:17 +00:00
Tilghman Lesher
8774e4a7d8 Merged revisions 9233 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r9233 | tilghman | 2006-02-08 16:34:38 -0600 (Wed, 08 Feb 2006) | 2 lines

Leave it to RH/CentOS to put the freetds headers in a completely nonstandard location.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9238 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-08 23:10:39 +00:00
Christian Richter
be20a26a35 fix for the L2 Signalling
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9225 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-08 19:51:53 +00:00
Christian Richter
f354a43bd3 L2 Signalling in PTP-TE Mode fixed
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-08 19:39:37 +00:00
Christian Richter
a43c6c0f49 * dozens of white-space removements
* some // comment removements
* debugging optimization, use port where possible
* fixed  pickup problem (pickup didn't work anymore after mqueue)
* removed some mIDSN_JOLLY defines which are not needed anymore in mqueue
* adapted the new cli.h constifications



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9215 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-08 16:10:21 +00:00
Matthew Fredrickson
556ec7c940 Make sure we output the APDU debug on pri debug commands
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9194 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-07 18:00:42 +00:00
Christian Richter
b42dd639ee default values of jitterbuffer and jitterbuffer_upper_threshold should be > 0, this fixes the tv_fix warnings, because we use ast_read to transmit frames to asterisk in jitterbuffer mode, instead of queueing the audio data with ast_queue_frame.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9186 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-07 13:34:59 +00:00
Kevin P. Fleming
8d8aa07407 minor cleanup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-06 20:30:49 +00:00
Kevin P. Fleming
d87a77b89b rename properties for forward-porting fixes so they don't conflict with developer branches
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-06 20:18:17 +00:00
Tilghman Lesher
b347ddf3c6 Merged revisions 9156 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r9156 | tilghman | 2006-02-05 11:10:19 -0600 (Sun, 05 Feb 2006) | 2 lines

Bug 6176 - Fix race condition

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-05 17:20:29 +00:00
Russell Bryant
5384e654f7 remove windows-style line endings
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9150 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-04 16:32:27 +00:00
BJ Weschke
81125d803e Don't set a global variable if the channel you're trying to set CHANLOCALSTATUS on has gone away already.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-03 22:38:38 +00:00
Tilghman Lesher
34bcd0e0b6 Bug 6322 - Implementation of SHA1 in Asterisk (plus dialplan function to use it)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-03 22:37:29 +00:00
Kevin P. Fleming
193b923925 remove obsolete stuff
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-02 22:23:00 +00:00
Kevin P. Fleming
a84d2cf4ea make chan_misdn build on x86-64
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9123 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-02 22:05:47 +00:00
Kevin P. Fleming
ec5dfabc65 updates to compile against current trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9119 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-02 21:49:36 +00:00
Christian Richter
0563c61f3a updated the misdn documentation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9116 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-02 21:25:37 +00:00
Christian Richter
7133d1b006 * removed unnecessary struct elements and functions
* fixed "RETRIEVE does not work" bug
* fixed some NT Mode bugs
* removed some // comments
* added configureable jitterbuffer
* removed own tone-generator, and use asterisks instead, to support 
  asterisks indications
* added more support for hw-bridging, we bridge now every possible call
* fixed some hdlc mode issues, with a patch for chan_zap we can make 
  data calls between chan_zap and chan_misdn now
* completely reworked the config engine, works like a charm now
* fixed SetCallerPres - bug
* added Progress and Proceeding passing
* optimized Ringing Indication handling
* added full ast_send_text support (you can setup nice menus with the dialplan
  now)
* added support to read /etc/misdn-init.conf to clarify the NT+PTP Problem
* we compile now channels/misdn if mISDNuser is installed systemwide


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9114 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-02 21:15:34 +00:00
Matthew Fredrickson
7bed7d9048 Fix w/ string field updates #6397
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9113 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-02 21:02:19 +00:00
Olle Johansson
f1377e3ce1 - Remove "frame relay" from chan_sip !
- Add some comments for the monitoring thread


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-02 20:51:08 +00:00
Matthew Fredrickson
d65e912816 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9106 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-02-02 20:50:29 +00:00
Olle Johansson
2f4524f1df - Add doxygen docs on return values on check_user_full()
- Simplify code in handle_request_subscribe (mailbox subscription)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-02 20:28:57 +00:00
Olle Johansson
88e37acdcd - Make debug logging for each authentication (twice per call) optional
- Small update to doxygen comment


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9104 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-02 20:18:31 +00:00
Kevin P. Fleming
51ea2f4707 Merged revisions 9086 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r9086 | kpfleming | 2006-02-02 12:37:04 -0600 (Thu, 02 Feb 2006) | 2 lines

don't override ASTERISKVERSIONNUM to 000000 for non-svn builds

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-02 18:40:22 +00:00
Kevin P. Fleming
2d6f4ee90f block patch that has already been merged
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-02 18:40:06 +00:00
Matthew Fredrickson
af52e3fd90 More stringfield related changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9085 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-02 18:33:23 +00:00
Matthew Fredrickson
35edaf57d6 Fix so that hardhdlc works w/ chan_zap
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-02 16:09:38 +00:00
Matthew Fredrickson
54135bacbd Fix for very unlikely memory leak in res_odbc
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-02 16:09:01 +00:00
Olle Johansson
a45394d3e9 Issue #6383 - Crash on CLI originate with missing channel argument
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-02 14:04:29 +00:00
Kevin P. Fleming
a16ae226b6 use string fields for some stuff in ast_channel
const-ify some more APIs
remove 'type' field from ast_channel, in favor of the one in the channel's tech structure
allow string field module users to specify the 'chunk size' for pool allocations
update chan_alsa to be compatible with recent const-ification patches


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-01 23:05:28 +00:00
Matt O'Gorman
f246b9fc64 reports why an agi script errors out on opening
file


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-01 20:40:45 +00:00
Olle Johansson
adaddaa5c5 - Update URL to digium store
- Remove X100p and S100u
- Add mISDN
- remove ISDN4Linux 


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9057 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-01 19:16:09 +00:00
Matt O'Gorman
7d03c33e0a Allows for user to uninstall asterisk binaries
bug 6177


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-01 18:39:41 +00:00
Olle Johansson
286a521e11 - Removing the "README." from the name of the README files.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-01 17:49:02 +00:00
Olle Johansson
8204f581ab - Adding a doc/00README.1st with an INDEX over README files
- Moving files from / to /doc or /configs
- Renaming some documentation files

Thank you for the initiative, manxpower!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9046 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-01 17:16:08 +00:00
Olle Johansson
3f6cc5c544 - Clarify default setting of canreinvite (thanks royk)
- Add some extra headers and reference to other doc/ files for realtime


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-01 13:23:59 +00:00
Olle Johansson
f0c6fe952e Optimize settings of defaults for a new peer object and make sure
we set the same defaults for autocreated peers and other peers.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-31 18:40:07 +00:00
Russell Bryant
a228af1dd9 remove some more local declarations of null frames
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9004 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-31 17:57:12 +00:00
Russell Bryant
e01861fafd define a global null_frame object so when queueing a null frame, you don't
have to allocate one on the stack


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-31 17:18:58 +00:00
Olle Johansson
18eac350af - Moving two session (PVT) flags to peer PAGE2 (DYNAMIC and SELFDESTRUCT) to make room for more session-related flags
This is needed for integrating patches in the bug tracker
- Adding doxygen comments


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-31 16:02:35 +00:00
Olle Johansson
ea0ac62a1e - Change "prefs" to "default_prefs" and move declaration to "default" group
- Add doxygen comments


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8976 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-31 14:30:09 +00:00
Kevin P. Fleming
d819679da0 Yes Virginia, Zaptel does support native ALAW
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-31 03:45:09 +00:00
Russell Bryant
fa5b5aa099 add a note to hopefully decrease the chance that someone forgets to increment
.cleancount after changing the ast_channel structure


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-31 00:24:34 +00:00
Kevin P. Fleming
0bfd41272c increment for recent ast_channel change
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8948 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-31 00:17:43 +00:00
Matt O'Gorman
a13ae9b5c1 reverting blocks 9 and 10 from revision 7547
fixes bug 6080


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8938 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-30 21:16:43 +00:00
Olle Johansson
19cd118bff - Doxygen and comments updates
- Moving structure declarations to top of file with the rest
- Adding some forward declarations for RTP interface functions

(All these changes to position in file are in preparation for splitting chan_sip up
into several files at some point in the future)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-30 20:36:38 +00:00
Olle Johansson
125fd8446c Issue 5892: Set a minimum T1 timer for calls. Reporter: twisted
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8926 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-30 19:50:39 +00:00
Olle Johansson
f3f9230738 Issue #6035 - Don't send 403 on bad auth (correcting one of my old mistakes...) Reported by maik.
Patch inspired by, but not the patch in the bug tracker.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-30 19:09:08 +00:00
Olle Johansson
81813b42a4 Issue #5793
- simplification of check_auth
- constifications
- whitespace changes
Rizzo's patch with some changes


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8919 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-30 18:51:02 +00:00
Kevin P. Fleming
257212b930 Merged revisions 8905 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8905 | kpfleming | 2006-01-30 11:08:28 -0600 (Mon, 30 Jan 2006) | 2 lines

disable buggy PRI user-user code until it can be fixed

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8906 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-30 17:09:55 +00:00
Olle Johansson
a2eb074527 Document installation changes for BSD users.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-30 14:12:39 +00:00
Tilghman Lesher
f9811bc198 Bug 6378 - deprecate CHECK_MD5 function
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-30 06:07:05 +00:00
Mark Spencer
37815b2cce Merge Rizzo's waitfor update (bug #4584)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8877 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-30 03:13:33 +00:00
Kevin P. Fleming
f8b6a4db98 don't use tone generation for DTMF if the channel driver only supports begin/end (will need more work to translate non-variable events into begin/end events)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8852 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-29 05:29:29 +00:00
Kevin P. Fleming
d8908a3f52 add channel-driver callbacks for variable length DTMF
teach ast_write() to call those new callbacks


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-29 05:15:24 +00:00
Kevin P. Fleming
cde6058aef make ast_read() able to handle channel read()/exception() methods that return a chain of frames
cleanup code in ast_read()
add AST_FRAME_DTMF_BEGIN and AST_FRAME_DTMF_END so that variable-length DTMF events can be supported
teach chan_zap to send DTMF_BEGIN and DTMF_END when appropriate


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-29 05:07:04 +00:00
Olle Johansson
7b07bf5fc8 - Remove unused "resetinvite" variable
- Use TRUE/FALSE for fastrestart


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8835 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-28 17:17:37 +00:00
Olle Johansson
3009e4004c Change booleans to TRUE/FALSE.
(At some point we should implement these as enums to simplify debugging)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8834 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-28 17:00:05 +00:00
Olle Johansson
0c687996ad Doxygen updates
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8826 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-28 15:34:27 +00:00
Olle Johansson
4a63775523 - Moving forward declarations to one block
- Moving global variables to one block
- Moving global networking variables to one block
- Small whitespace changes
- Renaming a few more global channel settings to global_ for clarity
(No functional changes)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-28 15:28:58 +00:00
Olle Johansson
7ac422562e Simplify code for building Call ID's, create generic random string function
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8823 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-28 15:02:29 +00:00
Olle Johansson
10474b59c1 Blocking revision 8808 from trunk. It's already fixed in trunk.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-28 13:54:25 +00:00
Matthew Fredrickson
0296f45bff Add rdnis rx/tx support to chan_iax2 (#6348)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-27 23:55:37 +00:00
Olle Johansson
6fafc9d4f0 Merged revisions 8785 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8785 | oej | 2006-01-27 09:02:16 +0100 (Fri, 27 Jan 2006) | 2 lines

Issue 6362 - Register without Contact: and Expires: fails (reporter: op)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-27 08:07:43 +00:00
Russell Bryant
cebef08271 remove some more redundant flags
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8779 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-27 05:39:20 +00:00
Russell Bryant
95436436c3 add /usr/local/lib to SOLINK (issue #6323)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-27 05:33:20 +00:00
Tilghman Lesher
19558d8647 Merged revisions 8758 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8758 | tilghman | 2006-01-26 18:52:12 -0600 (Thu, 26 Jan 2006) | 2 lines

Bug 6072 - Revisions to the source bison and flex files don't auto-regenerate these files

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-27 01:04:03 +00:00
Russell Bryant
8578862401 don't re-define the localuser struct for custom use inside the module (issue #6216)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8757 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-27 00:31:05 +00:00
Olle Johansson
1a484607a3 - Move two functions to static that wasn't for some reason
- Add doxygen comments
- Remove un-needed assignment at declaration of variable
- Formatting fixes (whitespace)
- Add optin_debug in front of complex debugging output
- Move forward declarations of functions to top of file
- Fix error message for bad allocation in sip registry 
(Note: Review to line 6050 in this too large file)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-26 21:36:41 +00:00
Russell Bryant
32026d6f49 don't redefine the localuser struct for additional use specific to the module (issue #6216)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8742 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-26 20:28:52 +00:00
Olle Johansson
09e357e013 Formatting fixes, speling eror fiksd ;-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8741 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-26 20:08:53 +00:00
Olle Johansson
25ad6f6ec3 Issue #5954 revisited. Thanks rizzo.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-26 19:47:40 +00:00
Russell Bryant
99abd45d01 Merged revisions 8729 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8729 | russell | 2006-01-26 14:42:35 -0500 (Thu, 26 Jan 2006) | 2 lines

fix problem with dtmf on e&m (issue #6364)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8730 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-26 19:44:16 +00:00
Olle Johansson
db97a8d9ce Code clean up, inspired by rizzo's comments in issue 5978.
- Don't check for ignore if ignore is always negative
- Add comments to explain what's going on


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8728 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-26 19:38:11 +00:00
Russell Bryant
7707b953e1 store conference list using linked list macros (issue #6327)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8727 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-26 19:33:27 +00:00
Olle Johansson
0f4b7a78f6 Add some debugging output when reloading, to be able to follow progress at high debug levels
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8712 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-26 14:59:33 +00:00
Olle Johansson
ca81ac1a02 Merged revisions 8710 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8710 | oej | 2006-01-26 15:39:36 +0100 (Thu, 26 Jan 2006) | 2 lines

Issue 5898: Registrations does not get deleted if there's an active SIP dialog

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-26 14:44:23 +00:00
Kevin P. Fleming
4467ab62c8 string field manager improvements:
use multiple memory blocks, instead of realloc(), ensuring that field pointers will never become invalid or change
don't run vs(n)printf twice when doing a field build unless required


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-26 04:00:05 +00:00
Russell Bryant
99872975bf use arg parsing macros for WaitExten and Background (issue #6185)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-25 20:02:12 +00:00
Russell Bryant
c1a2631101 Merged revisions 8677 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8677 | russell | 2006-01-25 14:14:43 -0500 (Wed, 25 Jan 2006) | 3 lines

don't call ast_update_realtime with uninitialized variables if we get a
registration with an expirey of 0 seconds (issue #6173)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-25 19:16:14 +00:00
Russell Bryant
19f99bee0f use arg parsing macros in the AGENT dialplan function (issue #6236, with small mods)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-25 19:06:37 +00:00
Russell Bryant
778acbff12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8667 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-01-25 18:41:12 +00:00
Russell Bryant
5370520804 store feature_pvt list using linked list macros
(issue #6351, with additional changes to prevent a memory leak in unload_module)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-25 18:24:32 +00:00
Russell Bryant
b7ab0d1840 store agent_pvt list using linked list macros (issue #6342)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-25 18:12:55 +00:00
Kevin P. Fleming
c767a66da5 don't queue a congestion frame on a channel that will be immediately hung up anyway
clean up/organize code block


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-25 14:52:43 +00:00
Olle Johansson
82f8c9d64d - Remove unused option to transmit_state_notify
- Allow for expiry=0 in subscription requests that only wants *one* update and that's it.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-25 12:11:30 +00:00
Olle Johansson
b64404e039 From now on, apply maxexpiry and minexpiry to all subscriptions. Thanks to fourcheeze in the IRC channel
for pointing this out.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8642 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-25 12:01:07 +00:00
Olle Johansson
1d99282f9f Issue #6349 - patch by markster, imported from 1.2
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-25 09:50:28 +00:00
Russell Bryant
4a8afe697c git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8620 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-01-25 05:39:25 +00:00
Russell Bryant
3d93e85ade don't leak almost 200 bytes for each new channel and store the active
channel list using the linked list macros (issue #6330)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8618 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-25 05:37:29 +00:00
Kevin P. Fleming
cd52b5d676 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8610 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-01-25 01:53:15 +00:00
Kevin P. Fleming
210d4679ee Merged revisions 8608 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8608 | kpfleming | 2006-01-24 19:50:52 -0600 (Tue, 24 Jan 2006) | 2 lines

ensure hangup cause code is handled properly when channel does not return a frame (issue #6346)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-25 01:52:58 +00:00
Kevin P. Fleming
ca5b46cd94 remove extraneous characters from property
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8599 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 22:45:41 +00:00
Kevin P. Fleming
a4271aee65 clean up remaining already-merged revisions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 22:43:57 +00:00
Kevin P. Fleming
6c21d975b0 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8596 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-01-24 22:43:30 +00:00
Kevin P. Fleming
7be26feea8 Merged revisions 8173 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8173 | russell | 2006-01-17 20:49:21 -0600 (Tue, 17 Jan 2006) | 2 lines

remove ChangeLog from the 1.2 branch.  It will only be present in the tags.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 22:42:43 +00:00
Kevin P. Fleming
4f363f4bee git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8594 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-01-24 22:41:45 +00:00
Kevin P. Fleming
ea4d05be8e git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8593 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-01-24 22:40:57 +00:00
Kevin P. Fleming
5ecf9d4ec9 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8592 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-01-24 22:40:20 +00:00
Kevin P. Fleming
49f69c3f94 Merged revisions 8588 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8588 | kpfleming | 2006-01-24 16:32:09 -0600 (Tue, 24 Jan 2006) | 2 lines

ensure that channel cannot become zombie after we check but before we try to start indications

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8591 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 22:38:17 +00:00
Kevin P. Fleming
1317b4bb6d git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8590 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-01-24 22:34:06 +00:00
Kevin P. Fleming
9f19499e74 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8589 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-01-24 22:33:58 +00:00
Matthew Fredrickson
3e73dcfa2c Make sure safe_asterisk retains previous script defaults
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 22:06:37 +00:00
Matthew Fredrickson
1bb29aa0cd Updates from royk to safe_asterisk (#5207) Thanks!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 21:45:42 +00:00
Olle Johansson
3fbad3f5d3 Don't reset scheduled ID until we actually end the scheduled event.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 20:41:08 +00:00
Russell Bryant
6334e3b543 store the list of 'atexit' functions using linked list macros (issue #6329)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8572 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 20:27:09 +00:00
Russell Bryant
a7b05ea51c convert ast_channel list to use linked list macros (issue #6338)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8571 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 20:20:05 +00:00
Olle Johansson
1a2b5c7822 Blocking fix from 1.2 from being applied again.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8563 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 19:29:32 +00:00
Olle Johansson
50280803be Issue 6114: Don't hangup on bye/also if there's no channel. (gst)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 19:19:20 +00:00
Olle Johansson
ab04b28196 Issue #6093: Match realtime non-dynamic peers by IP. (siacali).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 19:08:44 +00:00
Olle Johansson
0ba27e0a6b Make it clear that caller ID in sip.conf is used only on incoming calls (inspired by bug #6183)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8554 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 18:15:20 +00:00
Olle Johansson
293d88108f Reverting change in revision 8539 - fixed wrong problem. Sorry.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8548 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 17:47:41 +00:00
Olle Johansson
543cc7e2a4 Issue #6323, FreeBSD compatibility with compilation of func_odbc.c (reported by nulbyte)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 13:53:45 +00:00
Olle Johansson
be28dc1be8 Importing rev #8537 from 1.2, never send response to ACK (issue #6308)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 13:21:13 +00:00
Olle Johansson
9434a05dc1 - Report SIP reload in manager (issue 5742 with small changes)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 12:48:44 +00:00
Olle Johansson
aad2331375 - Adding whitespace that I found unused outside
- Adding "if (option_debug)" before outputting to DEBUG channel


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8524 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 11:46:29 +00:00
Olle Johansson
fe1366c201 Declaring conn and result static to avoid collission with realtime driver (issue 6336, pressureman)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 11:42:09 +00:00
Olle Johansson
9863ed4624 Whitespace change, extra <tab> added from my tab storage.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8517 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 10:36:45 +00:00
Olle Johansson
b90a5b0ebd - Adding doxygen comments
- Changing default values set in reload_config to DEFAULT_ #defines to make it more clear what defaults are
- Cleaning up global_ and default_ variable naming. 
- Moving variable and #defines together in the source, adding comments to explain sections

Global_ is used for channel settings that does not apply to peers or users as defaults for their settings
default_ is used both as a channel setting for unknown callers, as well as defaults for peers and users



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 10:19:13 +00:00
Matt O'Gorman
428efda5a9 code clean up and macro implementation from
bug 6247


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8505 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-23 18:07:12 +00:00
Olle Johansson
9cda86f4b2 Remove redundant default default/global settings from declaration, settings are done in reload_config()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8500 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-23 17:51:15 +00:00
Matt O'Gorman
83ab52cdc4 changed some settings to app_args and some code
cleaning patch 6267


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8495 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-23 17:23:22 +00:00
Olle Johansson
4c8b2c62de Remove more unused defines.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-23 17:19:03 +00:00
Olle Johansson
c3fcb9eaea Doxygen updates
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8492 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-23 17:17:56 +00:00
Olle Johansson
8b42063108 Finally removing SIPDUMPER that hasn't been used for ages. If anyone needs this for some reason,
please tell me and I'll put it back :-)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-23 17:12:44 +00:00
Olle Johansson
57f0c81518 - Change "call" to "dialog" where use of "call" is confusing, since it may be a register transaction or a subscription.
The word dialog is defined as "a peer-to-peer SIP relationship between two UAs that persist for some time" in RFC 3261.

- Whitespace fixes
- Debugging fixes (adding check of option_debug)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-23 17:08:19 +00:00
Olle Johansson
814800008d - Debug output fixes
- Whitespace fixes


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8483 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-23 16:41:48 +00:00
Olle Johansson
e2f477175f Doxygen update
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-23 16:27:01 +00:00
Olle Johansson
e0fe84d1b2 Re-instate sip_addheader() while waiting for a dialplan function. (Issue 6317)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8481 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-23 16:21:51 +00:00
Olle Johansson
50797d7c05 - Adding some white space from my white space reservoir
- Fixing some comment formatting (doxygen fix)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-23 13:11:04 +00:00
Olle Johansson
92390274e5 Use doxygen for todo's! :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-23 12:44:53 +00:00
Olle Johansson
6f3cdf08e4 Spelling fix undetected by kpfleming in rev 8150 ;-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-23 12:32:43 +00:00
Olle Johansson
77752fc8c5 Remove javadoc doxygen format...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-23 12:19:16 +00:00
Russell Bryant
72a2e892bc fix memory leak from not freeing the list of queue members when freeing a queue
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-22 19:09:50 +00:00
Russell Bryant
aad7522ed4 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8446 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-01-22 19:04:37 +00:00
Russell Bryant
7df4257dbb eliminate some compiler warnings
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8443 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-22 18:42:06 +00:00
Russell Bryant
c84ec3a3ad Merged revisions 8437 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8437 | russell | 2006-01-22 12:47:13 -0500 (Sun, 22 Jan 2006) | 2 lines

fix MixMonitor crash (issue #6321, probably others)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8438 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-22 17:53:14 +00:00
Tilghman Lesher
56bb41460e Bug 6312 - Macro janitor
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-22 17:28:42 +00:00
BJ Weschke
0034a39f29 Correct some scenarios where CALL_LIMIT could not be getting adjusted properly allowing chan_sip to send calls when it really shouldn't. Bug #6111
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-22 15:08:51 +00:00
Tilghman Lesher
7d897634dc Bug 6262 - New function STRPTIME
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8428 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-22 08:09:02 +00:00
Tilghman Lesher
c3ded332b5 Bug 6148 - Add PARKEDAT variable; also cleaned up application help to fit 80-column screen.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-22 07:18:02 +00:00
Russell Bryant
8cddfd5da1 add 'show channeltype' CLI command (issue #6149, with small modifications)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8422 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-22 02:23:38 +00:00
Russell Bryant
92f13e8d9f prevent writing outside of the provided workspace when calculating a
substring (issue #6271)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-22 02:10:19 +00:00
Russell Bryant
9ebedbafa9 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8420 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-01-22 02:06:33 +00:00
Russell Bryant
08759a1d78 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8413 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-01-21 23:17:52 +00:00
Russell Bryant
5e6968ea86 const-ify some fields in the ast_exten and ast_include structures (issue #6270)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21 23:05:19 +00:00
Russell Bryant
efae38a82d - conversions to allocation wrappers
- replace malloc/memset with ast_calloc
- replace malloc/ast_copy_string with ast_strdup
(based on patch from issue #6299)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21 22:09:06 +00:00
Russell Bryant
039ee896c7 oops, don't build app_sql_postgres by default ...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21 21:57:01 +00:00
Russell Bryant
eefe5d1685 - conversion to allocation wrappers
- get rid of some compiler warnings due to usused variables and const-ification
- remove some unnecessary uses of malloc/strncpy/free and replace with ast_strdupa
(based on the patch from issue #6275)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21 21:50:09 +00:00
Russell Bryant
a163eaa03c clean up formatting to conform to coding guidelines and fix some typos (issue #6260)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8407 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21 21:29:06 +00:00
Russell Bryant
475b2cc0cf git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8404 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-01-21 20:58:57 +00:00
Russell Bryant
4414f45393 on this pass, only remove duplicate log messages
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8403 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21 20:57:06 +00:00
Tilghman Lesher
41c87ccb97 Bug 5936 - Cannot AddQueueMember on realtime queue, if queue not yet loaded (different fix than 1.2)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8402 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21 20:32:17 +00:00
Russell Bryant
e040a10d81 finish reverting my pass through the tree to remove checks of the result of
ast_strdupa, this one is revision 8362


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8401 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21 20:20:06 +00:00
Russell Bryant
9fd2746442 don't do the memcpy inside of ast_strdupa if we know that __builtin_alloca
was not successful


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21 18:11:40 +00:00
Russell Bryant
9fa6eb5e07 revert my pass through the tree to remove checks of the result of ast_strdupa
(revisions 8378 through 8381)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8387 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21 17:50:04 +00:00
Russell Bryant
fbdc8ce317 conversions to use allocation wrappers (issue #6277)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8381 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21 08:45:39 +00:00
Russell Bryant
2499926195 remove useless checks of the result of ast_strdupa
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21 08:23:57 +00:00
Russell Bryant
7ad681adc8 remove lots of useless checks of the result of ast_strdupa
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21 08:13:12 +00:00
Russell Bryant
847260bb77 remove some useless checks of the result of ast_strdupa
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21 08:01:24 +00:00
Tilghman Lesher
0f2a9df6aa Bug 4872 - Make Asterisk paths available to AGIs via environmental variables
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8372 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21 05:22:18 +00:00
Tilghman Lesher
e3e7e1d1b2 Bug 5515 - Devicestate and API documentation update
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21 05:15:56 +00:00
Tilghman Lesher
51944ec723 Bug 6096 - callerid_parse cleanup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21 05:05:45 +00:00
Russell Bryant
5d2cd87f41 remove optimization where its benefits are negligible
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21 03:09:01 +00:00
Russell Bryant
a501cdb8c6 remove some useless checks after calls to ast_strdupa
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8362 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21 00:42:25 +00:00
Matthew Fredrickson
67e32c3f2d fix for codec_gsm on ia64 (#6294)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-20 23:28:37 +00:00
Russell Bryant
ba56332ce8 formatting and doxygen fixes (issue #6300)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-20 23:23:00 +00:00
Matthew Fredrickson
4dc76fbcc1 Fix comments in sip.conf (#6134)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8359 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-20 23:19:49 +00:00
Matthew Fredrickson
52fe16259b Fix for formats so they give better output on failure conditions. (#6141)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-20 21:36:33 +00:00
Russell Bryant
1946020208 - move ast_strdupa from channel.h to utils.h
- attempt to log an error message if the __builtin_alloca inside of ast_strdupa
  fails.
- document the fact that it is known and intended behavior for ast_strdupa to
  cause Asterisk to crash if the alloca fails
- use __builtin_expect when checking for allocation failure in all of the
  allocation wrappers

New Janitor Project!  Anywhere that we check for a successful allocation after
a call to ast_strdupa is unnecessary and should be removed.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8356 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-20 19:24:42 +00:00
Russell Bryant
cb8bd57a21 Merged revisions 8347 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8347 | russell | 2006-01-20 13:34:42 -0500 (Fri, 20 Jan 2006) | 2 lines

fix invalid value of prev_q (issue #6302)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-20 18:40:24 +00:00
Matthew Fredrickson
be910dd5b6 Change chan_alsa to default open the first sound card device
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-20 18:18:40 +00:00
Matthew Fredrickson
bab4d7a6b9 Update config. Apprently default doesn't always work now.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-20 18:17:46 +00:00
Kevin P. Fleming
1992ffbdb0 eliminate compiler warnings from recent const-ification
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-20 17:27:51 +00:00
Olle Johansson
125db028c3 - Add DOC file about caller ID presentation values
- Add callingpres to sip.conf
- Add reference to README.callingpres from zapata.conf


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8336 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-20 14:32:30 +00:00
Russell Bryant
fa97579482 fix version reporting (issue #6292)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8324 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-20 01:25:12 +00:00
Matt O'Gorman
bc133ed475 Merged revisions 8320 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8320 | mogorman | 2006-01-19 19:00:46 -0600 (Thu, 19 Jan 2006) | 3 lines

solved problem with delayreject and iax trunking
bug 4291

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8323 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-20 01:07:46 +00:00
Olle Johansson
ad5eaa9aca More doxygen updates
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8315 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-20 00:18:42 +00:00
Olle Johansson
0fd8b4cb3b Doxygen updates
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8313 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-20 00:08:36 +00:00
Olle Johansson
3d456ce4f0 Add support for "musicclass" instead of "musiconhold" to make chan_zap compatible
with other channels.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8300 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-19 22:41:55 +00:00
Olle Johansson
45c8956e0f Doxygen fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-19 22:09:18 +00:00
Olle Johansson
de72ee118b Enable "musicclass" setting for sip peers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-19 19:41:06 +00:00
Tilghman Lesher
47bc420d7d Merged revisions 8276 via svnmerge from
/branches/1.2


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-19 19:18:51 +00:00
Tilghman Lesher
2977f19cac Deprecate the use of Random in 1.3, 1.4
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-19 18:58:45 +00:00
Russell Bryant
6b46e27bb4 Merged revisions 8242 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8242 | russell | 2006-01-18 23:56:48 -0500 (Wed, 18 Jan 2006) | 3 lines

fix Message-Account header to use the ip address if the fromdomain 
isn't set (issue #6278)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8243 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-19 04:58:43 +00:00
Russell Bryant
012e7e948f Merged revisions 8232 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8232 | russell | 2006-01-18 23:17:45 -0500 (Wed, 18 Jan 2006) | 3 lines

fix a seg fault due to assuming that space gets allocatted on the stack in the
same order that we declare the variables (issue #6290)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8233 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-19 04:21:12 +00:00
Russell Bryant
6f71e1178e constify arguments in more places where strings should not be modified (issue #6286)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-18 22:17:31 +00:00
Matt O'Gorman
d57bc8a513 Merged revisions 8194 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8194 | mogorman | 2006-01-18 15:02:06 -0600 (Wed, 18 Jan 2006) | 3 lines

Solves issue with the login proccess in meetme
patch from 6136

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8195 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-18 21:12:14 +00:00
Matt O'Gorman
5b748f587c oops. sorry
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-18 16:24:29 +00:00
Matt O'Gorman
c814734307 allows for use of the originate function from
the cli patch 5847


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8186 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-18 15:42:48 +00:00
Matt O'Gorman
8dc9457bb7 cli.h cleanup and additional documentation
from patch 6272 


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8179 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-18 03:53:10 +00:00
Matt O'Gorman
e57319b1e5 Merged revisions 8162 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8162 | mogorman | 2006-01-17 18:47:04 -0600 (Tue, 17 Jan 2006) | 4 lines

Changed order of autoload so that pbx_ comes before
channels, and in doing so cause bug 6002 to not
be an issue

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-18 00:49:43 +00:00
Matt O'Gorman
5aa3822dbc cleanup the show uptime code, and minor changes
to patch 6274


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-18 00:05:09 +00:00
Kevin P. Fleming
065a368463 remove some more deprecated (pre-1.2) stuff
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17 23:45:05 +00:00
Matthew Fredrickson
d2fa424b1e Improvements to DSP callprogress=yes code (#5009)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8156 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17 23:37:22 +00:00
Matthew Fredrickson
6ba6a2be1c Fix answeronpolarityswitch and hanguponpolarityswitch when both are yes (#6229)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8155 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17 23:13:42 +00:00
Matt O'Gorman
90b4d8b9be oops all better now.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17 21:10:38 +00:00
Matt O'Gorman
24c4e062cc allow for multiple periodic announcements
from bug 5273 with minor changes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17 20:58:56 +00:00
Kevin P. Fleming
e7f8d66855 spelling fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8150 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17 20:53:04 +00:00
Kevin P. Fleming
5af944427f suppress compiler warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17 20:49:39 +00:00
Matt O'Gorman
455f916d83 Merged revisions 8140 via svnmerge from
https://svn.digium.com/svn/asterisk/branches/1.2

........
r8140 | mogorman | 2006-01-17 14:10:29 -0600 (Tue, 17 Jan 2006) | 3 lines

Stop any generators running on a channel when
festival is called as described in 5996

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8141 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17 20:16:18 +00:00
Olle Johansson
69e9567874 Portability - compilation warning on Mac OS/X removed
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17 19:03:04 +00:00
Olle Johansson
533a64401b Extra comma causing compilation errors...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17 18:56:57 +00:00
Olle Johansson
95144f75a5 - Logging clean up
- Whitespace removed and added, formatting fixed


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8136 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17 18:54:56 +00:00
BJ Weschke
242a478023 Fix compiler warning.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17 18:31:03 +00:00
Matthew Fredrickson
540175d9c7 Check to see if arg is NULL before passing (#6094)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17 18:20:33 +00:00
Matt O'Gorman
859f1fa009 Added tab completion for help. bug 6074
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17 17:25:53 +00:00
Matt O'Gorman
f2b231daf6 Merged revisions 7963 via svnmerge from
https://svn.digium.com/svn/asterisk/branches/1.2

........
r7963 | mogorman | 2006-01-10 22:38:07 -0600 (Tue, 10 Jan 2006) | 2 lines

Minor typo refrenced in 6191

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8125 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17 16:58:09 +00:00
Kevin P. Fleming
d8dfdf0504 Merged revisions 8122 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8122 | kpfleming | 2006-01-17 07:11:55 -0600 (Tue, 17 Jan 2006) | 2 lines

update CLI copyright notice

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8123 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17 13:13:31 +00:00
Kevin P. Fleming
21347757ef don't generate any message for native bridge attempts unless all the basic checks have passed and we're actually going to try it
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17 05:15:33 +00:00
Olle Johansson
d791033430 Doxygen update
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8118 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17 03:05:43 +00:00
Kevin P. Fleming
97ef58e4eb check rlimit _after_ reading config file, so that if 'dumpcore' is specified there it will take effect
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8114 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-16 23:52:51 +00:00
Kevin P. Fleming
f9f9769502 block this revision, fix is different in this branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8113 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-16 23:52:02 +00:00
Jim Dixon
80c19330ff Added NOANSWER support, so that optional the DISA application starts without
answering (used in new version of app_rpt, and potentially other applicaitons).


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-16 18:52:13 +00:00
Tilghman Lesher
109b5baa8d Argh, another ERROR that should have been DEBUG
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8104 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-16 18:41:18 +00:00
Tilghman Lesher
7f28989616 Change a debugging message committed with the wrong level
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-16 18:39:01 +00:00
Tilghman Lesher
2a9a03e6f0 Bug 5090 - sample configuration for udptl packets
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8102 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-16 18:05:19 +00:00
Russell Bryant
4a7cec937d remove redundant CFLAGS for BSD which are already set in the main Makefile (issue #6250)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8101 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-16 17:51:35 +00:00
BJ Weschke
3854a2438e Spelling corrections (mostly in comments and doxygen areas) #6249
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8100 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-16 17:37:44 +00:00
BJ Weschke
fa07ae94ec More code optimization with the new argument macros #6253
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8099 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-16 17:31:30 +00:00
Russell Bryant
06d2ae82cd Merged revisions 7963 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7963 | mogorman | 2006-01-10 23:38:07 -0500 (Tue, 10 Jan 2006) | 2 lines

Minor typo refrenced in 6191

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-16 01:47:02 +00:00
Russell Bryant
08e3c1038d block more revisions ...
TO ALL DEVELOPERS WITH COMMIT ACCESS:
Please remember to *always* do an 'svnmerge block -r <rev#>' on the trunk
every single time you make a commit to the 1.2 branch which will not be pulled
into the trunk using svnmerge.  This is important for us to be able to take
full advatage of this tool.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-16 01:46:15 +00:00
Russell Bryant
0ec9717247 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8088 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2006-01-16 01:36:10 +00:00
Russell Bryant
4d9a267d0a block appropriate revisions from being merged from 1.2 ...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-16 01:32:46 +00:00
Tilghman Lesher
2dec3747df Clarify description of ARRAY function
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8080 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-15 18:08:04 +00:00
Tilghman Lesher
56bd1469ba Allow application arguments to be quoted, allowing '|' characters inside arguments
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-15 18:02:46 +00:00
Tilghman Lesher
417d6b1793 Prepare for removal of DBGet/DBPut manager commands, by allowing Getvar to get functions (Setvar can already set functions)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-15 05:50:19 +00:00
Tilghman Lesher
9702fac4f8 Bug 6238 - Janitor - update to app_args macros
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-14 19:30:37 +00:00
Tilghman Lesher
3578c5b19d Merged revisions 8074 via svnmerge from
/branches/1.2


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-14 19:08:03 +00:00
Matthew Fredrickson
c4d3efb519 Small documentation update for new AST_FRAME_MODEM type
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8073 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-14 18:53:10 +00:00
Matthew Fredrickson
b5ed1a1a59 Add mission options to agents.conf sample file (#6234)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-14 16:18:03 +00:00
BJ Weschke
ec0c939e6f Code cleanup spawned from an earlier commit today r8063. Standardize manager event responses and queue_log behavior on callbacklogoff.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-14 03:25:38 +00:00
Matt O'Gorman
06f2040e6f added feature for pausing and unpausing the
monitor app from manager and in the call through
features.conf bug 5395 for the patch


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-14 00:32:30 +00:00
Matt O'Gorman
58bac05e59 Added QUEUE_MEMBER_COUNT and QUEUE_MEMBER_LIST
from bug 5451


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-13 22:59:19 +00:00
Matt O'Gorman
9932a6415a make voicemail files group writable and uses a
nicer function for creating dirs as described in
5929


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8068 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-13 22:05:46 +00:00
Matt O'Gorman
169eeb8599 Added forward context option from 5497
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-13 19:09:05 +00:00
Russell Bryant
55c8fc92a9 Various cleanups from comments in an email from Luigi Rizzo. Thank you!
- Use a cleaner syntax for declaring the allocation macros
- Fix return value for ast_strdup/ast_strndup
- remove safe_strdup from app_macro, since ast_strup does the same thing
- fix a place in app_queue where ast_calloc+strncpy was used instead of
  ast_strdup.  If you are helping out with these conversions, please watch out
  for other places where this is done.
- add a note to the coding guidelines about the fix to app_queue


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-13 18:38:55 +00:00
Matt O'Gorman
3928ebd74f Made chan_agent code parsing more robust and
implemented new macro code. from 6228.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8064 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-13 18:30:49 +00:00
BJ Weschke
1874f21ff8 Implement the autologoffunavail option in chan_agent (#6038 with some minor mods)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8063 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-13 18:23:30 +00:00
Matt O'Gorman
130ce286ba added two new features to meetme, autofill and
autopause.  thanks twisted from 5577


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-13 17:39:56 +00:00
BJ Weschke
21796e2569 Another patch against this code (the right one now) to deal with cyclic ranges. #6230
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-13 17:35:12 +00:00
BJ Weschke
46b6488927 Address the condition where X-ClientCode could be NULL or an empty string - from a -dev posting.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-13 17:28:22 +00:00
Matt O'Gorman
2aaffe48e4 allow app_directed_pickup to try to pickup
multiple channels at the same time. however it
does not work in cases where dial was called
with multiple devices.  bug 5694.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8057 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-13 17:02:15 +00:00
BJ Weschke
34ba77e702 Range should be inclusive, not exclusive, of the end of the range.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8056 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-13 16:01:40 +00:00
Tilghman Lesher
caa0de6e99 Somebody complained the that length of the dah wasn't quite up to spec...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8051 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-13 07:14:42 +00:00
Matt O'Gorman
1a5aa53fc9 adding more output for shutdown. as per 6102
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-13 06:49:23 +00:00
Matt O'Gorman
ea06844b19 added some minor changes from bug 6046 thanks ppyy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8049 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-13 06:43:27 +00:00
Russell Bryant
cd28843c19 fix spelling errors (issue #6227)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-13 06:11:41 +00:00
BJ Weschke
f6c5e65266 More memory wrapper cleanup. #6224
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-13 03:34:31 +00:00
BJ Weschke
8637b23569 More memory wrapper and cleanup work. #6226 w/one very minor compile fix mod in app_rpt.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-13 03:25:23 +00:00
Matt O'Gorman
8d4ee3882a forgot to take out createlink sample along with
other part.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-13 02:34:10 +00:00
Tilghman Lesher
79d3456c50 Bug 6223 - Remove unnecessary header that caused FreeBSD not to compile
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8038 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-12 21:18:46 +00:00
Tilghman Lesher
bce06eff5b Fix typos that caused voicemail not to compile.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-12 21:12:25 +00:00
Matt O'Gorman
ac2732ef4e I will never touch VM again...
thanks qwell for spotting mistakes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-12 20:04:52 +00:00
Matt O'Gorman
791370e026 some error checking added into g and a option
if there is no parens.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-12 19:45:38 +00:00
Matt O'Gorman
b86c380a58 More cosmetic changes. thanks qwell and everyone
else.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-12 19:28:47 +00:00
Matt O'Gorman
d6638d5262 Oops... need to keep my trunk folder clean...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8023 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-12 19:15:20 +00:00
Matt O'Gorman
0228cf5bc0 Minor revisions from bug 6090
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-12 19:09:36 +00:00
Matt O'Gorman
1dc0312d01 Added option for limiting a user from logging in
as multiple agents at same time. bug 6046 thanks
ppyy


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-12 19:07:18 +00:00
BJ Weschke
a44bc3a0d7 Remove an unneccessary unlock and do away with the error msg about not being able to unlock the lock. #6201
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8020 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-12 19:01:35 +00:00
Russell Bryant
57a8394f6c fix breakage from new feature committed in r7995
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-12 18:35:03 +00:00
Mark Spencer
af155f9c28 Remove unnecessary (but unexecutable) unlocks, cleanup code (bug #6220)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-12 17:34:10 +00:00
Mark Spencer
7b6c46a6d4 Merge rizzo's range optimizations (bug #6101)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8016 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-12 17:27:38 +00:00
Matthew Fredrickson
1437a7255d More changes to make t.38 support work
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8015 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-12 17:14:58 +00:00
Matthew Fredrickson
0f5e4e476a Changes to add udptl to asterisk (preliminary merging of the t.38 patch)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8014 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-12 17:12:12 +00:00
Matt O'Gorman
37b04c33cb As we no longer have chan_modem this file is not used
either thanks rizzo in refrence to 6217


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-12 16:15:01 +00:00
BJ Weschke
aaa4c9aecc More new memory wrapper work.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8012 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-12 16:08:06 +00:00
BJ Weschke
e825a748cf More new memory wrapper work and initializing some memory allocations to zero where they weren't before.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8011 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-12 16:00:13 +00:00
Matt O'Gorman
57fe2e8ea2 removed unused variable and config parsing for it
as to bug 6219


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-12 16:00:04 +00:00
BJ Weschke
deae1cbc3f New memory wrapper changes.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-12 15:51:13 +00:00
BJ Weschke
0c41704c68 Use argument macro in app_voicemail #6221
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-12 15:28:01 +00:00
BJ Weschke
5f542e14cc Use argument macro in app_dictate #6222
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-12 15:11:49 +00:00
Matt O'Gorman
64f01df137 added page macro examples from 6077 with minor typo
fixes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-12 06:43:24 +00:00
Tilghman Lesher
1db503ade6 Merged revisions 7999 via svnmerge from
/branches/1.2


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-12 06:15:56 +00:00
Tilghman Lesher
35dc7e7ff9 Bug 6213 - Morse code app
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7998 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-12 05:47:30 +00:00
Russell Bryant
f693a606f8 typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7996 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-12 02:35:45 +00:00
Matt O'Gorman
672f6aa422 Added automatic folder feature described in 6090
with bounds checking.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7995 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-12 02:20:19 +00:00
Russell Bryant
2eb7eecdd0 conversions to memory allocation wrappers (issue #6210)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 22:41:34 +00:00
Matt O'Gorman
f5b108ac99 Added macros from 6198 and 6203. also added better
error reporting in func_cut


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 19:52:29 +00:00
Russell Bryant
69c4cefcd4 fix incorrect return value (issue #6202)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 19:23:16 +00:00
Russell Bryant
0318a4b180 Merged revisions 7986 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7986 | russell | 2006-01-11 14:08:53 -0500 (Wed, 11 Jan 2006) | 2 lines

move variable to correct scope (issue #6197)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 19:13:33 +00:00
Russell Bryant
2dc13eb912 replace malloc+memset with a call to ast_calloc, also removing the error
message that is no longer necessary (issue #6205)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 18:40:42 +00:00
Russell Bryant
5ce65af66e fix temp greetings with odbc storage (issue #6078)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7978 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 07:21:16 +00:00
Russell Bryant
da684d64b4 block 7976
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 07:19:52 +00:00
Matt O'Gorman
283c0d64ba added feature from 5750 with whitespace fixing.
allows for meetme show list to tell how long user
has been in confrence and reports it to manager
when user leaves confrence.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7975 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 06:56:28 +00:00
Russell Bryant
9de6d70b24 oops. :)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 06:35:34 +00:00
Russell Bryant
d7f70ca1c2 Merged revisions 7972 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7972 | russell | 2006-01-11 00:46:39 -0500 (Wed, 11 Jan 2006) | 2 lines

fix mem leak on module unload (issue #6190)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 05:47:21 +00:00
Russell Bryant
4b84879b0c block 7970
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7971 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 05:26:51 +00:00
Russell Bryant
60174631fc add doxygen documentation and fix various issues with ast_dtmf_stream
(discussed in issue #6087)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7969 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 05:23:19 +00:00
Russell Bryant
752e3c8938 - add AST_LIST_HEAD_NOLOCK_STATIC, similar to AST_LIST_HEAD_STATIC, but without the lock!
- store registered channel backends using linked list macros


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 05:05:13 +00:00
Russell Bryant
e0d4fcfb55 lock list of translators *before* recalculating translation matrix.
Also, store translators using linked list macros.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7967 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 05:00:45 +00:00
Russell Bryant
1d83e4a2ab block 7965
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7966 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 04:54:13 +00:00
Russell Bryant
c3323723ed remove stray header
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 04:39:53 +00:00
Russell Bryant
109ce5273f fix locking bug - lock instead of unlock (see commit to r7960 to branches/1.2)
store hint list using linked list macros


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7962 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 04:31:59 +00:00
Russell Bryant
98dc0c3b70 block 7960
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 04:19:48 +00:00
Russell Bryant
384aefa772 Merged revisions 7957 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7957 | russell | 2006-01-10 22:12:44 -0500 (Tue, 10 Jan 2006) | 2 lines

fix a little typo

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 03:13:45 +00:00
Tilghman Lesher
bdc14f3c84 Merged revisions 7955 via svnmerge from
/branches/1.2


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7956 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 01:31:28 +00:00
Russell Bryant
466a062b09 convert some channels to use the memory allocation wrappers.
(This is being added to the janitor projects list.)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 01:20:29 +00:00
Russell Bryant
79aa72e2e7 fix typo, thanks Qwell!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 00:06:15 +00:00
Russell Bryant
15fb0b2061 Add wrappers for commonly used memory allocation functions. These wrappers
add an automatically generated Asterisk log message if the allocation fails
for some reason.  Otherwise, they are functionally the same, with the
exception of ast_strdup and ast_strndup.  These functions have the added
ability to accept a NULL argument without error, which will just be ignored
without generating an error. The coding guidelines have also been updated to 
reflect all of this information.  (issue #4996)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-10 23:51:42 +00:00
Matthew Fredrickson
f87a6a3c5f Allow a digitstream to contain a flash character ('f' or 'F') when sending dtmf string to a channel. (#4935)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7948 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-10 21:35:45 +00:00
Matthew Fredrickson
c2f0133a3b Update chan_phone to indicate FLASH properley (#4935)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-10 21:34:04 +00:00
Matthew Fredrickson
8f7647b49f Make sure to update the config file for chan_zap to include japanese caller id
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-10 21:13:18 +00:00
Matt O'Gorman
00f2142dc1 6186 amd 6187 with minor revisions. added arg
parsing from macro.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-10 16:08:28 +00:00
Olle Johansson
b3ed64689d Importing rev 7939 from 1.2
- Add reference to README.tds 
- Reformat table


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7940 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-10 08:52:55 +00:00
Olle Johansson
aa7974450b Declare missing randomlock
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-10 08:33:52 +00:00
Tilghman Lesher
0d7fda32fd Fix indentation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-10 03:23:38 +00:00
Matt O'Gorman
d25b128b66 committing 5924 with minor white space changes
and adding it to the Makefile for functions.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7921 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-10 01:52:34 +00:00
Tilghman Lesher
935c80d5e6 Bug 5961 - new RAND() function
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7920 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-10 00:55:45 +00:00
Tilghman Lesher
662c9aeb23 Bug 6106 - SuSE startup script
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7919 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 23:20:50 +00:00
Kevin P. Fleming
8d17df65ce Merged revisions 7917 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7917 | kpfleming | 2006-01-09 16:48:48 -0600 (Mon, 09 Jan 2006) | 2 lines

re-initialize _all_ sequence numbers when transfer completes

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7918 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 23:06:28 +00:00
Russell Bryant
ca4de4563c block rev 7915 from being merged into the trunk, since the patch is
not compatible


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7916 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 22:09:15 +00:00
Matt O'Gorman
cc9cbda7ed Changed say.c aliased zh to the tw say.c output.
Done in relation to bug 6135.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 21:50:20 +00:00
Olle Johansson
efe79bd677 Bug 6112: file.c list macro conversion (drumkilla)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 21:30:46 +00:00
Tilghman Lesher
8d42b1eb74 Bug 6099 - cleanup of parse_variable_name and pbx_retrieve_variable
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7911 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 21:22:36 +00:00
Tilghman Lesher
335cd7d3a2 Merged revisions 7908 via svnmerge from
/branches/1.2


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7909 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 20:12:07 +00:00
Tilghman Lesher
99a3195329 Merged revisions 7904 via svnmerge from
/branches/1.2


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7907 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 19:33:47 +00:00
Kevin P. Fleming
3277919885 restore proper svn:ignore properties that were somehow lost...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7902 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 18:34:09 +00:00
Russell Bryant
455f75c9b1 remove unnecessary check before ast_strlen_zero (issue #6179)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 18:29:03 +00:00
Kevin P. Fleming
10862cd151 fix breakage introduced in revision 7863
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7897 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 18:03:18 +00:00
Olle Johansson
8e344385a2 -Move declaration of callevents variable out of the block of function declarations.
-Do not set it to a default value, it's set later on before loading configuration.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7887 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 15:20:53 +00:00
Olle Johansson
725155b854 Doxygen update
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 09:07:58 +00:00
Tilghman Lesher
69653d9807 Bug 6150 - do not modify strings after they have been submitted into a string pool
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7872 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 06:42:28 +00:00
Mark Spencer
1134b480dc you need to setgid in addition to initgroups...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-08 20:27:22 +00:00
Mark Spencer
be582e9f2a Remove unnecessary unlock (bug #6171)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-08 19:53:25 +00:00
Matt O'Gorman
82a74beed4 Commiting bugfix 5310. added functions to astobj
for queue like structure. astobj_container_link_end
astobj_container_link_start 
astobj_conatiner_unlink_start


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-08 17:24:54 +00:00
Mark Spencer
940c49390c Minor video fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-08 04:30:10 +00:00
Matt O'Gorman
353e5f1dc9 added small feature from bug 5682 with one typo fix.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7865 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-08 00:25:31 +00:00
Mark Spencer
50ab29b64b Merge playback cleanups (bug #6163)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-08 00:08:49 +00:00
Mark Spencer
f5678d89d4 Fix segfault in greek syntax (bug #6142)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7863 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-07 23:43:23 +00:00
Mark Spencer
8f00194254 Fix RPID with new string fields (bug #6145)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7862 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-07 21:35:40 +00:00
Mark Spencer
9c3db147ea Handle swapout of "fromdomain" in callid properly (bug #6154)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7861 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-07 21:30:19 +00:00
Mark Spencer
1b57ae8b6c Fix build if RINGBEGIN is not defined (bug #6166)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7860 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-07 20:38:40 +00:00
Mark Spencer
b631dc98b5 oops
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7859 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-07 20:09:26 +00:00
Mark Spencer
e9afca36f9 Only set group for "runuser" if "rungroup" is not specified.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-07 20:08:51 +00:00
Mark Spencer
bb8882d7fc Initialize groups properly
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7857 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-07 19:42:05 +00:00
Mark Spencer
ce5a9c4f12 Fix potential deadlock (bug #6169)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7856 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-07 19:30:44 +00:00
Mark Spencer
e2ef61814f Add support for H.264 with SIP and recording
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7855 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-07 17:54:22 +00:00
Tilghman Lesher
33323ac720 Bug 6164 - Allow ast_skip_blanks on const strings without spewing warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7854 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-07 15:45:47 +00:00
Tilghman Lesher
d4ee9cb1a3 Bug 6162 - Constify manager_event arguments
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7853 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-07 15:23:38 +00:00
Tilghman Lesher
e92b19bc35 Bug 6160 - Replace inlined code with ast_skip_blanks
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7852 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-07 15:18:23 +00:00
Mark Spencer
d7906c3447 Fix CLI breakage
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-07 15:17:10 +00:00
Tilghman Lesher
0be002fe3b Bug 6161 - Remove duplicated code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-07 14:47:36 +00:00
Tilghman Lesher
32f05bfa95 Merged revisions 7848 via svnmerge from
/branches/1.2


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-07 07:31:08 +00:00
Matthew Fredrickson
4401b7e67f Changes to allow receiving japanese callerid (Bug #5928)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-06 20:03:20 +00:00
Kevin P. Fleming
1fe5108763 ensure that string field 'build' operation only evaluates arguments one time
fix some minor documentation errors
return proper type from string field space allocator


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-06 19:19:17 +00:00
Kevin P. Fleming
d44823b5b8 allow limiting of queue members who will be delivered a given caller's call by penalty setting
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7833 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-06 03:40:12 +00:00
Tilghman Lesher
a84633ba26 Merged revisions 7831 via svnmerge from
/branches/1.2


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-06 00:36:12 +00:00
Kevin P. Fleming
95b4988cf5 Merged revisions 7829 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7829 | kpfleming | 2006-01-05 18:21:00 -0600 (Thu, 05 Jan 2006) | 2 lines

update agent persistence when an agent gets logged off by autologoff

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-06 00:23:19 +00:00
Tilghman Lesher
f6bd113f02 Merged revisions 7827 via svnmerge from
/branches/1.2


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-05 23:54:28 +00:00
Kevin P. Fleming
7bbbbffa6a Merged revisions 7825 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7825 | kpfleming | 2006-01-05 17:49:50 -0600 (Thu, 05 Jan 2006) | 3 lines

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/trunk@7826 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-05 23:52:34 +00:00
Tilghman Lesher
a0ba6e7084 Merged revisions 7823 via svnmerge from
/branches/1.2


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7824 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-05 23:08:55 +00:00
Matt O'Gorman
8adf708c1b Added feature from bug #5053, allowing for
app_authenticate to set a max number of digits
also implemented the new argument and option
parsing code.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7822 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-05 21:47:44 +00:00
Matt O'Gorman
6ac09042f1 oops minor formatting fixes, and taking out
debug message.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-05 21:04:06 +00:00
Kevin P. Fleming
b157f30e51 Merged revisions 7819 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7819 | kpfleming | 2006-01-05 14:52:38 -0600 (Thu, 05 Jan 2006) | 2 lines

ensure that variable is initialized

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-05 20:53:21 +00:00
Matt O'Gorman
7b680ef6d8 Added feature from bug #5573 and updated app_read
to be able to use indication tones, and argument 
parsing code. Documented possible problems this might
cause an older dialplans in UPGRADE.txt


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-05 19:55:03 +00:00
Olle Johansson
a312561ff8 Doxygen updates
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7814 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-05 09:40:22 +00:00
Olle Johansson
00311eed17 Copyright header update
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-05 09:30:21 +00:00
Olle Johansson
80dd03e865 Fix copyright for touched file
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7811 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-05 09:12:33 +00:00
Kevin P. Fleming
2d4c002a2c Merged revisions 7809 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7809 | kpfleming | 2006-01-04 18:58:29 -0600 (Wed, 04 Jan 2006) | 2 lines

send device state updates for auto-logoff of agents as well

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-05 00:58:48 +00:00
Kevin P. Fleming
1e9180d0a8 Merged revisions 7807 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7807 | kpfleming | 2006-01-04 18:18:46 -0600 (Wed, 04 Jan 2006) | 2 lines

doh... fseek() has no useful return value

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-05 00:19:18 +00:00
Kevin P. Fleming
cb2f9640ba Merged revisions 7805 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7805 | kpfleming | 2006-01-04 17:51:03 -0600 (Wed, 04 Jan 2006) | 2 lines

use proper fwrite() parameters and return value

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 23:51:23 +00:00
Kevin P. Fleming
e8f9ee8f6a Merged revisions 7803 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7803 | kpfleming | 2006-01-04 17:45:34 -0600 (Wed, 04 Jan 2006) | 2 lines

return properly after extending file

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 23:45:58 +00:00
Kevin P. Fleming
ce81ea8122 remove deprecated chan_modem drivers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 23:33:59 +00:00
Kevin P. Fleming
c3ce1852bc Merged revisions 7799-7800 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7799 | kpfleming | 2006-01-04 17:02:38 -0600 (Wed, 04 Jan 2006) | 2 lines

make monitoring more tolerant of peers that deliver frames in bursts

........
r7800 | kpfleming | 2006-01-04 17:27:57 -0600 (Wed, 04 Jan 2006) | 2 lines

ensure that ulaw/alaw sound files are filled with silence when extended (not zeroes)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 23:29:37 +00:00
Kevin P. Fleming
80fa9689b7 add memory-pool based string field management for structures
convert chan_sip sip_pvt and sip_registry structures to use string fields
add 'const' qualifiers to a few API calls that don't modify their input strings
add an asprintf() wrapper to astmm


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 21:54:09 +00:00
Olle Johansson
223c0c303a Merged revisions 7795 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7795 | oej | 2006-01-04 22:46:40 +0100 (Wed, 04 Jan 2006) | 2 lines

Issue #5980: Removing extra CR+LF in manager events - needs port to trunk

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7796 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 21:52:35 +00:00
Matthew Fredrickson
a14916bfa5 Fixes for bug #6125
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 14:46:41 +00:00
Olle Johansson
e57c15deee Small typo fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 13:56:11 +00:00
Olle Johansson
a5dcd29a2e Whitespace and formatting changes. /Housekeeping
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 13:49:25 +00:00
Olle Johansson
72779cd6a0 Issue #5824: Adding more SIP to ISDN Cause code conversions. Thanks mguesdon!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 13:07:34 +00:00
Olle Johansson
4661015664 Issue #5952: Add destination protocol information to res_osp (homesick)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7779 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 12:16:30 +00:00
Russell Bryant
d904a19e56 doxygen tweak
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 12:11:11 +00:00
Olle Johansson
b6bd455a7b Missing ">" in XML. Thanks, fenlander, for reporting this on IRC.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 10:16:53 +00:00
Olle Johansson
7c0ae1bc1f Issue #6127: Count in show channeltypes (junky)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7776 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 09:22:45 +00:00
Olle Johansson
5462ec082c - Remove "incominglimit" as a configuration option in sip.conf
- Add documentation on call-limit, explaining that there's two counters
  for a type="friend". 
- Document the removval of "incominglimit" in UPGRADE.txt



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7775 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 09:10:56 +00:00
Russell Bryant
1d603f5256 Merged revisions 7773 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7773 | russell | 2006-01-04 02:06:50 -0500 (Wed, 04 Jan 2006) | 2 lines

use a more correct way of determining the size of the destination buffer

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7774 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 07:08:08 +00:00
BJ Weschke
6149728a77 Fix the 'if' clause to be true under the right conditions. Bug #6126
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 05:26:03 +00:00
Kevin P. Fleming
a4f8d466e8 update copyright headers for files changed this year
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03 22:16:23 +00:00
Kevin P. Fleming
a1a5e746ee add optional timestamps to manager events (issue #5535, simplified)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03 22:07:12 +00:00
Kevin P. Fleming
aa2def927f add script for simple 'no-brainer' restarts of safe_asterisk (issue #5139)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03 20:33:28 +00:00
Kevin P. Fleming
61613f710d Merged revisions 7746 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7746 | kpfleming | 2006-01-03 14:22:18 -0600 (Tue, 03 Jan 2006) | 2 lines

remove unused 'old' expression parser

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03 20:23:23 +00:00
Olle Johansson
38cc562008 Don't check user call limits for outbound calls.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7745 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03 19:12:50 +00:00
Tilghman Lesher
577e4189d5 Merged revisions 7743 via svnmerge from
/branches/1.2


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7744 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03 18:17:42 +00:00
Kevin P. Fleming
cdf0303465 Merged revisions 7740 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7740 | kpfleming | 2006-01-03 11:24:56 -0600 (Tue, 03 Jan 2006) | 4 lines

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/trunk@7741 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03 17:25:39 +00:00
Kevin P. Fleming
815d2413ff fix breakage from rev 7730 (failure to unlock list in get_proto)
minor cleanups and simpler usage of list macros


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7739 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03 17:08:35 +00:00
Kevin P. Fleming
142ef858a5 Merged revisions 7736 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7736 | kpfleming | 2006-01-03 10:34:12 -0600 (Tue, 03 Jan 2006) | 2 lines

don't leak memory for (most) expression evaluations

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7737 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03 16:39:37 +00:00
Olle Johansson
1e6ada5f68 Issue #5954: Implement printf-like append_history and implement AST_LIST for SIP history (rizzo)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03 12:25:32 +00:00
Olle Johansson
4ef2139916 Bug #6071: Broken rport match in check_via(). (rizzo)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03 11:58:10 +00:00
Olle Johansson
6e7962b5a1 Bug #5228: Add caller ID and CallerIDname to OriginateSuccess/Failure manager events (outtolunc)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03 11:31:56 +00:00
Olle Johansson
3b4f660a85 Bug 5345; Add configuration option for minimum registration time. (folsson)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03 11:21:48 +00:00
Olle Johansson
715a220850 Bug #6109: Fix unprotected list in RTP, implement AST_LIST macros, update doxygen docs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7730 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03 09:30:19 +00:00
Olle Johansson
9b315771d4 Bug #6116: Use list macros in autoservice.c (drumkilla)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03 08:54:19 +00:00
Olle Johansson
cc252f60d5 Bug #6118: Clean up list handling in image.c (drumkilla)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7728 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03 08:40:55 +00:00
Russell Bryant
9b8b2c79c6 initialize sip_auth list
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-02 23:52:33 +00:00
Russell Bryant
8a64cc5f46 doxygen updates
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7720 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-02 18:54:34 +00:00
Tilghman Lesher
b5d18c50b9 Merged revisions 7709 via svnmerge from
/branches/1.2


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7710 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-02 07:41:02 +00:00
BJ Weschke
7aad650606 Fix compiler warnings.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-02 01:53:26 +00:00
Russell Bryant
1946d7ae92 fix a couple of doxygen errors
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7699 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-01 18:37:50 +00:00
Russell Bryant
ae3d9d38cd clean up some loops and replace some duplicate code with a for loop (issue #6100)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-01 17:50:37 +00:00
Russell Bryant
ecacbda75f remove some duplicated code (issue #6098)
Also, touch up some formatting


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-01 08:45:29 +00:00
Russell Bryant
d41c5918b2 - fix some doxygen errors
- add the flag definitions to the page about global options


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7690 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-31 19:45:30 +00:00
Russell Bryant
44d8f1e3b4 update comments to doxygen style
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-31 16:35:48 +00:00
Russell Bryant
a725468381 update doxygen docs to specify authors
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-30 21:18:06 +00:00
Tilghman Lesher
75dc984c31 Merged revisions 7677 via svnmerge from
/branches/1.2


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-30 14:57:00 +00:00
Olle Johansson
1dc8844db1 - Reformatting the app_sms help text from html to txt to comply with the rest of the documentation
- Renaming help files to README.<name>


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-30 11:20:13 +00:00
Russell Bryant
5c18154617 normalize a loop and avoid multiple strlen calls when completing voicemail users
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7668 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-29 08:25:06 +00:00
Russell Bryant
1bd94abf57 avoid multiple strlen calls in complete_queue
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7667 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-29 08:15:48 +00:00
Russell Bryant
a6d13ff79f Merged revisions 7665 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7665 | russell | 2005-12-28 12:35:56 -0500 (Wed, 28 Dec 2005) | 2 lines

fix memory leak in build_rpid (issue #6070)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7666 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-28 17:37:35 +00:00
Russell Bryant
33fafb28f8 restore alphabetical order for builtin cli commands (issue #6073)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-28 17:31:12 +00:00
Russell Bryant
e458091585 fix permissions of created recordings (issue #6067)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7662 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-27 21:03:18 +00:00
Russell Bryant
04fc58d038 minor cleanups for another cli completion function ...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7661 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-27 20:03:07 +00:00
Russell Bryant
27a345626c avoid duplicate strlen calls for the command completion functions for
'show application' and 'show applications'


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7660 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-27 19:59:09 +00:00
Russell Bryant
37e21fc61c avoid unneeded calls to strlen in iax2 completion functions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7659 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-27 19:48:44 +00:00
Tilghman Lesher
a19361c684 Bug 4880 - add priority label matching and dialplan function retrieval
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7658 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-27 19:13:13 +00:00
Russell Bryant
e4e5b423a4 avoid repeated calls to strlen in command completion functions and normalize
some loops


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7657 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-27 18:18:41 +00:00
Tilghman Lesher
478052caa0 Bug 5237 - Optional filename argument
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-27 17:53:48 +00:00
Russell Bryant
1f73717188 when doing tab completion, iterate the list of matches to count how many there
are instead of having the list of matches generated twice (issue #6066)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-27 17:24:54 +00:00
Tilghman Lesher
7fae5bb20e Bug 5382 - Allow VM_CATEGORY in voicemail emails
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-27 07:13:37 +00:00
Tilghman Lesher
340f5b67de Bug 5906 - ARRAY dialplan function
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-27 06:50:25 +00:00
Tilghman Lesher
ca92ea82d6 Bug 5854 - Allow quotation of the second field in extconfig, for the purpose of including commas (for LDAP configuration)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-27 06:42:29 +00:00
Tilghman Lesher
cdab512c9f Bug 5183 - Inline stack backtraces
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7646 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-27 06:24:28 +00:00
Tilghman Lesher
b7272182d1 Reduce warnings on signedness conversions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-27 02:05:56 +00:00
Tilghman Lesher
dd161bec3b Add SQL_ESC to allow single ticks to be escaped
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7642 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-27 02:02:23 +00:00
Mark Spencer
63ed37defd Don't do DTMF detect on pseudo's!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-26 23:56:44 +00:00
Russell Bryant
a4f1d606b7 - normalize some loops
- simplify and reduce code by keeping track of return value
- replace some simple if/then sections with conditional expressions
(issue #6065)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-26 21:38:50 +00:00
Tilghman Lesher
cf1e68e4e8 Merged revisions 7637 via svnmerge from
/branches/1.2


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-26 20:34:46 +00:00
Jim Dixon
a945b5598e Added support for Feature Group C CAMA trunks (both DP and MF), and support
for Feature Group D Tamdem trunks inbound (outbound was already there)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-26 20:01:35 +00:00
Russell Bryant
ef1ce7aec9 Merged revisions 7634 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7634 | russell | 2005-12-26 13:19:12 -0500 (Mon, 26 Dec 2005) | 2 lines

cast time_t to an int in printf/scanf (issue #5635)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-26 18:35:28 +00:00
Tilghman Lesher
dc51afacc6 Bug 6057 - Deprecate builtins that have been replaced by functions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-26 16:48:12 +00:00
Mark Spencer
ec0b96837e Add "local channel" variation so that we don't read/write to the same
channel...  (bug #6058)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-26 00:47:28 +00:00
Mark Spencer
96b3a24637 Fix multiple free of a frame (bug #6058)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-25 01:27:47 +00:00
Tilghman Lesher
eeb58dcd81 Bug 5727 - reduce duplicate code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7619 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-25 00:25:41 +00:00
Russell Bryant
85efb20313 minor cleanups ...
- use for loops instead of while loops for basic list traversals
- only calculate word length one time in CLI complete functions
- use calloc instead of malloc + memset
- remove some unnecessary casts
- formatting tweaks 


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7618 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-24 06:23:36 +00:00
Russell Bryant
22315a44c4 minor cleanups ...
- use for loops instead of while loops for basic list traversals
- remove an unused 'res' variable
- formatting tweaks


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7617 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-24 05:18:40 +00:00
Tilghman Lesher
af4d531322 Bug 5759 - Remove unused datetime code (current DateTime app is in app_sayunixtime)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-23 23:42:58 +00:00
Tilghman Lesher
c66748df1c Alphabetize the functions list
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7615 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-23 22:47:26 +00:00
Tilghman Lesher
5323442db4 Bug 5327 - new function FILTER and optional argument to CALLERID
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7614 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-23 21:03:25 +00:00
Tilghman Lesher
06d1a99163 Make the English language of date format 'Q' and 'q' sound a little bit more natural
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-23 20:43:11 +00:00
Tilghman Lesher
8d2b85d10a Merged revisions 7608 via svnmerge from
/branches/1.2


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-23 06:39:44 +00:00
Kevin P. Fleming
dea5bdd8e1 Merged revisions 7606 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7606 | kpfleming | 2005-12-22 21:01:24 -0600 (Thu, 22 Dec 2005) | 3 lines

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/trunk@7607 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-23 03:04:38 +00:00
BJ Weschke
3f035b3dfc Another app documentation tweak.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-22 23:59:13 +00:00
Tilghman Lesher
2f9eb968e7 Merged revisions 7601 via svnmerge from
/branches/1.2


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7602 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-22 22:06:35 +00:00
Russell Bryant
b60daeb58f Merged revisions 7599 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7599 | russell | 2005-12-22 15:36:47 -0500 (Thu, 22 Dec 2005) | 3 lines

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/trunk@7600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-22 20:38:43 +00:00
Russell Bryant
80322c1bdb remove stray unlock (issue #5955)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7594 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-22 16:14:38 +00:00
Kevin P. Fleming
9adc59ca3a forward-port per-peer videosupport changes from branches/1.2
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7590 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-22 03:50:44 +00:00
Kevin P. Fleming
2f66f7cfe9 don't try to build func_odbc when ODBC headers/libraries are not present
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-22 03:49:41 +00:00
Russell Bryant
1d498c35cd - construct the difference and have only one call to snprintf in build_via
- convert some while loops to for loops
- localize some variables and remove unneeded initializations
- store result of get_header locally so it only has to be called once
- remove some duplicate calls to strcasecmp by storing result
(issue #5955)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-22 02:20:44 +00:00
Tilghman Lesher
134c3757d8 Merged revisions 7582 via svnmerge from
/branches/1.2


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7583 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-21 20:02:36 +00:00
BJ Weschke
a3bd5d11d3 Bug #6040 - Documentation correction
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-21 19:44:51 +00:00
Tilghman Lesher
84d98f6b84 Merged revisions 7577 via svnmerge from
/branches/1.2


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7578 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-21 19:24:56 +00:00
Tilghman Lesher
28af98ae95 Bug 5055 - Simple SQL commands from the dialplan
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-21 18:43:10 +00:00
Tilghman Lesher
6c3eda3e5f Bug 5440 - Add STAT() dialplan function
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7575 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-21 17:09:54 +00:00
Russell Bryant
da1d91b688 move heading to the top of the file
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-21 16:36:48 +00:00
Tilghman Lesher
f31bb6d7ed Bug 5734 - add status variables indicating the success or failure of the realtime apps
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-21 15:16:08 +00:00
Russell Bryant
a63f3dffa1 add Log application for generating custom log messages from the dialplan (issue #5287)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7570 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-21 09:33:41 +00:00
Russell Bryant
f49974f314 add a header to indicate who the call was parked by to the ParkedCall manager
events generated when parking status is requested.  This header was already
in the events that are generated when the call is first parked. (issue #5883)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7569 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-21 08:51:44 +00:00
Russell Bryant
5039373b99 - change the default value of the global priority jumping option to 'off'
- update the UPGRADE.txt file to reflect this change
- remove old information from UPGRADE.txt


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-21 08:44:51 +00:00
Jim Dixon
1187d236bc Added docs for new features (duplex mode & tailmessages)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-20 23:53:26 +00:00
Jim Dixon
13e757450d New version, including half/semi-half duplex modes and system announcements
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-20 23:41:59 +00:00
Mark Spencer
7f23f1b5de Avoid multiple free
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-20 23:36:22 +00:00
Russell Bryant
0da13c21b4 - move the string join() function to utils.c since it is used in both cli.c and res_agi.c
- reimplement ast_join to be of linear effieciency instead of quadratic
- remove some useless checks for "if (e)"
- reorder checks for strings starting with '_' to avoid a useless call to ast_join()
- check array bounds when parsing arguments to AGI
(issue #5868)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-20 20:20:04 +00:00
Russell Bryant
9398c57e6f add AGENT function, similar to SIPPEER or IAXPEER (issue #5531)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7554 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-20 19:56:52 +00:00
Mark Spencer
0d32a85be1 Major RTP fixes for using inbound SDP on outbound connection, get rid of
old local rtp stuff...


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-20 17:52:31 +00:00
Mark Spencer
93d1d0dcfb Don't bother decode on muted participants
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7548 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-20 14:14:01 +00:00
Mark Spencer
d6b8ce3921 Major peformance improvements to meetme
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-20 13:07:02 +00:00
Mark Spencer
74460d2e8b Fix choppy audio with > 20ms audio frames (bug #5697)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7542 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-20 10:26:53 +00:00
Mark Spencer
a965978a25 Fix segfault on directed pickup when no CDR is available (bug #5998)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-20 09:56:55 +00:00
Mark Spencer
6322aaad68 Fix reload of peer contexts (bug #6007)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-20 09:39:31 +00:00
Russell Bryant
62084f9736 use the system libgsm if available (issue #5434, modified to still work with builtin libgsm)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-20 08:16:53 +00:00
Russell Bryant
1bd64edd17 allow forcing the build to exclude PRI support using WITHOUT_PRI, similar to
how we already have WITHOUT_ZAPTEL (issue #5985)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-20 07:45:05 +00:00
Russell Bryant
dca08fd878 - 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/trunk@7528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-19 23:41:53 +00:00
Tilghman Lesher
154d9ada80 Merged revisions 7523 via svnmerge from
/branches/1.2


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7524 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-19 19:08:42 +00:00
Tilghman Lesher
9b166d3319 Merged revisions 7521 via svnmerge from
/branches/1.2


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-19 05:42:55 +00:00
Tilghman Lesher
c7786ce493 Merged revisions 7519 via svnmerge from
/branches/1.2


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-17 18:58:57 +00:00
Tilghman Lesher
4f72086b8f Merged revisions 7517 via svnmerge from
/branches/1.2


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7518 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-17 17:22:24 +00:00
Kevin P. Fleming
2a3dacfc3d Merged revisions 7515 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7515 | kpfleming | 2005-12-16 21:59:05 -0600 (Fri, 16 Dec 2005) | 2 lines

Max-Forwards headers must only be present on requests, not responses

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7516 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-17 03:59:27 +00:00
Kevin P. Fleming
caa2e580da Merged revisions 7513 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7513 | kpfleming | 2005-12-16 21:44:30 -0600 (Fri, 16 Dec 2005) | 2 lines

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/trunk@7514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-17 03:45:25 +00:00
Kevin P. Fleming
9cc6ad4880 Merged revision 7510 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7510 | kpfleming | 2005-12-16 20:20:04 -0600 (Fri, 16 Dec 2005) | 2 lines

fix some buglet when building team branch version strings

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-17 02:22:24 +00:00
Kevin P. Fleming
5bca3c5440 block a commit to a module that no longer exists in trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-17 02:21:36 +00:00
Tilghman Lesher
6350e25aa7 Merged revisions 7508 via svnmerge from
/branches/1.2


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-17 01:07:44 +00:00
Tilghman Lesher
eea40f2025 First field was truncated.
(Don't kill me; this attempted merge didn't work because the paths changed.)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7498 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-16 00:55:39 +00:00
Tilghman Lesher
cbab537375 Properly move these functions over to the funcs directory (since they no longer contain apps)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7496 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-15 19:05:41 +00:00
Tilghman Lesher
3a257db366 Make sure the functions CUT and SORT are built.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7494 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-15 17:31:52 +00:00
BJ Weschke
3dd016d7b5 Bug #6003 - Don't free the channel structure until after having sent the manager event.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7481 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-15 02:49:17 +00:00
Russell Bryant
565dcc3482 reduce some duplicated code when doing a strdup (issue #5986)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7472 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-13 22:03:06 +00:00
Kevin P. Fleming
baecca2320 Merged revisions 7470 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7470 | kpfleming | 2005-12-13 12:54:22 -0600 (Tue, 13 Dec 2005) | 2 lines

clarify substring documentation

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-13 18:54:41 +00:00
Kevin P. Fleming
6ca9632df5 Merged revisions 7468 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7468 | kpfleming | 2005-12-13 10:06:27 -0600 (Tue, 13 Dec 2005) | 2 lines

correct broken math in tvfix() for timestamp values over one million

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-13 16:07:19 +00:00
Kevin P. Fleming
b7b2317d81 Merged revisions 7448-7449,7451,7453 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7448 | kpfleming | 2005-12-12 22:25:14 -0600 (Mon, 12 Dec 2005) | 2 lines

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)

........
r7449 | kpfleming | 2005-12-12 22:43:38 -0600 (Mon, 12 Dec 2005) | 2 lines

only report AGENT_IDLE for callback mode agents when they are actually idle (issue #5902)

........
r7451 | kpfleming | 2005-12-12 23:14:27 -0600 (Mon, 12 Dec 2005) | 2 lines

ensure that hangups while incoming calls are in early state are handled properly (issue #5919)

........
r7453 | kpfleming | 2005-12-12 23:53:00 -0600 (Mon, 12 Dec 2005) | 2 lines

restore ability of caller to hangup calls that are still ringing (issue #5839)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-13 06:00:17 +00:00
Christian Richter
d37857c208 updated the documentation and the sample config to meet the present
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-12 22:26:35 +00:00
Kevin P. Fleming
bc50894149 Merged revisions 7433,7435 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7433 | tilghman | 2005-12-12 11:19:29 -0600 (Mon, 12 Dec 2005) | 2 lines

Typo

........
r7435 | kpfleming | 2005-12-12 11:30:59 -0600 (Mon, 12 Dec 2005) | 2 lines

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/trunk@7436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-12 17:31:45 +00:00
Tilghman Lesher
23ccbfc122 Typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7434 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-12 17:20:21 +00:00
Russell Bryant
fcbe928353 Merged revisions 7404,7406,7425,7427,7429-7430 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7404 | tilghman | 2005-12-08 18:32:08 -0500 (Thu, 08 Dec 2005) | 2 lines

Documenting two keywords that were previously missing

........
r7406 | tilghman | 2005-12-08 18:45:36 -0500 (Thu, 08 Dec 2005) | 2 lines

Bug 5960

........
r7425 | bweschke | 2005-12-10 13:10:50 -0500 (Sat, 10 Dec 2005) | 4 lines

 Bug #5877
 Make sure the digit string from E&M wink DNIS collection is properly null terminated as it grows.


........
r7427 | tilghman | 2005-12-10 20:15:15 -0500 (Sat, 10 Dec 2005) | 2 lines

Bug 5967

........
r7429 | tilghman | 2005-12-10 20:26:51 -0500 (Sat, 10 Dec 2005) | 2 lines

Bug 5965 - major bug in AST_LIST_REMOVE

........
r7430 | russell | 2005-12-11 01:08:56 -0500 (Sun, 11 Dec 2005) | 2 lines

silence a couple of compiler warnings about pointer signedness

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7431 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-11 06:17:36 +00:00
Tilghman Lesher
d9a99af589 Bug 5965 - major bug in AST_LIST_REMOVE
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7428 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-11 01:26:09 +00:00
BJ Weschke
8ef327b3f5 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/trunk@7424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-10 18:05:00 +00:00
Christian Richter
7dfa72cdee committed head of chan_misdn with a lot of new features. Most important of all: chan_misdn supports now the mISDN mqueue tree (smp,preemptible,gcc-4 aware\!). Additionally there are some code optimizations, new facility management (Calldeflect works for now).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-09 11:01:18 +00:00
Christian Richter
52d3ddabd1 chan_misdn links against shared mISDNuser libraries now
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7412 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-09 11:00:48 +00:00
Josh Roberson
9c8d7286dd Document other use of courtesytone, make association of "One Touch Record" with "Touch monitor"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-09 00:27:11 +00:00
Josh Roberson
4e8e92f389 Document addition of variable from Touch Monitor.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-09 00:24:59 +00:00
Tilghman Lesher
5152e1989f Bug 5960
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7407 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-08 23:46:21 +00:00
Tilghman Lesher
c7cda51ffc Document two keywords that were previously missing
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7405 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-08 23:33:08 +00:00
Josh Roberson
97c8d0dbfc Allow retrieval of generated filename from one touch monitor feature.
Adds new variable TOUCH_MONITOR_OUTPUT to both legs on completion.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-08 18:18:59 +00:00
Russell Bryant
444eac93ab fix a bug from the recent removal of deprecated applications by initializing
a variable on its first use (issue #5951)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-08 17:52:43 +00:00
Kevin P. Fleming
13d25649b2 Merged revisions 7386 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7386 | kpfleming | 2005-12-07 19:05:43 -0600 (Wed, 07 Dec 2005) | 2 lines

initialize the buffer before using it...

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7387 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-08 01:06:09 +00:00
Kevin P. Fleming
f791f18f7c Merged revisions 7382 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7382 | kpfleming | 2005-12-07 14:46:55 -0600 (Wed, 07 Dec 2005) | 2 lines

ensure that hints are allowed to use global variable references

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7383 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-07 20:47:59 +00:00
Russell Bryant
d6862a5853 re-add app_setcallerid since it was not actually marked deprecated in 1.2
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-07 16:41:26 +00:00
Russell Bryant
cac0f4d095 This is the first round of removing applications that were marked as deprecated
in the 1.2 release. They are being removed from the trunk and will not be in
the next major release.  The following is a list of the applications that are
being removed in this commit:

Curl, Cut, Sort, DBPut, DBGet, ENUMLookup, Eval
GetGroupCount, SetGroup, CheckGroup, GetGroupMatchCount
MD5, MD5Check, Math, SetCIDName, SetCIDNum, SetRDNIS, SetCallerID
TXTCIDName, AbsoluteTimeout, DigitTimeout, ResponseTimeout, SetAccount
SetLanguage, SetVar (renamed to Set)

These changes also include moving the "group show channels" cli command from 
app_groupcount.c to cli.c.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-07 15:36:55 +00:00
Tilghman Lesher
e2f674787b Clarify purpose of function, by renaming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7353 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-06 00:25:13 +00:00
Kevin P. Fleming
f1f2749def Merged revisions 7351 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7351 | kpfleming | 2005-12-05 18:23:05 -0600 (Mon, 05 Dec 2005) | 2 lines

ensure that sound/music files are handled as binary

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7352 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-06 00:24:55 +00:00
Kevin P. Fleming
94fd338e86 Merged revisions 7349 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7349 | kpfleming | 2005-12-05 18:19:17 -0600 (Mon, 05 Dec 2005) | 2 lines

replace with unmodified file

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-06 00:19:49 +00:00
Kevin P. Fleming
f0850765d8 Merged revisions 7345-7347 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7345 | kpfleming | 2005-12-05 18:02:08 -0600 (Mon, 05 Dec 2005) | 2 lines

set this file to binary mode, so it won't be mangled on export/checkout

........
r7346 | kpfleming | 2005-12-05 18:07:48 -0600 (Mon, 05 Dec 2005) | 2 lines

don't try to expand keywords in this file

........
r7347 | kpfleming | 2005-12-05 18:08:19 -0600 (Mon, 05 Dec 2005) | 2 lines

_really_ don't mess with line endings

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-06 00:09:48 +00:00
Russell Bryant
c6907f1ed8 Merged revisions 7340 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7340 | russell | 2005-12-05 01:47:51 -0500 (Mon, 05 Dec 2005) | 2 lines

remove ASTERISKVERSIONNUM from the version string given to doxygen

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-05 06:50:04 +00:00
Russell Bryant
b5dfd1174e add support for 'show functions like <text>' (issue #5923)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-05 00:39:15 +00:00
Russell Bryant
f75bd5a29e Merged revisions 7337 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7337 | russell | 2005-12-04 19:09:12 -0500 (Sun, 04 Dec 2005) | 2 lines

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/trunk@7338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-05 00:11:00 +00:00
Russell Bryant
bdb525c420 Merged revisions 7335 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7335 | russell | 2005-12-04 19:01:17 -0500 (Sun, 04 Dec 2005) | 2 lines

fix the order of arguments to an error message (issue #5927)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7336 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-05 00:06:09 +00:00
Russell Bryant
ec05153ac4 convert most of the option_*'s to a single ast_flags structure. Also, fix some
formatting, remove some unnecessary casts, and other little code cleanups.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-04 20:40:46 +00:00
Kevin P. Fleming
b6b32ebd91 Merged revisions 7285,7299,7310,7329 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7285 | tilghman | 2005-12-02 15:12:05 -0600 (Fri, 02 Dec 2005) | 2 lines

Turn on executable bits for startup scripts, and fix bash var interpolation for Mandrake

........
r7299 | oej | 2005-12-02 19:24:40 -0600 (Fri, 02 Dec 2005) | 2 lines

Documenting the default registerattempts setting as 0, continue hammering the server for ever and ever ;-)

........
r7310 | tilghman | 2005-12-03 13:55:05 -0600 (Sat, 03 Dec 2005) | 3 lines

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)

........
r7329 | kpfleming | 2005-12-04 12:03:07 -0600 (Sun, 04 Dec 2005) | 2 lines

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/trunk@7330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-04 18:12:52 +00:00
Russell Bryant
82a4d5dd8f add some missing prototypes and don't use caps for the sip debug defines since
they are not constants


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-04 17:28:02 +00:00
Russell Bryant
0ff48b4681 clean up some compiler warnings
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-04 15:28:48 +00:00
Russell Bryant
8af65a8a25 add the 'sip debug' options to the set of global flags and fix some compiler warnings
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-03 23:35:15 +00:00
Tilghman Lesher
357c38d177 Merging from 1.2, bug 5925 - app_voicemail should check for the callerid it sets for unknown
Also, remove unnecessary res checks (initialized to 0; never set)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7313 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-03 20:20:51 +00:00
Tilghman Lesher
870f98f02d Bug 5858 - Make the chanvars.c functions return a 'const char *'
This should prevent us from unintentionally changing variable
values when they're returned from pbx_builtin_getvar_helper.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-03 19:25:33 +00:00
Matthew Fredrickson
6a6b88c0e3 Fix all the warnings and errors for PRI to go to more logical places
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7294 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-02 23:52:00 +00:00
Kevin P. Fleming
0242a69b3f Merged revisions 7265-7266,7268-7275 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7265 | oej | 2005-12-01 17:18:14 -0600 (Thu, 01 Dec 2005) | 2 lines

Changing bug report address to the Asterisk issue tracker

........
r7266 | kpfleming | 2005-12-01 17:18:29 -0600 (Thu, 01 Dec 2005) | 3 lines

Makefile 'update' target now supports updating from Subversion repositories (issue #5875)
remove support for 'patches' subdirectory, it's no longer useful

........
r7268 | kpfleming | 2005-12-01 17:34:58 -0600 (Thu, 01 Dec 2005) | 2 lines

ensure channel's scheduling context is freed (issue #5788)

........
r7269 | kpfleming | 2005-12-01 17:49:44 -0600 (Thu, 01 Dec 2005) | 2 lines

don't block waiting for the Festival server forever when it goes away (issue #5882)

........
r7270 | kpfleming | 2005-12-01 18:26:12 -0600 (Thu, 01 Dec 2005) | 2 lines

allow variables to exist on both 'halves' of the Local channel (issue #5810)

........
r7271 | kpfleming | 2005-12-01 18:28:48 -0600 (Thu, 01 Dec 2005) | 2 lines

protect agent_bridgedchannel() from segfaulting when there is no bridged channel (issue #5879)

........
r7272 | kpfleming | 2005-12-01 18:39:00 -0600 (Thu, 01 Dec 2005) | 3 lines

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)

........
r7273 | kpfleming | 2005-12-01 18:42:40 -0600 (Thu, 01 Dec 2005) | 2 lines

allow previous context-searching behavior to be used if desired (issue #5899)

........
r7274 | kpfleming | 2005-12-01 18:51:15 -0600 (Thu, 01 Dec 2005) | 2 lines

inherit channel variables into channels created by Page() application (issue #5888)

........
r7275 | oej | 2005-12-01 18:52:13 -0600 (Thu, 01 Dec 2005) | 2 lines

Bug #5907. Improve SIP INFO DTMF debugging output. (1.2 & Trunk)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-02 01:01:11 +00:00
Kevin P. Fleming
6b8a8926ab Merged revisions 7261,7263 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7261 | oej | 2005-12-01 15:38:38 -0600 (Thu, 01 Dec 2005) | 2 lines

Fixing some spelling errors, as well as changing "cvs" to "subversion" in misdn documentation.

........
r7263 | oej | 2005-12-01 16:21:13 -0600 (Thu, 01 Dec 2005) | 2 lines

Removing references to 1.1dev, replacing with 1.2, in documentation files.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-01 22:54:58 +00:00
Olle Johansson
4cb24d2942 Changing "cvs" to "subversion" in documentation, also removing references to old versions of Asterisk
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-01 22:17:35 +00:00
Kevin P. Fleming
d50c812e1c Merged revisions 7257 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7257 | kpfleming | 2005-12-01 13:25:06 -0600 (Thu, 01 Dec 2005) | 2 lines

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/trunk@7258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-01 19:27:49 +00:00
Kevin P. Fleming
0b6dd5c5a8 configure trunk for merging fixes from 1.2 branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-01 19:18:18 +00:00
Matthew Fredrickson
39c7f262a0 Add app to send pri keypad facility digits during a call
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7254 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-01 18:52:24 +00:00
Russell Bryant
91316ef9e5 use ast_app_separate_args to split arguments (issue #5686)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7250 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-01 02:32:10 +00:00
Russell Bryant
ad122bf6cd 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/trunk@7248 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-01 01:17:41 +00:00
Russell Bryant
b994fcae8b 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/trunk@7246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-01 00:43:17 +00:00
Russell Bryant
48a4c3a24d remove outdated redhat init script and provide the updated one in 'make rpm' (issue #5786)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7243 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 21:30:18 +00:00
Russell Bryant
056d4010e9 Comment out LD_ASSUME_KERNEL by default.
Print error messages if asterisk executable or the asterisk configuration
directory is not found. (issue #5785, #5708)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 21:22:38 +00:00
Russell Bryant
0d341e060f use app arg parsing macros (issue #5678)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 20:15:36 +00:00
Russell Bryant
db755f9035 use app arg parsing macros (issue #5681)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7238 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 20:09:58 +00:00
Russell Bryant
cf2690dc4a use app arg parsing macros (issue #5690)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 19:53:05 +00:00
Russell Bryant
6e1957475c use app arg parsing macros (issue #5679)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7236 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 19:38:54 +00:00
Russell Bryant
1ced6b4775 convert VMCOUNT function to use new app args parsing macros (issue #5688)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 19:20:28 +00:00
Russell Bryant
68fa778314 do not allow an rtp message with zero type (issue #5749)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 14:24:50 +00:00
Russell Bryant
cff32c9b6d print an error message if invalid arguments are specified (issue #5872)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 05:29:36 +00:00
Russell Bryant
6a2bb9c3e0 add description of the fromdomain option (issue #5874)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 05:26:29 +00:00
Josh Roberson
1f538ad219 issue #5887
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7225 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 03:35:24 +00:00
Kevin P. Fleming
66ddc1dd5f free write frames when spy queues provide frames that don't need to be dup'd
properly lock and trigger spies when detaching them en masse


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 03:16:53 +00:00
Kevin P. Fleming
350287ea08 move mkpkgconfig script where it belongs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7222 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 02:00:49 +00:00
Kevin P. Fleming
2c65582b66 remove extraneous svn:executable properties
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 18:24:39 +00:00
Kevin P. Fleming
c14588af86 remove remaining .cvsignore files
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7220 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 18:09:49 +00:00
Russell Bryant
df53606847 remove duplicate list of cdr variable names (issue #5865)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7217 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 05:45:35 +00:00
Russell Bryant
06b4b11c4b fix some typos and add the reload function
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7215 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 04:41:19 +00:00
Russell Bryant
8e28b45846 Add a minor optimization to CLI tab completion functions for channels.
Also, clean up some formatting and coding guidelines issues.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7214 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 04:25:28 +00:00
Kevin P. Fleming
45c2f3b9f9 make version-string computation based on SVN branch/revision numbers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-28 03:59:39 +00:00
Mark Spencer
aab82dc3d2 Record DIALEDTIME on incomplete calls, update description (bug #5862)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7198 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-25 19:59:46 +00:00
Mark Spencer
f831c89066 Fix hint case sensitivity (bug #5856)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-25 19:52:30 +00:00
Russell Bryant
6801852c65 issue #5850
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7195 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-25 14:13:54 +00:00
Russell Bryant
4349fda37a issue #5828
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7192 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-23 05:58:41 +00:00
Josh Roberson
fb418aa2e0 issue #5826
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7188 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-23 05:03:42 +00:00
Josh Roberson
e38a91b45a issue #5829
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7187 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-23 04:46:12 +00:00
Kevin P. Fleming
1cfc858e89 remove extraneous header
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 19:33:33 +00:00
Kevin P. Fleming
e9cde1fbdb fix port number handling in peer building functions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 19:27:26 +00:00
Kevin P. Fleming
2424305562 proper entry formatting (doh!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 19:24:43 +00:00
Kevin P. Fleming
354b7f1a81 fix a bug found during a recent upgrade
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 19:20:26 +00:00
Josh Roberson
d34be7edf7 Re-add explicit poll support for Darwin, as without it, rasterisk (or asterisk -r) is broken under Darwin.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7172 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 15:09:31 +00:00
Russell Bryant
aeac8bf137 issue #5789
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 13:41:28 +00:00
Russell Bryant
ee5bc3ce65 don't hardcode poll.o for Darwin
fix incorrect portion of patch from yesterday's Solaris fixes


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 13:21:18 +00:00
Russell Bryant
f367620dd9 issue #5815
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 13:04:36 +00:00
Russell Bryant
b39076b985 issue #5775
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 02:30:37 +00:00
Russell Bryant
3d6c054ca8 issue #5787
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 02:01:36 +00:00
Russell Bryant
edef0bbf2f create the monitor spool dir
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 01:53:44 +00:00
Russell Bryant
070f6c9510 issue #5805
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7160 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 01:39:26 +00:00
Russell Bryant
0c5e18d880 issue #5804
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 01:21:39 +00:00
Russell Bryant
3cb060d80f issue #5800
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 01:11:40 +00:00
Russell Bryant
913232e82e issue #5794
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7156 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 00:57:35 +00:00
Josh Roberson
c203681525 Make conform to coding guidelines... thanks drumkilla :)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7145 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 10:32:28 +00:00
Josh Roberson
322fdec33a fix changelog issue id
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7144 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 10:25:59 +00:00
Josh Roberson
39407c4366 issue #5806
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 06:59:42 +00:00
Josh Roberson
5d71dfeaea issue #5773, with minor modification to log message
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 05:58:40 +00:00
Josh Roberson
e9ae7a8be1 issue #5774
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7141 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 05:51:33 +00:00
Josh Roberson
bcd45496ed Fix j option in a couple more places.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 05:39:47 +00:00
Josh Roberson
772f075fe9 issue #5795
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 05:22:26 +00:00
Josh Roberson
85d60cf7ab issue #5792
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 05:19:04 +00:00
Josh Roberson
c347d8fee3 issue #5803
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 05:01:07 +00:00
Josh Roberson
15f5afeaa8 issue #5799
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7136 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 04:54:15 +00:00
Josh Roberson
ab56f3a571 issue #5791
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 04:48:24 +00:00
Russell Bryant
008be638a5 Update application description to be a bit more accurate, and clean up a little bit of code formatting
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-19 19:44:46 +00:00
Russell Bryant
d09769fba7 fix the output of Makefile generated variables to doxygen
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-17 21:45:03 +00:00
Russell Bryant
35fcf0a8aa 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/trunk@7130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-17 20:25:40 +00:00
Kevin P. Fleming
522544442b backport chan_modem fixes from v1-2
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-17 16:57:25 +00:00
1338 changed files with 184496 additions and 76954 deletions

2
.cleancount Executable file → Normal file
View File

@@ -1 +1 @@
8
24

View File

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

1
.lastclean Normal file
View File

@@ -0,0 +1 @@
24

1
.version Normal file
View File

@@ -0,0 +1 @@
1.4.0-beta2

0
BUGS Executable file → Normal file
View File

0
CHANGES Executable file → Normal file
View File

0
COPYING Executable file → Normal file
View File

90
CREDITS Executable file → Normal file
View File

@@ -13,6 +13,8 @@ Telesthetic - for supporting SIP development
Christos Ricudis - for substantial code contributions
nic.at - ENUM support in Asterisk
Paul Bagyenda, Digital Solutions - for initial Voicetronix driver development
=== WISHLIST CONTRIBUTERS ===
@@ -25,69 +27,149 @@ 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.
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, various other
bugs. tholo@sigmasoft.com
dialplan include verification, route lookup on OpenBSD, SNMP agent
support (res_snmp), 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
Steve Murphy - privacy support, $[ ] parser upgrade, AEL2 parser upgrade
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 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.freeplaymusic.com
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:

369
ChangeLog Executable file → Normal file
View File

@@ -1,367 +1,16 @@
2005-11-16 Jeremy McNamara <jj@nufone.net>
2006-09-21 Kevin P. Fleming <kpfleming@digium.com>
* apps/app_voicemail.c (load_config): do not terminate asterisk if no voicemail config file
* channels/chan_skinny: Don't register channel type until ready, code formatting updates
* Asterisk 1.4.0-beta2 released.
2005-11-16 Josh Roberson <josh@asteriasgi.com>
2006-09-21 16:08 +0000 [r43404-43405] Kevin P. Fleming <kpfleming@digium.com>
* Makefile: Update to fix non-responsive remote console on Darwin (OSX)(issue #5757)
* main/Makefile: remove this change... it requires binutils 2.17
2005-11-16 Kevin P. Fleming <kpfleming@digium.com>
2006-09-20 23:19 +0000 [r43396] Jason Parker <jparker@digium.com>
* channels/Makefile: don't build chan_modem and sub-modules by default
* build_tools/make_version: fix minor typo in the way version is
handled
* res/Makefile: issue mpg123 not-installed warning at 'make install' time, not 'make'
* apps/app_forkcdr.c (forkcdr_exec): issue warning (and don't segfault) if ForkCDR is called on a channel that doesn't have a CDR (issue #5763)
* channel.c (ast_queue_hangup): ensure that the channel lock is held before changing its fields... (issue #5770)
* res/res_musiconhold.c: don't spit out incorrect log messages (and leak memory) during reload (issue #5766)
* channels/chan_sip.c (process_sdp): don't pass video codec number into ast_getformatname(), it is not valid input for that function (issue #5764)
* pbx/pbx_ael.c (match_assignment): properly parse equal signs surrounded by whitespace (issue #5761)
* doc/README.realtime: document the limitations of using FreeTDS with Realtime (issue #5767)
2005-11-15 Kevin P. Fleming <kpfleming@digium.com>
* Makefile: use -g3 for compiler to include macro information for debugger
* astmm.c (__ast_vasprintf): don't re-use the ap list without copying it; that's not safe on some platforms (issue #5035)
* doc/README.backtrace: add note about properly building Asterisk to be able to produce backtraces; wrap text and remove DOS line endings
* channels/chan_sip.c (add_codec_to_sdp): add 'annexb=no' to G.729A SDP (issue #5539)
* channels/chan_alsa.c (alsa_hangup): handle autohangup properly (issue #5672)
* channels/chan_misdn.c (and other files): various fixes (issue #5739)
* channels/chan_sip.c (handle_request_info): properly forward 'flash' events received via SIP INFO (issue #5751, different patch)
* apps/app_disa.c (disa_exec): don't duplicate constant strings when not needed
* apps/app_playback.c (playback_exec): use correct logic tests for options (issue #5752)
* apps/app_disa.c (disa_exec): use standard arg parsing routines (issue #5736)
2005-11-15 Russell Bryant <russell@digium.com>
* manager.c: Don't crash on a SetVar action if the channel name is not set, or variable's value is not set (issue #5760)
* doc/README.variables: Add application exit status variables
2005-11-14 Josh Roberson <josh@asteriasgi.com>
* manager.c: Fix crash on variable passing from AMI originate (issue #5737)
2005-11-14 Russell Bryant <russell@digium.com>
* many files: Merge doxygen documentation updates. (issue #5605)
* apps/app_dial.c: Fix typo in RetryDial description.
2005-11-12 Russell Bryant <russell@digium.com>
* channels/chan_oss.c: Fix a typo in an error message.
2005-11-11 Kevin P. Fleming <kpfleming@digium.com>
* Asterisk 1.2.0-rc2 released.
2005-11-11 Kevin P. Fleming <kpfleming@digium.com>
* channels/chan_sip.c (thread_safe_rand): ensure that threads don't get the same random number (issue #5712)
* apps/app_voicemail.c (forward_message): correct bugs in message forwarding (issue #5718)
(copy_message): use correct path for locking (issue #5704)
* apps/app_dial.c (wait_for_answer): correct flag copying for automon feature (issue #5720)
* channels/chan_iax2.c: correct comment
* apps/app_voicemail.c (close_mailbox): correct previous commit (issue #5663)
(vm_change_password): fix password change writing (issue #5721)
* channels/chan_sip.c (transmit_invite): remove useless debug message; don't try to add OSP tokens to OPTIONS pings
* apps/app_voicemail.c (close_mailbox): properly remove deleted messages at mailbox close time (issue #5663)
2005-11-11 Mark Spencer <markster@digium.com>
* channels/chan_zap.c (zt_bridge): only enable/disable DTMF detection on SUB_REAL channels
2005-11-10 Kevin P. Fleming <kpfleming@digium.com>
* channels/chan_iax2.c: ensure that system headers that provide basic types are included first (issue #5713)
2005-11-11 Russell Bryant <russell@digium.com>
* many files in apps/: Clean up application descriptions. Clarify some wording and make sure they wrap at 80 characters.
2005-11-10 Mark Spencer <markster@digium.com>
* rtp.c (ast_rtp_raw_write): use unsigned int for return value from calc_txstamp() (issue #5595)
(calc_txstamp): never return a value that was less than zero before being turned into 'unsigned int' (issue #5595)
2005-11-10 Kevin P. Fleming <kpfleming@digium.com>
* include/asterisk/chanspy.h: move spy-related stuff into separate header so chan_h323 can build (issue #5590)
* include/asterisk/linkedlists.h (AST_LIST_HEAD_SET_NOLOCK): properly initialize tail pointer when list head is directly set (issue #5669)
* app.c (ast_app_parse_options): ok, so we aren't all perfect... let's make the while loop actually work properly here (issue #5684)
* apps/app_disa.c (disa_exec): correct password file parsing (issue #5676)
* apps/app_meetme.c (conf_run): don't restrict admin users from joining a locked conference (issue #5680)
* channels/chan_misdn.c: include stdio.h (issue #5671)
* channels/chan_misdn_config.c: fix prototype warning (issue #5671)
* pbx.c: remove apps that were deprecated before 1.0 was released (issue #5673)
* apps/app_striplsd.c, apps/app_substring.c: remove apps that were deprecated before 1.0 was released (issue #5673)
* include/asterisk/lock.h (PTHREAD_MUTEX_RECURSIVE_NP): work around header problems on Cygwin (issue #5668)
* pbx/pbx_ael.c: handle switch default cases inside macros properly (issue #5354)
* configs/voicemail.conf.sample (format): add strong warning about changing format list when mailboxes contain messages (issue #5689)
* many files: ensure that system headers are included before Asterisk headers (issue #5693)
* channels/chan_iax2.c (complete_iax2_show_peer): don't return from function without releasing lock (issue #5685)
* channels/iax2-provision.c (iax_provision_reload): don't leak memory (issue #5700)
* pbx/pbx_ael.c (handle_macro): don't leak memory (issue #5701)
(handle_context): ditto
* res/res_features.c (load_config): properly initialize referenced variable (issue #5703)
* apps/app_queue.c (rqm_exec): correct segfault problem (issue #5705)
(aqm_exec): ditto
* app.c (ast_app_parse_options): don't increment 's' until after checking for NULL (related to issue #5630)
* apps/app_rpt.c: solve a memory leak (config structure was not freed) (issue #5706)
2005-11-10 Russell Bryant <russell@digium.com>
* app.c (ast_app_separate_args): Don't consider the open parenthesis as part of the arguments to an option. (issue #5630)
* many files: Change all references to ast_separate_app_args to ast_app_separate_args
* many files in apps/: Clean up some application descriptions. Make sure all descriptions in changed files are wrapped at 80 characters.
2005-11-09 Russell Bryant <russell@digium.com>
* pbx.c: Clean up descriptions of built-in dialplan applications. Changes include clearer wording and not referring to return values.
2005-11-09 Kevin P. Fleming <kpfleming@digium.com>
* channels/chan_iax2.c (update_registry): don't complain about unspecifed registration expiration intervals, just use the minimum
2005-11-08 Kevin P. Fleming <kpfleming@digium.com>
* Asterisk 1.2.0-rc1 released.
* include/asterisk/file.h: add test to ensure that stdio.h is included before this file (issue #5658)
* res/res_odbc.c (odbc_prepare_and_execute): add new API call for use to properly handle prepared statements across server disconnects (issue #5563)
* pbx.c (pbx_substitute_variables_helper_full): use already-substituted buffer for parsing variable name (issue #5664)
* channels/chan_zap.c (zt_request): return AST_CAUSE_CONGESTION when a group-channel is requested and the group exists but all channels are busy (issue #3360, related fix)
* channels/chan_iax2.c (create_addr): treat UNREACHABLE as AST_CAUSE_UNREGISTERED so that it will generate CHANUNAVAIL from app_dial (issue #3360)
* res/res_features.c (ast_bridge_call_thread_launch): set SCHED_RR separately from thread creation, so it won't fail when running as non-root (issue #5601, different fix)
* pbx.c (pbx_builtin_pushvar_helper): add new API function for setting variables that can exist multiple times (issue #2720)
* apps/Makefile (APPS): add app_stack (issue #2720)
* apps/app_stack.c: new applications (issue #2720)
* apps/app_meetme.c: fix two audio delay problems related to using non-Zap channels in conferences (issues #3599 and #4252)
* configs/meetme.conf.sample: add documentation of new 'audiobuffers' setting to control buffering on incoming audio from non-Zap channels
* channels/chan_local.c (local_call): move channel variables from incoming to outgoing instead of inheriting them (issue #5604)
* many files: add explicit include of stdio.h (issue #5650)
2005-11-07 Kevin P. Fleming <kpfleming@digium.com>
* UPGRADE.txt (Parking): add note about new parking behavior (issue #5532)
* many files: more Cygwin compatibility, and proper getloadavg() prototype/macro (issue #5569)
* include/asterisk/lock.h (__ast_pthread_mutex_lock): correct build with DETECT_DEADLOCKS defined (issue #5570)
2005-11-07 Russell Bryant <russell@digium.com>
* apps/app_queue.c: upgrade to new arg/option API and implement priority jumping control (issue #5580)
* many files: Add missing include of stdio.h, and remove some duplicate and unused header includes
* include/asterisk/app.h: Increment the arg_index in the options structure to fix applicaiton options that have arguments to them
2005-11-07 Kevin P. Fleming <kpfleming@digium.com>
* cryptostub.c: include necessary headers
* include/asterisk/crypto.h: don't include unnecessary headers
* manager.c (action_setvar): add support for setting global variables (issue #5571)
* Makefile: correct cross-compilation issue introduced in Cygwin patches (issue #5572)
* apps/app_voicemail.c: upgrade to new arg/option API and implement priority jumping control (issue #5649)
* asterisk.c (main): setpriority() failure is not a reason to stop the process (issue #5581)
* say.c (ast_say_date_with_format_da): say hours properly (issue #5576)
* manager.c (astman_get_variables): restore old multiple-variable behavior for "Variable" header (issue #5585)
* many files: don't check for NULL before calling ast_strlen_zero, it can do it itself (issue #5648)
* pbx.c (handle_show_hints): use proper state-to-string function for hint state (issue #5583)
* rtp.c: use unsigned format for debug packet output (issue #5595)
* asterisk.c (main): force a dnsmgr background refresh after all other modules are initialized (issue #5599)
* dnsmgr.c: add ability to start a background refresh on demand (issue #5599)
* apps/app_dial.c (HANDLE_CAUSE): set CDR disposition to match cause code (issue #5602)
* asterisk.c: support 'runuser' and 'rungroup' options in asterisk.conf (issue #5621)
* res/Makefile, apps/Makefile, channels/Makefile, Makefile: support WITHOUT_ZAPTEL define to forcibly avoid building Zaptel support (issue #5634)
* Makefile: various fixes (issue #5633)
* apps/app_osplookup.c: upgrade to new arg/option API and implement priority jumping control
* channels/chan_misdn.c: various fixes (issue #5639)
* channels/misdn/isdn_lib.c: various fixes (issue #5639)
* apps/app_playback.c: upgrade to new arg/option API and implement priority jumping control
* apps/app_privacy.c: upgrade to new arg/option API and implement priority jumping control
* apps/app_sendtext.c: upgrade to new arg/option API and implement priority jumping control
* apps/app_transfer.c: upgrade to new arg/option API and implement priority jumping control
* apps/app_txtcidname.c: upgrade to new arg/option API and implement priority jumping control
* Makefile: restore function of 'dont-optimize'
* config.c (config_text_file_load): don't generate log message when stat() fails
* many files: clean up application documentation to not refer to return values, since they cannot be used in the dialplan (work done by Neil Lewis)
2005-11-06 Russell Bryant <russell@digium.com>
* many files: alphabetize options in applicaiton descriptions
* channels/chan_iax2.c: Use an enum to define iax peer/user flags as well as the pvt structure state. Use the ast_flags macros for checking or setting the state.
* sounds.txt: Add missing words from the description of the vm-opts prompt
* apps/app_externalivr.c: Add a space that fixes building on older versions of gcc
* many files: Add doxygen updates to categorize modules into groups. Convert a lot of comments over to doxygen style. Add some text giving a basic overview of channels.
* many files: Update applications to add an exit status variable, make priority jumping optional, and use new args parsing macros
* pbx.c cdr.c res/res_features.c apps/app_dial.c include/asterisk/cdr.h: Convert some built-in applications to use new args parsing macros. Change ast_cdr_reset to take a pointer to an ast_flags structure instead of an integer for flags.
* channels/chan_agent.c: Don't loop forever on an invalid options string
* apps/app_disa.c apps/app_forkcdr.c: Fix to use correct arguments to ast_cdr_reset
2005-11-05 Kevin P. Fleming <kpfleming@digium.com>
* Makefile: don't rebuild asterisk/build.h unless the asterisk binary is going to be relinked for some other reason (stops spurious recompile/link every time 'make' is issued); clean up variable substitutions to use consistent syntax
* asterisk.c: don't include asterisk/build.h (it's unnecessary)
* cli.c: don't include asterisk/build.h, use extern references to buildinfo.c
* buildinfo.c: new file to hold version info strings
2005-11-04 Kevin P. Fleming <kpfleming@digium.com>
* apps/app_mixmonitor.c (mixmonitor_exec): correct app name in an error message
2005-11-04 Russell Bryant <russell@digium.com>
* channels/chan_iax2.c: Create a function that stores a peer's status in a given buffer. Use this function in "iax2 show peers" and "iax2 show peer <peername>". Also, add the peer's status as an option to the IAXPEER dialplan function.
2005-11-04 Kevin P. Fleming <kpfleming@digium.com>
* include/asterisk/compiler.h: don't try to use always_inline on old compilers
2005-11-03 Russell Bryant <russell@digium.com>
* res/res_agi.c: initialize buffer for result so that the contents are always valid in the response to GET FULL VARIABLE
2005-11-03 Kevin P. Fleming <kpfleming@digium.com>
* doc/README.variables: document DYNAMIC_FEATURES
* res/res_features.c (ast_bridge_call): remove unused variables
* apps/app_dial.c (dial_exec_full): simplify options and flag usage
* include/asterisk/app.h: re-work application arg/option parsing APIs for consistent naming, add doxygen docs for option API
* many files: update to new APIs
2005-11-02 Kevin P. Fleming <kpfleming@digium.com>
* apps/app_dial.c (dial_exec_full): convert to use API calls for argument/option parsing
* include/asterisk/channel.h: add doxygen docs for silence generator APIs
* channel.c (ast_channel_bridge): simplify native-bridge return logic, remove 'unsuccessful' message since it causes too many questions :-)
2005-11-01 Kevin P. Fleming <kpfleming@digium.com>
* stdtime/localtime.c: fix build failure on uClibc systems (issue #5558)
* devicestate.c: same
* many files: make chan_misdn actually build (issue #5566)
* many files: more Cygwin build system support (issue #4678)
* apps/app_parkandannounce.c (parkandannounce_exec): supply parent channel to ast_request_and_dial so channel variables can be inherited (issue #5564)
* include/asterisk/channel.h: add parent_channel field
* channel.c (__ast_request_and_dial): use parent_channel field to inherit variables into new channel
* apps/app_cut.c (cut_internal): use ast_app_separate_args() instead of open code (issue #5560)
* apps/app_mixmonitor.c (launch_monitor_thread): ast_strlen_zero can handle NULL input (issue #5561)
(mixmonitor_exec): same
* res/res_features.c (ast_feature_request_and_dial): ensure that channel variables are inherited from the channel placing the call (issue #5499)
* utils.c (getloadavg): change to using _BSD_SOURCE as the indicator for whether this function is present or not (issue #5549)
* include/asterisk/utils.h (ast_slinear_saturated_add): force to be inlined whenever possible
(ast_slinear_saturated_multiply): same
(ast_slinear_saturated_divide): same
(inaddrcmp): same
* include/asterisk/strings.h (ast_strlen_zero): force to be inlined whenever possible
* include/asterisk/compiler.h (force_inline): add macro to force inlining of functions
* app.c (ast_play_and_record): use ast_silence_generator during recording if requested
* asterisk.c: add global option to enable silence-during-record (issue #5135)
* channel.c (silence_generator_alloc): new
(silence_generator_release): new
(silence_generator_generate): new
(ast_channel_start_silence_generator): new API call to start generating silence on a channel
(ast_channel_stop_silence_generator): parallel call to stop silence generation
* apps/app_record.c (record_exec): use ast_silence_generator during recording if requested
2005-11-01 Kevin P. Fleming <kpfleming@digium.com>
* Asterisk 1.2.0-beta2 released.
2006-09-20 Kevin P. Fleming <kpfleming@digium.com>
* Asterisk 1.4.0-beta1 released.

3
LICENSE Executable file → Normal file
View File

@@ -38,7 +38,8 @@ 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.
steps you must take. For more information on this policy, please read
http://www.digium.com/en/company/profile/trademarkpolicy.php
If you have any questions regarding our licensing policy, please
contact us:

957
Makefile Executable file → Normal file

File diff suppressed because it is too large Load Diff

105
Makefile.moddir_rules Normal file
View File

@@ -0,0 +1,105 @@
#
# 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
#
ifneq ($(findstring MALLOC_DEBUG,$(MENUSELECT_CFLAGS)),)
CFLAGS+=-include $(ASTTOPDIR)/include/asterisk/astmm.h
endif
ifeq ($(findstring LOADABLE_MODULES,$(MENUSELECT_CFLAGS)),)
CFLAGS+=${GC_CFLAGS}
endif
ifneq ($(findstring STATIC_BUILD,$(MENUSELECT_CFLAGS)),)
STATIC_BUILD=-static
endif
include $(ASTTOPDIR)/Makefile.rules
comma:=,
define module_o_template
$(2): $(3)
$(2): CFLAGS+=-DAST_MODULE=\"$(1)\" $$(MENUSELECT_OPTS_$(1):%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$(1)),$$(value $(dep)_INCLUDE))
endef
define module_so_template
$(1)=$(1).so
$(1).so: CFLAGS+=-fPIC
$(1).so: LIBS+=$(foreach dep,$(MENUSELECT_DEPENDS_$(1)),$$(value $(dep)_LIB))
$(1).so: LDFLAGS+=$(foreach dep,$(MENUSELECT_DEPENDS_$(1)),$$(value $(dep)_LDFLAGS))
$(1).so: $(2)
endef
define module_a_template
$(1)=modules.link
modules.link: $(2)
endef
$(foreach mod,$(C_MODS),$(eval $(call module_o_template,$(mod),$(mod).o,$(mod).c)))
$(foreach mod,$(CC_MODS),$(eval $(call module_o_template,$(mod),$(mod).oo,$(mod).cc)))
$(foreach mod,$(filter-out $(EMBEDDED_MODS),$(C_MODS)),$(eval $(call module_so_template,$(mod),$(mod).o)))
$(foreach mod,$(filter-out $(EMBEDDED_MODS),$(CC_MODS)),$(eval $(call module_so_template,$(mod),$(mod).oo)))
$(foreach mod,$(filter $(EMBEDDED_MODS),$(C_MODS)),$(eval $(call module_a_template,$(mod),$(mod).o)))
$(foreach mod,$(filter $(EMBEDDED_MODS),$(CC_MODS)),$(eval $(call module_a_template,$(mod),$(mod).oo)))
.PHONY: clean clean-depend depend uninstall _all
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 $(ASTTOPDIR)/%,%,$(realpath $^)); do echo "INPUT (../$${file})" >> $@; done
clean-depend::
rm -f .depend
clean:: clean-depend
rm -f *.so *.o *.oo
rm -f modules.link
install:: all
for x in $(LOADABLE_MODS:%=%.so); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
uninstall::
ifneq ($(wildcard .depend),)
include .depend
endif
depend: .depend
.depend:
../build_tools/mkdep $(CFLAGS) `ls *.c *.cc 2> /dev/null`

100
Makefile.rules Normal file
View File

@@ -0,0 +1,100 @@
#
# Asterisk -- A telephony toolkit for Linux.
#
# Makefile rules
#
# 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
#
# 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
ifeq ($(NOISY_BUILD),)
ECHO_PREFIX=@
CMD_PREFIX=@
else
ECHO_PREFIX=@\#
CMD_PREFIX=
endif
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
OPTIMIZE?=-O6
CFLAGS+=$(OPTIMIZE)
endif
define ast_make_o_c
$(1): $(2)
$(ECHO_PREFIX) echo " [CC] $$< -> $$@"
$(CMD_PREFIX) $$(CC) -o $$@ -c $$< $$(CFLAGS)
endef
define ast_make_oo_cc
$(1): $(2)
$(ECHO_PREFIX) echo " [CXX] $$< -> $$@"
$(CMD_PREFIX) $$(CXX) -o $$@ -c $$< $$(CFLAGS)
endef
define ast_make_c_y
$(1): $(2)
$(ECHO_PREFIX) echo " [BISON] $$< -> $$@"
$(CMD_PREFIX) bison -o $$@ -d --name-prefix=ast_yy $$<
endef
define ast_make_c_fl
$(1): $(2)
$(ECHO_PREFIX) echo " [FLEX] $$< -> $$@"
$(CMD_PREFIX) flex -o $$@ --full $$<
endef
define ast_make_so_o
$(1): $(2)
$(ECHO_PREFIX) echo " [LD] $$^ -> $$@"
$(CMD_PREFIX) $$(CC) $$(STATIC_BUILD) -o $$@ $$(LDFLAGS) $$(SOLINK) $$^ $$(LIBS)
endef
define ast_make_so_oo
$(1): $(2)
$(ECHO_PREFIX) echo " [LDXX] $$^ -> $$@"
$(CMD_PREFIX) $$(CXX) $$(STATIC_BUILD) -o $$@ $$(LDFLAGS) $$(SOLINK) $$^ $$(LIBS)
endef
define ast_make_a_o
$(1): $(2)
$(ECHO_PREFIX) echo " [AR] $$^ -> $$@"
$(CMD_PREFIX) $$(AR) cr $$@ $$^
$(CMD_PREFIX) $$(RANLIB) $$@
endef
define ast_make_final
$(1): $(2)
$(ECHO_PREFIX) echo " [LD] $$^ -> $$@"
$(CMD_PREFIX) $$(CXX) $$(STATIC_BUILD) -o $$@ $$(LDFLAGS) $$^ $$(LIBS)
endef
define ast_make_final_host
$(1): $(2)
$(ECHO_PREFIX) echo " [LD] $$^ -> $$@"
$(CMD_PREFIX) $$(HOST_CC) $$(STATIC_BUILD) -o $$@ $$(CFLAGS) $$(LDFLAGS) $$^ $$(LIBS)
endef
$(eval $(call ast_make_o_c,%.o,%.c))
$(eval $(call ast_make_oo_cc,%.oo,%.cc))
$(eval $(call ast_make_so_o,%.so,%.o))
$(eval $(call ast_make_final,%,%.o))

36
README Executable file → Normal file
View File

@@ -1,15 +1,15 @@
The Asterisk Open Source PBX
The Asterisk(R) Open Source PBX
by Mark Spencer <markster@digium.com>
and the Asterisk.org developer community
Copyright (C) 2001-2005 Digium, Inc.
Copyright (C) 2001-2006 Digium, Inc.
and other copyright holders.
================================================================
* SECURITY
It is imperative that you read and fully understand the contents of
the SECURITY file before you attempt to configure and run an Asterisk
server.
the security information file (doc/security.txt) before you attempt
to configure and run an Asterisk server.
* WHAT IS ASTERISK ?
Asterisk is an Open Source PBX and telephony toolkit. It is, in a
@@ -51,13 +51,15 @@ 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, chan_misdn and
Check the voip-info.org wiki for more information on chan_capi and
zaphfc.
* UPGRADING FROM VERSION 1.0
* UPGRADING FROM AN EARLIER VERSION
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
@@ -67,7 +69,7 @@ made every effort possible to maintain backwards compatibility.
In order to discover new features to use, please check the configuration
examples in the /configs directory of the source code distribution.
To discover the major new features of Asterisk 1.2, please visit
http://www.astricon.net/asterisk1-2/
http://edvina.net/asterisk1-2/
* NEW INSTALLATIONS
@@ -82,14 +84,21 @@ On many distributions, these files are installed by packages with names like
So let's proceed:
1) Run "make"
1) Read the README files.
There are more README files than this one in the doc/ directory.
Start with doc/00README.1st
You may also want to check the configuration files that contain
examples and reference guides. They are all in the configs/
directory.
2) Run "make"
Assuming the build completes successfully:
2) Run "make install"
3) Run "make install"
Each time you update or checkout from CVS, you are strongly encouraged
to ensure all previous object files are removed to avoid internal
Each time you update or checkout from the repository, 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.
@@ -97,7 +106,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:
3) "make samples"
4) "make samples"
Doing so will overwrite any existing config files you have.
@@ -238,3 +247,6 @@ 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

View File

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

512
UPGRADE.txt Executable file → Normal file
View File

@@ -1,198 +1,424 @@
Information for Upgrading From Previous Asterisk Releases
=========================================================
Compiling:
Build Process (configure script):
* 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.
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:
Dialplan Expressions:
$ ./configure --help
* 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.
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.
Agents:
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.
* 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.
Build Process (module selection):
* 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 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.
Parking:
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 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.
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'.
Dialing:
Build Process (Makefile targets):
* 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.
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.
IAX:
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'.
* The naming convention for IAX channels has changed in a minor way such
that the call number follows a "-" rather than a "/" character.
Sound (prompt) and Music On Hold files:
SIP:
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.
* 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 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 "Registry" event now uses "Username" rather than "User" for
consistency with IAX.
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 '!'.
Applications:
* With the addition of dialplan functions (which operate similarly
to variables), the SetVar application has been renamed to Set.
* 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 CallerPres application has been removed. Use SetCallerPres
instead. It accepts both numeric and symbolic names.
* 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 applications GetGroupCount, GetGroupMatchCount, SetGroup, and
CheckGroup have been deprecated in favor of functions. Here is a
table of their replacements:
* 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.
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)
* 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.
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.
* 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.
* The applications DBGet and DBPut have been deprecated in favor of
functions. Here is a table of their replacements:
* OSPAuth is added to authenticate OSP tokens in in_bound call setup messages.
DBGet(foo=family/key) Set(foo=${DB(family/key)})
DBPut(family/key=${foo}) Set(DB(family/key)=${foo})
* 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 application SetLanguage has been deprecated in favor of the
function LANGUAGE().
* 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.
SetLanguage(fr) Set(LANGUAGE()=fr)
* 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 LANGUAGE function can also return the currently set language:
* 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'.
Set(MYLANG=${LANGUAGE()})
* 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.
* The applications AbsoluteTimeout, DigitTimeout, and ResponseTimeout
have been deprecated in favor of the function TIMEOUT(timeouttype):
* 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.
AbsoluteTimeout(300) Set(TIMEOUT(absolute)=300)
DigitTimeout(15) Set(TIMEOUT(digit)=15)
ResponseTimeout(15) Set(TIMEOUT(response)=15)
* 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 TIMEOUT() function can also return the currently set timeouts:
* 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.
Set(DTIMEOUT=${TIMEOUT(digit)})
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".
* The applications SetCIDName, SetCIDNum, and SetRDNIS have been
deprecated in favor of the CALLERID(datatype) function:
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".
SetCIDName(Joe Cool) Set(CALLERID(name)=Joe Cool)
SetCIDNum(2025551212) Set(CALLERID(number)=2025551212)
SetRDNIS(2024561414) Set(CALLERID(RDNIS)=2024561414)
* 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
* The application Record now uses the period to separate the filename
from the format, rather than the colon.
* 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.
* 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.
Manager:
Queues:
* 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.
* 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.
* 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.
* 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.
* 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.
Extensions:
* 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.
* 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.
Variables:
AGI:
* 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.
* 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.
* The CDR-CSV variables uniqueid, userfield, and basing time on GMT are now
adjustable from cdr.conf, instead of recompiling.
* CallerID is reported with agi_callerid and agi_calleridname instead
of a single parameter holding both.
* 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.
Music On Hold:
* 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.
* 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.
Functions:
chan_modem:
* The function ${CHECK_MD5()} has been deprecated in favor of using an
expression: $[${MD5(<string>)} = ${saved_md5}].
* 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.
* 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.
MeetMe:
* 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 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.
* 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
GetVar Manager Action:
* The QUEUEAGENTCOUNT() function has been deprecated in favor of
QUEUE_MEMBER_COUNT().
* 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
The IAX2 channel:
* 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 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.

491
acinclude.m4 Normal file
View File

@@ -0,0 +1,491 @@
# AST_GCC_ATTRIBUTE([attribute name])
AC_DEFUN([AST_GCC_ATTRIBUTE],
[
AC_MSG_CHECKING(for compiler 'attribute $1' support)
AC_COMPILE_IFELSE(
AC_LANG_PROGRAM([static int __attribute__(($1)) test(void) {}],
[]),
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED([HAVE_ATTRIBUTE_$1], 1, [Define to 1 if your GCC C compiler supports the '$1' attribute.]),
AC_MSG_RESULT(no))
])
# AST_EXT_LIB_SETUP([package symbol name], [package friendly name], [package option name], [additional help text])
AC_DEFUN([AST_EXT_LIB_SETUP],
[
$1_DESCRIP="$2"
$1_OPTION="$3"
AC_ARG_WITH([$3], AC_HELP_STRING([--with-$3=PATH],[use $2 files in PATH $4]),[
case ${withval} in
n|no)
USE_$1=no
;;
y|ye|yes)
$1_MANDATORY="yes"
;;
*)
$1_DIR="${withval}"
$1_MANDATORY="yes"
;;
esac
])
PBX_$1=0
AC_SUBST([$1_LIB])
AC_SUBST([$1_INCLUDE])
AC_SUBST([PBX_$1])
])
# AST_EXT_LIB_CHECK([package symbol name], [package library name], [function to check], [package header], [additional LIB data])
AC_DEFUN([AST_EXT_LIB_CHECK],
[
if test "${USE_$1}" != "no"; then
pbxlibdir=""
if test "x${$1_DIR}" != "x"; then
if test -d ${$1_DIR}/lib; then
pbxlibdir="-L${$1_DIR}/lib"
else
pbxlibdir="-L${$1_DIR}"
fi
fi
AC_CHECK_LIB([$2], [$3], [AST_$1_FOUND=yes], [AST_$1_FOUND=no], ${pbxlibdir} $5)
if test "${AST_$1_FOUND}" = "yes"; then
$1_LIB="-l$2 $5"
$1_HEADER_FOUND="1"
if test "x${$1_DIR}" != "x"; then
$1_LIB="${pbxlibdir} ${$1_LIB}"
$1_INCLUDE="-I${$1_DIR}/include"
if test "x$4" != "x" ; then
AC_CHECK_HEADER([${$1_DIR}/include/$4], [$1_HEADER_FOUND=1], [$1_HEADER_FOUND=0] )
fi
else
if test "x$4" != "x" ; then
AC_CHECK_HEADER([$4], [$1_HEADER_FOUND=1], [$1_HEADER_FOUND=0] )
fi
fi
if test "x${$1_HEADER_FOUND}" = "x0" ; then
if test ! -z "${$1_MANDATORY}" ;
then
AC_MSG_NOTICE( ***)
AC_MSG_NOTICE( *** It appears that you do not have the $2 development package installed.)
AC_MSG_NOTICE( *** Please install it to include ${$1_DESCRIP} support, or re-run configure)
AC_MSG_NOTICE( *** without explicitly specifying --with-${$1_OPTION})
exit 1
fi
$1_LIB=""
$1_INCLUDE=""
PBX_$1=0
else
PBX_$1=1
AC_DEFINE_UNQUOTED([HAVE_$1], 1, [Define to indicate the ${$1_DESCRIP} library])
fi
elif test ! -z "${$1_MANDATORY}";
then
AC_MSG_NOTICE(***)
AC_MSG_NOTICE(*** The ${$1_DESCRIP} installation on this system appears to be broken.)
AC_MSG_NOTICE(*** Either correct the installation, or run configure)
AC_MSG_NOTICE(*** without explicitly specifying --with-${$1_OPTION})
exit 1
fi
fi
])
AC_DEFUN(
[AST_CHECK_GNU_MAKE], [AC_CACHE_CHECK(for GNU make, GNU_MAKE,
GNU_MAKE='Not Found' ;
GNU_MAKE_VERSION_MAJOR=0 ;
GNU_MAKE_VERSION_MINOR=0 ;
for a in make gmake gnumake ; do
if test -z "$a" ; then continue ; fi ;
if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then
GNU_MAKE=$a ;
GNU_MAKE_VERSION_MAJOR=`$GNU_MAKE --version | grep "GNU Make" | cut -f3 -d' ' | cut -f1 -d'.'`
GNU_MAKE_VERSION_MINOR=`$GNU_MAKE --version | grep "GNU Make" | cut -f2 -d'.' | cut -c1-2`
break;
fi
done ;
) ;
if test "x$GNU_MAKE" = "xNot Found" ; then
AC_MSG_ERROR( *** Please install GNU make. It is required to build Asterisk!)
exit 1
fi
AC_SUBST([GNU_MAKE])
])
AC_DEFUN(
[AST_CHECK_PWLIB], [
PWLIB_INCDIR=
PWLIB_LIBDIR=
if test "${PWLIBDIR:-unset}" != "unset" ; then
AC_CHECK_FILE(${PWLIBDIR}/version.h, HAS_PWLIB=1, )
fi
if test "${HAS_PWLIB:-unset}" = "unset" ; then
if test "${OPENH323DIR:-unset}" != "unset"; then
AC_CHECK_FILE(${OPENH323DIR}/../pwlib/version.h, HAS_PWLIB=1, )
fi
if test "${HAS_PWLIB:-unset}" != "unset" ; then
PWLIBDIR="${OPENH323DIR}/../pwlib"
else
AC_CHECK_FILE(${HOME}/pwlib/include/ptlib.h, HAS_PWLIB=1, )
if test "${HAS_PWLIB:-unset}" != "unset" ; then
PWLIBDIR="${HOME}/pwlib"
else
AC_CHECK_FILE(/usr/local/include/ptlib.h, HAS_PWLIB=1, )
if test "${HAS_PWLIB:-unset}" != "unset" ; then
AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/local/bin)
if test "${PTLIB_CONFIG:-unset}" = "unset" ; then
AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/local/share/pwlib/make)
fi
PWLIB_INCDIR="/usr/local/include"
PWLIB_LIBDIR="/usr/local/lib"
else
AC_CHECK_FILE(/usr/include/ptlib.h, HAS_PWLIB=1, )
if test "${HAS_PWLIB:-unset}" != "unset" ; then
AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/share/pwlib/make)
PWLIB_INCDIR="/usr/include"
PWLIB_LIBDIR="/usr/lib"
fi
fi
fi
fi
fi
#if test "${HAS_PWLIB:-unset}" = "unset" ; then
# echo "Cannot find pwlib - please install or set PWLIBDIR and try again"
# exit
#fi
if test "${HAS_PWLIB:-unset}" != "unset" ; then
if test "${PWLIBDIR:-unset}" = "unset" ; then
if test "${PTLIB_CONFIG:-unset}" != "unset" ; then
PWLIBDIR=`$PTLIB_CONFIG --prefix`
else
echo "Cannot find ptlib-config - please install and try again"
exit
fi
fi
if test "x$PWLIBDIR" = "x/usr" -o "x$PWLIBDIR" = "x/usr/"; then
PWLIBDIR="/usr/share/pwlib"
PWLIB_INCDIR="/usr/include"
PWLIB_LIBDIR="/usr/lib"
fi
if test "x$PWLIBDIR" = "x/usr/local" -o "x$PWLIBDIR" = "x/usr/"; then
PWLIBDIR="/usr/local/share/pwlib"
PWLIB_INCDIR="/usr/local/include"
PWLIB_LIBDIR="/usr/local/lib"
fi
if test "${PWLIB_INCDIR:-unset}" = "unset"; then
PWLIB_INCDIR="${PWLIBDIR}/include"
fi
if test "${PWLIB_LIBDIR:-unset}" = "unset"; then
PWLIB_LIBDIR="${PWLIBDIR}/lib"
fi
AC_SUBST([PWLIBDIR])
AC_SUBST([PWLIB_INCDIR])
AC_SUBST([PWLIB_LIBDIR])
fi
])
AC_DEFUN(
[AST_CHECK_OPENH323_PLATFORM], [
PWLIB_OSTYPE=
case "$host_os" in
linux*) PWLIB_OSTYPE=linux ;
;;
freebsd* ) PWLIB_OSTYPE=FreeBSD ;
;;
openbsd* ) PWLIB_OSTYPE=OpenBSD ;
ENDLDLIBS="-lossaudio" ;
;;
netbsd* ) PWLIB_OSTYPE=NetBSD ;
ENDLDLIBS="-lossaudio" ;
;;
solaris* | sunos* ) PWLIB_OSTYPE=solaris ;
;;
darwin* ) PWLIB_OSTYPE=Darwin ;
;;
beos*) PWLIB_OSTYPE=beos ;
STDCCFLAGS="$STDCCFLAGS -D__BEOS__"
;;
cygwin*) PWLIB_OSTYPE=cygwin ;
;;
mingw*) PWLIB_OSTYPE=mingw ;
STDCCFLAGS="$STDCCFLAGS -mms-bitfields" ;
ENDLDLIBS="-lwinmm -lwsock32 -lsnmpapi -lmpr -lcomdlg32 -lgdi32 -lavicap32" ;
;;
* ) PWLIB_OSTYPE="$host_os" ;
AC_MSG_WARN("OS $PWLIB_OSTYPE not recognized - proceed with caution!") ;
;;
esac
PWLIB_MACHTYPE=
case "$host_cpu" in
x86 | i686 | i586 | i486 | i386 ) PWLIB_MACHTYPE=x86
;;
x86_64) PWLIB_MACHTYPE=x86_64 ;
P_64BIT=1 ;
LIB64=1 ;
;;
alpha | alphaev56 | alphaev6 | alphaev67 | alphaev7) PWLIB_MACHTYPE=alpha ;
P_64BIT=1 ;
;;
sparc ) PWLIB_MACHTYPE=sparc ;
;;
powerpc ) PWLIB_MACHTYPE=ppc ;
;;
ppc ) PWLIB_MACHTYPE=ppc ;
;;
powerpc64 ) PWLIB_MACHTYPE=ppc64 ;
P_64BIT=1 ;
LIB64=1 ;
;;
ppc64 ) PWLIB_MACHTYPE=ppc64 ;
P_64BIT=1 ;
LIB64=1 ;
;;
ia64) PWLIB_MACHTYPE=ia64 ;
P_64BIT=1 ;
;;
s390x) PWLIB_MACHTYPE=s390x ;
P_64BIT=1 ;
LIB64=1 ;
;;
s390) PWLIB_MACHTYPE=s390 ;
;;
* ) PWLIB_MACHTYPE="$host_cpu";
AC_MSG_WARN("CPU $PWLIB_MACHTYPE not recognized - proceed with caution!") ;;
esac
PWLIB_PLATFORM="${PWLIB_OSTYPE}_${PWLIB_MACHTYPE}"
AC_SUBST([PWLIB_PLATFORM])
])
AC_DEFUN(
[AST_CHECK_OPENH323], [
OPENH323_INCDIR=
OPENH323_LIBDIR=
if test "${OPENH323DIR:-unset}" != "unset" ; then
AC_CHECK_FILE(${OPENH323DIR}/version.h, HAS_OPENH323=1, )
fi
if test "${HAS_OPENH323:-unset}" = "unset" ; then
AC_CHECK_FILE(${PWLIBDIR}/../openh323/version.h, OPENH323DIR="${PWLIBDIR}/../openh323"; HAS_OPENH323=1, )
if test "${HAS_OPENH323:-unset}" != "unset" ; then
OPENH323DIR="${PWLIBDIR}/../openh323"
AC_CHECK_FILE(${OPENH323DIR}/include/h323.h, , OPENH323_INCDIR="${PWLIB_INCDIR}/openh323"; OPENH323_LIBDIR="${PWLIB_LIBDIR}")
else
AC_CHECK_FILE(${HOME}/openh323/include/h323.h, HAS_OPENH323=1, )
if test "${HAS_OPENH323:-unset}" != "unset" ; then
OPENH323DIR="${HOME}/openh323"
else
AC_CHECK_FILE(/usr/local/include/openh323/h323.h, HAS_OPENH323=1, )
if test "${HAS_OPENH323:-unset}" != "unset" ; then
OPENH323DIR="/usr/local/share/openh323"
OPENH323_INCDIR="/usr/local/include/openh323"
OPENH323_LIBDIR="/usr/local/lib"
else
AC_CHECK_FILE(/usr/include/openh323/h323.h, HAS_OPENH323=1, )
if test "${HAS_OPENH323:-unset}" != "unset" ; then
OPENH323DIR="/usr/share/openh323"
OPENH323_INCDIR="/usr/include/openh323"
OPENH323_LIBDIR="/usr/lib"
fi
fi
fi
fi
fi
if test "${HAS_OPENH323:-unset}" != "unset" ; then
if test "${OPENH323_INCDIR:-unset}" = "unset"; then
OPENH323_INCDIR="${OPENH323DIR}/include"
fi
if test "${OPENH323_LIBDIR:-unset}" = "unset"; then
OPENH323_LIBDIR="${OPENH323DIR}/lib"
fi
AC_SUBST([OPENH323DIR])
AC_SUBST([OPENH323_INCDIR])
AC_SUBST([OPENH323_LIBDIR])
fi
])
AC_DEFUN(
[AST_CHECK_PWLIB_VERSION], [
if test "${HAS_$2:-unset}" != "unset"; then
$2_VERSION=`grep "$2_VERSION" ${$2_INCDIR}/$3 | cut -f2 -d ' ' | sed -e 's/"//g'`
$2_MAJOR_VERSION=`echo ${$2_VERSION} | cut -f1 -d.`
$2_MINOR_VERSION=`echo ${$2_VERSION} | cut -f2 -d.`
$2_BUILD_NUMBER=`echo ${$2_VERSION} | cut -f3 -d.`
let $2_VER=${$2_MAJOR_VERSION}*10000+${$2_MINOR_VERSION}*100+${$2_BUILD_NUMBER}
let $2_REQ=$4*10000+$5*100+$6
AC_MSG_CHECKING(if $1 version ${$2_VERSION} is compatible with chan_h323)
if test ${$2_VER} -lt ${$2_REQ}; then
AC_MSG_RESULT(no)
unset HAS_$2
else
AC_MSG_RESULT(yes)
fi
fi
])
AC_DEFUN(
[AST_CHECK_PWLIB_BUILD], [
if test "${HAS_$2:-unset}" != "unset"; then
AC_MSG_CHECKING($1 installation validity)
saved_cppflags="${CPPFLAGS}"
saved_libs="${LIBS}"
LIBS="${LIBS} -L${$2_LIBDIR} -l${PLATFORM_$2} $7"
CPPFLAGS="${CPPFLAGS} -I${$2_INCDIR} $6"
AC_LANG_PUSH([C++])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([$4],[$5])],
[ AC_MSG_RESULT(yes)
ac_cv_lib_$2="yes"
],
[ AC_MSG_RESULT(no)
ac_cv_lib_$2="no"
]
)
AC_LANG_POP([C++])
LIBS="${saved_libs}"
CPPFLAGS="${saved_cppflags}"
if test "${ac_cv_lib_$2}" = "yes"; then
if test "${$2_LIBDIR}" != "" -a "${$2_LIBDIR}" != "/usr/lib"; then
$2_LIB="-L${$2_LIBDIR} -l${PLATFORM_$2}"
else
$2_LIB="-l${PLATFORM_$2}"
fi
if test "${$2_INCDIR}" != "" -a "${$2_INCDIR}" != "/usr/include"; then
$2_INCLUDE="-I${$2_INCDIR}"
fi
PBX_$2=1
AC_DEFINE([HAVE_$2], 1, [$3])
fi
fi
])
AC_DEFUN(
[AST_CHECK_OPENH323_BUILD], [
if test "${HAS_OPENH323:-unset}" != "unset"; then
AC_MSG_CHECKING(OpenH323 build option)
OPENH323_SUFFIX=
files=`ls -l ${OPENH323_LIBDIR}/libh323_${PWLIB_PLATFORM}_*.so*`
libfile=
if test -n "$files"; then
for f in $files; do
if test -f $f -a ! -L $f; then
libfile=`basename $f`
break;
fi
done
fi
if test "${libfile:-unset}" != "unset"; then
OPENH323_SUFFIX=`eval "echo ${libfile} | sed -e 's/libh323_${PWLIB_PLATFORM}_\(@<:@^.@:>@*\)\..*/\1/'"`
fi
case "${OPENH323_SUFFIX}" in
n)
OPENH323_BUILD="notrace";;
r)
OPENH323_BUILD="opt";;
d)
OPENH323_BUILD="debug";;
*)
OPENH323_BUILD="notrace";;
esac
AC_MSG_RESULT(${OPENH323_BUILD})
AC_SUBST([OPENH323_SUFFIX])
AC_SUBST([OPENH323_BUILD])
fi
])
# AST_FUNC_FORK
# -------------
AN_FUNCTION([fork], [AST_FUNC_FORK])
AN_FUNCTION([vfork], [AST_FUNC_FORK])
AC_DEFUN([AST_FUNC_FORK],
[AC_REQUIRE([AC_TYPE_PID_T])dnl
AC_CHECK_HEADERS(vfork.h)
AC_CHECK_FUNCS(fork vfork)
if test "x$ac_cv_func_fork" = xyes; then
_AST_FUNC_FORK
else
ac_cv_func_fork_works=$ac_cv_func_fork
fi
if test "x$ac_cv_func_fork_works" = xcross; then
case $host in
*-*-amigaos* | *-*-msdosdjgpp* | *-*-uclinux* )
# Override, as these systems have only a dummy fork() stub
ac_cv_func_fork_works=no
;;
*)
ac_cv_func_fork_works=yes
;;
esac
AC_MSG_WARN([result $ac_cv_func_fork_works guessed because of cross compilation])
fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
if test "x$ac_cv_func_vfork" = xyes; then
_AC_FUNC_VFORK
fi;
if test "x$ac_cv_func_fork_works" = xcross; then
ac_cv_func_vfork_works=$ac_cv_func_vfork
AC_MSG_WARN([result $ac_cv_func_vfork_works guessed because of cross compilation])
fi
if test "x$ac_cv_func_vfork_works" = xyes; then
AC_DEFINE(HAVE_WORKING_VFORK, 1, [Define to 1 if `vfork' works.])
else
AC_DEFINE(vfork, fork, [Define as `fork' if `vfork' does not work.])
fi
if test "x$ac_cv_func_fork_works" = xyes; then
AC_DEFINE(HAVE_WORKING_FORK, 1, [Define to 1 if `fork' works.])
fi
])# AST_FUNC_FORK
# _AST_FUNC_FORK
# -------------
AC_DEFUN([_AST_FUNC_FORK],
[AC_CACHE_CHECK(for working fork, ac_cv_func_fork_works,
[AC_RUN_IFELSE(
[AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
[
/* By Ruediger Kuhlmann. */
return fork () < 0;
])],
[ac_cv_func_fork_works=yes],
[ac_cv_func_fork_works=no],
[ac_cv_func_fork_works=cross])])]
)# _AST_FUNC_FORK

14
aclocal.m4 vendored Normal file
View File

@@ -0,0 +1,14 @@
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
m4_include([acinclude.m4])

View File

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

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

38
agi/Makefile Executable file → Normal file
View File

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

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

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

@@ -17,7 +17,10 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <asterisk/compat.h>
#include "asterisk.h"
#include "asterisk/compat.h"
#define AUDIO_FILENO (STDERR_FILENO + 1)

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

@@ -11,7 +11,10 @@
#include <errno.h>
#include <string.h>
#include <sys/select.h>
#include <asterisk/compat.h>
#include "asterisk.h"
#include "asterisk/compat.h"
#define AUDIO_FILENO (STDERR_FILENO + 1)

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

488
agi/jukebox.agi Executable file
View File

@@ -0,0 +1,488 @@
#!/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;
}
}

0
agi/numeralize Executable file → Normal file
View File

View File

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

127
apps/Makefile Executable file → Normal file
View File

@@ -3,131 +3,36 @@
#
# Makefile for PBX applications
#
# Copyright (C) 1999-2005, Digium
#
# Mark Spencer <markster@digium.com>
# Copyright (C) 1999-2006, Digium, Inc.
#
# This program is free software, distributed under the terms of
# the GNU General Public License
#
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
-include ../menuselect.makeopts ../menuselect.makedeps
#
# Obsolete things...
#
#APPS+=app_sql_postgres.so
#APPS+=app_sql_odbc.so
C_MODS:=$(filter-out $(MENUSELECT_APPS),$(patsubst %.c,%,$(wildcard app_*.c)))
CC_MODS:=$(filter-out $(MENUSELECT_APPS),$(patsubst %.cc,%,$(wildcard app_*.cc)))
#
# Experimental things
#
#APPS+=app_ivrdemo.so
#APPS+=app_skel.so
#APPS+=app_rpt.so
LOADABLE_MODS:=$(C_MODS) $(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
ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/osp/osp.h $(CROSS_COMPILE_TARGET)/usr/include/osp/osp.h),)
APPS+=app_osplookup.so
ifneq ($(findstring apps,$(MENUSELECT_EMBED)),)
EMBEDDED_MODS:=$(LOADABLE_MODS)
LOADABLE_MODS:=
endif
ifeq ($(findstring BSD,${OSARCH}),BSD)
CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
ifneq ($(findstring ODBC_STORAGE,$(MENUSELECT_OPTS_app_voicemail)),)
MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_ODBC_STORAGE)
endif
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
ifneq ($(findstring IMAP_STORAGE,$(MENUSELECT_OPTS_app_voicemail)),)
MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_IMAP_STORAGE)
endif
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 look .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/usr/local/pgsql/include $(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
look: look.c
$(CC) -pipe -O6 -g look.c -o look -lncurses
ifeq (SunOS,$(shell uname))
app_chanspy.so: app_chanspy.o
$(CC) $(SOLINK) -o $@ $< -lrt
MENUSELECT_DEPENDS_app_chanspy+=RT
RT_LIB=-lrt
endif
all: _all
ifneq ($(wildcard .depend),)
include .depend
endif
depend: .depend
.depend:
../build_tools/mkdep $(CFLAGS) `ls *.c`
env:
env
include $(ASTTOPDIR)/Makefile.moddir_rules

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

@@ -17,11 +17,18 @@
*/
/*! \file
*
* \brief Program Asterisk ADSI Scripts into phone
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <sys/types.h>
#include <netinet/in.h>
#include <stdlib.h>
@@ -32,10 +39,6 @@
#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"
@@ -46,8 +49,6 @@ 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";
@@ -58,10 +59,6 @@ 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;
@@ -1356,13 +1353,10 @@ static struct adsi_script *compile_script(char *script)
ast_log(LOG_WARNING, "Can't open file '%s'\n", fn);
return NULL;
}
scr = malloc(sizeof(struct adsi_script));
if (!scr) {
if (!(scr = ast_calloc(1, sizeof(*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)) {
@@ -1444,11 +1438,11 @@ static int adsi_prog(struct ast_channel *chan, char *script)
return -1;
/* Start an empty ADSI Session */
if (adsi_load_session(chan, NULL, 0, 1) < 1)
if (ast_adsi_load_session(chan, NULL, 0, 1) < 1)
return -1;
/* Now begin the download attempt */
if (adsi_begin_download(chan, scr->desc, scr->fdn, scr->sec, scr->ver)) {
if (ast_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 +1456,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 (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
if (ast_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 +1469,7 @@ static int adsi_prog(struct ast_channel *chan, char *script)
#endif
}
if (bytes) {
if (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
if (ast_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 +1480,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 (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
if (ast_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 +1493,7 @@ static int adsi_prog(struct ast_channel *chan, char *script)
#endif
}
if (bytes) {
if (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
if (ast_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 +1504,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 (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
if (ast_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 +1517,7 @@ static int adsi_prog(struct ast_channel *chan, char *script)
#endif
}
if (bytes) {
if (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
if (ast_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 +1525,11 @@ static int adsi_prog(struct ast_channel *chan, char *script)
bytes = 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)
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)
return -1;
if (adsi_end_download(chan)) {
if (ast_adsi_end_download(chan)) {
/* Download failed for some reason */
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Download attempt failed\n");
@@ -1544,21 +1538,21 @@ static int adsi_prog(struct ast_channel *chan, char *script)
return -1;
}
free(scr);
adsi_unload_session(chan);
ast_adsi_unload_session(chan);
return 0;
}
static int adsi_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct localuser *u;
struct ast_module_user *u;
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
if (ast_strlen_zero(data))
data = "asterisk.adsi";
if (!adsi_available(chan)) {
if (!ast_adsi_available(chan)) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "ADSI Unavailable on CPE. Not bothering to try.\n");
} else {
@@ -1567,40 +1561,26 @@ static int adsi_exec(struct ast_channel *chan, void *data)
res = adsi_prog(chan, data);
}
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return res;
}
int unload_module(void)
static int unload_module(void)
{
int res;
ast_module_user_hangup_all();
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
return res;
}
int load_module(void)
static int load_module(void)
{
return ast_register_application(app, adsi_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Asterisk ADSI Programming Application");

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

@@ -22,13 +22,17 @@
*
* *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING ***
*
* Use at your own risk. Please consult the GNU GPL license document included with Asterisk details. *
* Use at your own risk. Please consult the GNU GPL license document included with Asterisk. *
*
* *** 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>
@@ -37,10 +41,6 @@
#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,6 +56,7 @@ 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"
@@ -67,11 +68,9 @@ 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 receving alarm reports from a burglar or fire alarm panel";
static char *synopsis = "Provide support for receiving 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"
@@ -94,18 +93,10 @@ 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
@@ -215,6 +206,7 @@ static int send_tone_burst(struct ast_channel *chan, float freq, int duration, i
i += wf.datalen / 8;
if (i > duration) {
ast_frfree(f);
break;
}
if (ast_write(chan, &wf)){
@@ -222,6 +214,7 @@ static int send_tone_burst(struct ast_channel *chan, float freq, int duration, i
ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: Failed to write frame on %s\n", chan->name);
ast_log(LOG_WARNING, "AlarmReceiver Failed to write frame on %s\n",chan->name);
res = -1;
ast_frfree(f);
break;
}
}
@@ -556,13 +549,12 @@ 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;
}
}
/* Check the message type for correctness */
@@ -579,17 +571,11 @@ static int receive_ademco_contact_id( struct ast_channel *chan, void *data, int
events_received++;
/* Queue the Event */
if((enew = malloc(sizeof(event_node_t))) == NULL){
if(option_verbose >= 1)
ast_verbose(VERBOSE_PREFIX_1 "AlarmReceiver: Failed to allocate memory\n");
ast_log(LOG_WARNING, "AlarmReceiver Failed to allocate memory\n");
/* Queue the Event */
if (!(enew = ast_calloc(1, sizeof(*enew)))) {
res = -1;
break;
break;
}
memset(enew, 0, sizeof(event_node_t));
enew->next = NULL;
ast_copy_string(enew->data, event, sizeof(enew->data));
@@ -640,13 +626,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 localuser *u;
struct ast_module_user *u;
event_node_t *elp, *efree;
char signalling_type[64] = "";
event_node_t *event_head = NULL;
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
/* Set write and read formats to ULAW */
@@ -655,13 +641,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);
LOCAL_USER_REMOVE(u);
ast_module_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);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
@@ -680,7 +666,7 @@ static int alarmreceiver_exec(struct ast_channel *chan, void *data)
res = ast_answer(chan);
if (res) {
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
}
@@ -735,7 +721,7 @@ static int alarmreceiver_exec(struct ast_channel *chan, void *data)
}
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return 0;
}
@@ -747,7 +733,7 @@ static int alarmreceiver_exec(struct ast_channel *chan, void *data)
static int load_config(void)
{
struct ast_config *cfg;
char *p;
const char *p;
/* Read in the config file */
@@ -757,6 +743,7 @@ static int load_config(void)
if(option_verbose >= 4)
ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: No config file\n");
return 0;
}
else{
@@ -823,7 +810,7 @@ static int load_config(void)
}
ast_config_destroy(cfg);
}
return 0;
return 1;
}
@@ -832,36 +819,23 @@ static int load_config(void)
*/
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
load_config();
return ast_register_application(app, alarmreceiver_exec, synopsis, descrip);
if(load_config())
return ast_register_application(app, alarmreceiver_exec, synopsis, descrip);
else
return AST_MODULE_LOAD_DECLINE;
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Alarm Receiver for Asterisk");

398
apps/app_amd.c Normal file
View File

@@ -0,0 +1,398 @@
/*
* 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;
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;
int inInitialSilence = 1;
int inGreeting = 0;
int voiceDuration = 0;
int silenceDuration = 0;
int iTotalTime = 0;
int iWordsCount = 0;
int currentState = STATE_IN_SILENCE;
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;
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
ast_log(LOG_NOTICE, "AMD using the default parameters.\n");
/* 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, totalAnalysisTime)) > -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) {
/* If the total time exceeds the analysis time then give up as we are not too sure */
framelength = (ast_codec_get_samples(f) / DEFAULT_SAMPLES_PER_MS);
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 */
dspsilence = 0;
ast_dsp_silence(silenceDetector, f, &dspsilence);
if (dspsilence) {
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);
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);
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);
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);
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,
);

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

@@ -17,21 +17,24 @@
*/
/*! \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"
@@ -41,17 +44,33 @@ 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]): 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"
" 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"
"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"
@@ -66,69 +85,82 @@ 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 localuser *u;
char password[256]="";
struct ast_module_user *u;
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;
}
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
if (chan->_state != AST_STATE_UP) {
res = ast_answer(chan);
if (res) {
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
}
strncpy(password, data, sizeof(password) - 1);
opts=strchr(password, '|');
if (opts) {
*opts = 0;
opts++;
} else
opts = "";
if (strchr(opts, 'j'))
jump = 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;
}
/* Start asking for password */
prompt = "agent-pass";
for (retries = 0; retries < 3; retries++) {
res = ast_app_getdata(chan, prompt, passwd, sizeof(passwd) - 2, 0);
res = ast_app_getdata(chan, prompt, passwd, maxdigits, 0);
if (res < 0)
break;
res = 0;
if (password[0] == '/') {
if (strchr(opts, 'd')) {
if (arglist.password[0] == '/') {
if (ast_test_flag(&flags,OPT_DATABASE)) {
char tmp[256];
/* Compare against a database key */
if (!ast_db_get(password + 1, passwd, tmp, sizeof(tmp))) {
if (!ast_db_get(arglist.password + 1, passwd, tmp, sizeof(tmp))) {
/* It's a good password */
if (strchr(opts, 'r')) {
ast_db_del(password + 1, passwd);
if (ast_test_flag(&flags,OPT_REMOVE)) {
ast_db_del(arglist.password + 1, passwd);
}
break;
}
} else {
/* Compare against a file */
FILE *f;
f = fopen(password, "r");
f = fopen(arglist.password, "r");
if (f) {
char buf[256] = "";
char md5passwd[33] = "";
@@ -138,7 +170,7 @@ static int auth_exec(struct ast_channel *chan, void *data)
fgets(buf, sizeof(buf), f);
if (!feof(f) && !ast_strlen_zero(buf)) {
buf[strlen(buf) - 1] = '\0';
if (strchr(opts, 'm')) {
if (ast_test_flag(&flags,OPT_MULTIPLE)) {
md5secret = strchr(buf, ':');
if (md5secret == NULL)
continue;
@@ -146,13 +178,13 @@ static int auth_exec(struct ast_channel *chan, void *data)
md5secret++;
ast_md5_hash(md5passwd, passwd);
if (!strcmp(md5passwd, md5secret)) {
if (strchr(opts, 'a'))
if (ast_test_flag(&flags,OPT_ACCOUNT))
ast_cdr_setaccount(chan, buf);
break;
}
} else {
if (!strcmp(passwd, buf)) {
if (strchr(opts, 'a'))
if (ast_test_flag(&flags,OPT_ACCOUNT))
ast_cdr_setaccount(chan, buf);
break;
}
@@ -161,7 +193,7 @@ static int auth_exec(struct ast_channel *chan, void *data)
}
fclose(f);
if (!ast_strlen_zero(buf)) {
if (strchr(opts, 'm')) {
if (ast_test_flag(&flags,OPT_MULTIPLE)) {
if (md5secret && !strcmp(md5passwd, md5secret))
break;
} else {
@@ -170,23 +202,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", password, strerror(errno));
ast_log(LOG_WARNING, "Unable to open file '%s' for authentication: %s\n", arglist.password, strerror(errno));
}
} else {
/* Compare against a fixed password */
if (!strcmp(passwd, password))
if (!strcmp(passwd, arglist.password))
break;
}
prompt="auth-incorrect";
}
if ((retries < 3) && !res) {
if (strchr(opts, 'a') && !strchr(opts, 'm'))
if (ast_test_flag(&flags,OPT_ACCOUNT) && !ast_test_flag(&flags,OPT_MULTIPLE))
ast_cdr_setaccount(chan, passwd);
res = ast_streamfile(chan, "auth-thankyou", chan->language);
if (!res)
res = ast_waitstream(chan, "");
} else {
if (jump && ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101)) {
if (ast_test_flag(&flags,OPT_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))
@@ -194,39 +226,25 @@ static int auth_exec(struct ast_channel *chan, void *data)
res = -1;
}
}
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return res;
}
int unload_module(void)
static int unload_module(void)
{
int res;
ast_module_user_hangup_all();
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
return res;
}
int load_module(void)
static int load_module(void)
{
return ast_register_application(app, auth_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Authentication Application");

44
apps/app_cdr.c Executable file → Normal file
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,55 +43,37 @@ 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 localuser *u;
struct ast_module_user *u;
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
if (chan->cdr) {
ast_cdr_free(chan->cdr);
chan->cdr = NULL;
}
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return 0;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(nocdr_app);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
return ast_register_application(nocdr_app, nocdr_exec, nocdr_synopsis, nocdr_descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Tell Asterisk to not maintain a CDR for the current call");

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

@@ -18,11 +18,19 @@
*/
/*! \file
* \brief Check if Channel is Available
*
*
* \brief Check if Channel is Available
*
* \author Mark Spencer <markster@digium.com>
* \author James Golovich <james@gnuinter.net>
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -30,10 +38,6 @@
#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"
@@ -44,8 +48,6 @@ 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";
@@ -61,36 +63,37 @@ 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 localuser *u;
char *info, tmp[512], trychan[512], *peers, *tech, *number, *rest, *cur, *options, *stringp;
struct ast_module_user *u;
char *info, tmp[512], trychan[512], *peers, *tech, *number, *rest, *cur;
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;
}
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
info = ast_strdupa(data);
stringp = info;
strsep(&stringp, "|");
options = strsep(&stringp, "|");
if (options) {
if (strchr(options, 's'))
AST_STANDARD_APP_ARGS(args, info);
if (args.options) {
if (strchr(args.options, 's'))
option_state = 1;
if (strchr(options, 'j'))
if (strchr(args.options, 'j'))
priority_jump = 1;
}
peers = info;
peers = args.reqchans;
if (peers) {
cur = peers;
do {
@@ -104,7 +107,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");
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
*number = '\0';
@@ -139,47 +142,32 @@ 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 || option_priority_jumping) {
if (priority_jump || ast_opt_priority_jumping) {
if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101)) {
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
}
}
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return 0;
}
int unload_module(void)
static int unload_module(void)
{
int res = 0;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
return ast_register_application(app, chanavail_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Check channel availability");

140
apps/app_channelredirect.c Normal file
View File

@@ -0,0 +1,140 @@
/*
* 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 (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");

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

@@ -2,8 +2,10 @@
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 2005 Anthony Minessale II (anthmct@yahoo.com)
* Copyright (C) 2005 - 2006, Digium, Inc.
*
* Disclaimed to Digium
* A license has been granted to Digium (via disclaimer) for the use of
* this code.
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
@@ -17,21 +19,24 @@
*/
/*! \file
*
* \brief ChanSpy: Listen in on any channel.
*
*
* \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 <ctype.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
@@ -46,46 +51,76 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/module.h"
#include "asterisk/lock.h"
AST_MUTEX_DEFINE_STATIC(modlock);
#define AST_NAME_STRLEN 256
#define ALL_DONE(u, ret) LOCAL_USER_REMOVE(u); return ret;
#define get_volfactor(x) x ? ((x > 0) ? (1 << x) : ((1 << abs(x)) * -1)) : 0
static const char *synopsis = "Listen to the audio of an active channel\n";
static const char *app = "ChanSpy";
static const char *desc =
static const char *tdesc = "Listen to a channel, and optionally whisper into it";
static const char *app_chan = "ChanSpy";
static const char *desc_chan =
" ChanSpy([chanprefix][|options]): This application is used to listen to the\n"
"audio from an active Asterisk channel. This includes the audio coming in and\n"
"audio from an Asterisk channel. This includes the audio coming in and\n"
"out of the channel being spied on. If the 'chanprefix' parameter is specified,\n"
"only channels beginning with this string will be spied upon.\n"
" While Spying, the following actions may be performed:\n"
" While spying, the following actions may be performed:\n"
" - Dialing # cycles the volume level.\n"
" - Dialing * will stop spying and look for another channel to spy on.\n"
" - Dialing a series of digits followed by # builds a channel name to append\n"
" to 'chanprefix'. For example, executing ChanSpy(Agent) and then dialing\n"
" the digits '1234#' while spying will begin spying on the channel,\n"
" the digits '1234#' while spying will begin spying on the channel\n"
" 'Agent/1234'.\n"
" Options:\n"
" b - Only spy on channels involved in a bridged call.\n"
" g(grp) - Match only channels where their ${SPYGROUP} variable is set to\n"
" 'grp'.\n"
" q - Don't play a beep when beginning to spy on a channel.\n"
" b - Only spy on channels involved in a bridged call.\n"
" g(grp) - Match only channels where their ${SPYGROUP} variable is set to\n"
" contain 'grp' in an optional : delimited list.\n"
" q - Don't play a beep when beginning to spy on a channel, or speak the\n"
" selected channel name.\n"
" r[(basename)] - Record the session to the monitor spool directory. An\n"
" optional base for the filename may be specified. The\n"
" default is 'chanspy'.\n"
" v([value]) - Adjust the initial volume in the range from -4 to 4. A\n"
" negative value refers to a quieter setting.\n"
" v([value]) - Adjust the initial volume in the range from -4 to 4. A\n"
" negative value refers to a quieter setting.\n"
" w - Enable 'whisper' mode, so the spying channel can talk to\n"
" the spied-on channel.\n"
" W - Enable 'private whisper' mode, so the spying channel can\n"
" talk to the spied-on channel but cannot listen to that\n"
" channel.\n"
;
static const char *chanspy_spy_type = "ChanSpy";
static const char *app_ext = "ExtenSpy";
static const char *desc_ext =
" ExtenSpy(exten[@context][|options]): This application is used to listen to the\n"
"audio from an Asterisk channel. This includes the audio coming in and\n"
"out of the channel being spied on. Only channels created by outgoing calls for the\n"
"specified extension will be selected for spying. If the optional context is not\n"
"supplied, the current channel's context will be used.\n"
" While spying, the following actions may be performed:\n"
" - Dialing # cycles the volume level.\n"
" - Dialing * will stop spying and look for another channel to spy on.\n"
" Options:\n"
" b - Only spy on channels involved in a bridged call.\n"
" g(grp) - Match only channels where their ${SPYGROUP} variable is set to\n"
" contain 'grp' in an optional : delimited list.\n"
" q - Don't play a beep when beginning to spy on a channel, or speak the\n"
" selected channel name.\n"
" r[(basename)] - Record the session to the monitor spool directory. An\n"
" optional base for the filename may be specified. The\n"
" default is 'chanspy'.\n"
" v([value]) - Adjust the initial volume in the range from -4 to 4. A\n"
" negative value refers to a quieter setting.\n"
" w - Enable 'whisper' mode, so the spying channel can talk to\n"
" the spied-on channel.\n"
" W - Enable 'private whisper' mode, so the spying channel can\n"
" talk to the spied-on channel but cannot listen to that\n"
" channel.\n"
;
enum {
OPTION_QUIET = (1 << 0), /* Quiet, no announcement */
OPTION_BRIDGED = (1 << 1), /* Only look at bridged calls */
OPTION_VOLUME = (1 << 2), /* Specify initial volume */
OPTION_GROUP = (1 << 3), /* Only look at channels in group */
OPTION_RECORD = (1 << 4), /* Record */
OPTION_RECORD = (1 << 4),
OPTION_WHISPER = (1 << 5),
OPTION_PRIVATE = (1 << 6), /* Private Whisper mode */
} chanspy_opt_flags;
enum {
@@ -95,16 +130,16 @@ enum {
OPT_ARG_ARRAY_SIZE,
} chanspy_opt_args;
AST_APP_OPTIONS(chanspy_opts, {
AST_APP_OPTIONS(spy_opts, {
AST_APP_OPTION('q', OPTION_QUIET),
AST_APP_OPTION('b', OPTION_BRIDGED),
AST_APP_OPTION('w', OPTION_WHISPER),
AST_APP_OPTION('W', OPTION_PRIVATE),
AST_APP_OPTION_ARG('v', OPTION_VOLUME, OPT_ARG_VOLUME),
AST_APP_OPTION_ARG('g', OPTION_GROUP, OPT_ARG_GROUP),
AST_APP_OPTION_ARG('r', OPTION_RECORD, OPT_ARG_RECORD),
});
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
struct chanspy_translation_helper {
/* spy data */
@@ -113,34 +148,6 @@ struct chanspy_translation_helper {
int volfactor;
};
static struct ast_channel *local_channel_walk(struct ast_channel *chan)
{
struct ast_channel *ret;
ast_mutex_lock(&modlock);
if ((ret = ast_channel_walk_locked(chan))) {
ast_mutex_unlock(&ret->lock);
}
ast_mutex_unlock(&modlock);
return ret;
}
static struct ast_channel *local_get_channel_begin_name(char *name)
{
struct ast_channel *chan, *ret = NULL;
ast_mutex_lock(&modlock);
chan = local_channel_walk(NULL);
while (chan) {
if (!strncmp(chan->name, name, strlen(name))) {
ret = chan;
break;
}
chan = local_channel_walk(chan);
}
ast_mutex_unlock(&modlock);
return ret;
}
static void *spy_alloc(struct ast_channel *chan, void *data)
{
/* just store the data pointer in the channel structure */
@@ -181,7 +188,6 @@ static int spy_generate(struct ast_channel *chan, void *data, int len, int sampl
return 0;
}
static struct ast_generator spygen = {
.alloc = spy_alloc,
.release = spy_release,
@@ -195,32 +201,16 @@ static int start_spying(struct ast_channel *chan, struct ast_channel *spychan, s
ast_log(LOG_NOTICE, "Attaching %s to %s\n", spychan->name, chan->name);
ast_mutex_lock(&chan->lock);
ast_channel_lock(chan);
res = ast_channel_spy_add(chan, spy);
ast_mutex_unlock(&chan->lock);
ast_channel_unlock(chan);
if (!res && ast_test_flag(chan, AST_FLAG_NBRIDGE) && (peer = ast_bridged_channel(chan))) {
if (!res && ast_test_flag(chan, AST_FLAG_NBRIDGE) && (peer = ast_bridged_channel(chan)))
ast_softhangup(peer, AST_SOFTHANGUP_UNBRIDGE);
}
return res;
}
static void stop_spying(struct ast_channel *chan, struct ast_channel_spy *spy)
{
/* If our status has changed, then the channel we're spying on is gone....
DON'T TOUCH IT!!! RUN AWAY!!! */
if (spy->status != CHANSPY_RUNNING)
return;
if (!chan)
return;
ast_mutex_lock(&chan->lock);
ast_channel_spy_remove(chan, spy);
ast_mutex_unlock(&chan->lock);
};
/* Map 'volume' levels from -4 through +4 into
decibel (dB) settings for channel drivers
*/
@@ -246,342 +236,489 @@ static void set_volume(struct ast_channel *chan, struct chanspy_translation_help
if (!ast_channel_setoption(chan, AST_OPTION_TXGAIN, &volume_adjust, sizeof(volume_adjust), 0))
csth->volfactor = 0;
csth->spy.read_vol_adjustment = csth->volfactor;
csth->spy.write_vol_adjustment = csth->volfactor;
}
static int channel_spy(struct ast_channel *chan, struct ast_channel *spyee, int *volfactor, int fd)
static int channel_spy(struct ast_channel *chan, struct ast_channel *spyee, int *volfactor, int fd,
const struct ast_flags *flags)
{
struct chanspy_translation_helper csth;
int running, res = 0, x = 0;
char inp[24];
char *name=NULL;
int running = 0, res, x = 0;
char inp[24] = {0};
char *name;
struct ast_frame *f;
struct ast_silence_generator *silgen = NULL;
running = (chan && !ast_check_hangup(chan) && spyee && !ast_check_hangup(spyee));
if (ast_check_hangup(chan) || ast_check_hangup(spyee))
return 0;
if (running) {
memset(inp, 0, sizeof(inp));
name = ast_strdupa(spyee->name);
if (option_verbose >= 2)
ast_verbose(VERBOSE_PREFIX_2 "Spying on channel %s\n", name);
name = ast_strdupa(spyee->name);
if (option_verbose >= 2)
ast_verbose(VERBOSE_PREFIX_2 "Spying on channel %s\n", name);
memset(&csth, 0, sizeof(csth));
ast_set_flag(&csth.spy, CHANSPY_FORMAT_AUDIO);
ast_set_flag(&csth.spy, CHANSPY_TRIGGER_NONE);
ast_set_flag(&csth.spy, CHANSPY_MIXAUDIO);
csth.spy.type = chanspy_spy_type;
csth.spy.status = CHANSPY_RUNNING;
csth.spy.read_queue.format = AST_FORMAT_SLINEAR;
csth.spy.write_queue.format = AST_FORMAT_SLINEAR;
ast_mutex_init(&csth.spy.lock);
csth.volfactor = *volfactor;
set_volume(chan, &csth);
csth.spy.read_vol_adjustment = csth.volfactor;
csth.spy.write_vol_adjustment = csth.volfactor;
csth.fd = fd;
if (start_spying(spyee, chan, &csth.spy))
running = 0;
memset(&csth, 0, sizeof(csth));
ast_set_flag(&csth.spy, CHANSPY_FORMAT_AUDIO);
ast_set_flag(&csth.spy, CHANSPY_TRIGGER_NONE);
ast_set_flag(&csth.spy, CHANSPY_MIXAUDIO);
csth.spy.type = "ChanSpy";
csth.spy.status = CHANSPY_RUNNING;
csth.spy.read_queue.format = AST_FORMAT_SLINEAR;
csth.spy.write_queue.format = AST_FORMAT_SLINEAR;
ast_mutex_init(&csth.spy.lock);
csth.volfactor = *volfactor;
set_volume(chan, &csth);
csth.fd = fd;
if (start_spying(spyee, chan, &csth.spy)) {
ast_mutex_destroy(&csth.spy.lock);
return 0;
}
if (running) {
running = 1;
if (ast_test_flag(flags, OPTION_WHISPER)) {
struct ast_filestream *beepstream;
ast_channel_whisper_start(csth.spy.chan);
if ((beepstream = ast_openstream_full(chan, "beep", chan->language, 1))) {
struct ast_frame *f;
while ((f = ast_readframe(beepstream))) {
ast_channel_whisper_feed(csth.spy.chan, f);
ast_frfree(f);
}
ast_closestream(beepstream);
}
}
if (ast_test_flag(flags, OPTION_PRIVATE))
silgen = ast_channel_start_silence_generator(chan);
else
ast_activate_generator(chan, &spygen, &csth);
while (csth.spy.status == CHANSPY_RUNNING &&
chan && !ast_check_hangup(chan) &&
spyee &&
!ast_check_hangup(spyee) &&
running == 1 &&
(res = ast_waitfor(chan, -1) > -1)) {
if ((f = ast_read(chan))) {
res = 0;
if (f->frametype == AST_FRAME_DTMF) {
res = f->subclass;
}
ast_frfree(f);
if (!res) {
continue;
}
} else {
/* We can no longer rely on 'spyee' being an actual channel;
it can be hung up and freed out from under us. However, the
channel destructor will put NULL into our csth.spy.chan
field when that happens, so that is our signal that the spyee
channel has gone away.
*/
/* Note: it is very important that the ast_waitfor() be the first
condition in this expression, so that if we wait for some period
of time before receiving a frame from our spying channel, we check
for hangup on the spied-on channel _after_ knowing that a frame
has arrived, since the spied-on channel could have gone away while
we were waiting
*/
while ((res = ast_waitfor(chan, -1) > -1) &&
csth.spy.status == CHANSPY_RUNNING &&
csth.spy.chan) {
if (!(f = ast_read(chan)) || ast_check_hangup(chan)) {
running = -1;
break;
}
if (ast_test_flag(flags, OPTION_WHISPER) &&
(f->frametype == AST_FRAME_VOICE)) {
ast_channel_whisper_feed(csth.spy.chan, f);
ast_frfree(f);
continue;
}
res = (f->frametype == AST_FRAME_DTMF) ? f->subclass : 0;
ast_frfree(f);
if (!res)
continue;
if (x == sizeof(inp))
x = 0;
if (res < 0) {
running = -1;
break;
}
if (res == '*') {
running = 0;
break;
} else if (res == '#') {
if (!ast_strlen_zero(inp)) {
running = atoi(inp);
break;
}
if (x == sizeof(inp)) {
x = 0;
}
if (res < 0) {
running = -1;
}
if (res == 0) {
continue;
} else if (res == '*') {
running = 0;
} else if (res == '#') {
if (!ast_strlen_zero(inp)) {
running = x ? atoi(inp) : -1;
break;
} else {
(*volfactor)++;
if (*volfactor > 4) {
*volfactor = -4;
}
if (option_verbose > 2) {
ast_verbose(VERBOSE_PREFIX_3 "Setting spy volume on %s to %d\n", chan->name, *volfactor);
}
csth.volfactor = *volfactor;
set_volume(chan, &csth);
csth.spy.read_vol_adjustment = csth.volfactor;
csth.spy.write_vol_adjustment = csth.volfactor;
}
} else if (res >= 48 && res <= 57) {
inp[x++] = res;
}
}
ast_deactivate_generator(chan);
stop_spying(spyee, &csth.spy);
if (option_verbose >= 2) {
ast_verbose(VERBOSE_PREFIX_2 "Done Spying on channel %s\n", name);
(*volfactor)++;
if (*volfactor > 4)
*volfactor = -4;
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Setting spy volume on %s to %d\n", chan->name, *volfactor);
csth.volfactor = *volfactor;
set_volume(chan, &csth);
} else if (res >= '0' && res <= '9') {
inp[x++] = res;
}
} else {
running = 0;
}
ast_mutex_destroy(&csth.spy.lock);
if (ast_test_flag(flags, OPTION_WHISPER) && csth.spy.chan)
ast_channel_whisper_stop(csth.spy.chan);
if (ast_test_flag(flags, OPTION_PRIVATE))
ast_channel_stop_silence_generator(chan, silgen);
else
ast_deactivate_generator(chan);
/* If a channel still exists on our spy structure then we need to remove ourselves */
if (csth.spy.chan) {
csth.spy.status = CHANSPY_DONE;
ast_channel_lock(csth.spy.chan);
ast_channel_spy_remove(csth.spy.chan, &csth.spy);
ast_channel_unlock(csth.spy.chan);
}
ast_channel_spy_free(&csth.spy);
if (option_verbose >= 2)
ast_verbose(VERBOSE_PREFIX_2 "Done Spying on channel %s\n", name);
return running;
}
static int chanspy_exec(struct ast_channel *chan, void *data)
static struct ast_channel *next_channel(const struct ast_channel *last, const char *spec,
const char *exten, const char *context)
{
struct localuser *u;
struct ast_channel *peer=NULL, *prev=NULL;
char name[AST_NAME_STRLEN],
peer_name[AST_NAME_STRLEN + 5],
*args,
*ptr = NULL,
*options = NULL,
*spec = NULL,
*argv[5],
*mygroup = NULL,
*recbase = NULL;
int res = -1,
volfactor = 0,
silent = 0,
argc = 0,
bronly = 0,
chosen = 0,
count=0,
waitms = 100,
num = 0,
oldrf = 0,
oldwf = 0,
fd = 0;
struct ast_flags flags;
struct ast_channel *this;
redo:
if (spec)
this = ast_walk_channel_by_name_prefix_locked(last, spec, strlen(spec));
else if (exten)
this = ast_walk_channel_by_exten_locked(last, exten, context);
else
this = ast_channel_walk_locked(last);
if (this) {
ast_channel_unlock(this);
if (!strncmp(this->name, "Zap/pseudo", 10))
goto redo;
}
return this;
}
static int common_exec(struct ast_channel *chan, const struct ast_flags *flags,
int volfactor, const int fd, const char *mygroup, const char *spec,
const char *exten, const char *context)
{
struct ast_channel *peer, *prev, *next;
char nameprefix[AST_NAME_STRLEN];
char peer_name[AST_NAME_STRLEN + 5];
signed char zero_volume = 0;
int waitms;
int res;
char *ptr;
int num;
if (!(args = ast_strdupa((char *)data))) {
ast_log(LOG_ERROR, "Out of memory!\n");
return -1;
}
LOCAL_USER_ADD(u);
oldrf = chan->readformat;
oldwf = chan->writeformat;
if (ast_set_read_format(chan, AST_FORMAT_SLINEAR) < 0) {
ast_log(LOG_ERROR, "Could Not Set Read Format.\n");
LOCAL_USER_REMOVE(u);
return -1;
}
if (ast_set_write_format(chan, AST_FORMAT_SLINEAR) < 0) {
ast_log(LOG_ERROR, "Could Not Set Write Format.\n");
LOCAL_USER_REMOVE(u);
return -1;
}
ast_answer(chan);
if (chan->_state != AST_STATE_UP)
ast_answer(chan);
ast_set_flag(chan, AST_FLAG_SPYING); /* so nobody can spy on us while we are spying */
if ((argc = ast_app_separate_args(args, '|', argv, sizeof(argv) / sizeof(argv[0])))) {
spec = argv[0];
if ( argc > 1) {
options = argv[1];
}
if (ast_strlen_zero(spec) || !strcmp(spec, "all")) {
spec = NULL;
}
}
if (options) {
char *opts[OPT_ARG_ARRAY_SIZE];
ast_app_parse_options(chanspy_opts, &flags, opts, options);
if (ast_test_flag(&flags, OPTION_GROUP)) {
mygroup = opts[1];
}
if (ast_test_flag(&flags, OPTION_RECORD)) {
if (!(recbase = opts[2])) {
recbase = "chanspy";
}
}
silent = ast_test_flag(&flags, OPTION_QUIET);
bronly = ast_test_flag(&flags, OPTION_BRIDGED);
if (ast_test_flag(&flags, OPTION_VOLUME) && opts[1]) {
int vol;
waitms = 100;
if ((sscanf(opts[0], "%d", &vol) != 1) || (vol > 4) || (vol < -4))
ast_log(LOG_NOTICE, "Volume factor must be a number between -4 and 4\n");
else
volfactor = vol;
}
}
if (recbase) {
char filename[512];
snprintf(filename,sizeof(filename),"%s/%s.%ld.raw",ast_config_AST_MONITOR_DIR, recbase, time(NULL));
if ((fd = open(filename, O_CREAT | O_WRONLY, O_TRUNC)) <= 0) {
ast_log(LOG_WARNING, "Cannot open %s for recording\n", filename);
fd = 0;
}
}
for(;;) {
if (!silent) {
for (;;) {
if (!ast_test_flag(flags, OPTION_QUIET)) {
res = ast_streamfile(chan, "beep", chan->language);
if (!res)
res = ast_waitstream(chan, "");
if (res < 0) {
else if (res < 0) {
ast_clear_flag(chan, AST_FLAG_SPYING);
break;
}
}
count = 0;
res = ast_waitfordigit(chan, waitms);
if (res < 0) {
ast_clear_flag(chan, AST_FLAG_SPYING);
break;
}
peer = local_channel_walk(NULL);
prev=NULL;
while(peer) {
if (peer != chan) {
char *group = NULL;
int igrp = 1;
/* reset for the next loop around, unless overridden later */
waitms = 100;
peer = prev = next = NULL;
if (peer == prev && !chosen) {
break;
}
chosen = 0;
group = pbx_builtin_getvar_helper(peer, "SPYGROUP");
if (mygroup) {
if (!group || strcmp(mygroup, group)) {
igrp = 0;
}
for (peer = next_channel(peer, spec, exten, context);
peer;
prev = peer, peer = next ? next : next_channel(peer, spec, exten, context), next = NULL) {
const char *group;
int igrp = !mygroup;
char *groups[25];
int num_groups = 0;
char *dup_group;
int x;
char *s;
if (peer == prev)
break;
if (peer == chan)
continue;
if (ast_test_flag(flags, OPTION_BRIDGED) && !ast_bridged_channel(peer))
continue;
if (ast_check_hangup(peer) || ast_test_flag(peer, AST_FLAG_SPYING))
continue;
if (mygroup) {
if ((group = pbx_builtin_getvar_helper(peer, "SPYGROUP"))) {
dup_group = ast_strdupa(group);
num_groups = ast_app_separate_args(dup_group, ':', groups,
sizeof(groups) / sizeof(groups[0]));
}
if (igrp && (!spec || ((strlen(spec) < strlen(peer->name) &&
!strncasecmp(peer->name, spec, strlen(spec)))))) {
if (peer && (!bronly || ast_bridged_channel(peer)) &&
!ast_check_hangup(peer) && !ast_test_flag(peer, AST_FLAG_SPYING)) {
int x = 0;
strncpy(peer_name, "spy-", 5);
strncpy(peer_name + strlen(peer_name), peer->name, AST_NAME_STRLEN);
ptr = strchr(peer_name, '/');
*ptr = '\0';
ptr++;
for (x = 0 ; x < strlen(peer_name) ; x++) {
if (peer_name[x] == '/') {
break;
}
peer_name[x] = tolower(peer_name[x]);
}
if (!silent) {
if (ast_fileexists(peer_name, NULL, NULL) != -1) {
res = ast_streamfile(chan, peer_name, chan->language);
if (!res)
res = ast_waitstream(chan, "");
if (res)
break;
} else
res = ast_say_character_str(chan, peer_name, "", chan->language);
if ((num=atoi(ptr)))
ast_say_digits(chan, atoi(ptr), "", chan->language);
}
count++;
prev = peer;
res = channel_spy(chan, peer, &volfactor, fd);
if (res == -1) {
break;
} else if (res > 1 && spec) {
snprintf(name, AST_NAME_STRLEN, "%s/%d", spec, res);
if ((peer = local_get_channel_begin_name(name))) {
chosen = 1;
}
continue;
}
for (x = 0; x < num_groups; x++) {
if (!strcmp(mygroup, groups[x])) {
igrp = 1;
break;
}
}
}
if ((peer = local_channel_walk(peer)) == NULL) {
if (!igrp)
continue;
strcpy(peer_name, "spy-");
strncat(peer_name, peer->name, AST_NAME_STRLEN);
ptr = strchr(peer_name, '/');
*ptr++ = '\0';
for (s = peer_name; s < ptr; s++)
*s = tolower(*s);
if (!ast_test_flag(flags, OPTION_QUIET)) {
if (ast_fileexists(peer_name, NULL, NULL) != -1) {
res = ast_streamfile(chan, peer_name, chan->language);
if (!res)
res = ast_waitstream(chan, "");
if (res)
break;
} else
res = ast_say_character_str(chan, peer_name, "", chan->language);
if ((num = atoi(ptr)))
ast_say_digits(chan, atoi(ptr), "", chan->language);
}
waitms = 5000;
res = channel_spy(chan, peer, &volfactor, fd, flags);
if (res == -1) {
break;
} else if (res > 1 && spec) {
snprintf(nameprefix, AST_NAME_STRLEN, "%s/%d", spec, res);
if ((next = ast_get_channel_by_name_prefix_locked(nameprefix, strlen(nameprefix)))) {
ast_channel_unlock(next);
} else {
/* stay on this channel */
next = peer;
}
peer = NULL;
}
}
waitms = count ? 100 : 5000;
if (res == -1)
break;
}
if (fd > 0) {
close(fd);
}
if (oldrf && ast_set_read_format(chan, oldrf) < 0) {
ast_log(LOG_ERROR, "Could Not Set Read Format.\n");
}
if (oldwf && ast_set_write_format(chan, oldwf) < 0) {
ast_log(LOG_ERROR, "Could Not Set Write Format.\n");
}
ast_clear_flag(chan, AST_FLAG_SPYING);
ast_channel_setoption(chan, AST_OPTION_TXGAIN, &zero_volume, sizeof(zero_volume), 0);
ALL_DONE(u, res);
return res;
}
int unload_module(void)
static int chanspy_exec(struct ast_channel *chan, void *data)
{
struct ast_module_user *u;
char *options = NULL;
char *spec = NULL;
char *argv[2];
char *mygroup = NULL;
char *recbase = NULL;
int fd = 0;
struct ast_flags flags;
int oldwf = 0;
int argc = 0;
int volfactor = 0;
int res;
res = ast_unregister_application(app);
data = ast_strdupa(data);
STANDARD_HANGUP_LOCALUSERS;
u = ast_module_user_add(chan);
if ((argc = ast_app_separate_args(data, '|', argv, sizeof(argv) / sizeof(argv[0])))) {
spec = argv[0];
if (argc > 1)
options = argv[1];
if (ast_strlen_zero(spec) || !strcmp(spec, "all"))
spec = NULL;
}
if (options) {
char *opts[OPT_ARG_ARRAY_SIZE];
ast_app_parse_options(spy_opts, &flags, opts, options);
if (ast_test_flag(&flags, OPTION_GROUP))
mygroup = opts[OPT_ARG_GROUP];
if (ast_test_flag(&flags, OPTION_RECORD) &&
!(recbase = opts[OPT_ARG_RECORD]))
recbase = "chanspy";
if (ast_test_flag(&flags, OPTION_VOLUME) && opts[OPT_ARG_VOLUME]) {
int vol;
if ((sscanf(opts[OPT_ARG_VOLUME], "%d", &vol) != 1) || (vol > 4) || (vol < -4))
ast_log(LOG_NOTICE, "Volume factor must be a number between -4 and 4\n");
else
volfactor = vol;
}
if (ast_test_flag(&flags, OPTION_PRIVATE))
ast_set_flag(&flags, OPTION_WHISPER);
}
oldwf = chan->writeformat;
if (ast_set_write_format(chan, AST_FORMAT_SLINEAR) < 0) {
ast_log(LOG_ERROR, "Could Not Set Write Format.\n");
ast_module_user_remove(u);
return -1;
}
if (recbase) {
char filename[512];
snprintf(filename, sizeof(filename), "%s/%s.%d.raw", ast_config_AST_MONITOR_DIR, recbase, (int) time(NULL));
if ((fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0644)) <= 0) {
ast_log(LOG_WARNING, "Cannot open '%s' for recording\n", filename);
fd = 0;
}
}
res = common_exec(chan, &flags, volfactor, fd, mygroup, spec, NULL, NULL);
if (fd)
close(fd);
if (oldwf && ast_set_write_format(chan, oldwf) < 0)
ast_log(LOG_ERROR, "Could Not Set Write Format.\n");
ast_module_user_remove(u);
return res;
}
int load_module(void)
{
return ast_register_application(app, chanspy_exec, synopsis, desc);
}
char *description(void)
{
return (char *) synopsis;
}
int usecount(void)
static int extenspy_exec(struct ast_channel *chan, void *data)
{
struct ast_module_user *u;
char *options = NULL;
char *exten = NULL;
char *context = NULL;
char *argv[2];
char *mygroup = NULL;
char *recbase = NULL;
int fd = 0;
struct ast_flags flags;
int oldwf = 0;
int argc = 0;
int volfactor = 0;
int res;
STANDARD_USECOUNT(res);
data = ast_strdupa(data);
u = ast_module_user_add(chan);
if ((argc = ast_app_separate_args(data, '|', argv, sizeof(argv) / sizeof(argv[0])))) {
context = argv[0];
exten = strsep(&context, "@");
if (ast_strlen_zero(context))
context = ast_strdupa(chan->context);
if (argc > 1)
options = argv[1];
}
if (options) {
char *opts[OPT_ARG_ARRAY_SIZE];
ast_app_parse_options(spy_opts, &flags, opts, options);
if (ast_test_flag(&flags, OPTION_GROUP))
mygroup = opts[OPT_ARG_GROUP];
if (ast_test_flag(&flags, OPTION_RECORD) &&
!(recbase = opts[OPT_ARG_RECORD]))
recbase = "chanspy";
if (ast_test_flag(&flags, OPTION_VOLUME) && opts[OPT_ARG_VOLUME]) {
int vol;
if ((sscanf(opts[OPT_ARG_VOLUME], "%d", &vol) != 1) || (vol > 4) || (vol < -4))
ast_log(LOG_NOTICE, "Volume factor must be a number between -4 and 4\n");
else
volfactor = vol;
}
if (ast_test_flag(&flags, OPTION_PRIVATE))
ast_set_flag(&flags, OPTION_WHISPER);
}
oldwf = chan->writeformat;
if (ast_set_write_format(chan, AST_FORMAT_SLINEAR) < 0) {
ast_log(LOG_ERROR, "Could Not Set Write Format.\n");
ast_module_user_remove(u);
return -1;
}
if (recbase) {
char filename[512];
snprintf(filename, sizeof(filename), "%s/%s.%d.raw", ast_config_AST_MONITOR_DIR, recbase, (int) time(NULL));
if ((fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0644)) <= 0) {
ast_log(LOG_WARNING, "Cannot open '%s' for recording\n", filename);
fd = 0;
}
}
res = common_exec(chan, &flags, volfactor, fd, mygroup, NULL, exten, context);
if (fd)
close(fd);
if (oldwf && ast_set_write_format(chan, oldwf) < 0)
ast_log(LOG_ERROR, "Could Not Set Write Format.\n");
ast_module_user_remove(u);
return res;
}
char *key()
static int unload_module(void)
{
return ASTERISK_GPL_KEY;
int res = 0;
res |= ast_unregister_application(app_chan);
res |= ast_unregister_application(app_ext);
ast_module_user_hangup_all();
return res;
}
static int load_module(void)
{
int res = 0;
res |= ast_register_application(app_chan, chanspy_exec, tdesc, desc_chan);
res |= ast_register_application(app_ext, extenspy_exec, tdesc, desc_ext);
return res;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Listen to the audio of an active channel");

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

@@ -17,19 +17,22 @@
*/
/*! \file
*
* \brief Trivial application to control playback of a sound file
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -41,8 +44,6 @@ 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";
@@ -65,9 +66,6 @@ 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)
{
@@ -78,7 +76,7 @@ static int controlplayback_exec(struct ast_channel *chan, void *data)
{
int res = 0, priority_jump = 0;
int skipms = 0;
struct localuser *u;
struct ast_module_user *u;
char *tmp;
int argc;
char *argv[8];
@@ -98,7 +96,7 @@ static int controlplayback_exec(struct ast_channel *chan, void *data)
return -1;
}
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
tmp = ast_strdupa(data);
memset(argv, 0, sizeof(argv));
@@ -107,7 +105,7 @@ static int controlplayback_exec(struct ast_channel *chan, void *data)
if (argc < 1) {
ast_log(LOG_WARNING, "ControlPlayback requires an argument (filename)\n");
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
@@ -139,8 +137,8 @@ static int controlplayback_exec(struct ast_channel *chan, void *data)
pbx_builtin_setvar_helper(chan, "CPLAYBACKSTATUS", "USERSTOPPED");
} else {
if (res < 0) {
if (priority_jump || option_priority_jumping) {
if (!ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101)) {
if (priority_jump || ast_opt_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");
}
}
@@ -150,41 +148,21 @@ static int controlplayback_exec(struct ast_channel *chan, void *data)
pbx_builtin_setvar_helper(chan, "CPLAYBACKSTATUS", "SUCCESS");
}
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return res;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
return res;
}
int load_module(void)
static int load_module(void)
{
return ast_register_application(app, controlplayback_exec, synopsis, descrip);
}
char *description(void)
{
return (char *) tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Control Playback Application");

View File

@@ -1,471 +0,0 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (c) 2003 Tilghman Lesher. All rights reserved.
*
* Tilghman Lesher <app_cut__v003@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 Cut application
*
* \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"
#include "asterisk/version.h"
#include "asterisk/app.h"
/* 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 applicaiton 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 applicaiton has been deprecated in favor of the SORT function.\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
struct sortable_keys {
char *key;
float value;
};
static int sort_subroutine(const void *arg1, const void *arg2)
{
const struct sortable_keys *one=arg1, *two=arg2;
if (one->value < two->value) {
return -1;
} else if (one->value == two->value) {
return 0;
} else {
return 1;
}
}
#define ERROR_NOARG (-1)
#define ERROR_NOMEM (-2)
#define ERROR_USAGE (-3)
static int sort_internal(struct ast_channel *chan, char *data, char *buffer, size_t buflen)
{
char *strings, *ptrkey, *ptrvalue;
int count=1, count2, element_count=0;
struct sortable_keys *sortable_keys;
memset(buffer, 0, buflen);
if (!data) {
return ERROR_NOARG;
}
strings = ast_strdupa((char *)data);
if (!strings) {
return ERROR_NOMEM;
}
for (ptrkey = strings; *ptrkey; 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));
/* Parse each into a struct */
count2 = 0;
while ((ptrkey = strsep(&strings, "|"))) {
ptrvalue = index(ptrkey, ':');
if (!ptrvalue) {
count--;
continue;
}
*ptrvalue = '\0';
ptrvalue++;
sortable_keys[count2].key = ptrkey;
sscanf(ptrvalue, "%f", &sortable_keys[count2].value);
count2++;
}
/* Sort the structs */
qsort(sortable_keys, count, sizeof(struct sortable_keys), sort_subroutine);
for (count2 = 0; count2 < count; count2++) {
int blen = strlen(buffer);
if (element_count++) {
strncat(buffer + blen, ",", buflen - blen - 1);
}
strncat(buffer + blen + 1, sortable_keys[count2].key, buflen - blen - 2);
}
return 0;
}
static int cut_internal(struct ast_channel *chan, char *data, char *buffer, size_t buflen)
{
char *s, *args[3], *varname=NULL, *delimiter=NULL, *field=NULL;
int args_okay = 0;
memset(buffer, 0, buflen);
/* Check and parse arguments */
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(varname) + 4);
char varvalue[MAXRESULT], *tmp2=varvalue;
if (tmp) {
snprintf(tmp, strlen(varname) + 4, "${%s}", varname);
memset(varvalue, 0, sizeof(varvalue));
} else {
return ERROR_NOMEM;
}
if (delimiter[0])
d = delimiter[0];
else
d = '-';
/* String form of the delimiter, for use with strsep(3) */
snprintf(ds, sizeof(ds), "%c", d);
pbx_substitute_variables_helper(chan, tmp, tmp2, MAXRESULT - 1);
if (tmp2) {
int curfieldnum = 1;
while ((tmp2 != NULL) && (field != NULL)) {
char *nextgroup = strsep(&field, "&");
int num1 = 0, num2 = MAXRESULT;
char trashchar;
if (sscanf(nextgroup, "%d-%d", &num1, &num2) == 2) {
/* range with both start and end */
} else if (sscanf(nextgroup, "-%d", &num2) == 1) {
/* range with end */
num1 = 0;
} else if ((sscanf(nextgroup, "%d%c", &num1, &trashchar) == 2) && (trashchar == '-')) {
/* range with start */
num2 = MAXRESULT;
} else if (sscanf(nextgroup, "%d", &num1) == 1) {
/* single number */
num2 = num1;
} else {
return ERROR_USAGE;
}
/* Get to start, if any */
if (num1 > 0) {
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)) {
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)) {
char *tmp3 = strsep(&tmp2, ds);
int curlen = strlen(buffer);
if (curlen) {
snprintf(buffer + curlen, buflen - curlen, "%c%s", d, tmp3);
} else {
snprintf(buffer, buflen, "%s", tmp3);
}
curfieldnum++;
}
}
}
}
return 0;
}
static int sort_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct localuser *u;
char *varname, *strings, result[512] = "";
static int dep_warning=0;
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:
ast_log(LOG_ERROR, "SORT() requires an argument\n");
break;
case ERROR_NOMEM:
ast_log(LOG_ERROR, "Out of memory\n");
break;
case 0:
break;
default:
ast_log(LOG_ERROR, "Unknown internal error\n");
}
LOCAL_USER_REMOVE(u);
return buf;
}
static char *acf_cut_exec(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
{
struct localuser *u;
LOCAL_USER_ACF_ADD(u);
switch (cut_internal(chan, data, buf, len)) {
case ERROR_NOARG:
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: %s\n", cut_synopsis);
break;
case 0:
break;
default:
ast_log(LOG_ERROR, "Unknown internal error\n");
}
LOCAL_USER_REMOVE(u);
return buf;
}
struct ast_custom_function acf_sort = {
.name = "SORT",
.synopsis = "Sorts a list of key/vals into a list of keys, based upon the vals",
.syntax = "SORT(key1:val1[...][,keyN:valN])",
.desc =
"Takes a comma-separated list of keys and values, each separated by a colon, and returns a\n"
"comma-separated list of the keys, sorted by their values. Values will be evaluated as\n"
"floating-point numbers.\n",
.read = acf_sort_exec,
};
struct ast_custom_function acf_cut = {
.name = "CUT",
.synopsis = "Slices and dices strings, based upon a named delimiter.",
.syntax = "CUT(<varname>,<char-delim>,<range-spec>)",
.desc =
" varname - variable you want cut\n"
" char-delim - defaults to '-'\n"
" range-spec - 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",
.read = acf_cut_exec,
};
int unload_module(void)
{
int res;
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);
STANDARD_HANGUP_LOCALUSERS;
return res;
}
int load_module(void)
{
int res;
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;
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

View File

@@ -1,101 +0,0 @@
/*
* 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;
}

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

@@ -22,19 +22,22 @@
*
* \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"
@@ -45,65 +48,38 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/options.h"
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";
/*! \todo XXX Remove this application after 1.4 is relased */
static char *d_descrip =
" DBdel(family/key): This applicaiton will delete a key from the Asterisk\n"
"database.\n";
"database.\n"
" This application has been DEPRECATED in favor of the DB_DELETE function.\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 localuser *u;
struct ast_module_user *u;
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
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");
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return 0;
}
if (ast_strlen_zero(keytree))
@@ -125,7 +101,7 @@ static int deltree_exec(struct ast_channel *chan, void *data)
ast_verbose(VERBOSE_PREFIX_3 "DBdeltree: Error deleting key from database.\n");
}
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return 0;
}
@@ -133,23 +109,24 @@ 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 localuser *u;
struct ast_module_user *u;
static int deprecation_warning = 0;
LOCAL_USER_ADD(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");
}
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");
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return 0;
}
if (option_verbose > 2)
@@ -162,162 +139,29 @@ static int del_exec(struct ast_channel *chan, void *data)
ast_log(LOG_DEBUG, "Ignoring, no parameters\n");
}
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return 0;
}
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)
static 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;
}
int load_module(void)
static int load_module(void)
{
int retval;
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(d_app, del_exec, d_synopsis, d_descrip);
retval |= ast_register_application(dt_app, deltree_exec, dt_synopsis, dt_descrip);
return retval;
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Database Access Functions");

1527
apps/app_dial.c Executable file → Normal file

File diff suppressed because it is too large Load Diff

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

@@ -22,18 +22,20 @@
*
* \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> /* for mkdir */
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <sys/stat.h>
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -44,16 +46,12 @@ 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>])\n"
static char *desc = " Dictate([<base_dir>[|<filename>]])\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),
@@ -80,16 +78,20 @@ static int play_and_wait(struct ast_channel *chan, char *file, char *digits)
static int dictate_exec(struct ast_channel *chan, void *data)
{
char *mydata, *argv[2], *path = NULL, filein[256];
char *path = NULL, filein[256], *filename = "";
char *parse;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(base);
AST_APP_ARG(filename);
);
char dftbase[256];
char *base;
struct ast_flags flags = {0};
struct ast_filestream *fs;
struct ast_frame *f = NULL;
struct localuser *u;
struct ast_module_user *u;
int ffactor = 320 * 80,
res = 0,
argc = 0,
done = 0,
oldr = 0,
lastop = 0,
@@ -100,35 +102,43 @@ static int dictate_exec(struct ast_channel *chan, void *data)
maxlen = 0,
mode = 0;
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
snprintf(dftbase, sizeof(dftbase), "%s/dictate", ast_config_AST_SPOOL_DIR);
if (!ast_strlen_zero(data) && (mydata = ast_strdupa(data))) {
argc = ast_app_separate_args(mydata, '|', argv, sizeof(argv) / sizeof(argv[0]));
}
if (!ast_strlen_zero(data)) {
parse = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, parse);
} else
args.argc = 0;
if (argc) {
base = argv[0];
if (args.argc && !ast_strlen_zero(args.base)) {
base = args.base;
} 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");
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
ast_answer(chan);
ast_safe_sleep(chan, 200);
for(res = 0; !res;) {
if (ast_app_getdata(chan, "dictate/enter_filename", filein, sizeof(filein), 0) ||
ast_strlen_zero(filein)) {
res = -1;
break;
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 = "";
}
mkdir(base, 0755);
len = strlen(base) + strlen(filein) + 2;
if (!path || len > maxlen) {
@@ -319,40 +329,20 @@ static int dictate_exec(struct ast_channel *chan, void *data)
if (oldr) {
ast_set_read_format(chan, oldr);
}
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return res;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
return res;
}
int load_module(void)
static int load_module(void)
{
return ast_register_application(app, dictate_exec, synopsis, desc);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Virtual Dictation Machine");

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

@@ -3,7 +3,7 @@
*
* Copyright (C) 2005, Joshua Colp
*
* Joshua Colp <jcolp@asterlink.com>
* Joshua Colp <jcolp@digium.com>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
@@ -20,18 +20,20 @@
*
* \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"
@@ -40,128 +42,126 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/app.h"
static const char *tdesc = "Directed Call Pickup Application";
#define PICKUPMARK "PICKUPMARK"
static const char *app = "Pickup";
static const char *synopsis = "Directed Call Pickup";
static const char *descrip =
" Pickup(extension[@context]): This application can pickup any ringing channel\n"
" Pickup(extension[@context][&extension2@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.\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 context\n"
"as \"extension\".";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int pickup_exec(struct ast_channel *chan, void *data)
{
int res = 0;
struct localuser *u = NULL;
struct ast_module_user *u = NULL;
struct ast_channel *origin = NULL, *target = NULL;
char *tmp = NULL, *exten = NULL, *context = NULL;
char *tmp = NULL, *exten = NULL, *context = NULL, *rest=data;
char workspace[256] = "";
const char *tmp2 = NULL;
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "Pickup requires an argument (extension) !\n");
return -1;
}
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
/* Get the extension and context if present */
exten = data;
context = strchr(data, '@');
if (context) {
*context = '\0';
context++;
}
while (!target && (exten = rest) ) {
res = 0;
rest = strchr(exten, '&');
if (rest)
*rest++ = 0;
/* Find a channel to pickup */
origin = ast_get_channel_by_exten_locked(exten, context);
if (origin) {
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);
/* Get the extension and context if present */
context = strchr(exten, '@');
if (context)
*context++ = '\0';
/* If the context is the pickup mark, iterate through all channels finding the right origin one */
if (context && !strcmp(context, PICKUPMARK)) {
while ((origin = ast_channel_walk_locked(origin))) {
if (origin) {
tmp2 = pbx_builtin_getvar_helper(origin, PICKUPMARK);
if (tmp2 && !strcmp(tmp2, exten))
break;
ast_mutex_unlock(&origin->lock);
}
}
} else {
ast_log(LOG_DEBUG, "No target channel found.\n");
res = -1;
/* Use the classic mode of searching */
origin = ast_get_channel_by_exten_locked(exten, context);
}
ast_mutex_unlock(&origin->lock);
} else {
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;
if (origin) {
ast_cdr_getvar(origin->cdr, "dstchannel", &tmp, workspace,
sizeof(workspace), 0, 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_NOTICE, "No target channel found for %s.\n", exten);
res = -1;
}
ast_mutex_unlock(&origin->lock);
} else {
ast_log(LOG_DEBUG, "No originating channel found.\n");
}
res = ast_queue_control(chan, AST_CONTROL_ANSWER);
if (res) {
ast_log(LOG_WARNING, "Unable to queue answer on '%s'\n",
chan->name);
if (res)
continue;
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;
break;
}
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;
break;
}
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;
break;
}
} else {
ast_log(LOG_NOTICE, "No call pickup possible for %s...\n", exten);
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);
ast_module_user_remove(u);
return res;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
return res;
}
int load_module(void)
static int load_module(void)
{
return ast_register_application(app, pickup_exec, synopsis, descrip);
}
char *description(void)
{
return (char *) tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Directed Call Pickup Application");

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

@@ -19,19 +19,21 @@
/*! \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"
@@ -41,8 +43,18 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/config.h"
#include "asterisk/say.h"
#include "asterisk/utils.h"
#include "asterisk/app.h"
#ifdef USE_ODBC_STORAGE
#include <errno.h>
#include <sys/mman.h>
#include "asterisk/res_odbc.h"
static char odbc_database[80] = "asterisk";
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";
@@ -51,7 +63,7 @@ static char *descrip =
"the calling channel with a directory of extensions from which they can search\n"
"by name. The list of names and corresponding extensions is retrieved from the\n"
"voicemail configuration file, voicemail.conf.\n"
" This applicaiton will immediate exit if one of the following DTMF digits are\n"
" This application will immediately exit if one of the following DTMF digits are\n"
"received and the extension to jump to exists:\n"
" 0 - Jump to the 'o' extension, if it exists.\n"
" * - Jump to the 'a' extension, if it exists.\n\n"
@@ -62,8 +74,10 @@ 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 */
@@ -73,15 +87,107 @@ static char *descrip =
/* How many digits to read in */
#define NUMDIGITS 3
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
#ifdef USE_ODBC_STORAGE
static void retrieve_file(char *dir)
{
int x = 0;
int res;
int fd=-1;
size_t fdlen = 0;
void *fdm=NULL;
SQLHSTMT stmt;
char sql[256];
char fmt[80]="";
char *c;
SQLLEN colsize;
char full_fn[256];
static char *convert(char *lastname)
odbc_obj *obj;
obj = fetch_odbc_obj(odbc_database, 0);
if (obj) {
do {
ast_copy_string(fmt, vmfmts, sizeof(fmt));
c = strchr(fmt, '|');
if (c)
*c = '\0';
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);
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);
if (res == SQL_NO_DATA) {
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
break;
} else 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);
break;
}
fd = open(full_fn, O_RDWR | O_CREAT | O_TRUNC, 0770);
if (fd < 0) {
ast_log(LOG_WARNING, "Failed to write '%s': %s\n", full_fn, strerror(errno));
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
break;
}
res = SQLGetData(stmt, 1, SQL_BINARY, NULL, 0, &colsize);
fdlen = colsize;
if (fd > -1) {
char tmp[1]="";
lseek(fd, fdlen - 1, SEEK_SET);
if (write(fd, tmp, 1) != 1) {
close(fd);
fd = -1;
break;
}
if (fd > -1)
fdm = mmap(NULL, fdlen, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
}
if (fdm) {
memset(fdm, 0, fdlen);
res = SQLGetData(stmt, x + 1, SQL_BINARY, fdm, fdlen, &colsize);
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);
break;
}
}
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
} while (0);
} else
ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
if (fdm)
munmap(fdm, fdlen);
if (fd > -1)
close(fd);
return;
}
#endif
static char *convert(const char *lastname)
{
char *tmp;
int lcount = 0;
tmp = malloc(NUMDIGITS + 1);
tmp = ast_malloc(NUMDIGITS + 1);
if (tmp) {
while((*lastname > 32) && lcount < NUMDIGITS) {
switch(toupper(*lastname)) {
@@ -151,80 +257,80 @@ static char *convert(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) {
static int play_mailbox_owner(struct ast_channel *chan, char *context,
char *dialcontext, char *ext, char *name, int readext,
int fromappvm)
{
int res = 0;
int loop = 3;
int loop;
char fn[256];
char fn2[256];
/* Check for the VoiceMail2 greeting first */
snprintf(fn, sizeof(fn), "%s/voicemail/%s/%s/greet",
(char *)ast_config_AST_SPOOL_DIR, context, ext);
ast_config_AST_SPOOL_DIR, context, ext);
#ifdef USE_ODBC_STORAGE
retrieve_file(fn);
#endif
/* Otherwise, check for an old-style Voicemail greeting */
snprintf(fn2, sizeof(fn2), "%s/vm/%s/greet",
(char *)ast_config_AST_SPOOL_DIR, ext);
if (ast_fileexists(fn, NULL, chan->language) <= 0) {
/* no file, check for an old-style Voicemail greeting */
snprintf(fn, sizeof(fn), "%s/vm/%s/greet",
ast_config_AST_SPOOL_DIR, ext);
}
#ifdef USE_ODBC_STORAGE
retrieve_file(fn2);
#endif
if (ast_fileexists(fn, NULL, chan->language) > 0) {
res = ast_streamfile(chan, fn, chan->language);
if (!res) {
res = ast_waitstream(chan, AST_DIGIT_ANY);
}
res = ast_stream_and_wait(chan, fn, chan->language, AST_DIGIT_ANY);
ast_stopstream(chan);
} else if (ast_fileexists(fn2, NULL, chan->language) > 0) {
res = ast_streamfile(chan, fn2, chan->language);
if (!res) {
res = ast_waitstream(chan, AST_DIGIT_ANY);
/* 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);
}
ast_stopstream(chan);
} else {
res = ast_say_character_str(chan, !ast_strlen_zero(name) ? name : ext,
AST_DIGIT_ANY, chan->language);
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);
}
}
#ifdef USE_ODBC_STORAGE
ast_filedelete(fn, NULL);
ast_filedelete(fn2, NULL);
#endif
while (loop) {
if (!res) {
res = ast_streamfile(chan, "dir-instr", chan->language);
}
if (!res) {
res = ast_waitstream(chan, AST_DIGIT_ANY);
}
if (!res) {
for (loop = 3 ; loop > 0; loop--) {
if (!res)
res = ast_stream_and_wait(chan, "dir-instr", chan->language, AST_DIGIT_ANY);
if (!res)
res = ast_waitfordigit(chan, 3000);
}
ast_stopstream(chan);
if (res > -1) {
switch (res) {
case '1':
/* Name selected */
loop = 0;
if (ast_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 < 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;
}
} /* end while */
if (res == '*') /* Skip to next match in list */
break;
/* Not '1', or '*', so decrement number of tries */
res = 0;
}
return(res);
}
@@ -236,8 +342,8 @@ static struct ast_config *realtime_directory(char *context)
struct ast_category *cat;
struct ast_variable *var;
char *mailbox;
char *fullname;
char *hidefromdir;
const char *fullname;
const char *hidefromdir;
char tmp[100];
/* Load flat file config. */
@@ -269,8 +375,8 @@ static struct ast_config *realtime_directory(char *context)
ast_category_append(cfg, cat);
}
mailbox = ast_category_browse(rtdata, NULL);
while (mailbox) {
mailbox = NULL;
while ( (mailbox = ast_category_browse(rtdata, mailbox)) ) {
fullname = ast_variable_retrieve(rtdata, mailbox, "fullname");
hidefromdir = ast_variable_retrieve(rtdata, mailbox, "hidefromdir");
snprintf(tmp, sizeof(tmp), "no-password,%s,hidefromdir=%s",
@@ -281,23 +387,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, char *context, char *dialcontext, char digit, int last)
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)
{
/* Read in the first three digits.. "digit" is the first digit, already read */
char ext[NUMDIGITS + 1];
char ext[NUMDIGITS + 1], *cat;
char name[80] = "";
struct ast_variable *v;
int res;
int found=0;
int lastuserchoice = 0;
char *start, *pos, *conv,*stringp=NULL;
char *start, *conv, *stringp = NULL;
const char *pos;
if (ast_strlen_zero(context)) {
ast_log(LOG_WARNING,
@@ -306,7 +412,7 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char *
return -1;
}
if (digit == '0') {
if (!ast_goto_if_exists(chan, chan->context, "o", 1) ||
if (!ast_goto_if_exists(chan, dialcontext, "o", 1) ||
(!ast_strlen_zero(chan->macrocontext) &&
!ast_goto_if_exists(chan, chan->macrocontext, "o", 1))) {
return 0;
@@ -317,7 +423,7 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char *
}
}
if (digit == '*') {
if (!ast_goto_if_exists(chan, chan->context, "a", 1) ||
if (!ast_goto_if_exists(chan, dialcontext, "a", 1) ||
(!ast_strlen_zero(chan->macrocontext) &&
!ast_goto_if_exists(chan, chan->macrocontext, "a", 1))) {
return 0;
@@ -367,7 +473,7 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char *
if (v) {
/* We have a match -- play a greeting if they have it */
res = play_mailbox_owner(chan, context, dialcontext, v->name, name);
res = play_mailbox_owner(chan, context, dialcontext, v->name, name, readext, fromappvm);
switch (res) {
case -1:
/* user pressed '1' but extension does not exist, or
@@ -394,11 +500,60 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char *
}
}
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;
break;
case '1':
/* user pressed '1' and extensions exists;
play_mailbox_owner will already have done
a goto() on the channel
*/
lastuserchoice = res;
break;
case '*':
/* user pressed '*' to skip something found */
lastuserchoice = res;
res = 0;
break;
default:
break;
}
free(conv);
break;
}
free(conv);
}
}
}
}
if (lastuserchoice != '1') {
if (found)
res = ast_streamfile(chan, "dir-nomore", chan->language);
else
res = ast_streamfile(chan, "dir-nomatch", chan->language);
res = ast_streamfile(chan, found ? "dir-nomore" : "dir-nomatch", chan->language);
if (!res)
res = 1;
return res;
@@ -411,106 +566,113 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char *
static int directory_exec(struct ast_channel *chan, void *data)
{
int res = 0;
struct localuser *u;
struct ast_config *cfg;
struct ast_module_user *u;
struct ast_config *cfg, *ucfg;
int last = 1;
char *context, *dialcontext, *dirintro, *options;
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);
);
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "Directory requires an argument (context[,dialcontext])\n");
return -1;
}
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
context = ast_strdupa(data);
dialcontext = strchr(context, '|');
if (dialcontext) {
*dialcontext = '\0';
dialcontext++;
options = strchr(dialcontext, '|');
if (options) {
*options = '\0';
options++;
if (strchr(options, 'f'))
last = 0;
}
} else
dialcontext = context;
parse = ast_strdupa(data);
cfg = realtime_directory(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);
if (!cfg) {
LOCAL_USER_REMOVE(u);
ast_log(LOG_ERROR, "Unable to read the configuration data!\n");
ast_module_user_remove(u);
return -1;
}
ucfg = ast_config_load("users.conf");
dirintro = ast_variable_retrieve(cfg, context, "directoryintro");
dirintro = ast_variable_retrieve(cfg, args.vmcontext, "directoryintro");
if (ast_strlen_zero(dirintro))
dirintro = ast_variable_retrieve(cfg, "general", "directoryintro");
if (ast_strlen_zero(dirintro)) {
if (last)
dirintro = "dir-intro";
else
dirintro = "dir-intro-fn";
}
if (ast_strlen_zero(dirintro))
dirintro = last ? "dir-intro" : "dir-intro-fn";
if (chan->_state != AST_STATE_UP)
res = ast_answer(chan);
for (;;) {
if (!res)
res = ast_streamfile(chan, dirintro, chan->language);
if (!res)
res = ast_waitstream(chan, AST_DIGIT_ANY);
res = ast_stream_and_wait(chan, dirintro, chan->language, AST_DIGIT_ANY);
ast_stopstream(chan);
if (!res)
res = ast_waitfordigit(chan, 5000);
if (res > 0) {
res = do_directory(chan, cfg, context, dialcontext, res, last);
res = do_directory(chan, cfg, ucfg, args.vmcontext, args.dialcontext, res, last, readext, 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);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return res;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
return res;
}
int load_module(void)
static int load_module(void)
{
#ifdef USE_ODBC_STORAGE
struct ast_config *cfg = ast_config_load(VOICEMAIL_CONFIG);
char *tmp;
if (cfg) {
if ((tmp = ast_variable_retrieve(cfg, "general", "odbcstorage"))) {
ast_copy_string(odbc_database, tmp, sizeof(odbc_database));
}
if ((tmp = ast_variable_retrieve(cfg, "general", "odbctable"))) {
ast_copy_string(odbc_table, tmp, sizeof(odbc_table));
}
if ((tmp = ast_variable_retrieve(cfg, "general", "format"))) {
ast_copy_string(vmfmts, tmp, sizeof(vmfmts));
}
ast_config_destroy(cfg);
} else
ast_log(LOG_WARNING, "Unable to load " VOICEMAIL_CONFIG " - ODBC defaults will be used\n");
#endif
return ast_register_application(app, directory_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Extension Directory");

175
apps/app_disa.c Executable file → Normal file
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,15 +47,14 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/translate.h"
#include "asterisk/ulaw.h"
#include "asterisk/callerid.h"
static char *tdesc = "DISA (Direct Inward System Access) Application";
#include "asterisk/stringfields.h"
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"
@@ -71,7 +70,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 allow specification\n"
"individual passcodes contained in a file. It also allows 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"
@@ -93,11 +92,9 @@ 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.\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";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static void play_dialtone(struct ast_channel *chan, char *mailbox)
{
@@ -114,10 +111,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;
int i,j,k,x,did_ignore,special_noanswer;
int firstdigittimeout = 20000;
int digittimeout = 10000;
struct localuser *u;
struct ast_module_user *u;
char *tmp, exten[AST_MAX_EXTENSION],acctcode[20]="";
char pwline[256];
char ourcidname[256],ourcidnum[256];
@@ -131,14 +128,15 @@ 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;
}
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
if (chan->pbx) {
firstdigittimeout = chan->pbx->rtimeout*1000;
@@ -146,13 +144,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);
LOCAL_USER_REMOVE(u);
ast_log(LOG_WARNING, "Unable to set write format to Mu-law on %s\n", chan->name);
ast_module_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);
LOCAL_USER_REMOVE(u);
ast_log(LOG_WARNING, "Unable to set read format to Mu-law on %s\n", chan->name);
ast_module_user_remove(u);
return -1;
}
@@ -160,11 +158,6 @@ 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);
@@ -175,10 +168,15 @@ static int disa_exec(struct ast_channel *chan, void *data)
ast_log(LOG_DEBUG, "Mailbox: %s\n",args.mailbox);
if (chan->_state != AST_STATE_UP) {
/* answer */
ast_answer(chan);
}
special_noanswer = 0;
if ((!args.noanswer) || strcmp(args.noanswer,"NOANSWER"))
{
if (chan->_state != AST_STATE_UP) {
/* answer */
ast_answer(chan);
}
} else special_noanswer = 1;
i = k = x = 0; /* k is 0 for pswd entry, 1 for ext entry */
did_ignore = 0;
exten[0] = 0;
@@ -198,8 +196,7 @@ 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;
@@ -210,72 +207,68 @@ static int disa_exec(struct ast_channel *chan, void *data)
}
f = ast_read(chan);
if (f == NULL)
{
LOCAL_USER_REMOVE(u);
if (f == NULL) {
ast_module_user_remove(u);
return -1;
}
if ((f->frametype == AST_FRAME_CONTROL) &&
(f->subclass == AST_CONTROL_HANGUP))
{
(f->subclass == AST_CONTROL_HANGUP)) {
ast_frfree(f);
LOCAL_USER_REMOVE(u);
ast_module_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);
LOCAL_USER_REMOVE(u);
ast_module_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";
@@ -283,12 +276,11 @@ 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;
@@ -302,15 +294,16 @@ 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;
}
}
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, "");
@@ -321,7 +314,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;
}
@@ -341,18 +334,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_copy_string(chan->accountcode, acctcode, sizeof(chan->accountcode));
ast_string_field_set(chan, accountcode, acctcode);
if (special_noanswer) flags.flags = 0;
ast_cdr_reset(chan->cdr, &flags);
ast_explicit_goto(chan, args.context, exten, 1);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return 0;
}
}
@@ -364,8 +357,7 @@ 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);
@@ -374,39 +366,24 @@ reorder:
ast_frfree(f);
}
ast_playtones_stop(chan);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
return ast_register_application(app, disa_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key(void)
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "DISA (Direct Inward System Access) Application");

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

@@ -5,7 +5,8 @@
*
* Anthony Minessale <anthmct@yahoo.com>
*
* disclaimed to Digium
* A license has been granted to Digium (via disclaimer) for the use of
* this code.
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
@@ -21,19 +22,21 @@
/*! \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"
@@ -44,30 +47,27 @@ 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;
LOCAL_USER_DECL;
static int ast_serialize_showchan(struct ast_channel *c, char *buf, size_t size)
static int 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[256];
char pgrp[256];
long elapsed_seconds = 0;
int hour = 0, min = 0, sec = 0;
char cgrp[BUFSIZ/2];
char pgrp[BUFSIZ/2];
char formatbuf[BUFSIZ/2];
now = ast_tvnow();
memset(buf,0,size);
memset(buf, 0, size);
if (!c)
return 0;
@@ -85,11 +85,12 @@ static int ast_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= %d\n"
"WriteFormat= %d\n"
"ReadFormat= %d\n"
"NativeFormat= %s\n"
"WriteFormat= %s\n"
"ReadFormat= %s\n"
"1stFileDescriptor= %d\n"
"Framesin= %d %s\n"
"Framesout= %d %s\n"
@@ -104,19 +105,20 @@ static int ast_serialize_showchan(struct ast_channel *c, char *buf, size_t size)
"Data= %s\n"
"Blocking_in= %s\n",
c->name,
c->type,
c->tech->type,
c->uniqueid,
(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)" ),
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)"),
ast_state2str(c->_state),
c->_state,
c->rings,
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,
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,
hour,
min,
sec,
@@ -126,7 +128,7 @@ static int ast_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 ? (!ast_strlen_zero(c->data) ? c->data : "(Empty)") : "(None)"),
( c-> data ? S_OR(c->data, "(Empty)") : "(None)"),
(ast_test_flag(c, AST_FLAG_BLOCKING) ? c->blockproc : "(Not Blocking)"));
return 0;
@@ -134,59 +136,41 @@ static int ast_serialize_showchan(struct ast_channel *c, char *buf, size_t size)
static int dumpchan_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct localuser *u;
char vars[1024];
struct ast_module_user *u;
char vars[BUFSIZ * 4];
char info[1024];
int level = 0;
static char *line = "================================================================================";
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
if (!ast_strlen_zero(data)) {
if (!ast_strlen_zero(data))
level = atoi(data);
}
pbx_builtin_serialize_variables(chan, vars, sizeof(vars));
ast_serialize_showchan(chan, info, sizeof(info));
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);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return res;
return 0;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
return ast_register_application(app, dumpchan_exec, synopsis, desc);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Dump Info About The Calling Channel");

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

@@ -19,19 +19,21 @@
/*! \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"
@@ -39,85 +41,69 @@ 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 read back to the user";
static char *synopsis = "Echo audio, video, or DTMF back to the calling party";
static char *descrip =
" 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";
" 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";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int echo_exec(struct ast_channel *chan, void *data)
{
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);
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);
if (!f)
break;
f->delivery.tv_sec = 0;
f->delivery.tv_usec = 0;
if (f->frametype == AST_FRAME_VOICE) {
if (ast_write(chan, f))
break;
} else if (f->frametype == AST_FRAME_VIDEO) {
if (ast_write(chan, f))
break;
} else if (f->frametype == AST_FRAME_DTMF) {
switch (f->frametype) {
case AST_FRAME_DTMF:
if (f->subclass == '#') {
res = 0;
break;
} else
if (ast_write(chan, f))
break;
ast_frfree(f);
goto end;
}
/* fall through */
default:
if (ast_write(chan, f)) {
ast_frfree(f);
goto end;
}
}
ast_frfree(f);
}
LOCAL_USER_REMOVE(u);
end:
ast_module_user_remove(u);
return res;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
return ast_register_application(app, echo_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Simple Echo Application");

View File

@@ -1,270 +0,0 @@
/*
* 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;
}

View File

@@ -1,127 +0,0 @@
/*
* 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;
}

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

@@ -2,8 +2,9 @@
* 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__v001@the-tilghman.com>
* Tilghman Lesher <app_exec__v002@the-tilghman.com>
*
* This code is released by the author with no restrictions on usage.
*
@@ -19,20 +20,21 @@
*
* \brief Exec application
*
* \author Tilghman Lesher <app_exec__v001@the-tilghman.com>
* \author Tilghman Lesher <app_exec__v002@the-tilghman.com>
* \author Philipp Dunkel <philipp.dunkel@ebox.at>
*
* \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"
@@ -43,93 +45,177 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
/* Maximum length of any variable */
#define MAXRESULT 1024
static char *tdesc = "Executes applications";
/*! 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 *app_exec = "Exec";
static char *exec_synopsis = "Executes internal application";
static char *exec_synopsis = "Executes dialplan 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. Returns whatever value the\n"
"app returns or a non-zero value if the app cannot be found.\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";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
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";
static int exec_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct localuser *u;
char *s, *appname, *endargs, args[MAXRESULT];
struct ast_module_user *u;
char *s, *appname, *endargs, args[MAXRESULT] = "";
struct ast_app *app;
LOCAL_USER_ADD(u);
memset(args, 0, MAXRESULT);
u = ast_module_user_add(chan);
/* Check and parse arguments */
if (data) {
s = ast_strdupa((char *)data);
s = ast_strdupa(data);
appname = strsep(&s, "(");
if (s) {
appname = strsep(&s, "(");
if (s) {
endargs = strrchr(s, ')');
if (endargs)
*endargs = '\0';
pbx_substitute_variables_helper(chan, s, args, MAXRESULT - 1);
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;
}
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;
}
}
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return res;
}
int unload_module(void)
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, "Count 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 res;
res = ast_unregister_application(app_exec);
res |= ast_unregister_application(app_tryexec);
res |= ast_unregister_application(app_execif);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
return ast_register_application(app_exec, exec_exec, exec_synopsis, exec_descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
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 res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Executes dialplan applications");

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

@@ -22,20 +22,25 @@
/*! \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
*/
#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"
@@ -43,8 +48,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/linkedlists.h"
static const char *tdesc = "External IVR Interface Application";
#include "asterisk/app.h"
#include "asterisk/utils.h"
#include "asterisk/options.h"
static const char *app = "ExternalIVR";
@@ -58,7 +64,7 @@ static const char *descrip =
"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/README.externalivr for a protocol specification.\n";
"See doc/externalivr.txt 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__)
@@ -68,9 +74,8 @@ struct playlist_entry {
char filename[1];
};
struct localuser {
struct ivr_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;
@@ -78,10 +83,9 @@ struct localuser {
int option_autoclear;
};
LOCAL_USER_DECL;
struct gen_state {
struct localuser *u;
struct ivr_localuser *u;
struct ast_filestream *stream;
struct playlist_entry *current;
int sample_queue;
@@ -93,9 +97,9 @@ static void send_child_event(FILE *handle, const char event, const char *data,
char tmp[256];
if (!data) {
snprintf(tmp, sizeof(tmp), "%c,%10ld", event, time(NULL));
snprintf(tmp, sizeof(tmp), "%c,%10d", event, (int)time(NULL));
} else {
snprintf(tmp, sizeof(tmp), "%c,%10ld,%s", event, time(NULL), data);
snprintf(tmp, sizeof(tmp), "%c,%10d,%s", event, (int)time(NULL), data);
}
fprintf(handle, "%s\n", tmp);
@@ -104,12 +108,10 @@ static void send_child_event(FILE *handle, const char event, const char *data,
static void *gen_alloc(struct ast_channel *chan, void *params)
{
struct localuser *u = params;
struct ivr_localuser *u = params;
struct gen_state *state;
state = calloc(1, sizeof(*state));
if (!state)
if (!(state = ast_calloc(1, sizeof(*state))))
return NULL;
state->u = u;
@@ -138,7 +140,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 localuser *u = state->u;
struct ivr_localuser *u = state->u;
char *file_to_stream;
u->abort_current_sound = 0;
@@ -170,7 +172,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 localuser *u = state->u;
struct ivr_localuser *u = state->u;
if (u->abort_current_sound ||
(u->playing_silence && AST_LIST_FIRST(&u->playlist))) {
@@ -228,10 +230,8 @@ static struct ast_generator gen =
static struct playlist_entry *make_entry(const char *filename)
{
struct playlist_entry *entry;
entry = calloc(1, sizeof(*entry) + strlen(filename) + 10);
if (!entry)
if (!(entry = ast_calloc(1, sizeof(*entry) + strlen(filename) + 10))) /* XXX why 10 ? */
return NULL;
strcpy(entry->filename, filename);
@@ -241,7 +241,7 @@ static struct playlist_entry *make_entry(const char *filename)
static int app_exec(struct ast_channel *chan, void *data)
{
struct localuser *u = NULL;
struct ast_module_user *lu;
struct playlist_entry *entry;
const char *args = data;
int child_stdin[2] = { 0,0 };
@@ -250,31 +250,32 @@ static int app_exec(struct ast_channel *chan, void *data)
int res = -1;
int gen_active = 0;
int pid;
char *command;
char *argv[32];
int argc = 1;
char *buf;
char *buf, *command;
FILE *child_commands = NULL;
FILE *child_errors = NULL;
FILE *child_events = NULL;
struct ivr_localuser foo = {
.playlist = AST_LIST_HEAD_INIT_VALUE,
.finishlist = AST_LIST_HEAD_INIT_VALUE,
};
struct ivr_localuser *u = &foo;
LOCAL_USER_ADD(u);
lu = ast_module_user_add(chan);
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");
goto exit;
ast_module_user_remove(lu);
return -1;
}
buf = ast_strdupa(data);
command = strsep(&buf, "|");
memset(argv, 0, sizeof(argv) / sizeof(argv[0]));
argv[0] = command;
while ((argc < 31) && (argv[argc++] = strsep(&buf, "|")));
argv[argc] = NULL;
argc = ast_app_separate_args(buf, '|', argv, sizeof(argv) / sizeof(argv[0]));
if (pipe(child_stdin)) {
ast_chan_log(LOG_WARNING, chan, "Could not create pipe for child input: %s\n", strerror(errno));
@@ -311,13 +312,16 @@ static int app_exec(struct ast_channel *chan, void *data)
/* child process */
int i;
if (ast_opt_high_priority)
ast_set_priority(0);
dup2(child_stdin[0], STDIN_FILENO);
dup2(child_stdout[1], STDOUT_FILENO);
dup2(child_stderr[1], STDERR_FILENO);
for (i = STDERR_FILENO + 1; i < 1024; i++)
close(i);
execv(command, argv);
fprintf(stderr, "Failed to execute '%s': %s\n", command, strerror(errno));
execv(argv[0], argv);
fprintf(stderr, "Failed to execute '%s': %s\n", argv[0], strerror(errno));
exit(1);
} else {
/* parent process */
@@ -343,8 +347,6 @@ static int app_exec(struct ast_channel *chan, void *data)
goto exit;
}
setvbuf(child_events, NULL, _IONBF, 0);
if (!(child_commands = fdopen(child_commands_fd, "r"))) {
ast_chan_log(LOG_WARNING, chan, "Could not open stream for child commands\n");
goto exit;
@@ -355,6 +357,10 @@ static int app_exec(struct ast_channel *chan, void *data)
goto exit;
}
setvbuf(child_events, NULL, _IONBF, 0);
setvbuf(child_commands, NULL, _IONBF, 0);
setvbuf(child_errors, NULL, _IONBF, 0);
res = 0;
while (1) {
@@ -538,42 +544,25 @@ static int app_exec(struct ast_channel *chan, void *data)
while ((entry = AST_LIST_REMOVE_HEAD(&u->playlist, list)))
free(entry);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(lu);
return res;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
return ast_register_application(app, app_exec, synopsis, descrip);
}
char *description(void)
{
return (char *) tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "External IVR Interface Application");

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

@@ -19,10 +19,16 @@
/*! \file
*
* \brief Connect to festival
*
* \author Christos Ricudis <ricudis@itc.auth.gr>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <sys/types.h>
#include <stdlib.h>
#include <unistd.h>
@@ -40,10 +46,6 @@
#include <fcntl.h>
#include <ctype.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
@@ -53,11 +55,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/config.h"
#include "asterisk/utils.h"
#include "asterisk/lock.h"
#include "asterisk/options.h"
#define FESTIVAL_CONFIG "festival.conf"
static char *tdesc = "Simple Festival Interface";
static char *app = "Festival";
static char *synopsis = "Say text to the user";
@@ -67,9 +68,6 @@ 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)
{
@@ -84,7 +82,10 @@ static char *socket_receive_file_to_buff(int fd,int *size)
char c;
bufflen = 1024;
buff = (char *)malloc(bufflen);
if (!(buff = ast_malloc(bufflen)))
{
/* TODO: Handle memory allocation failure */
}
*size=0;
for (k=0; file_stuff_key[k] != '\0';)
@@ -94,7 +95,10 @@ 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;
buff = (char *)realloc(buff,bufflen);
if (!(buff = ast_realloc(buff, bufflen)))
{
/* TODO: Handle memory allocation failure */
}
}
if (file_stuff_key[k] == c)
k++;
@@ -136,6 +140,9 @@ static int send_waveform_to_fd(char *waveform, int length, int fd) {
if (x != fd)
close(x);
}
if (ast_opt_high_priority)
ast_set_priority(0);
/*IAS */
#ifdef __PPC__
for( x=0; x<length; x+=2)
@@ -175,7 +182,8 @@ static int send_waveform_to_channel(struct ast_channel *chan, char *waveform, in
if (chan->_state != AST_STATE_UP)
ast_answer(chan);
ast_stopstream(chan);
ast_indicate(chan, -1);
owriteformat = chan->writeformat;
res = ast_set_write_format(chan, AST_FORMAT_SLINEAR);
if (res < 0) {
@@ -229,11 +237,13 @@ static int send_waveform_to_channel(struct ast_channel *chan, char *waveform, in
myf.f.data = myf.frdata;
if (ast_write(chan, &myf.f) < 0) {
res = -1;
ast_frfree(f);
break;
}
if (res < needed) { /* last frame */
ast_log(LOG_DEBUG, "Last frame\n");
res=0;
ast_frfree(f);
break;
}
} else {
@@ -264,16 +274,16 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
{
int usecache;
int res=0;
struct localuser *u;
struct ast_module_user *u;
struct sockaddr_in serv_addr;
struct hostent *serverhost;
struct ast_hostent ahp;
int fd;
FILE *fs;
char *host;
char *cachedir;
char *temp;
char *festivalcommand;
const char *host;
const char *cachedir;
const char *temp;
const char *festivalcommand;
int port=1314;
int n;
char ack[4];
@@ -296,18 +306,19 @@ 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;
}
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
cfg = ast_config_load(FESTIVAL_CONFIG);
if (!cfg) {
ast_log(LOG_WARNING, "No such configuration file %s\n", FESTIVAL_CONFIG);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
if (!(host = ast_variable_retrieve(cfg, "general", "host"))) {
@@ -328,15 +339,25 @@ 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) {
@@ -354,7 +375,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);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
memset(&serv_addr, 0, sizeof(serv_addr));
@@ -364,7 +385,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);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
memmove(&serv_addr.sin_addr,serverhost->h_addr, serverhost->h_length);
@@ -375,7 +396,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);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
@@ -455,8 +476,23 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
/* This assumes only one waveform will come back, also LP is unlikely */
wave = 0;
do {
int read_data;
for (n=0; n < 3; )
n += read(fd,ack+n,3-n);
{
read_data = read(fd,ack+n,3-n);
/* this avoids falling in infinite loop
* in case that festival server goes down
* */
if ( read_data == -1 )
{
ast_log(LOG_WARNING,"Unable to read from cache/festival fd");
close(fd);
ast_config_destroy(cfg);
ast_module_user_remove(u);
return -1;
}
n += read_data;
}
ack[3] = '\0';
if (strcmp(ack,"WV\n") == 0) { /* receive a waveform */
ast_log(LOG_DEBUG,"Festival WV command\n");
@@ -479,41 +515,31 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
} while (strcmp(ack,"OK\n") != 0);
close(fd);
ast_config_destroy(cfg);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return res;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static 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);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Simple Festival Interface");

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

@@ -19,24 +19,26 @@
/*! \file
*
* \brief App to flash a zap trunk
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
/*** MODULEINFO
<depend>zaptel</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 <zaptel/zaptel.h>
#include "asterisk/lock.h"
#include "asterisk/file.h"
@@ -48,8 +50,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/image.h"
#include "asterisk/options.h"
static char *tdesc = "Flash zap trunk application";
static char *app = "Flash";
static char *synopsis = "Flashes a Zap Trunk";
@@ -59,9 +59,6 @@ static char *descrip =
"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";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static inline int zt_wait_event(int fd)
{
@@ -77,10 +74,10 @@ static int flash_exec(struct ast_channel *chan, void *data)
{
int res = -1;
int x;
struct localuser *u;
struct ast_module_user *u;
struct zt_params ztp;
LOCAL_USER_ADD(u);
if (!strcasecmp(chan->type, "Zap")) {
u = ast_module_user_add(chan);
if (!strcasecmp(chan->tech->type, "Zap")) {
memset(&ztp, 0, sizeof(ztp));
res = ioctl(chan->fds[0], ZT_GET_PARAMS, &ztp);
if (!res) {
@@ -103,39 +100,25 @@ static int flash_exec(struct ast_channel *chan, void *data)
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 Zap channel\n", chan->name);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return res;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
return ast_register_application(app, flash_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Flash channel application");
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

1105
apps/app_followme.c Normal file

File diff suppressed because it is too large Load Diff

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

@@ -18,19 +18,23 @@
/*! \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"
@@ -38,21 +42,15 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/cdr.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\n"
"If the option 'v' is passed all cdr variables will be passed along also.\n"
"";
"If the option 'v' is passed all cdr variables will be passed along also.\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static void ast_cdr_fork(struct ast_channel *chan)
{
struct ast_cdr *cdr;
@@ -79,53 +77,38 @@ static void ast_cdr_fork(struct ast_channel *chan)
static int forkcdr_exec(struct ast_channel *chan, void *data)
{
int res = 0;
struct localuser *u;
struct ast_module_user *u;
if (!chan->cdr) {
ast_log(LOG_WARNING, "Channel does not have a CDR\n");
return 0;
}
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
if (!ast_strlen_zero(data))
ast_set2_flag(chan->cdr, strchr(data, 'v'), AST_CDR_FLAG_KEEP_VARS);
ast_cdr_fork(chan);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return res;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
return ast_register_application(app, forkcdr_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Fork The CDR into 2 separate entities");

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

@@ -19,19 +19,21 @@
/*! \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"
@@ -41,8 +43,6 @@ 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";
@@ -51,9 +51,6 @@ static char *descrip =
" GetCPEID: Obtains and displays ADSI CPE ID and other information in order\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)
{
@@ -63,13 +60,13 @@ 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 adsi_print(chan, tmp, justify, voice);
return ast_adsi_print(chan, tmp, justify, voice);
}
static int cpeid_exec(struct ast_channel *chan, void *idata)
{
int res=0;
struct localuser *u;
struct ast_module_user *u;
unsigned char cpeid[4];
int gotgeometry = 0;
int gotcpeid = 0;
@@ -77,7 +74,7 @@ static int cpeid_exec(struct ast_channel *chan, void *idata)
char data[4][80];
char *stuff[4];
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
stuff[0] = data[0];
stuff[1] = data[1];
stuff[2] = data[2];
@@ -86,10 +83,10 @@ static int cpeid_exec(struct ast_channel *chan, void *idata)
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);
res = ast_adsi_load_session(chan, NULL, 0, 1);
if (res > 0) {
cpeid_setstatus(chan, stuff, 0);
res = adsi_get_cpeid(chan, cpeid, 0);
res = ast_adsi_get_cpeid(chan, cpeid, 0);
if (res > 0) {
gotcpeid = 1;
if (option_verbose > 2)
@@ -99,7 +96,7 @@ static int cpeid_exec(struct ast_channel *chan, void *idata)
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);
res = ast_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);
@@ -126,42 +123,27 @@ static int cpeid_exec(struct ast_channel *chan, void *idata)
break;
}
}
adsi_unload_session(chan);
ast_adsi_unload_session(chan);
}
}
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return res;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
return ast_register_application(app, cpeid_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Get ADSI CPE ID");

View File

@@ -1,340 +0,0 @@
/*
* 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);
strncpy(group, grp, sizeof(group) - 1);
}
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 (!(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"
struct ast_channel *c = NULL;
int numchans = 0;
struct ast_var_t *current;
struct varshead *headp;
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");
while ( (c = ast_channel_walk_locked(c)) != NULL) {
headp=&c->varshead;
AST_LIST_TRAVERSE(headp,current,entries) {
if (!strncmp(ast_var_name(current), GROUP_CATEGORY_PREFIX "_", strlen(GROUP_CATEGORY_PREFIX) + 1)) {
if (!havepattern || !regexec(&regexbuf, ast_var_value(current), 0, NULL, 0)) {
ast_cli(fd, FORMAT_STRING, c->name, ast_var_value(current),
(ast_var_name(current) + strlen(GROUP_CATEGORY_PREFIX) + 1));
numchans++;
}
} else if (!strcmp(ast_var_name(current), GROUP_CATEGORY_PREFIX)) {
if (!havepattern || !regexec(&regexbuf, ast_var_value(current), 0, NULL, 0)) {
ast_cli(fd, FORMAT_STRING, c->name, ast_var_value(current), "(default)");
numchans++;
}
}
}
numchans++;
ast_mutex_unlock(&c->lock);
}
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"
"This application has been deprecated, please use the function\n"
"GroupCount.\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"
"This application has been deprecated, please use the function\n"
"GroupMatchCount.\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;
}

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

@@ -1,7 +1,7 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Changes Copyright (c) 2004 - 2005 Todd Freeman <freeman@andrews.edu>
* Changes Copyright (c) 2004 - 2006 Todd Freeman <freeman@andrews.edu>
*
* 95% based on HasNewVoicemail by:
*
@@ -24,9 +24,18 @@
*
* \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>
@@ -34,10 +43,6 @@
#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"
@@ -48,7 +53,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/app.h"
#include "asterisk/options.h"
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 =
@@ -68,39 +72,15 @@ static char *hasnewvoicemail_descrip =
"Assumes folder 'INBOX' if folder is not specified. Optionally sets <varname> to the number of messages\n"
"in that folder.\n"
" The option string may contain zero of the following character:\n"
" 'j' -- jump to priority n+101, if there is new voicemail in tolder 'folder' or INBOX\n"
" 'j' -- jump to priority n+101, if there is new voicemail in folder 'folder' or INBOX\n"
" This application sets the following channel variable upon completion:\n"
" HASVMSTATUS The result of the new voicemail check returned as a text string as follows\n"
" <# of messages in the folder, 0 for NONE>\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int hasvoicemail_internal(char *context, char *box, char *folder)
{
char vmpath[256];
DIR *vmdir;
struct dirent *vment;
int count=0;
snprintf(vmpath,sizeof(vmpath), "%s/voicemail/%s/%s/%s", (char *)ast_config_AST_SPOOL_DIR, context, box, folder);
if ((vmdir = opendir(vmpath))) {
/* No matter what the format of VM, there will always be a .txt file for each message. */
while ((vment = readdir(vmdir))) {
if (!strncmp(vment->d_name + 7, ".txt", 4)) {
count++;
break;
}
}
closedir(vmdir);
}
return count;
}
static int hasvoicemail_exec(struct ast_channel *chan, void *data)
{
struct localuser *u;
struct ast_module_user *u;
char *input, *varname = NULL, *vmbox, *context = "default";
char *vmfolder;
int vmcount = 0;
@@ -123,22 +103,16 @@ static int hasvoicemail_exec(struct ast_channel *chan, void *data)
return -1;
}
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
input = ast_strdupa((char *)data);
if (! input) {
ast_log(LOG_ERROR, "Out of memory error\n");
LOCAL_USER_REMOVE(u);
return -1;
}
input = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, input);
if ((vmbox = strsep(&args.vmbox, "@")))
if (!ast_strlen_zero(args.vmbox))
context = args.vmbox;
if (!vmbox)
vmbox = args.vmbox;
vmbox = strsep(&args.vmbox, "@");
if (!ast_strlen_zero(args.vmbox))
context = args.vmbox;
vmfolder = strchr(vmbox, '/');
if (vmfolder) {
@@ -153,7 +127,7 @@ static int hasvoicemail_exec(struct ast_channel *chan, void *data)
priority_jump = 1;
}
vmcount = hasvoicemail_internal(context, vmbox, vmfolder);
vmcount = ast_app_messagecount(context, vmbox, vmfolder);
/* Set the count in the channel variable */
if (varname) {
snprintf(tmp, sizeof(tmp), "%d", vmcount);
@@ -162,8 +136,8 @@ static int hasvoicemail_exec(struct ast_channel *chan, void *data)
if (vmcount > 0) {
/* Branch to the next extension */
if (priority_jump || option_priority_jumping) {
if (!ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101))
if (priority_jump || ast_opt_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);
}
}
@@ -171,46 +145,42 @@ static int hasvoicemail_exec(struct ast_channel *chan, void *data)
snprintf(tmp, sizeof(tmp), "%d", vmcount);
pbx_builtin_setvar_helper(chan, "HASVMSTATUS", tmp);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return 0;
}
static char *acf_vmcount_exec(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
static int acf_vmcount_exec(struct ast_channel *chan, char *cmd, char *argsstr, char *buf, size_t len)
{
struct localuser *u;
char *args, *context, *box, *folder;
struct ast_module_user *u;
char *context;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(vmbox);
AST_APP_ARG(folder);
);
LOCAL_USER_ACF_ADD(u);
u = ast_module_user_add(chan);
buf[0] = '\0';
args = ast_strdupa(data);
if (!args) {
ast_log(LOG_ERROR, "Out of memory");
LOCAL_USER_REMOVE(u);
return buf;
}
AST_STANDARD_APP_ARGS(args, argsstr);
box = strsep(&args, "|");
if (strchr(box, '@')) {
context = box;
box = strsep(&context, "@");
if (strchr(args.vmbox, '@')) {
context = args.vmbox;
args.vmbox = strsep(&context, "@");
} else {
context = "default";
}
if (args) {
folder = args;
} else {
folder = "INBOX";
if (ast_strlen_zero(args.folder)) {
args.folder = "INBOX";
}
snprintf(buf, len, "%d", hasvoicemail_internal(context, box, folder));
snprintf(buf, len, "%d", ast_app_messagecount(context, args.vmbox, args.folder));
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return buf;
return 0;
}
struct ast_custom_function acf_vmcount = {
@@ -223,7 +193,7 @@ struct ast_custom_function acf_vmcount = {
.read = acf_vmcount_exec,
};
int unload_module(void)
static int unload_module(void)
{
int res;
@@ -231,12 +201,12 @@ int unload_module(void)
res |= ast_unregister_application(app_hasvoicemail);
res |= ast_unregister_application(app_hasnewvoicemail);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
int res;
@@ -247,19 +217,4 @@ int load_module(void)
return res;
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Indicator for whether a voice mailbox has messages in a given folder.");

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

@@ -19,10 +19,16 @@
/*! \file
*
* \brief Stream to an icecast server via ICES (see contrib/asterisk-ices.xml)
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <string.h>
#include <stdio.h>
#include <signal.h>
@@ -32,10 +38,6 @@
#include <sys/time.h>
#include <errno.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -44,12 +46,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/translate.h"
#include "asterisk/options.h"
#define ICES "/usr/bin/ices"
#define LOCAL_ICES "/usr/local/bin/ices"
static char *tdesc = "Encode and Stream via icecast and ices";
static char *app = "ICES";
static char *synopsis = "Encode and stream using 'ices'";
@@ -59,9 +60,6 @@ static char *descrip =
"(available separately). A configuration file must be supplied\n"
"for ices (see examples/asterisk-ices.conf). \n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int icesencode(char *filename, int fd)
{
@@ -72,6 +70,8 @@ static int icesencode(char *filename, int fd)
ast_log(LOG_WARNING, "Fork failed\n");
if (res)
return res;
if (ast_opt_high_priority)
ast_set_priority(0);
dup2(fd, STDIN_FILENO);
for (x=STDERR_FILENO + 1;x<256;x++) {
if ((x != STDIN_FILENO) && (x != STDOUT_FILENO))
@@ -90,7 +90,7 @@ static int icesencode(char *filename, int fd)
static int ices_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct localuser *u;
struct ast_module_user *u;
int fds[2];
int ms = -1;
int pid = -1;
@@ -106,13 +106,13 @@ static int ices_exec(struct ast_channel *chan, void *data)
return -1;
}
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
last = ast_tv(0, 0);
if (pipe(fds)) {
ast_log(LOG_WARNING, "Unable to create pipe\n");
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
flags = fcntl(fds[1], F_GETFL);
@@ -127,7 +127,7 @@ static int ices_exec(struct ast_channel *chan, void *data)
close(fds[0]);
close(fds[1]);
ast_log(LOG_WARNING, "Answer failed!\n");
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
@@ -137,7 +137,7 @@ 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");
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
if (((char *)data)[0] == '/')
@@ -172,6 +172,7 @@ static int ices_exec(struct ast_channel *chan, void *data)
if (errno != EAGAIN) {
ast_log(LOG_WARNING, "Write failed to pipe: %s\n", strerror(errno));
res = -1;
ast_frfree(f);
break;
}
}
@@ -186,40 +187,25 @@ static int ices_exec(struct ast_channel *chan, void *data)
if (!res && oreadformat)
ast_set_read_format(chan, oreadformat);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return res;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
return ast_register_application(app, ices_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Encode and Stream via icecast and ices");

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

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

View File

@@ -1,234 +0,0 @@
/*
* 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;
}

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

@@ -19,19 +19,25 @@
/*! \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"
@@ -82,21 +88,18 @@ 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 localuser *u;
struct ast_module_user *u;
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "skel requires an argument (filename)\n");
return -1;
}
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
/* Do our thing here */
@@ -105,40 +108,25 @@ static int skel_exec(struct ast_channel *chan, void *data)
if (!res)
res = ast_ivr_menu_run(chan, &ivr_demo, data);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return res;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
return ast_register_application(app, skel_exec, tdesc, synopsis);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "IVR Demo Application");

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

@@ -20,18 +20,20 @@
*
* \brief App to lookup the callerid number, and see if it is blacklisted
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -45,8 +47,6 @@ 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";
@@ -61,19 +61,48 @@ static char *descrip =
" FOUND | NOTFOUND\n"
"Example: exten => 1234,1,LookupBlacklist()\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
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,
};
static int
lookupblacklist_exec (struct ast_channel *chan, void *data)
{
char blacklist[1];
struct localuser *u;
struct ast_module_user *u;
int bl = 0;
int priority_jump = 0;
static int dep_warning = 0;
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
if (!dep_warning) {
dep_warning = 1;
ast_log(LOG_WARNING, "LookupBlacklist is deprecated. Please use ${BLACKLIST()} instead.\n");
}
if (!ast_strlen_zero(data)) {
if (strchr(data, 'j'))
@@ -96,46 +125,34 @@ lookupblacklist_exec (struct ast_channel *chan, void *data)
}
if (bl) {
if (priority_jump || option_priority_jumping)
if (priority_jump || ast_opt_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");
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return 0;
}
int unload_module (void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
res |= ast_custom_function_unregister(&blacklist_function);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module (void)
static int load_module(void)
{
return ast_register_application (app, lookupblacklist_exec, synopsis,descrip);
}
char *description (void)
{
return tdesc;
}
int usecount (void)
{
int res;
STANDARD_USECOUNT (res);
int res = ast_custom_function_register(&blacklist_function);
res |= ast_register_application (app, lookupblacklist_exec, synopsis,descrip);
return res;
}
char *key ()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Look up Caller*ID name/number from blacklist database");

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

@@ -19,18 +19,20 @@
/*! \file
*
* \brief App to set callerid name from database, based on directory number
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -43,8 +45,6 @@ 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";
@@ -57,64 +57,45 @@ static char *descrip =
"name delivery, or if you want to change the names on some incoming\n"
"calls.\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int
lookupcidname_exec (struct ast_channel *chan, void *data)
static int lookupcidname_exec (struct ast_channel *chan, void *data)
{
char dbname[64];
struct localuser *u;
char dbname[64];
struct ast_module_user *u;
static int dep_warning = 0;
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);
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_REMOVE (u);
return 0;
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;
}
int
unload_module (void)
static int unload_module(void)
{
int res;
res = ast_unregister_application (app);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int
load_module (void)
static int load_module(void)
{
return ast_register_application (app, lookupcidname_exec, synopsis,
descrip);
return ast_register_application (app, lookupcidname_exec, synopsis, descrip);
}
char *
description (void)
{
return tdesc;
}
int
usecount (void)
{
int res;
STANDARD_USECOUNT (res);
return res;
}
char *
key ()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Look up CallerID Name from local database");

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

@@ -19,20 +19,22 @@
/*! \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"
@@ -48,8 +50,6 @@ 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"
@@ -68,6 +68,13 @@ 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"
@@ -77,18 +84,19 @@ 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";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int macro_exec(struct ast_channel *chan, void *data)
static int _macro_exec(struct ast_channel *chan, void *data, int exclusive)
{
const char *s;
char *tmp;
char *cur, *rest;
char *macro;
@@ -101,35 +109,35 @@ static int macro_exec(struct ast_channel *chan, void *data)
int oldpriority;
char pc[80], depthc[12];
char oldcontext[AST_MAX_CONTEXT] = "";
char *offsets;
int offset, depth;
int offset, depth = 0, maxdepth = 7;
int setmacrocontext=0;
int autoloopflag;
int autoloopflag, dead = 0;
char *save_macro_exten;
char *save_macro_context;
char *save_macro_priority;
char *save_macro_offset;
struct localuser *u;
struct ast_module_user *u;
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "Macro() requires arguments. See \"show application macro\" for help.\n");
return -1;
}
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
/* does the user want a deeper rabbit hole? */
s = pbx_builtin_getvar_helper(chan, "MACRO_RECURSION");
if (s)
sscanf(s, "%d", &maxdepth);
/* Count how many levels deep the rabbit hole goes */
tmp = pbx_builtin_getvar_helper(chan, "MACRO_DEPTH");
if (tmp) {
sscanf(tmp, "%d", &depth);
} else {
depth = 0;
}
if (depth >= 7) {
s = pbx_builtin_getvar_helper(chan, "MACRO_DEPTH");
if (s)
sscanf(s, "%d", &depth);
if (depth >= maxdepth) {
ast_log(LOG_ERROR, "Macro(): possible infinite loop detected. Returning early.\n");
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return 0;
}
snprintf(depthc, sizeof(depthc), "%d", depth + 1);
@@ -140,18 +148,33 @@ static int macro_exec(struct ast_channel *chan, void *data)
macro = strsep(&rest, "|");
if (ast_strlen_zero(macro)) {
ast_log(LOG_WARNING, "Invalid macro name specified\n");
LOCAL_USER_REMOVE(u);
ast_module_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);
LOCAL_USER_REMOVE(u);
ast_log(LOG_WARNING, "Context '%s' for macro '%s' lacks 's' extension, priority 1\n", fullmacro, macro);
ast_module_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;
@@ -165,25 +188,17 @@ static int macro_exec(struct ast_channel *chan, void *data)
}
argc = 1;
/* Save old macro variables */
save_macro_exten = pbx_builtin_getvar_helper(chan, "MACRO_EXTEN");
if (save_macro_exten)
save_macro_exten = strdup(save_macro_exten);
save_macro_exten = ast_strdup(pbx_builtin_getvar_helper(chan, "MACRO_EXTEN"));
pbx_builtin_setvar_helper(chan, "MACRO_EXTEN", oldexten);
save_macro_context = pbx_builtin_getvar_helper(chan, "MACRO_CONTEXT");
if (save_macro_context)
save_macro_context = strdup(save_macro_context);
save_macro_context = ast_strdup(pbx_builtin_getvar_helper(chan, "MACRO_CONTEXT"));
pbx_builtin_setvar_helper(chan, "MACRO_CONTEXT", oldcontext);
save_macro_priority = pbx_builtin_getvar_helper(chan, "MACRO_PRIORITY");
if (save_macro_priority)
save_macro_priority = strdup(save_macro_priority);
save_macro_priority = ast_strdup(pbx_builtin_getvar_helper(chan, "MACRO_PRIORITY"));
snprintf(pc, sizeof(pc), "%d", oldpriority);
pbx_builtin_setvar_helper(chan, "MACRO_PRIORITY", pc);
save_macro_offset = pbx_builtin_getvar_helper(chan, "MACRO_OFFSET");
if (save_macro_offset)
save_macro_offset = strdup(save_macro_offset);
save_macro_offset = ast_strdup(pbx_builtin_getvar_helper(chan, "MACRO_OFFSET"));
pbx_builtin_setvar_helper(chan, "MACRO_OFFSET", NULL);
/* Setup environment for new run */
@@ -193,12 +208,13 @@ static int macro_exec(struct ast_channel *chan, void *data)
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);
oldargs[argc] = pbx_builtin_getvar_helper(chan, varname);
if (oldargs[argc])
oldargs[argc] = strdup(oldargs[argc]);
s = pbx_builtin_getvar_helper(chan, varname);
if (s)
oldargs[argc] = ast_strdup(s);
pbx_builtin_setvar_helper(chan, varname, cur);
argc++;
}
@@ -216,8 +232,8 @@ static int macro_exec(struct ast_channel *chan, void *data)
break;
}
switch(res) {
case MACRO_EXIT_RESULT:
res = 0;
case MACRO_EXIT_RESULT:
res = 0;
goto out;
case AST_PBX_KEEPALIVE:
if (option_debug)
@@ -231,6 +247,7 @@ static int macro_exec(struct ast_channel *chan, void *data)
ast_log(LOG_DEBUG, "Spawn extension (%s,%s,%d) exited non-zero on '%s' in macro '%s'\n", chan->context, chan->exten, chan->priority, chan->name, macro);
else if (option_verbose > 1)
ast_verbose( VERBOSE_PREFIX_2 "Spawn extension (%s, %s, %d) exited non-zero on '%s' in macro '%s'\n", chan->context, chan->exten, chan->priority, chan->name, macro);
dead = 1;
goto out;
}
}
@@ -240,9 +257,9 @@ static int macro_exec(struct ast_channel *chan, void *data)
break;
}
/* don't stop executing extensions when we're in "h" */
if (chan->_softhangup && strcasecmp(oldexten,"h")) {
ast_log(LOG_DEBUG, "Extension %s, priority %d returned normally even though call was hung up\n",
chan->exten, chan->priority);
if (chan->_softhangup && strcasecmp(oldexten,"h") && strcasecmp(chan->macroexten,"h")) {
ast_log(LOG_DEBUG, "Extension %s, macroexten %s, priority %d returned normally even though call was hung up\n",
chan->exten, chan->macroexten, chan->priority);
goto out;
}
chan->priority++;
@@ -250,42 +267,49 @@ static int macro_exec(struct ast_channel *chan, void *data)
out:
/* Reset the depth back to what it was when the routine was entered (like if we called Macro recursively) */
snprintf(depthc, sizeof(depthc), "%d", depth);
pbx_builtin_setvar_helper(chan, "MACRO_DEPTH", depthc);
if (!dead) {
pbx_builtin_setvar_helper(chan, "MACRO_DEPTH", depthc);
ast_set2_flag(chan, autoloopflag, AST_FLAG_IN_AUTOLOOP);
}
ast_set2_flag(chan, autoloopflag, AST_FLAG_IN_AUTOLOOP);
for (x=1; x<argc; x++) {
for (x = 1; x < argc; x++) {
/* Restore old arguments and delete ours */
snprintf(varname, sizeof(varname), "ARG%d", x);
if (oldargs[x]) {
pbx_builtin_setvar_helper(chan, varname, oldargs[x]);
if (!dead)
pbx_builtin_setvar_helper(chan, varname, oldargs[x]);
free(oldargs[x]);
} else {
} else if (!dead) {
pbx_builtin_setvar_helper(chan, varname, NULL);
}
}
/* Restore macro variables */
pbx_builtin_setvar_helper(chan, "MACRO_EXTEN", save_macro_exten);
if (!dead) {
pbx_builtin_setvar_helper(chan, "MACRO_EXTEN", save_macro_exten);
pbx_builtin_setvar_helper(chan, "MACRO_CONTEXT", save_macro_context);
pbx_builtin_setvar_helper(chan, "MACRO_PRIORITY", save_macro_priority);
}
if (save_macro_exten)
free(save_macro_exten);
pbx_builtin_setvar_helper(chan, "MACRO_CONTEXT", save_macro_context);
if (save_macro_context)
free(save_macro_context);
pbx_builtin_setvar_helper(chan, "MACRO_PRIORITY", save_macro_priority);
if (save_macro_priority)
free(save_macro_priority);
if (setmacrocontext) {
if (!dead && setmacrocontext) {
chan->macrocontext[0] = '\0';
chan->macroexten[0] = '\0';
chan->macropriority = 0;
}
if (!strcasecmp(chan->context, fullmacro)) {
if (!dead && !strcasecmp(chan->context, fullmacro)) {
/* If we're leaving the macro normally, restore original information */
chan->priority = oldpriority;
ast_copy_string(chan->context, oldcontext, sizeof(chan->context));
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
@@ -299,25 +323,45 @@ static int macro_exec(struct ast_channel *chan, void *data)
}
}
pbx_builtin_setvar_helper(chan, "MACRO_OFFSET", save_macro_offset);
if (!dead)
pbx_builtin_setvar_helper(chan, "MACRO_OFFSET", save_macro_offset);
if (save_macro_offset)
free(save_macro_offset);
LOCAL_USER_REMOVE(u);
/* 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_module_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 localuser *u;
struct ast_module_user *u;
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
expr = ast_strdupa(data);
if (!expr) {
ast_log(LOG_ERROR, "Out of Memory!\n");
LOCAL_USER_REMOVE(u);
if (!(expr = ast_strdupa(data))) {
ast_module_user_remove(u);
return -1;
}
@@ -328,14 +372,14 @@ static int macroif_exec(struct ast_channel *chan, void *data)
*label_b = '\0';
label_b++;
}
if (ast_true(expr))
if (pbx_checkcondition(expr))
macro_exec(chan, label_a);
else if (label_b)
macro_exec(chan, label_b);
} else
ast_log(LOG_WARNING, "Invalid Syntax.\n");
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return res;
}
@@ -345,43 +389,30 @@ static int macro_exit_exec(struct ast_channel *chan, void *data)
return MACRO_EXIT_RESULT;
}
int unload_module(void)
static 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);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static 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;
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Extension Macros");

View File

@@ -1,297 +0,0 @@
/*
* 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";
#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... */

View File

@@ -1,205 +0,0 @@
/*
* 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, "ERROR: 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;
}

2294
apps/app_meetme.c Executable file → Normal file

File diff suppressed because it is too large Load Diff

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

@@ -19,28 +19,29 @@
/*! \file
*
* \brief Digital Milliwatt Test
*
* \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 <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"
static char *tdesc = "Digital Milliwatt (mu-law) Test Application";
#include "asterisk/utils.h"
static char *app = "Milliwatt";
@@ -49,19 +50,12 @@ static char *synopsis = "Generate a Constant 1000Hz tone at 0dbm (mu-law)";
static char *descrip =
"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)
{
int *indexp;
indexp = malloc(sizeof(int));
if (indexp == NULL) return(NULL);
*indexp = 0;
return(indexp);
return ast_calloc(1, sizeof(int));
}
static void milliwatt_release(struct ast_channel *chan, void *data)
@@ -72,31 +66,34 @@ static void milliwatt_release(struct ast_channel *chan, void *data)
static int milliwatt_generate(struct ast_channel *chan, void *data, int len, int samples)
{
struct ast_frame wf;
unsigned char waste[AST_FRIENDLY_OFFSET];
unsigned char buf[640];
int i,*indexp = (int *) data;
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__,
};
if (len > sizeof(buf))
{
ast_log(LOG_WARNING,"Only doing %d bytes (%d bytes requested)\n",(int)sizeof(buf),len);
len = sizeof(buf);
/* 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;
}
waste[0] = 0; /* make compiler happy */
wf.frametype = AST_FRAME_VOICE;
wf.subclass = AST_FORMAT_ULAW;
wf.offset = AST_FRIENDLY_OFFSET;
wf.mallocd = 0;
wf.data = buf;
len = samples * sizeof (buf[0]);
wf.datalen = len;
wf.samples = wf.datalen;
wf.src = "app_milliwatt";
wf.delivery.tv_sec = 0;
wf.delivery.tv_usec = 0;
wf.samples = samples;
/* create a buffer containing the digital milliwatt pattern */
for(i = 0; i < len; i++)
{
buf[i] = digital_milliwatt[(*indexp)++];
buf[AST_FRIENDLY_OFFSET + i] = digital_milliwatt[(*indexp)++];
*indexp &= 7;
}
if (ast_write(chan,&wf) < 0)
@@ -117,8 +114,8 @@ static struct ast_generator milliwattgen =
static int milliwatt_exec(struct ast_channel *chan, void *data)
{
struct localuser *u;
LOCAL_USER_ADD(u);
struct ast_module_user *u;
u = ast_module_user_add(chan);
ast_set_write_format(chan, AST_FORMAT_ULAW);
ast_set_read_format(chan, AST_FORMAT_ULAW);
if (chan->_state != AST_STATE_UP)
@@ -128,44 +125,29 @@ static int milliwatt_exec(struct ast_channel *chan, void *data)
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);
ast_module_user_remove(u);
return -1;
}
while(!ast_safe_sleep(chan, 10000));
ast_deactivate_generator(chan);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
return ast_register_application(app, milliwatt_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Digital Milliwatt (mu-law) Test Application");

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

@@ -2,7 +2,7 @@
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 2005, Anthony Minessale II
* Copyright (C) 2005, Digium, Inc.
* Copyright (C) 2005 - 2006, Digium, Inc.
*
* Mark Spencer <markster@digium.com>
* Kevin P. Fleming <kpfleming@digium.com>
@@ -22,19 +22,26 @@
*/
/*! \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"
@@ -46,10 +53,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 = ""
@@ -72,19 +79,24 @@ static const char *desc = ""
"The variable MIXMONITOR_FILENAME will contain the filename used to record.\n"
"";
STANDARD_LOCAL_USER;
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"
"";
LOCAL_USER_DECL;
struct module_symbols *me;
static const char *mixmonitor_spy_type = "MixMonitor";
struct mixmonitor {
struct ast_channel *chan;
char *filename;
struct ast_channel_spy spy;
struct ast_filestream *fs;
char *post_process;
char *name;
unsigned int flags;
int readvol;
int writevol;
};
enum {
@@ -110,21 +122,6 @@ AST_APP_OPTIONS(mixmonitor_opts, {
AST_APP_OPTION_ARG('W', MUXFLAG_VOLUME, OPT_ARG_VOLUME),
});
static void stopmon(struct ast_channel *chan, struct ast_channel_spy *spy)
{
/* If our status has changed, then the channel we're spying on is gone....
DON'T TOUCH IT!!! RUN AWAY!!! */
if (spy->status != CHANSPY_RUNNING)
return;
if (!chan)
return;
ast_mutex_lock(&chan->lock);
ast_channel_spy_remove(chan, spy);
ast_mutex_unlock(&chan->lock);
}
static int startmon(struct ast_channel *chan, struct ast_channel_spy *spy)
{
struct ast_channel *peer;
@@ -133,10 +130,10 @@ static int startmon(struct ast_channel *chan, struct ast_channel_spy *spy)
if (!chan)
return -1;
ast_mutex_lock(&chan->lock);
ast_channel_lock(chan);
res = ast_channel_spy_add(chan, spy);
ast_mutex_unlock(&chan->lock);
ast_channel_unlock(chan);
if (!res && ast_test_flag(chan, AST_FLAG_NBRIDGE) && (peer = ast_bridged_channel(chan)))
ast_softhangup(peer, AST_SOFTHANGUP_UNBRIDGE);
@@ -148,127 +145,59 @@ static int startmon(struct ast_channel *chan, struct ast_channel_spy *spy)
static void *mixmonitor_thread(void *obj)
{
struct mixmonitor *mixmonitor = obj;
struct ast_channel_spy spy;
struct ast_filestream *fs = NULL;
char *ext, *name;
unsigned int oflags;
struct ast_frame *f;
char post_process[1024] = "";
struct ast_frame *f = NULL;
STANDARD_INCREMENT_USECOUNT;
name = ast_strdupa(mixmonitor->chan->name);
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";
}
fs = ast_writefile(mixmonitor->filename, ext, NULL, oflags, 0, 0644);
if (!fs) {
ast_log(LOG_ERROR, "Cannot open %s.%s\n", mixmonitor->filename, ext);
goto out;
}
if (ast_test_flag(mixmonitor, MUXFLAG_APPEND))
ast_seekstream(fs, 0, SEEK_END);
memset(&spy, 0, sizeof(spy));
ast_set_flag(&spy, CHANSPY_FORMAT_AUDIO);
ast_set_flag(&spy, CHANSPY_MIXAUDIO);
spy.type = mixmonitor_spy_type;
spy.status = CHANSPY_RUNNING;
spy.read_queue.format = AST_FORMAT_SLINEAR;
spy.write_queue.format = AST_FORMAT_SLINEAR;
if (mixmonitor->readvol) {
ast_set_flag(&spy, CHANSPY_READ_VOLADJUST);
spy.read_vol_adjustment = mixmonitor->readvol;
}
if (mixmonitor->writevol) {
ast_set_flag(&spy, CHANSPY_WRITE_VOLADJUST);
spy.write_vol_adjustment = mixmonitor->writevol;
}
ast_mutex_init(&spy.lock);
if (startmon(mixmonitor->chan, &spy)) {
ast_log(LOG_WARNING, "Unable to add '%s' spy to channel '%s'\n",
spy.type, mixmonitor->chan->name);
goto out2;
}
if (option_verbose > 1)
ast_verbose(VERBOSE_PREFIX_2 "Begin MixMonitor Recording %s\n", name);
ast_verbose(VERBOSE_PREFIX_2 "Begin MixMonitor Recording %s\n", mixmonitor->name);
while (1) {
ast_mutex_lock(&mixmonitor->spy.lock);
while (mixmonitor->spy.chan) {
struct ast_frame *next;
int write;
ast_mutex_lock(&spy.lock);
ast_channel_spy_trigger_wait(&spy);
ast_channel_spy_trigger_wait(&mixmonitor->spy);
if (ast_check_hangup(mixmonitor->chan) || spy.status != CHANSPY_RUNNING) {
ast_mutex_unlock(&spy.lock);
if (!mixmonitor->spy.chan || mixmonitor->spy.status != CHANSPY_RUNNING)
break;
}
while (1) {
if (!(f = ast_channel_spy_read_frame(&spy, SAMPLES_PER_FRAME)))
if (!(f = ast_channel_spy_read_frame(&mixmonitor->spy, SAMPLES_PER_FRAME)))
break;
write = (!ast_test_flag(mixmonitor, MUXFLAG_BRIDGED) ||
ast_bridged_channel(mixmonitor->chan));
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;
next = AST_LIST_NEXT(f, frame_list);
if (write)
ast_writestream(fs, f);
ast_frfree(f);
ast_writestream(mixmonitor->fs, f);
ast_frame_free(f, 0);
}
}
ast_mutex_unlock(&spy.lock);
}
ast_mutex_unlock(&mixmonitor->spy.lock);
ast_channel_spy_free(&mixmonitor->spy);
if (mixmonitor->post_process) {
char *p;
for (p = mixmonitor->post_process; *p ; p++) {
if (*p == '^' && *(p+1) == '{') {
*p = '$';
}
}
pbx_substitute_variables_helper(mixmonitor->chan, mixmonitor->post_process, post_process, sizeof(post_process) - 1);
}
stopmon(mixmonitor->chan, &spy);
if (option_verbose > 1)
ast_verbose(VERBOSE_PREFIX_2 "End MixMonitor Recording %s\n", name);
ast_verbose(VERBOSE_PREFIX_2 "End MixMonitor Recording %s\n", mixmonitor->name);
if (!ast_strlen_zero(post_process)) {
if (mixmonitor->post_process) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_2 "Executing [%s]\n", post_process);
ast_safe_system(post_process);
ast_verbose(VERBOSE_PREFIX_2 "Executing [%s]\n", mixmonitor->post_process);
ast_safe_system(mixmonitor->post_process);
}
ast_closestream(mixmonitor->fs);
out2:
ast_mutex_destroy(&spy.lock);
if (fs)
ast_closestream(fs);
out:
free(mixmonitor);
STANDARD_DECREMENT_USECOUNT;
return NULL;
}
@@ -279,38 +208,99 @@ static void launch_monitor_thread(struct ast_channel *chan, const char *filename
pthread_attr_t attr;
pthread_t thread;
struct mixmonitor *mixmonitor;
int len;
char *file_name, *ext;
char postprocess2[1024] = "";
unsigned int oflags;
size_t len;
len = sizeof(*mixmonitor) + strlen(filename) + 1;
if (!ast_strlen_zero(post_process))
len += strlen(post_process) + 1;
len = sizeof(*mixmonitor) + strlen(chan->name) + 1;
/* If a post process system command is given attach it to the structure */
if (!ast_strlen_zero(post_process)) {
char *p1, *p2;
p1 = ast_strdupa(post_process);
for (p2 = p1; *p2 ; p2++) {
if (*p2 == '^' && *(p2+1) == '{') {
*p2 = '$';
}
}
pbx_substitute_variables_helper(chan, p1, postprocess2, sizeof(postprocess2) - 1);
if (!ast_strlen_zero(postprocess2))
len += strlen(postprocess2) + 1;
}
/* Pre-allocate mixmonitor structure and spy */
if (!(mixmonitor = calloc(1, len))) {
ast_log(LOG_ERROR, "Memory Error!\n");
return;
}
mixmonitor->chan = chan;
mixmonitor->filename = (char *) mixmonitor + sizeof(*mixmonitor);
strcpy(mixmonitor->filename, filename);
if (!ast_strlen_zero(post_process)) {
mixmonitor->post_process = mixmonitor->filename + strlen(filename) + 1;
strcpy(mixmonitor->post_process, post_process);
}
mixmonitor->readvol = readvol;
mixmonitor->writevol = writevol;
/* Copy over flags and channel name */
mixmonitor->flags = flags;
mixmonitor->name = (char *) mixmonitor + sizeof(*mixmonitor);
strcpy(mixmonitor->name, chan->name);
if (!ast_strlen_zero(postprocess2)) {
mixmonitor->post_process = mixmonitor->name + strlen(mixmonitor->name) + 1;
strcpy(mixmonitor->post_process, postprocess2);
}
/* 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;
file_name = ast_strdupa(filename);
if ((ext = strrchr(file_name, '.'))) {
*(ext++) = '\0';
} else {
ext = "raw";
}
/* Move onto actually creating the filestream */
mixmonitor->fs = ast_writefile(file_name, ext, NULL, oflags, 0, 0644);
if (!mixmonitor->fs) {
ast_log(LOG_ERROR, "Cannot open %s.%s\n", file_name, ext);
free(mixmonitor);
return;
}
/* Setup the actual spy before creating our thread */
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;
}
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->spy)) {
ast_log(LOG_WARNING, "Unable to add '%s' spy to channel '%s'\n",
mixmonitor->spy.type, chan->name);
/* Since we couldn't add ourselves - bail out! */
ast_mutex_destroy(&mixmonitor->spy.lock);
ast_closestream(mixmonitor->fs);
free(mixmonitor);
return;
}
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
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 localuser *u;
struct ast_module_user *u;
struct ast_flags flags = {0};
char *parse;
AST_DECLARE_APP_ARGS(args,
@@ -324,19 +314,15 @@ static int mixmonitor_exec(struct ast_channel *chan, void *data)
return -1;
}
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
if (!(parse = ast_strdupa(data))) {
ast_log(LOG_WARNING, "Memory Error!\n");
LOCAL_USER_REMOVE(u);
return -1;
}
parse = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, parse);
if (ast_strlen_zero(args.filename)) {
ast_log(LOG_WARNING, "MixMonitor requires an argument (filename)\n");
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
@@ -388,7 +374,22 @@ 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);
LOCAL_USER_REMOVE(u);
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_channel_lock(chan);
ast_channel_spy_stop_by_type(chan, mixmonitor_spy_type);
ast_channel_unlock(chan);
ast_module_user_remove(u);
return 0;
}
@@ -410,57 +411,47 @@ static int mixmonitor_cli(int fd, int argc, char **argv)
else if (!strcasecmp(argv[1], "stop"))
ast_channel_spy_stop_by_type(chan, mixmonitor_spy_type);
ast_mutex_unlock(&chan->lock);
ast_channel_unlock(chan);
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"
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 },
};
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_cli_unregister(&cli_mixmonitor);
ast_cli_unregister_multiple(cli_mixmonitor, sizeof(cli_mixmonitor) / sizeof(struct ast_cli_entry));
res = ast_unregister_application(stop_app);
res |= ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
int res;
res = ast_cli_register(&cli_mixmonitor);
res |= ast_register_application(app, mixmonitor_exec, synopsis, desc);
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);
return res;
}
char *description(void)
{
return (char *) tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Mixed Audio Monitoring Application");

178
apps/app_morsecode.c Normal file
View File

@@ -0,0 +1,178 @@
/*
* 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++) {
char *dahdit;
if (*digit < 0) {
continue;
}
for (dahdit = morsecode[(int)*digit]; *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");

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

@@ -19,10 +19,16 @@
/*! \file
*
* \brief Silly application to play an MP3 file -- uses mpg123
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <string.h>
#include <stdio.h>
#include <signal.h>
@@ -31,10 +37,6 @@
#include <fcntl.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"
@@ -43,12 +45,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/translate.h"
#include "asterisk/options.h"
#define LOCAL_MPG_123 "/usr/local/bin/mpg123"
#define MPG_123 "/usr/bin/mpg123"
static char *tdesc = "Silly MP3 Application";
static char *app = "MP3Player";
static char *synopsis = "Play an MP3 file or stream";
@@ -58,9 +59,6 @@ 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)
{
@@ -71,6 +69,8 @@ static int mp3play(char *filename, int fd)
ast_log(LOG_WARNING, "Fork failed\n");
if (res)
return res;
if (ast_opt_high_priority)
ast_set_priority(0);
dup2(fd, STDOUT_FILENO);
for (x=0;x<256;x++) {
if (x != STDOUT_FILENO)
@@ -115,7 +115,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 localuser *u;
struct ast_module_user *u;
int fds[2];
int ms = -1;
int pid = -1;
@@ -134,11 +134,11 @@ static int mp3_exec(struct ast_channel *chan, void *data)
return -1;
}
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
if (pipe(fds)) {
ast_log(LOG_WARNING, "Unable to create pipe\n");
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
@@ -148,7 +148,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");
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
@@ -221,40 +221,25 @@ static int mp3_exec(struct ast_channel *chan, void *data)
if (!res && owriteformat)
ast_set_write_format(chan, owriteformat);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return res;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
return ast_register_application(app, mp3_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Silly MP3 Application");

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

@@ -19,10 +19,16 @@
/*! \file
*
* \brief Silly application to play an NBScat file -- uses nbscat8k
*
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <string.h>
#include <stdio.h>
#include <signal.h>
@@ -32,10 +38,6 @@
#include <sys/time.h>
#include <sys/socket.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -44,6 +46,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/translate.h"
#include "asterisk/options.h"
#define LOCAL_NBSCAT "/usr/local/bin/nbscat8k"
#define NBSCAT "/usr/bin/nbscat8k"
@@ -52,8 +55,6 @@ 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";
@@ -62,9 +63,6 @@ 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)
{
@@ -75,6 +73,9 @@ static int NBScatplay(int fd)
ast_log(LOG_WARNING, "Fork failed\n");
if (res)
return res;
if (ast_opt_high_priority)
ast_set_priority(0);
dup2(fd, STDOUT_FILENO);
for (x=0;x<256;x++) {
if (x != STDOUT_FILENO)
@@ -105,7 +106,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 localuser *u;
struct ast_module_user *u;
int fds[2];
int ms = -1;
int pid = -1;
@@ -118,11 +119,11 @@ static int NBScat_exec(struct ast_channel *chan, void *data)
short frdata[160];
} myf;
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
if (socketpair(AF_LOCAL, SOCK_STREAM, 0, fds)) {
ast_log(LOG_WARNING, "Unable to create socketpair\n");
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
@@ -132,7 +133,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");
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
@@ -202,40 +203,25 @@ static int NBScat_exec(struct ast_channel *chan, void *data)
if (!res && owriteformat)
ast_set_write_format(chan, owriteformat);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return res;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
return ast_register_application(app, NBScat_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Silly NBS Stream Application");

1868
apps/app_osplookup.c Executable file → Normal file

File diff suppressed because it is too large Load Diff

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

@@ -1,7 +1,7 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (c) 2004 - 2005 Digium, Inc. All rights reserved.
* Copyright (c) 2004 - 2006 Digium, Inc. All rights reserved.
*
* Mark Spencer <markster@digium.com>
*
@@ -20,19 +20,25 @@
*
* \brief page() - Paging application
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
/*** MODULEINFO
<depend>zaptel</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"
@@ -40,9 +46,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/module.h"
#include "asterisk/file.h"
#include "asterisk/app.h"
static const char *tdesc = "Page Multiple Phones";
#include "asterisk/chanvars.h"
#include "asterisk/utils.h"
static const char *app_page= "Page";
@@ -55,20 +60,20 @@ 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";
" q - quiet, do not play beep to caller\n"
" r - record the page into a file (see 'r' for app_meetme)\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 {
@@ -77,13 +82,14 @@ struct calloutdata {
char tech[64];
char resource[256];
char meetmeopts[64];
struct ast_variable *variables;
};
static void *page_thread(void *data)
{
struct calloutdata *cd = data;
ast_pbx_outgoing_app(cd->tech, AST_FORMAT_SLINEAR, cd->resource, 30000,
"MeetMe", cd->meetmeopts, NULL, 0, cd->cidnum, cd->cidname, NULL, NULL);
"MeetMe", cd->meetmeopts, NULL, 0, cd->cidnum, cd->cidname, cd->variables, NULL, NULL);
free(cd);
return NULL;
}
@@ -91,16 +97,40 @@ static void *page_thread(void *data)
static void launch_page(struct ast_channel *chan, const char *meetmeopts, const char *tech, const char *resource)
{
struct calloutdata *cd;
const char *varname;
struct ast_variable *lastvar = NULL;
struct ast_var_t *varptr;
pthread_t t;
pthread_attr_t attr;
cd = malloc(sizeof(struct calloutdata));
if (cd) {
memset(cd, 0, sizeof(struct calloutdata));
if ((cd = ast_calloc(1, sizeof(*cd)))) {
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)) {
@@ -112,42 +142,48 @@ static void launch_page(struct ast_channel *chan, const char *meetmeopts, const
static int page_exec(struct ast_channel *chan, void *data)
{
struct localuser *u;
struct ast_module_user *u;
char *options;
char *tech, *resource;
char meetmeopts[80];
struct ast_flags flags = { 0 };
unsigned int confid = rand();
unsigned int confid = ast_random();
struct ast_app *app;
char *tmp;
int res=0;
char originator[AST_CHANNEL_NAME];
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "This application requires at least one argument (destination(s) to page)\n");
return -1;
}
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
if (!(app = pbx_findapp("MeetMe"))) {
ast_log(LOG_WARNING, "There is no MeetMe application available!\n");
LOCAL_USER_REMOVE(u);
ast_module_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, '-')))
*tmp = '\0';
tmp = strsep(&options, "|");
if (options)
ast_app_parse_options(page_opts, &flags, NULL, options);
snprintf(meetmeopts, sizeof(meetmeopts), "%ud|%sqxdw", confid, ast_test_flag(&flags, PAGE_DUPLEX) ? "" : "m");
snprintf(meetmeopts, sizeof(meetmeopts), "%ud|%s%sqxdw(5)", confid, (ast_test_flag(&flags, PAGE_DUPLEX) ? "" : "m"),
(ast_test_flag(&flags, PAGE_RECORD) ? "r" : "") );
while ((tech = strsep(&tmp, "&"))) {
/* don't call the originating device */
if (!strcasecmp(tech, originator))
continue;
if ((resource = strchr(tech, '/'))) {
*resource++ = '\0';
launch_page(chan, meetmeopts, tech, resource);
@@ -155,52 +191,38 @@ static int page_exec(struct ast_channel *chan, void *data)
ast_log(LOG_WARNING, "Incomplete destination '%s' supplied.\n", tech);
}
}
if (!ast_test_flag(&flags, PAGE_QUIET)) {
res = ast_streamfile(chan, "beep", chan->language);
if (!res)
res = ast_waitstream(chan, "");
}
if (!res) {
snprintf(meetmeopts, sizeof(meetmeopts), "%ud|A%sqxd", confid, ast_test_flag(&flags, PAGE_DUPLEX) ? "" : "t");
pbx_exec(chan, app, meetmeopts, 1);
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);
}
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app_page);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
return ast_register_application(app_page, page_exec, page_synopsis, page_descrip);
}
char *description(void)
{
return (char *) tdesc;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Page Multiple Phones");
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}

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

@@ -1,7 +1,7 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 1999 - 2005, Digium, Inc.
* Copyright (C) 1999 - 2006, Digium, Inc.
*
* Mark Spencer <markster@digium.com>
*
@@ -22,20 +22,23 @@
/*! \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"
@@ -46,8 +49,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/logger.h"
#include "asterisk/say.h"
#include "asterisk/lock.h"
static char *tdesc = "Call Parking and Announce Application";
#include "asterisk/utils.h"
static char *app = "ParkAndAnnounce";
@@ -55,18 +57,23 @@ 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 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";
"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";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int parkandannounce_exec(struct ast_channel *chan, void *data)
{
int res=0;
@@ -75,6 +82,7 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data)
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;
char *s,*orig_s;
@@ -82,20 +90,18 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data)
struct outgoing_helper oh;
int outstate;
struct localuser *u;
struct ast_module_user *u;
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "ParkAndAnnounce requires arguments: (announce:template|timeout|dial|[return_context])\n");
return -1;
}
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
l=strlen(data)+2;
orig_s=malloc(l);
if(!orig_s) {
ast_log(LOG_WARNING, "Out of memory\n");
LOCAL_USER_REMOVE(u);
l=strlen(data)+2;
if (!(orig_s = ast_malloc(l))) {
ast_module_user_remove(u);
return -1;
}
s=orig_s;
@@ -105,7 +111,7 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data)
if(! template) {
ast_log(LOG_WARNING, "PARK: An announce template must be defined\n");
free(orig_s);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
@@ -117,7 +123,7 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data)
if(!dial) {
ast_log(LOG_WARNING, "PARK: A dial resource must be specified i.e: Console/dsp or Zap/g1/5551212\n");
free(orig_s);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
} else {
dialtech=strsep(&dial, "/");
@@ -150,14 +156,14 @@ 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);
free(orig_s);
LOCAL_USER_REMOVE(u);
ast_module_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 && strcasecmp(exten, "BYEXTENSION"))
if (exten)
strncpy(chan->exten, exten, sizeof(chan->exten)-1);
if(context)
if (context)
strncpy(chan->context, context, sizeof(chan->context)-1);
} else { /* increment the priority by default*/
chan->priority++;
@@ -181,8 +187,10 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data)
/* 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) {
@@ -195,13 +203,13 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data)
ast_log(LOG_WARNING, "PARK: Channel %s was never answered for the announce.\n", dchan->name);
ast_hangup(dchan);
free(orig_s);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
} else {
ast_log(LOG_WARNING, "PARK: Unable to allocate announce channel.\n");
free(orig_s);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
@@ -239,43 +247,26 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data)
ast_hangup(dchan);
free(orig_s);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return res;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
/* return ast_register_application(app, park_exec); */
return ast_register_application(app, parkandannounce_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Call Parking and Announce Application");

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

@@ -19,18 +19,20 @@
/*! \file
*
* \brief Trivial application to playback a sound file
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -41,8 +43,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/utils.h"
#include "asterisk/options.h"
#include "asterisk/app.h"
static char *tdesc = "Sound File Playback Application";
#include "asterisk/cli.h"
#include "asterisk/localtime.h"
#include "asterisk/say.h"
static char *app = "Playback";
@@ -64,19 +67,326 @@ static char *descrip =
" SUCCESS | FAILED\n"
;
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static struct ast_config *say_cfg;
/* 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;
ast_log(LOG_WARNING, "string <%s> depth <%d>\n", s, depth);
if (depth++ > 10) {
ast_log(LOG_WARNING, "recursion too deep, exiting\n");
return -1;
}
/* scan languages same as in file.c */
if (a->language == NULL)
a->language = "en"; /* default */
ast_log(LOG_WARNING, "try <%s> in <%s>\n", s, a->language);
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;
ast_log(LOG_WARNING, "value is <%s>\n", s);
n = ast_var_assign("SAY", s);
AST_LIST_INSERT_HEAD(&head, n, entries);
/* scan the body, one piece at a time */
while ( ret <= 0 && (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));
ast_log(LOG_WARNING, "doing [%s]\n", 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);
}
}
}
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 };
if (!say_cfg) {
ast_log(LOG_WARNING, "no say.conf, cannot spell '%s'\n", string);
return -1;
}
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", 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",
"say load new|old" },
};
static int playback_exec(struct ast_channel *chan, void *data)
{
int res = 0, mres = 0;
struct localuser *u;
char *tmp = NULL;
int res = 0;
struct ast_module_user *u;
char *tmp;
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);
@@ -87,20 +397,16 @@ static int playback_exec(struct ast_channel *chan, void *data)
return -1;
}
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'))
@@ -110,71 +416,76 @@ 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 */
LOCAL_USER_REMOVE(u);
return 0;
goto done;
} else if (!option_noanswer)
/* Otherwise answer unless we're supposed to send this while on-hook */
res = ast_answer(chan);
}
if (!res) {
int mres = 0;
char *front;
ast_stopstream(chan);
front = tmp;
while (!res && front) {
if ((back = strchr(front, '&'))) {
*back = '\0';
back++;
}
res = ast_streamfile(chan, front, chan->language);
while (!res && (front = strsep(&tmp, "&"))) {
if (option_say)
res = say_full(chan, front, "", chan->language, NULL, -1, -1);
else
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 || option_priority_jumping)
if (priority_jump || ast_opt_priority_jumping)
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
res = 0;
mres = 1;
}
front = back;
}
if (mres)
pbx_builtin_setvar_helper(chan, "PLAYBACKSTATUS", "FAILED");
else
pbx_builtin_setvar_helper(chan, "PLAYBACKSTATUS", "SUCCESS");
pbx_builtin_setvar_helper(chan, "PLAYBACKSTATUS", mres ? "FAILED" : "SUCCESS");
}
LOCAL_USER_REMOVE(u);
done:
ast_module_user_remove(u);
return res;
}
int unload_module(void)
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 res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
if (say_cfg)
ast_config_destroy(say_cfg);
return res;
}
int load_module(void)
static int load_module(void)
{
reload();
ast_cli_register_multiple(cli_playback, sizeof(cli_playback) / sizeof(struct ast_cli_entry));
return ast_register_application(app, playback_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Sound File Playback Application",
.load = load_module,
.unload = unload_module,
.reload = reload,
);

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

@@ -19,18 +19,20 @@
/*! \file
*
* \brief Block all calls without Caller*ID, require phone # to be entered
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/utils.h"
@@ -47,8 +49,6 @@ 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,11 +74,6 @@ static char *descrip =
" SUCCESS | FAILED \n"
;
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int privacy_exec (struct ast_channel *chan, void *data)
{
@@ -87,9 +82,9 @@ static int privacy_exec (struct ast_channel *chan, void *data)
int maxretries = 3;
int minlength = 10;
int x = 0;
char *s;
const char *s;
char phone[30];
struct localuser *u;
struct ast_module_user *u;
struct ast_config *cfg = NULL;
char *parse = NULL;
int priority_jump = 0;
@@ -99,7 +94,8 @@ static int privacy_exec (struct ast_channel *chan, void *data)
AST_APP_ARG(options);
);
LOCAL_USER_ADD (u);
u = ast_module_user_add(chan);
if (!ast_strlen_zero(chan->cid.cid_num)) {
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_3 "CallerID Present: Skipping\n");
@@ -108,19 +104,13 @@ static int privacy_exec (struct ast_channel *chan, void *data)
if (chan->_state != AST_STATE_UP) {
res = ast_answer(chan);
if (res) {
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
}
if (!ast_strlen_zero((char *)data))
{
if (!ast_strlen_zero(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);
@@ -193,16 +183,24 @@ static int privacy_exec (struct ast_channel *chan, void *data)
}
/*Got a number, play sounds and send them on their way*/
if ((retries < maxretries) && res == 1 ) {
if ((retries < maxretries) && res >= 0 ) {
res = ast_streamfile(chan, "privacy-thankyou", chan->language);
if (!res)
res = ast_waitstream(chan, "");
ast_set_callerid (chan, phone, "Privacy Manager", NULL);
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_3 "Changed Caller*ID to %s\n",phone);
ast_set_callerid (chan, phone, "Privacy Manager", NULL);
/* Clear the unavailable presence bit so if it came in on PRI
* the caller id will now be passed out to other channels
*/
chan->cid.cid_pres &= (AST_PRES_UNAVAILABLE ^ 0xFF);
if (option_verbose > 2) {
ast_verbose (VERBOSE_PREFIX_3 "Changed Caller*ID to %s, callerpres to %d\n",phone,chan->cid.cid_pres);
}
pbx_builtin_setvar_helper(chan, "PRIVACYMGRSTATUS", "SUCCESS");
} else {
if (priority_jump || option_priority_jumping)
if (priority_jump || ast_opt_priority_jumping)
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
pbx_builtin_setvar_helper(chan, "PRIVACYMGRSTATUS", "FAILED");
}
@@ -210,45 +208,25 @@ static int privacy_exec (struct ast_channel *chan, void *data)
ast_config_destroy(cfg);
}
LOCAL_USER_REMOVE (u);
return 0;
ast_module_user_remove(u);
return 0;
}
int
unload_module (void)
static int unload_module(void)
{
int res;
res = ast_unregister_application (app);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int
load_module (void)
static int load_module(void)
{
return ast_register_application (app, privacy_exec, synopsis,
descrip);
return ast_register_application (app, privacy_exec, synopsis, descrip);
}
char *
description (void)
{
return tdesc;
}
int
usecount (void)
{
int res;
STANDARD_USECOUNT (res);
return res;
}
char *
key ()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Require phone number to be entered, if no CallerID sent");

3077
apps/app_queue.c Executable file → Normal file

File diff suppressed because it is too large Load Diff

63
apps/app_random.c Executable file → Normal file
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"
static char *tdesc = "Random goto";
/*! \todo The Random() app should be removed from trunk following the release of 1.4 */
static char *app_random = "Random";
@@ -47,81 +47,62 @@ 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";
" probability := INTEGER in the range 1 to 100\n"
"DEPRECATED: Use GotoIf($[${RAND(1,100)} > <number>]?<label>)\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 localuser *u;
struct ast_module_user *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;
}
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
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 ((random() % 100) + probint > 100) {
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) {
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);
}
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return res;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app_random);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static 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);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Random goto");

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

@@ -19,18 +19,20 @@
/*! \file
*
* \brief Trivial application to read a variable
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -41,8 +43,19 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/translate.h"
#include "asterisk/options.h"
#include "asterisk/utils.h"
#include "asterisk/indications.h"
static char *tdesc = "Read Variable Application";
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 *app = "Read";
@@ -52,131 +65,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.\n"
" filename -- file to play before reading digits or tone with option i\n"
" maxdigits -- maximum acceptable number of digits. Stops reading after\n"
" maxdigits have been entered (without requiring the user to\n"
" press the '#' key).\n"
" Defaults to 0 - no limit - wait for the user press the '#' key.\n"
" Any value below 0 means the same. Max accepted value is 255.\n"
" option -- may be 'skip' to return immediately if the line is not up,\n"
" or 'noanswer' to read digits even if the line is not up.\n"
" 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"
" attempts -- if greater than 1, that many attempts will be made in the \n"
" event no data is entered.\n"
" timeout -- if greater than 0, that value will override the default timeout.\n\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"
"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 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;
struct ast_module_user *u;
char tmp[256] = "";
int maxdigits = 255;
int tries = 1, to = 0, x = 0;
char *argcopy = NULL;
char *args[8];
struct tone_zone_sound *ts;
struct ast_flags flags = {0};
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;
}
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
argcopy = ast_strdupa(data);
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;
}
AST_STANDARD_APP_ARGS(arglist, argcopy);
varname = args[x++];
filename = args[x++];
maxdigitstr = args[x++];
options = args[x++];
loops = args[x++];
timeout = args[x++];
if (!ast_strlen_zero(arglist.options)) {
ast_app_parse_options(read_app_options, &flags, NULL, arglist.options);
}
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)
if (!ast_strlen_zero(arglist.attempts)) {
tries = atoi(arglist.attempts);
if (tries <= 0)
tries = 1;
}
if(timeout) {
to = atoi(timeout);
if (!ast_strlen_zero(arglist.timeout)) {
to = atoi(arglist.timeout);
if (to <= 0)
to = 0;
else
to *= 1000;
}
if (ast_strlen_zero(filename))
filename = NULL;
if (maxdigitstr) {
maxdigits = atoi(maxdigitstr);
if (ast_strlen_zero(arglist.filename)) {
arglist.filename = NULL;
}
if (!ast_strlen_zero(arglist.maxdigits)) {
maxdigits = atoi(arglist.maxdigits);
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(varname)) {
if (ast_strlen_zero(arglist.variable)) {
ast_log(LOG_WARNING, "Invalid! Usage: Read(variable[|filename][|maxdigits][|option][|attempts][|timeout])\n\n");
LOCAL_USER_REMOVE(u);
ast_module_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 (option_skip) {
if (ast_test_flag(&flags,OPT_SKIP)) {
/* At the user's option, skip if the line is not up */
pbx_builtin_setvar_helper(chan, varname, "\0");
LOCAL_USER_REMOVE(u);
pbx_builtin_setvar_helper(chan, arglist.variable, "\0");
ast_module_user_remove(u);
return 0;
} else if (!option_noanswer) {
} else if (!ast_test_flag(&flags,OPT_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);
res = ast_app_getdata(chan, filename, tmp, maxdigits, to);
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);
}
if (res > -1) {
pbx_builtin_setvar_helper(chan, varname, tmp);
pbx_builtin_setvar_helper(chan, arglist.variable, tmp);
if (!ast_strlen_zero(tmp)) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "User entered '%s'\n", tmp);
@@ -192,44 +205,30 @@ 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");
}
}
}
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return res;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
return ast_register_application(app, read_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Read Variable Application");

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

@@ -20,18 +20,20 @@
*
* \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"
@@ -40,8 +42,6 @@ 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,15 +52,11 @@ 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 localuser *u;
struct ast_module_user *u;
char *s, *varname=NULL, *file=NULL, *length=NULL, *returnvar=NULL;
int len=0;
@@ -69,14 +65,9 @@ static int readfile_exec(struct ast_channel *chan, void *data)
return -1;
}
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
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, "|");
@@ -84,7 +75,7 @@ static int readfile_exec(struct ast_channel *chan, void *data)
if (!varname || !file) {
ast_log(LOG_ERROR, "No file or variable specified!\n");
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
@@ -95,49 +86,35 @@ static int readfile_exec(struct ast_channel *chan, void *data)
}
}
returnvar = ast_read_textfile(file);
if(len > 0){
if(len < strlen(returnvar))
returnvar[len]='\0';
else
ast_log(LOG_WARNING,"%s is longer than %d, and %d \n", file, len, (int)strlen(returnvar));
if ((returnvar = ast_read_textfile(file))) {
if (len > 0) {
if (len < strlen(returnvar))
returnvar[len]='\0';
else
ast_log(LOG_WARNING, "%s is longer than %d, and %d \n", file, len, (int)strlen(returnvar));
}
pbx_builtin_setvar_helper(chan, varname, returnvar);
free(returnvar);
}
pbx_builtin_setvar_helper(chan, varname, returnvar);
free(returnvar);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return res;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app_readfile);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
return ast_register_application(app_readfile, readfile_exec, readfile_synopsis, readfile_descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Stores output of file into a variable");

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

@@ -20,19 +20,22 @@
/*! \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"
@@ -46,25 +49,27 @@ 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 to the name.\n"
"e.g. prefix of 'var_' would make the column 'name' become the variable ${var_name}\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";
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 updated to <newval>\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";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int cli_load_realtime(int fd, int argc, char **argv)
static int cli_realtime_load(int fd, int argc, char **argv)
{
char *header_format = "%30s %-30s\n";
struct ast_variable *var=NULL;
@@ -89,7 +94,7 @@ static int cli_load_realtime(int fd, int argc, char **argv)
return RESULT_SUCCESS;
}
static int cli_update_realtime(int fd, int argc, char **argv) {
static int cli_realtime_update(int fd, int argc, char **argv) {
int res = 0;
if(argc<7) {
@@ -110,45 +115,49 @@ static int cli_update_realtime(int fd, int argc, char **argv) {
return RESULT_SUCCESS;
}
static char cli_load_realtime_usage[] =
static char cli_realtime_load_usage[] =
"Usage: realtime load <family> <colmatch> <value>\n"
" Prints out a list of variables using the RealTime driver.\n";
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[] =
static char cli_realtime_update_usage[] =
"Usage: realtime update <family> <colmatch> <value>\n"
" Update a single variable using the RealTime driver.\n";
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 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 int realtime_update_exec(struct ast_channel *chan, void *data)
{
char *family=NULL, *colmatch=NULL, *value=NULL, *newcol=NULL, *newval=NULL;
struct localuser *u;
int res = 0;
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");
if (ast_strlen_zero(data)) {
ast_log(LOG_ERROR,"Invalid input: usage %s\n",UUSAGE);
return -1;
}
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
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);
}
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);
}
}
}
@@ -156,10 +165,13 @@ static int realtime_update_exec(struct ast_channel *chan, void *data)
ast_log(LOG_ERROR,"Invalid input: usage %s\n",UUSAGE);
res = -1;
} else {
ast_update_realtime(family,colmatch,value,newcol,newval,NULL);
count = ast_update_realtime(family,colmatch,value,newcol,newval,NULL);
}
LOCAL_USER_REMOVE(u);
snprintf(countc, sizeof(countc), "%d", count);
pbx_builtin_setvar_helper(chan, "REALTIMECOUNT", countc);
ast_module_user_remove(u);
return res;
}
@@ -167,27 +179,29 @@ static int realtime_update_exec(struct ast_channel *chan, void *data)
static int realtime_exec(struct ast_channel *chan, void *data)
{
int res=0;
struct localuser *u;
int res=0, count=0;
struct ast_module_user *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;
}
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
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);
}
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) ) {
@@ -207,56 +221,41 @@ 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);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return res;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_cli_unregister(&cli_load_realtime_cmd);
res |= ast_cli_unregister(&cli_update_realtime_cmd);
res |= ast_unregister_application(uapp);
ast_cli_unregister_multiple(cli_realtime, sizeof(cli_realtime) / sizeof(struct ast_cli_entry));
res = ast_unregister_application(uapp);
res |= ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
int res;
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);
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_register_application(app, realtime_exec, synopsis, desc);
return res;
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Realtime Data Lookup/Rewrite");

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

@@ -20,17 +20,19 @@
*
* \brief Trivial application to record a sound file
*
* \author Matthew Fredrickson <creslin@digium.com>
*
* \ingroup applications
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -41,8 +43,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/dsp.h"
#include "asterisk/utils.h"
#include "asterisk/options.h"
#include "asterisk/app.h"
static char *tdesc = "Trivial Record Application";
static char *app = "Record";
@@ -61,7 +63,8 @@ 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 instead of default '#'\n"
" 't' : use alternate '*' terminator key (DTMF) instead of default '#'\n"
" 'x' : ignore all terminator keys (DTMF) and keep recording until hangup\n"
"\n"
"If filename contains '%d', these characters will be replaced with a number\n"
"incremented by one each time the file is recorded. \n\n"
@@ -70,9 +73,6 @@ static char *descrip =
"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)
{
@@ -85,7 +85,7 @@ static int record_exec(struct ast_channel *chan, void *data)
char tmp[256];
struct ast_filestream *s = '\0';
struct localuser *u;
struct ast_module_user *u;
struct ast_frame *f = NULL;
struct ast_dsp *sildet = NULL; /* silence detector dsp */
@@ -111,15 +111,10 @@ static int record_exec(struct ast_channel *chan, void *data)
return -1;
}
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
/* 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, "|");
@@ -140,7 +135,7 @@ static int record_exec(struct ast_channel *chan, void *data)
}
if (!ext) {
ast_log(LOG_WARNING, "No extension specified to filename!\n");
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
if (silstr) {
@@ -173,6 +168,8 @@ 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;
}
@@ -183,10 +180,36 @@ static int record_exec(struct ast_channel *chan, void *data)
/* these are to allow the use of the %d in the config file for a wild card of sort to
create a new file with the inputed name scheme */
if (percentflag) {
AST_DECLARE_APP_ARGS(fname,
AST_APP_ARG(piece)[100];
);
char *tmp2 = ast_strdupa(filename);
char countstring[15];
int i;
/* Separate each piece out by the format specifier */
AST_NONSTANDARD_APP_ARGS(fname, tmp2, '%');
do {
snprintf(tmp, sizeof(tmp), filename, count);
int tmplen;
/* First piece has no leading percent, so it's copied verbatim */
ast_copy_string(tmp, fname.piece[0], sizeof(tmp));
tmplen = strlen(tmp);
for (i = 1; i < fname.argc; i++) {
if (fname.piece[i][0] == 'd') {
/* Substitute the count */
snprintf(countstring, sizeof(countstring), "%d", count);
ast_copy_string(tmp + tmplen, countstring, sizeof(tmp) - tmplen);
tmplen += strlen(countstring);
} else if (tmplen + 2 < sizeof(tmp)) {
/* Unknown format specifier - just copy it verbatim */
tmp[tmplen++] = '%';
tmp[tmplen++] = fname.piece[i][0];
}
/* Copy the remaining portion of the piece */
ast_copy_string(tmp + tmplen, &(fname.piece[i][1]), sizeof(tmp) - tmplen);
}
count++;
} while ( ast_fileexists(tmp, ext, chan->language) != -1 );
} while (ast_fileexists(tmp, ext, chan->language) > 0);
pbx_builtin_setvar_helper(chan, "RECORDED_FILE", tmp);
} else
strncpy(tmp, filename, sizeof(tmp)-1);
@@ -197,7 +220,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 */
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return 0;
} else if (!option_noanswer) {
/* Otherwise answer unless we're supposed to record while on-hook */
@@ -228,13 +251,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");
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
sildet = ast_dsp_new();
if (!sildet) {
ast_log(LOG_WARNING, "Unable to create silence detector :(\n");
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
ast_dsp_set_threshold(sildet, 256);
@@ -249,7 +272,7 @@ static int record_exec(struct ast_channel *chan, void *data)
goto out;
}
if (option_transmit_silence_during_record)
if (ast_opt_transmit_silence)
silgen = ast_channel_start_silence_generator(chan);
/* Request a video update */
@@ -277,6 +300,7 @@ static int record_exec(struct ast_channel *chan, void *data)
if (res) {
ast_log(LOG_WARNING, "Problem writing frame\n");
ast_frfree(f);
break;
}
@@ -295,16 +319,15 @@ static int record_exec(struct ast_channel *chan, void *data)
break;
}
}
}
if (f->frametype == AST_FRAME_VIDEO) {
} else if (f->frametype == AST_FRAME_VIDEO) {
res = ast_writestream(s, f);
if (res) {
ast_log(LOG_WARNING, "Problem writing frame\n");
ast_frfree(f);
break;
}
}
if ((f->frametype == AST_FRAME_DTMF) &&
} else if ((f->frametype == AST_FRAME_DTMF) &&
(f->subclass == terminator)) {
ast_frfree(f);
break;
@@ -338,40 +361,25 @@ static int record_exec(struct ast_channel *chan, void *data)
ast_dsp_free(sildet);
}
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return res;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
return ast_register_application(app, record_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Trivial Record Application");

3023
apps/app_rpt.c Executable file → Normal file

File diff suppressed because it is too large Load Diff

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

@@ -1,7 +1,8 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (c) 2003 Tilghman Lesher. All rights reserved.
* Copyright (c) 2003, 2006 Tilghman Lesher. All rights reserved.
* Copyright (c) 2006 Digium, Inc.
*
* Tilghman Lesher <app_sayunixtime__200309@the-tilghman.com>
*
@@ -18,19 +19,21 @@
/*! \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"
@@ -38,9 +41,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/say.h"
static char *tdesc = "Say time";
#include "asterisk/app.h"
static char *app_sayunixtime = "SayUnixTime";
static char *app_datetime = "DateTime";
@@ -64,78 +65,55 @@ 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)
{
int res=0;
struct localuser *u;
char *s,*zone=NULL,*timec,*format;
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;
time_t unixtime;
struct timeval tv;
LOCAL_USER_ADD(u);
if (!data)
return 0;
tv = ast_tvnow();
unixtime = (time_t)tv.tv_sec;
parse = ast_strdupa(data);
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";
}
u = ast_module_user_add(chan);
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_STANDARD_APP_ARGS(args, parse);
if (chan->_state != AST_STATE_UP) {
ast_get_time_t(args.timeval, &unixtime, time(NULL), NULL);
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, format, zone);
LOCAL_USER_REMOVE(u);
if (!res)
res = ast_say_date_with_format(chan, unixtime, AST_DIGIT_ANY,
chan->language, args.format, args.timezone);
ast_module_user_remove(u);
return res;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app_sayunixtime);
res |= ast_unregister_application(app_datetime);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
int res;
@@ -145,19 +123,4 @@ int load_module(void)
return res;
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Say time");

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

@@ -19,18 +19,20 @@
/*! \file
*
* \brief App to send DTMF digits
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -41,8 +43,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/options.h"
#include "asterisk/utils.h"
#include "asterisk/app.h"
static char *tdesc = "Send DTMF digits Application";
#include "asterisk/manager.h"
static char *app = "SendDTMF";
@@ -50,18 +51,15 @@ static char *synopsis = "Sends arbitrary DTMF digits";
static char *descrip =
" SendDTMF(digits[|timeout_ms]): Sends DTMF digits on a channel. \n"
" Accepted digits: 0-9, *#abcd\n"
" Accepted digits: 0-9, *#abcd, w (.5s pause)\n"
" The application will either pass the assigned digits or terminate if it\n"
" encounters an error.\n";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int senddtmf_exec(struct ast_channel *chan, void *data)
{
int res = 0;
struct localuser *u;
struct ast_module_user *u;
char *digits = NULL, *to = NULL;
int timeout = 250;
@@ -70,14 +68,9 @@ static int senddtmf_exec(struct ast_channel *chan, void *data)
return 0;
}
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
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';
@@ -85,45 +78,67 @@ 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);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return res;
}
int unload_module(void)
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, struct message *m)
{
char *channel = astman_get_header(m, "Channel");
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");
ast_mutex_unlock(&chan->lock);
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 res;
res = ast_unregister_application(app);
res |= ast_manager_unregister("PlayDTMF");
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
{
return ast_register_application(app, senddtmf_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
static int load_module(void)
{
int res;
STANDARD_USECOUNT(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);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Send DTMF digits Application");

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

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

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

@@ -19,18 +19,20 @@
/*! \file
*
* \brief App to set callerid
*
* \author Mark Spencer <markster@digium.com>
*
* \ingroup applications
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -45,9 +47,6 @@ 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"
@@ -67,29 +66,25 @@ static char *descrip2 =
static int setcallerid_pres_exec(struct ast_channel *chan, void *data)
{
struct localuser *u;
struct ast_module_user *u;
int pres = -1;
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
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);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return 0;
}
chan->cid.cid_pres = pres;
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return 0;
}
static char *tdesc = "Set CallerID Application";
static char *app = "SetCallerID";
static char *synopsis = "Set CallerID";
@@ -104,23 +99,24 @@ static int setcallerid_exec(struct ast_channel *chan, void *data)
char *tmp = NULL;
char name[256];
char num[256];
struct localuser *u;
struct ast_module_user *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;
}
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);
if (!dep_warning) {
dep_warning = 1;
ast_log(LOG_WARNING, "SetCallerID is deprecated. Please use Set(CALLERID(all)=...) or Set(CALLERID(ani)=...) instead.\n");
}
tmp = ast_strdupa(data);
opt = strchr(tmp, '|');
if (opt) {
@@ -133,24 +129,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);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return res;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app2);
res |= ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
int res;
@@ -160,19 +156,4 @@ int load_module(void)
return res;
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Set CallerID Application");

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

@@ -19,18 +19,20 @@
/*! \file
*
* \brief Applictions connected with CDR engine
*
*
* \author Justin Huff <jjhuff@mspin.net>
*
* \ingroup applications
*/
#include <sys/types.h>
#include <stdlib.h>
#include <string.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <sys/types.h>
#include <stdlib.h>
#include <string.h>
#include "asterisk/channel.h"
#include "asterisk/cdr.h"
#include "asterisk/module.h"
@@ -41,8 +43,6 @@ 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"
@@ -72,9 +72,6 @@ static char *appendcdruserfield_descrip =
static char *appendcdruserfield_app = "AppendCDRUserField";
static char *appendcdruserfield_synopsis = "Append to the CDR user field";
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int action_setcdruserfield(struct mansession *s, struct message *m)
{
@@ -107,37 +104,49 @@ static int action_setcdruserfield(struct mansession *s, struct message *m)
static int setcdruserfield_exec(struct ast_channel *chan, void *data)
{
struct localuser *u;
struct ast_module_user *u;
int res = 0;
static int dep_warning = 0;
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
if (chan->cdr && data) {
ast_cdr_setuserfield(chan, (char*)data);
}
LOCAL_USER_REMOVE(u);
if (!dep_warning) {
dep_warning = 1;
ast_log(LOG_WARNING, "SetCDRUserField is deprecated. Please use CDR(userfield) instead.\n");
}
ast_module_user_remove(u);
return res;
}
static int appendcdruserfield_exec(struct ast_channel *chan, void *data)
{
struct localuser *u;
struct ast_module_user *u;
int res = 0;
static int dep_warning = 0;
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
if (chan->cdr && data) {
ast_cdr_appenduserfield(chan, (char*)data);
}
LOCAL_USER_REMOVE(u);
if (!dep_warning) {
dep_warning = 1;
ast_log(LOG_WARNING, "AppendCDRUserField is deprecated. Please use CDR(userfield) instead.\n");
}
ast_module_user_remove(u);
return res;
}
int unload_module(void)
static int unload_module(void)
{
int res;
@@ -145,12 +154,12 @@ int unload_module(void)
res |= ast_unregister_application(appendcdruserfield_app);
res |= ast_manager_unregister("SetCDRUserField");
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
int res;
@@ -161,19 +170,4 @@ int load_module(void)
return res;
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "CDR user field apps");

View File

@@ -1,132 +0,0 @@
/*
* 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;
}

View File

@@ -1,131 +0,0 @@
/*
* 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;
}

View File

@@ -1,132 +0,0 @@
/*
* 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;
}

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

@@ -19,17 +19,19 @@
/*! \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"
@@ -42,9 +44,6 @@ 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" },
@@ -65,20 +64,26 @@ 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"
;
static int settransfercapability_exec(struct ast_channel *chan, void *data)
{
char *tmp = NULL;
struct localuser *u;
struct ast_module_user *u;
int x;
char *opts;
int transfercapability = -1;
static int dep_warning = 0;
LOCAL_USER_ADD(u);
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");
}
if (data)
tmp = ast_strdupa(data);
else
@@ -96,7 +101,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);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return 0;
}
@@ -105,41 +110,26 @@ 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);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return 0;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
return ast_register_application(app, settransfercapability_exec, synopsis, descrip);
}
char *description(void)
{
return synopsis;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Set ISDN Transfer Capability");

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

@@ -3,7 +3,7 @@
*
* Copyright (C) <Year>, <Your Name Here>
*
* <Your Name Here> <<You Email Here>>
* <Your Name Here> <<Your Email Here>>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
@@ -19,20 +19,26 @@
/*! \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"
@@ -41,110 +47,87 @@ 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";
#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 */
enum {
OPTION_A = (1 << 0),
OPTION_B = (1 << 1),
OPTION_C = (1 << 2),
} option_flags;
AST_DECLARE_OPTIONS(app_opts,{
['a'] = { OPTION_A },
['b'] = { OPTION_B, 1 },
['c'] = { OPTION_C, 2 }
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;
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),
});
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int app_exec(struct ast_channel *chan, void *data)
{
int res = 0;
struct ast_flags flags;
struct localuser *u;
char *options=NULL;
char *dummy = NULL;
char *args;
int argc = 0;
char *opts[2];
char *argv[2];
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);
);
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "%s requires an argument (dummy|[options])\n",app);
LOCAL_USER_REMOVE(u);
ast_log(LOG_WARNING, "%s requires an argument (dummy|[options])\n", app);
return -1;
}
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
/* Do our thing here */
/* We need to make a copy of the input string if we are going to modify it! */
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_parseoptions(app_opts, &flags, opts, options);
}
parse = ast_strdupa(data);
if (!ast_strlen_zero(dummy))
ast_log(LOG_NOTICE, "Dummy value is : %s\n", dummy);
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_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[0] ? opts[0] : "<unspecified>");
ast_log(LOG_NOTICE, "Option B is set with : %s\n", opts[OPTION_ARG_B] ? opts[OPTION_ARG_B] : "<unspecified>");
if (ast_test_flag(&flags, OPTION_C))
ast_log(LOG_NOTICE,"Option C is set with : %s\n", opts[1] ? opts[1] : "<unspecified>");
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);
LOCAL_USER_REMOVE(u);
return res;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
return res;
}
int load_module(void)
static int load_module(void)
{
return ast_register_application(app, app_exec, synopsis, descrip);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Skeleton (sample) Application");

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

@@ -18,9 +18,14 @@
*
* \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>
@@ -31,10 +36,6 @@
#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"
@@ -60,8 +61,6 @@ 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";
@@ -94,9 +93,6 @@ 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[] = {
@@ -197,7 +193,7 @@ static void sms_release (struct ast_channel *chan, void *data)
static void sms_messagetx (sms_t * h);
/*--- numcpy: copy number, skipping non digits apart from leading + */
/*! \brief copy number, skipping non digits apart from leading + */
static void numcpy (char *d, char *s)
{
if (*s == '+')
@@ -210,7 +206,7 @@ static void numcpy (char *d, char *s)
*d = 0;
}
/*--- isodate: static, return a date/time in ISO format */
/*! \brief static, return a date/time in ISO format */
static char * isodate (time_t t)
{
static char date[20];
@@ -218,7 +214,7 @@ static char * isodate (time_t t)
return date;
}
/*--- utf8decode: reads next UCS character from null terminated UTF-8 string and advanced pointer */
/*! \brief 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)
@@ -264,7 +260,7 @@ static long utf8decode (unsigned char **pp)
return *p; /* not sensible */
}
/*--- 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 */
/*! \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 */
/* 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 */
@@ -334,7 +330,7 @@ static int packsms7 (unsigned char *o, int udhl, unsigned char *udh, int udl, un
return n;
}
/*--- 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 */
/*! \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 */
/* 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 */
@@ -366,7 +362,7 @@ static int packsms8 (unsigned char *o, int udhl, unsigned char *udh, int udl, un
return p;
}
/*--- packsms16: takes a binary header (udhl bytes at udh) and UCS-2
/*! \brief 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
@@ -403,7 +399,7 @@ static int packsms16 (unsigned char *o, int udhl, unsigned char *udh, int udl, u
return p;
}
/*--- packsms: general pack, with length and data,
/*! \brief 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)
{
@@ -435,7 +431,7 @@ static int packsms (unsigned char dcs, unsigned char *base, unsigned int udhl, u
}
/*--- packdate: pack a date and return */
/*! \brief pack a date and return */
static void packdate (unsigned char *o, time_t w)
{
struct tm *t = localtime (&w);
@@ -456,7 +452,7 @@ static void packdate (unsigned char *o, time_t w)
*o++ = ((z % 10) << 4) + z / 10;
}
/*--- unpackdate: unpack a date and return */
/*! \brief unpack a date and return */
static time_t unpackdate (unsigned char *i)
{
struct tm t;
@@ -474,7 +470,7 @@ static time_t unpackdate (unsigned char *i)
return mktime (&t);
}
/*--- unpacksms7: unpacks bytes (7 bit encoding) at i, len l septets,
/*! \brief 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)
@@ -525,7 +521,7 @@ static void unpacksms7 (unsigned char *i, unsigned char l, unsigned char *udh, i
*udl = (o - ud);
}
/*--- unpacksms8: unpacks bytes (8 bit encoding) at i, len l septets,
/*! \brief 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)
@@ -550,7 +546,7 @@ static void unpacksms8 (unsigned char *i, unsigned char l, unsigned char *udh, i
*udl = (o - ud);
}
/*--- unpacksms16: unpacks bytes (16 bit encoding) at i, len l septets,
/*! \brief 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)
@@ -579,7 +575,7 @@ static void unpacksms16 (unsigned char *i, unsigned char l, unsigned char *udh,
*udl = (o - ud);
}
/*--- unpacksms: general unpack - starts with length byte (octet or septet) and returns number of bytes used, inc length */
/*! \brief 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++;
@@ -593,7 +589,7 @@ static int unpacksms (unsigned char dcs, unsigned char *i, unsigned char *udh, i
return l + 1;
}
/*--- unpackaddress: unpack an address from i, return byte length, unpack to o */
/*! \brief 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],
@@ -610,7 +606,7 @@ static unsigned char unpackaddress (char *o, unsigned char *i)
return (l + 5) / 2;
}
/*--- packaddress: store an address at o, and return number of bytes used */
/*! \brief store an address at o, and return number of bytes used */
static unsigned char packaddress (unsigned char *o, char *i)
{
unsigned char p = 2;
@@ -635,7 +631,7 @@ static unsigned char packaddress (unsigned char *o, char *i)
return p;
}
/*--- sms_log: Log the output, and remove file */
/*! \brief Log the output, and remove file */
static void sms_log (sms_t * h, char status)
{
if (*h->oa || *h->da) {
@@ -673,7 +669,7 @@ static void sms_log (sms_t * h, char status)
}
}
/*--- sms_readfile: parse and delete a file */
/*! \brief parse and delete a file */
static void sms_readfile (sms_t * h, char *fn)
{
char line[1000];
@@ -695,6 +691,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;
for (p = line; *p && *p != '\n' && *p != '\r'; p++);
*p = 0; /* strip eoln */
p = line;
@@ -714,7 +711,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((unsigned char **)&p);
h->ud[o++] = utf8decode(pp);
h->udl = o;
if (*p)
ast_log (LOG_WARNING, "UD too long in %s\n", fn);
@@ -855,7 +852,7 @@ static void sms_readfile (sms_t * h, char *fn)
}
}
/*--- sms_writefile: white a received text message to a file */
/*! \brief white a received text message to a file */
static void sms_writefile (sms_t * h)
{
char fn[200] = "", fn2[200] = "";
@@ -942,7 +939,7 @@ static void sms_writefile (sms_t * h)
}
}
/*--- readdirqueue: read dir skipping dot files... */
/*! \brief read dir skipping dot files... */
static struct dirent *readdirqueue (DIR * d, char *queue)
{
struct dirent *f;
@@ -952,7 +949,7 @@ static struct dirent *readdirqueue (DIR * d, char *queue)
return f;
}
/*--- sms_handleincoming: handle the incoming message */
/*! \brief handle the incoming message */
static unsigned char sms_handleincoming (sms_t * h)
{
unsigned char p = 3;
@@ -1023,8 +1020,7 @@ static unsigned char sms_handleincoming (sms_t * h)
#define NAME_MAX 1024
#endif
/*--- sms_nextoutgoing: find and fill in next message,
or send a REL if none waiting */
/*! \brief 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] = "";
@@ -1178,33 +1174,31 @@ static void sms_messagetx(sms_t * h)
static int sms_generate (struct ast_channel *chan, void *data, int len, int samples)
{
struct ast_frame f = { 0 };
unsigned char waste[AST_FRIENDLY_OFFSET];
#define MAXSAMPLES (800)
#ifdef OUTALAW
unsigned char buf[800];
unsigned char *buf;
#else
signed short buf[800];
short *buf;
#endif
#define SAMPLE2LEN sizeof(*buf)
sms_t *h = data;
int i;
if (len > sizeof (buf)) {
ast_log (LOG_WARNING, "Only doing %d bytes (%d bytes requested)\n", (int)(sizeof (buf) / sizeof (signed short)), len);
len = sizeof (buf);
#ifdef OUTALAW
samples = len;
#else
samples = len / 2;
#endif
if (samples > MAXSAMPLES) {
ast_log (LOG_WARNING, "Only doing %d samples (%d requested)\n",
MAXSAMPLES, samples);
samples = MAXSAMPLES;
}
waste[0] = 0; /* make compiler happy */
len = samples * SAMPLE2LEN + AST_FRIENDLY_OFFSET;
buf = alloca(len);
f.frametype = AST_FRAME_VOICE;
#ifdef OUTALAW
f.subclass = AST_FORMAT_ALAW;
f.datalen = samples;
#else
f.subclass = AST_FORMAT_SLINEAR;
f.datalen = samples * 2;
#endif
f.datalen = len;
f.offset = AST_FRIENDLY_OFFSET;
f.mallocd = 0;
f.data = buf;
@@ -1256,6 +1250,8 @@ 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)
@@ -1361,17 +1357,17 @@ static struct ast_generator smsgen = {
static int sms_exec (struct ast_channel *chan, void *data)
{
int res = -1;
struct localuser *u;
struct ast_module_user *u;
struct ast_frame *f;
sms_t h = { 0 };
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
h.ipc0 = h.ipc1 = 20; /* phase for cosine */
h.dcs = 0xF1; /* default */
if (!data) {
ast_log (LOG_ERROR, "Requires queue name at least\n");
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
@@ -1379,25 +1375,25 @@ static int sms_exec (struct ast_channel *chan, void *data)
ast_copy_string (h.cli, chan->cid.cid_num, sizeof (h.cli));
{
char *d = data,
*p,
unsigned char *p;
unsigned char *d = data,
answer = 0;
if (!*d || *d == '|') {
ast_log (LOG_ERROR, "Requires queue name\n");
LOCAL_USER_REMOVE(u);
ast_module_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");
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return -1;
}
strncpy (h.queue, d, p - d);
strncpy (h.queue, (char *)d, p - d);
if (*p == '|')
p++;
d = p;
for (p = h.queue; *p; p++)
for (p = (unsigned char *)h.queue; *p; p++)
if (!isalnum (*p))
*p = '-'; /* make very safe for filenames */
while (*d && *d != '|') {
@@ -1429,27 +1425,27 @@ static int sms_exec (struct ast_channel *chan, void *data)
}
if (*d == '|') {
/* submitting a message, not taking call. */
/* depricated, use smsq instead */
/* deprecated, use smsq instead */
d++;
h.scts = time (0);
for (p = d; *p && *p != '|'; p++);
if (*p)
*p++ = 0;
if (strlen (d) >= sizeof (h.oa)) {
if (strlen ((char *)d) >= sizeof (h.oa)) {
ast_log (LOG_ERROR, "Address too long %s\n", d);
return 0;
}
if (h.smsc) {
ast_copy_string (h.oa, d, sizeof (h.oa));
ast_copy_string (h.oa, (char *)d, sizeof (h.oa));
} else {
ast_copy_string (h.da, d, sizeof (h.da));
ast_copy_string (h.da, (char *)d, sizeof (h.da));
}
if (!h.smsc)
ast_copy_string (h.oa, h.cli, sizeof (h.oa));
d = p;
h.udl = 0;
while (*p && h.udl < SMSLEN)
h.ud[h.udl++] = utf8decode((unsigned char **)&p);
h.ud[h.udl++] = utf8decode(&p);
if (is7bit (h.dcs) && packsms7 (0, h.udhl, h.udh, h.udl, h.ud) < 0)
ast_log (LOG_WARNING, "Invalid 7 bit GSM data\n");
if (is8bit (h.dcs) && packsms8 (0, h.udhl, h.udh, h.udl, h.ud) < 0)
@@ -1459,7 +1455,7 @@ static int sms_exec (struct ast_channel *chan, void *data)
h.rx = 0; /* sent message */
h.mr = -1;
sms_writefile (&h);
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return 0;
}
@@ -1483,13 +1479,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");
LOCAL_USER_REMOVE (u);
ast_module_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);
LOCAL_USER_REMOVE (u);
ast_module_user_remove(u);
return -1;
}
@@ -1508,22 +1504,22 @@ static int sms_exec (struct ast_channel *chan, void *data)
sms_log (&h, '?'); /* log incomplete message */
LOCAL_USER_REMOVE (u);
ast_module_user_remove(u);
return (h.err);
}
int unload_module (void)
static int unload_module(void)
{
int res;
res = ast_unregister_application (app);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module (void)
static int load_module(void)
{
#ifdef OUTALAW
{
@@ -1537,19 +1533,4 @@ int load_module (void)
return ast_register_application (app, sms_exec, synopsis, descrip);
}
char *description (void)
{
return tdesc;
}
int usecount (void)
{
int res;
STANDARD_USECOUNT (res);
return res;
}
char *key ()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "SMS/PSTN handler");

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

@@ -19,20 +19,22 @@
/*! \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"
@@ -42,8 +44,6 @@ 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,13 +52,10 @@ 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 localuser *u;
struct ast_module_user *u;
struct ast_channel *c=NULL;
char *options, *cut, *cdata, *match;
char name[AST_CHANNEL_NAME] = "";
@@ -69,7 +66,7 @@ static int softhangup_exec(struct ast_channel *chan, void *data)
return 0;
}
LOCAL_USER_ADD(u);
u = ast_module_user_add(chan);
cdata = ast_strdupa(data);
match = strsep(&cdata, "|");
@@ -82,7 +79,7 @@ static int softhangup_exec(struct ast_channel *chan, void *data)
/* 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->type,"CAPI"))
if (!strcmp(c->tech->type, "CAPI"))
cut = strrchr(name,'/');
/* Basically everything else is Foo/Bar-Z */
else
@@ -100,40 +97,25 @@ static int softhangup_exec(struct ast_channel *chan, void *data)
c = ast_channel_walk_locked(c);
}
LOCAL_USER_REMOVE(u);
ast_module_user_remove(u);
return 0;
}
int unload_module(void)
static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
ast_module_user_hangup_all();
return res;
}
int load_module(void)
static int load_module(void)
{
return ast_register_application(app, softhangup_exec, synopsis, desc);
}
char *description(void)
{
return tdesc;
}
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
}
char *key()
{
return ASTERISK_GPL_KEY;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Hangs up the requested channel");

796
apps/app_speech_utils.c Normal file
View File

@@ -0,0 +1,796 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 2006, Digium, Inc.
*
* Joshua Colp <jcolp@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 Speech Recognition Utility Applications
*
* \author Joshua Colp <jcolp@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/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/speech.h"
/* Descriptions for each application */
static char *speechcreate_descrip =
"SpeechCreate(engine name)\n"
"This application creates information to be used by all the other applications. It must be called before doing any speech recognition activities such as activating a grammar.\n"
"It takes the engine name to use as the argument, if not specified the default engine will be used.\n";
static char *speechactivategrammar_descrip =
"SpeechActivateGrammar(Grammar Name)\n"
"This activates the specified grammar to be recognized by the engine. A grammar tells the speech recognition engine what to recognize, \n"
"and how to portray it back to you in the dialplan. The grammar name is the only argument to this application.\n";
static char *speechstart_descrip =
"SpeechStart()\n"
"Tell the speech recognition engine that it should start trying to get results from audio being fed to it. This has no arguments.\n";
static char *speechbackground_descrip =
"SpeechBackground(Sound File|Timeout)\n"
"This application plays a sound file and waits for the person to speak. Once they start speaking playback of the file stops, and silence is heard.\n"
"Once they stop talking the processing sound is played to indicate the speech recognition engine is working.\n"
"Once results are available the application returns and results (score and text) are available using dialplan functions.\n"
"The first text and score are ${SPEECH_TEXT(0)} AND ${SPEECH_SCORE(0)} while the second are ${SPEECH_TEXT(1)} and ${SPEECH_SCORE(1)}.\n"
"The first argument is the sound file and the second is the timeout. Note the timeout will only start once the sound file has stopped playing.\n";
static char *speechdeactivategrammar_descrip =
"SpeechDeactivateGrammar(Grammar Name)\n"
"This deactivates the specified grammar so that it is no longer recognized. The only argument is the grammar name to deactivate.\n";
static char *speechprocessingsound_descrip =
"SpeechProcessingSound(Sound File)\n"
"This changes the processing sound that SpeechBackground plays back when the speech recognition engine is processing and working to get results.\n"
"It takes the sound file as the only argument.\n";
static char *speechdestroy_descrip =
"SpeechDestroy()\n"
"This destroys the information used by all the other speech recognition applications.\n"
"If you call this application but end up wanting to recognize more speech, you must call SpeechCreate\n"
"again before calling any other application. It takes no arguments.\n";
static char *speechload_descrip =
"SpeechLoadGrammar(Grammar Name|Path)\n"
"Load a grammar only on the channel, not globally.\n"
"It takes the grammar name as first argument and path as second.\n";
static char *speechunload_descrip =
"SpeechUnloadGrammar(Grammar Name)\n"
"Unload a grammar. It takes the grammar name as the only argument.\n";
/*! \brief Helper function used by datastores to destroy the speech structure upon hangup */
static void destroy_callback(void *data)
{
struct ast_speech *speech = (struct ast_speech*)data;
if (speech == NULL) {
return;
}
/* Deallocate now */
ast_speech_destroy(speech);
return;
}
/*! \brief Static structure for datastore information */
static const struct ast_datastore_info speech_datastore = {
.type = "speech",
.destroy = destroy_callback
};
/*! \brief Helper function used to find the speech structure attached to a channel */
static struct ast_speech *find_speech(struct ast_channel *chan)
{
struct ast_speech *speech = NULL;
struct ast_datastore *datastore = NULL;
datastore = ast_channel_datastore_find(chan, &speech_datastore, NULL);
if (datastore == NULL) {
return NULL;
}
speech = datastore->data;
return speech;
}
/* Helper function to find a specific speech recognition result by number */
static struct ast_speech_result *find_result(struct ast_speech_result *results, int num)
{
struct ast_speech_result *result = NULL;
int i = 0;
result = results;
while (result) {
if (i == num)
break;
i++;
result = result->next;
}
return result;
}
/*! \brief SPEECH_SCORE() Dialplan Function */
static int speech_score(struct ast_channel *chan, char *cmd, char *data,
char *buf, size_t len)
{
struct ast_speech_result *result = NULL;
struct ast_speech *speech = find_speech(chan);
char tmp[128] = "";
if (data == NULL || speech == NULL || !(result = find_result(speech->results, atoi(data))))
return -1;
snprintf(tmp, sizeof(tmp), "%d", result->score);
ast_copy_string(buf, tmp, len);
return 0;
}
static struct ast_custom_function speech_score_function = {
.name = "SPEECH_SCORE",
.synopsis = "Gets the confidence score of a result.",
.syntax = "SPEECH_SCORE(result number)",
.desc =
"Gets the confidence score of a result.\n",
.read = speech_score,
.write = NULL,
};
/*! \brief SPEECH_TEXT() Dialplan Function */
static int speech_text(struct ast_channel *chan, char *cmd, char *data,
char *buf, size_t len)
{
struct ast_speech_result *result = NULL;
struct ast_speech *speech = find_speech(chan);
if (data == NULL || speech == NULL || !(result = find_result(speech->results, atoi(data))))
return -1;
if (result->text != NULL)
ast_copy_string(buf, result->text, len);
return 0;
}
static struct ast_custom_function speech_text_function = {
.name = "SPEECH_TEXT",
.synopsis = "Gets the recognized text of a result.",
.syntax = "SPEECH_TEXT(result number)",
.desc =
"Gets the recognized text of a result.\n",
.read = speech_text,
.write = NULL,
};
/*! \brief SPEECH_GRAMMAR() Dialplan Function */
static int speech_grammar(struct ast_channel *chan, char *cmd, char *data,
char *buf, size_t len)
{
struct ast_speech_result *result = NULL;
struct ast_speech *speech = find_speech(chan);
if (data == NULL || speech == NULL || !(result = find_result(speech->results, atoi(data))))
return -1;
if (result->grammar != NULL)
ast_copy_string(buf, result->grammar, len);
return 0;
}
static struct ast_custom_function speech_grammar_function = {
.name = "SPEECH_GRAMMAR",
.synopsis = "Gets the matched grammar of a result if available.",
.syntax = "SPEECH_GRAMMAR(result number)",
.desc =
"Gets the matched grammar of a result if available.\n",
.read = speech_grammar,
.write = NULL,
};
/*! \brief SPEECH_ENGINE() Dialplan Function */
static int speech_engine_write(struct ast_channel *chan, char *cmd, char *data, const char *value)
{
struct ast_speech *speech = find_speech(chan);
if (data == NULL || speech == NULL)
return -1;
ast_speech_change(speech, data, value);
return 0;
}
static struct ast_custom_function speech_engine_function = {
.name = "SPEECH_ENGINE",
.synopsis = "Change a speech engine specific attribute.",
.syntax = "SPEECH_ENGINE(name)=value",
.desc =
"Changes a speech engine specific attribute.\n",
.read = NULL,
.write = speech_engine_write,
};
/*! \brief SPEECH() Dialplan Function */
static int speech_read(struct ast_channel *chan, char *cmd, char *data,
char *buf, size_t len)
{
int results = 0;
struct ast_speech_result *result = NULL;
struct ast_speech *speech = find_speech(chan);
char tmp[128] = "";
/* Now go for the various options */
if (!strcasecmp(data, "status")) {
if (speech != NULL)
ast_copy_string(buf, "1", len);
else
ast_copy_string(buf, "0", len);
return 0;
}
/* Make sure we have a speech structure for everything else */
if (speech == NULL) {
return -1;
}
/* Check to see if they are checking for silence */
if (!strcasecmp(data, "spoke")) {
if (ast_test_flag(speech, AST_SPEECH_SPOKE))
ast_copy_string(buf, "1", len);
else
ast_copy_string(buf, "0", len);
} else if (!strcasecmp(data, "results")) {
/* Count number of results */
result = speech->results;
while (result) {
results++;
result = result->next;
}
snprintf(tmp, sizeof(tmp), "%d", results);
ast_copy_string(buf, tmp, len);
}
return 0;
}
static struct ast_custom_function speech_function = {
.name = "SPEECH",
.synopsis = "Gets information about speech recognition results.",
.syntax = "SPEECH(argument)",
.desc =
"Gets information about speech recognition results.\n"
"status: Returns 1 upon speech object existing, or 0 if not\n"
"spoke: Returns 1 if spoker spoke, or 0 if not\n"
"results: Returns number of results that were recognized\n",
.read = speech_read,
.write = NULL,
};
/*! \brief SpeechCreate() Dialplan Application */
static int speech_create(struct ast_channel *chan, void *data)
{
struct ast_module_user *u = NULL;
struct ast_speech *speech = NULL;
struct ast_datastore *datastore = NULL;
u = ast_module_user_add(chan);
/* Request a speech object */
speech = ast_speech_new(data, AST_FORMAT_SLINEAR);
if (speech == NULL) {
/* Not available */
pbx_builtin_setvar_helper(chan, "ERROR", "1");
ast_module_user_remove(u);
return 0;
}
datastore = ast_channel_datastore_alloc(&speech_datastore, NULL);
if (datastore == NULL) {
ast_speech_destroy(speech);
pbx_builtin_setvar_helper(chan, "ERROR", "1");
ast_module_user_remove(u);
return 0;
}
datastore->data = speech;
ast_channel_datastore_add(chan, datastore);
ast_module_user_remove(u);
return 0;
}
/*! \brief SpeechLoadGrammar(Grammar Name|Path) Dialplan Application */
static int speech_load(struct ast_channel *chan, void *data)
{
int res = 0, argc = 0;
struct ast_module_user *u = NULL;
struct ast_speech *speech = find_speech(chan);
char *argv[2], *args = NULL, *name = NULL, *path = NULL;
args = ast_strdupa(data);
u = ast_module_user_add(chan);
if (speech == NULL) {
ast_module_user_remove(u);
return -1;
}
/* Parse out arguments */
argc = ast_app_separate_args(args, '|', argv, sizeof(argv) / sizeof(argv[0]));
if (argc != 2) {
ast_module_user_remove(u);
return -1;
}
name = argv[0];
path = argv[1];
/* Load the grammar locally on the object */
res = ast_speech_grammar_load(speech, name, path);
ast_module_user_remove(u);
return res;
}
/*! \brief SpeechUnloadGrammar(Grammar Name) Dialplan Application */
static int speech_unload(struct ast_channel *chan, void *data)
{
int res = 0;
struct ast_module_user *u = NULL;
struct ast_speech *speech = find_speech(chan);
u = ast_module_user_add(chan);
if (speech == NULL) {
ast_module_user_remove(u);
return -1;
}
/* Unload the grammar */
res = ast_speech_grammar_unload(speech, data);
ast_module_user_remove(u);
return res;
}
/*! \brief SpeechDeactivateGrammar(Grammar Name) Dialplan Application */
static int speech_deactivate(struct ast_channel *chan, void *data)
{
int res = 0;
struct ast_module_user *u = NULL;
struct ast_speech *speech = find_speech(chan);
u = ast_module_user_add(chan);
if (speech == NULL) {
ast_module_user_remove(u);
return -1;
}
/* Deactivate the grammar on the speech object */
res = ast_speech_grammar_deactivate(speech, data);
ast_module_user_remove(u);
return res;
}
/*! \brief SpeechActivateGrammar(Grammar Name) Dialplan Application */
static int speech_activate(struct ast_channel *chan, void *data)
{
int res = 0;
struct ast_module_user *u = NULL;
struct ast_speech *speech = find_speech(chan);
u = ast_module_user_add(chan);
if (speech == NULL) {
ast_module_user_remove(u);
return -1;
}
/* Activate the grammar on the speech object */
res = ast_speech_grammar_activate(speech, data);
ast_module_user_remove(u);
return res;
}
/*! \brief SpeechStart() Dialplan Application */
static int speech_start(struct ast_channel *chan, void *data)
{
int res = 0;
struct ast_module_user *u = NULL;
struct ast_speech *speech = find_speech(chan);
u = ast_module_user_add(chan);
if (speech == NULL) {
ast_module_user_remove(u);
return -1;
}
ast_speech_start(speech);
ast_module_user_remove(u);
return res;
}
/*! \brief SpeechProcessingSound(Sound File) Dialplan Application */
static int speech_processing_sound(struct ast_channel *chan, void *data)
{
int res = 0;
struct ast_module_user *u = NULL;
struct ast_speech *speech = find_speech(chan);
u = ast_module_user_add(chan);
if (speech == NULL) {
ast_module_user_remove(u);
return -1;
}
if (speech->processing_sound != NULL) {
free(speech->processing_sound);
speech->processing_sound = NULL;
}
speech->processing_sound = strdup(data);
ast_module_user_remove(u);
return res;
}
/*! \brief Helper function used by speech_background to playback a soundfile */
static int speech_streamfile(struct ast_channel *chan, const char *filename, const char *preflang)
{
struct ast_filestream *fs;
struct ast_filestream *vfs=NULL;
fs = ast_openstream(chan, filename, preflang);
if (fs)
vfs = ast_openvstream(chan, filename, preflang);
if (fs){
if (ast_applystream(chan, fs))
return -1;
if (vfs && ast_applystream(chan, vfs))
return -1;
if (ast_playstream(fs))
return -1;
if (vfs && ast_playstream(vfs))
return -1;
return 0;
}
return -1;
}
/*! \brief SpeechBackground(Sound File|Timeout) Dialplan Application */
static int speech_background(struct ast_channel *chan, void *data)
{
unsigned int timeout = 0;
int res = 0, done = 0, argc = 0, started = 0;
struct ast_module_user *u = NULL;
struct ast_speech *speech = find_speech(chan);
struct ast_frame *f = NULL;
int oldreadformat = AST_FORMAT_SLINEAR;
char dtmf[AST_MAX_EXTENSION] = "";
time_t start, current;
struct ast_datastore *datastore = NULL;
char *argv[2], *args = NULL, *filename = NULL, tmp[2] = "";
args = ast_strdupa(data);
u = ast_module_user_add(chan);
if (speech == NULL) {
ast_module_user_remove(u);
return -1;
}
/* If channel is not already answered, then answer it */
if (chan->_state != AST_STATE_UP && ast_answer(chan)) {
ast_module_user_remove(u);
return -1;
}
/* Record old read format */
oldreadformat = chan->readformat;
/* Change read format to be signed linear */
if (ast_set_read_format(chan, AST_FORMAT_SLINEAR)) {
ast_module_user_remove(u);
return -1;
}
/* Parse out options */
argc = ast_app_separate_args(args, '|', argv, sizeof(argv) / sizeof(argv[0]));
if (argc > 0) {
/* Yay sound file */
filename = argv[0];
if (argv[1] != NULL)
timeout = atoi(argv[1]);
}
/* Start streaming the file if possible and specified */
if (filename != NULL && ast_streamfile(chan, filename, chan->language)) {
/* An error occured while streaming */
ast_set_read_format(chan, oldreadformat);
ast_module_user_remove(u);
return -1;
}
/* Before we go into waiting for stuff... make sure the structure is ready, if not - start it again */
if (speech->state == AST_SPEECH_STATE_NOT_READY || speech->state == AST_SPEECH_STATE_DONE) {
ast_speech_change_state(speech, AST_SPEECH_STATE_NOT_READY);
ast_speech_start(speech);
}
/* Okay it's streaming so go into a loop grabbing frames! */
while (done == 0) {
/* Run scheduled stuff */
ast_sched_runq(chan->sched);
/* Yay scheduling */
res = ast_sched_wait(chan->sched);
if (res < 0) {
res = 1000;
}
/* If there is a frame waiting, get it - if not - oh well */
if (ast_waitfor(chan, res) > 0) {
f = ast_read(chan);
if (f == NULL) {
/* The channel has hung up most likely */
done = 3;
break;
}
}
/* Do timeout check (shared between audio/dtmf) */
if (started == 1) {
time(&current);
if ((current-start) >= timeout) {
done = 1;
if (f)
ast_frfree(f);
break;
}
}
/* Do checks on speech structure to see if it's changed */
ast_mutex_lock(&speech->lock);
if (ast_test_flag(speech, AST_SPEECH_QUIET) && chan->stream != NULL) {
ast_stopstream(chan);
ast_clear_flag(speech, AST_SPEECH_QUIET);
}
/* Check state so we can see what to do */
switch (speech->state) {
case AST_SPEECH_STATE_READY:
/* If audio playback has stopped do a check for timeout purposes */
if (chan->streamid == -1 && chan->timingfunc == NULL)
ast_stopstream(chan);
if (chan->stream == NULL && timeout > 0 && started == 0) {
time(&start);
started = 1;
}
/* Deal with audio frames if present */
if (f != NULL && f->frametype == AST_FRAME_VOICE) {
ast_speech_write(speech, f->data, f->datalen);
}
break;
case AST_SPEECH_STATE_WAIT:
/* Cue up waiting sound if not already playing */
if (chan->stream == NULL) {
if (speech->processing_sound != NULL) {
if (strlen(speech->processing_sound) > 0 && strcasecmp(speech->processing_sound,"none")) {
speech_streamfile(chan, speech->processing_sound, chan->language);
}
}
} else if (chan->streamid == -1 && chan->timingfunc == NULL) {
ast_stopstream(chan);
if (speech->processing_sound != NULL) {
if (strlen(speech->processing_sound) > 0 && strcasecmp(speech->processing_sound,"none")) {
speech_streamfile(chan, speech->processing_sound, chan->language);
}
}
}
break;
case AST_SPEECH_STATE_DONE:
/* Copy to speech structure the results, if available */
speech->results = ast_speech_results_get(speech);
/* Now that we are done... let's switch back to not ready state */
ast_speech_change_state(speech, AST_SPEECH_STATE_NOT_READY);
/* Break out of our background too */
done = 1;
/* Stop audio playback */
if (chan->stream != NULL) {
ast_stopstream(chan);
}
break;
default:
break;
}
ast_mutex_unlock(&speech->lock);
/* Deal with other frame types */
if (f != NULL) {
/* Free the frame we received */
switch (f->frametype) {
case AST_FRAME_DTMF:
if (f->subclass == '#') {
done = 1;
} else {
if (chan->stream != NULL) {
ast_stopstream(chan);
/* Change timeout to be 5 seconds for DTMF input */
timeout = 5;
time(&start);
started = 1;
}
snprintf(tmp, sizeof(tmp), "%c", f->subclass);
strncat(dtmf, tmp, sizeof(dtmf));
}
break;
case AST_FRAME_CONTROL:
switch (f->subclass) {
case AST_CONTROL_HANGUP:
/* Since they hung up we should destroy the speech structure */
done = 3;
default:
break;
}
default:
break;
}
ast_frfree(f);
f = NULL;
}
}
if (strlen(dtmf) > 0 && speech->results == NULL) {
/* We sort of make a results entry */
speech->results = ast_calloc(1, sizeof(*speech->results));
if (speech->results != NULL) {
speech->results->score = 1000;
speech->results->text = strdup(dtmf);
speech->results->grammar = strdup("dtmf");
}
}
/* See if it was because they hung up */
if (done == 3) {
/* Destroy speech structure */
ast_speech_destroy(speech);
datastore = ast_channel_datastore_find(chan, &speech_datastore, NULL);
if (datastore != NULL) {
ast_channel_datastore_remove(chan, datastore);
}
} else {
/* Channel is okay so restore read format */
ast_set_read_format(chan, oldreadformat);
}
ast_module_user_remove(u);
return 0;
}
/*! \brief SpeechDestroy() Dialplan Application */
static int speech_destroy(struct ast_channel *chan, void *data)
{
int res = 0;
struct ast_module_user *u = NULL;
struct ast_speech *speech = find_speech(chan);
struct ast_datastore *datastore = NULL;
u = ast_module_user_add(chan);
if (speech == NULL) {
ast_module_user_remove(u);
return -1;
}
/* Destroy speech structure */
ast_speech_destroy(speech);
datastore = ast_channel_datastore_find(chan, &speech_datastore, NULL);
if (datastore != NULL) {
ast_channel_datastore_remove(chan, datastore);
}
ast_module_user_remove(u);
return res;
}
static int unload_module(void)
{
int res = 0;
res = ast_unregister_application("SpeechCreate");
res |= ast_unregister_application("SpeechLoadGrammar");
res |= ast_unregister_application("SpeechUnloadGrammar");
res |= ast_unregister_application("SpeechActivateGrammar");
res |= ast_unregister_application("SpeechDeactivateGrammar");
res |= ast_unregister_application("SpeechStart");
res |= ast_unregister_application("SpeechBackground");
res |= ast_unregister_application("SpeechDestroy");
res |= ast_unregister_application("SpeechProcessingSound");
res |= ast_custom_function_unregister(&speech_function);
res |= ast_custom_function_unregister(&speech_score_function);
res |= ast_custom_function_unregister(&speech_text_function);
res |= ast_custom_function_unregister(&speech_grammar_function);
res |= ast_custom_function_unregister(&speech_engine_function);
ast_module_user_hangup_all();
return res;
}
static int load_module(void)
{
int res = 0;
res = ast_register_application("SpeechCreate", speech_create, "Create a Speech Structure", speechcreate_descrip);
res |= ast_register_application("SpeechLoadGrammar", speech_load, "Load a Grammar", speechload_descrip);
res |= ast_register_application("SpeechUnloadGrammar", speech_unload, "Unload a Grammar", speechunload_descrip);
res |= ast_register_application("SpeechActivateGrammar", speech_activate, "Activate a Grammar", speechactivategrammar_descrip);
res |= ast_register_application("SpeechDeactivateGrammar", speech_deactivate, "Deactivate a Grammar", speechdeactivategrammar_descrip);
res |= ast_register_application("SpeechStart", speech_start, "Start recognizing voice in the audio stream", speechstart_descrip);
res |= ast_register_application("SpeechBackground", speech_background, "Play a sound file and wait for speech to be recognized", speechbackground_descrip);
res |= ast_register_application("SpeechDestroy", speech_destroy, "End speech recognition", speechdestroy_descrip);
res |= ast_register_application("SpeechProcessingSound", speech_processing_sound, "Change background processing sound", speechprocessingsound_descrip);
res |= ast_custom_function_register(&speech_function);
res |= ast_custom_function_register(&speech_score_function);
res |= ast_custom_function_register(&speech_text_function);
res |= ast_custom_function_register(&speech_grammar_function);
res |= ast_custom_function_register(&speech_engine_function);
return res;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Dialplan Speech Applications");

View File

@@ -1,577 +0,0 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 2002, Christos Ricudis
*
* Christos Ricudis <ricudis@itc.auth.gr>
*
* 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 Connect to PostgreSQL
*
* \ingroup applications
*/
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <stdio.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/module.h"
#include "asterisk/linkedlists.h"
#include "asterisk/chanvars.h"
#include "asterisk/lock.h"
#include "libpq-fe.h"
static char *tdesc = "Simple PostgreSQL Interface";
static char *app = "PGSQL";
static char *synopsis = "Do several SQLy things";
static char *descrip =
"PGSQL(): Do several SQLy things\n"
"Syntax:\n"
" PGSQL(Connect var option-string)\n"
" Connects to a database. Option string contains standard PostgreSQL\n"
" parameters like host=, dbname=, user=. Connection identifer returned\n"
" in ${var}\n"
" PGSQL(Query var ${connection_identifier} query-string)\n"
" Executes standard SQL query contained in query-string using established\n"
" connection identified by ${connection_identifier}. Reseult of query is\n"
" is stored in ${var}.\n"
" PGSQL(Fetch statusvar ${result_identifier} var1 var2 ... varn)\n"
" Fetches a single row from a result set contained in ${result_identifier}.\n"
" Assigns returned fields to ${var1} ... ${varn}. ${statusvar} is set TRUE\n"
" if additional rows exist in reseult set.\n"
" PGSQL(Clear ${result_identifier})\n"
" Frees memory and datastructures associated with result set.\n"
" PGSQL(Disconnect ${connection_identifier})\n"
" Disconnects from named connection to PostgreSQL.\n" ;
/*
Syntax of SQL commands :
Connect var option-string
Connects to a database using the option-string and stores the
connection identifier in ${var}
Query var ${connection_identifier} query-string
Submits query-string to database backend and stores the result
identifier in ${var}
Fetch statusvar ${result_identifier} var1 var2 var3 ... varn
Fetches a row from the query and stores end-of-table status in
${statusvar} and columns in ${var1}..${varn}
Clear ${result_identifier}
Clears data structures associated with ${result_identifier}
Disconnect ${connection_identifier}
Disconnects from named connection
EXAMPLES OF USE :
exten => s,2,PGSQL(Connect connid host=localhost user=asterisk dbname=credit)
exten => s,3,PGSQL(Query resultid ${connid} SELECT username,credit FROM credit WHERE callerid=${CALLERIDNUM})
exten => s,4,PGSQL(Fetch fetchid ${resultid} datavar1 datavar2)
exten => s,5,GotoIf(${fetchid}?6:8)
exten => s,6,Festival("User ${datavar1} currently has credit balance of ${datavar2} dollars.")
exten => s,7,Goto(s,4)
exten => s,8,PGSQL(Clear ${resultid})
exten => s,9,PGSQL(Disconnect ${connid})
*/
STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
#define AST_PGSQL_ID_DUMMY 0
#define AST_PGSQL_ID_CONNID 1
#define AST_PGSQL_ID_RESID 2
#define AST_PGSQL_ID_FETCHID 3
struct ast_PGSQL_id {
int identifier_type; /* 0=dummy, 1=connid, 2=resultid */
int identifier;
void *data;
AST_LIST_ENTRY(ast_PGSQL_id) entries;
} *ast_PGSQL_id;
AST_LIST_HEAD(PGSQLidshead,ast_PGSQL_id) PGSQLidshead;
static void *find_identifier(int identifier,int identifier_type) {
struct PGSQLidshead *headp;
struct ast_PGSQL_id *i;
void *res=NULL;
int found=0;
headp=&PGSQLidshead;
if (AST_LIST_LOCK(headp)) {
ast_log(LOG_WARNING,"Unable to lock identifiers list\n");
} else {
AST_LIST_TRAVERSE(headp,i,entries) {
if ((i->identifier==identifier) && (i->identifier_type==identifier_type)) {
found=1;
res=i->data;
break;
}
}
if (!found) {
ast_log(LOG_WARNING,"Identifier %d, identifier_type %d not found in identifier list\n",identifier,identifier_type);
}
AST_LIST_UNLOCK(headp);
}
return(res);
}
static int add_identifier(int identifier_type,void *data) {
struct ast_PGSQL_id *i,*j;
struct PGSQLidshead *headp;
int maxidentifier=0;
headp=&PGSQLidshead;
i=NULL;
j=NULL;
if (AST_LIST_LOCK(headp)) {
ast_log(LOG_WARNING,"Unable to lock identifiers list\n");
return(-1);
} else {
i=malloc(sizeof(struct ast_PGSQL_id));
AST_LIST_TRAVERSE(headp,j,entries) {
if (j->identifier>maxidentifier) {
maxidentifier=j->identifier;
}
}
i->identifier=maxidentifier+1;
i->identifier_type=identifier_type;
i->data=data;
AST_LIST_INSERT_HEAD(headp,i,entries);
AST_LIST_UNLOCK(headp);
}
return(i->identifier);
}
static int del_identifier(int identifier,int identifier_type) {
struct ast_PGSQL_id *i;
struct PGSQLidshead *headp;
int found=0;
headp=&PGSQLidshead;
if (AST_LIST_LOCK(headp)) {
ast_log(LOG_WARNING,"Unable to lock identifiers list\n");
} else {
AST_LIST_TRAVERSE(headp,i,entries) {
if ((i->identifier==identifier) &&
(i->identifier_type==identifier_type)) {
AST_LIST_REMOVE(headp,i,entries);
free(i);
found=1;
break;
}
}
AST_LIST_UNLOCK(headp);
}
if (found==0) {
ast_log(LOG_WARNING,"Could not find identifier %d, identifier_type %d in list to delete\n",identifier,identifier_type);
return(-1);
} else {
return(0);
}
}
static int aPGSQL_connect(struct ast_channel *chan, void *data) {
char *s1;
char s[100] = "";
char *optionstring;
char *var;
int l;
int res;
PGconn *karoto;
int id;
char *stringp=NULL;
res=0;
l=strlen(data)+2;
s1=malloc(l);
strncpy(s1, data, l -1);
stringp=s1;
strsep(&stringp," "); /* eat the first token, we already know it :P */
var=strsep(&stringp," ");
optionstring=strsep(&stringp,"\n");
karoto = PQconnectdb(optionstring);
if (PQstatus(karoto) == CONNECTION_BAD) {
ast_log(LOG_WARNING,"Connection to database using '%s' failed. postgress reports : %s\n", optionstring,
PQerrorMessage(karoto));
res=-1;
} else {
ast_log(LOG_WARNING,"adding identifier\n");
id=add_identifier(AST_PGSQL_ID_CONNID,karoto);
snprintf(s, sizeof(s), "%d", id);
pbx_builtin_setvar_helper(chan,var,s);
}
free(s1);
return res;
}
static int aPGSQL_query(struct ast_channel *chan, void *data) {
char *s1,*s2,*s3,*s4;
char s[100] = "";
char *querystring;
char *var;
int l;
int res,nres;
PGconn *karoto;
PGresult *PGSQLres;
int id,id1;
char *stringp=NULL;
res=0;
l=strlen(data)+2;
s1=malloc(l);
s2=malloc(l);
strncpy(s1, data, l - 1);
stringp=s1;
strsep(&stringp," "); /* eat the first token, we already know it :P */
s3=strsep(&stringp," ");
while (1) { /* ugly trick to make branches with break; */
var=s3;
s4=strsep(&stringp," ");
id=atoi(s4);
querystring=strsep(&stringp,"\n");
if ((karoto=find_identifier(id,AST_PGSQL_ID_CONNID))==NULL) {
ast_log(LOG_WARNING,"Invalid connection identifier %d passed in aPGSQL_query\n",id);
res=-1;
break;
}
PGSQLres=PQexec(karoto,querystring);
if (PGSQLres==NULL) {
ast_log(LOG_WARNING,"aPGSQL_query: Connection Error (connection identifier = %d, error message : %s)\n",id,PQerrorMessage(karoto));
res=-1;
break;
}
if (PQresultStatus(PGSQLres) == PGRES_BAD_RESPONSE ||
PQresultStatus(PGSQLres) == PGRES_NONFATAL_ERROR ||
PQresultStatus(PGSQLres) == PGRES_FATAL_ERROR) {
ast_log(LOG_WARNING,"aPGSQL_query: Query Error (connection identifier : %d, error message : %s)\n",id,PQcmdStatus(PGSQLres));
res=-1;
break;
}
nres=PQnfields(PGSQLres);
id1=add_identifier(AST_PGSQL_ID_RESID,PGSQLres);
snprintf(s, sizeof(s), "%d", id1);
pbx_builtin_setvar_helper(chan,var,s);
break;
}
free(s1);
free(s2);
return(res);
}
static int aPGSQL_fetch(struct ast_channel *chan, void *data) {
char *s1,*s2,*fetchid_var,*s4,*s5,*s6,*s7;
char s[100];
char *var;
int l;
int res;
PGresult *PGSQLres;
int id,id1,i,j,fnd;
int *lalares=NULL;
int nres;
struct ast_var_t *variables;
struct varshead *headp;
char *stringp=NULL;
headp=&chan->varshead;
res=0;
l=strlen(data)+2;
s7=NULL;
s1=malloc(l);
s2=malloc(l);
strncpy(s1, data, l - 1);
stringp=s1;
strsep(&stringp," "); /* eat the first token, we already know it :P */
fetchid_var=strsep(&stringp," ");
while (1) { /* ugly trick to make branches with break; */
var=fetchid_var; /* fetchid */
fnd=0;
AST_LIST_TRAVERSE(headp,variables,entries) {
if (strncasecmp(ast_var_name(variables),fetchid_var,strlen(fetchid_var))==0) {
s7=ast_var_value(variables);
fnd=1;
break;
}
}
if (fnd==0) {
s7="0";
pbx_builtin_setvar_helper(chan,fetchid_var,s7);
}
s4=strsep(&stringp," ");
id=atoi(s4); /* resultid */
if ((PGSQLres=find_identifier(id,AST_PGSQL_ID_RESID))==NULL) {
ast_log(LOG_WARNING,"Invalid result identifier %d passed in aPGSQL_fetch\n",id);
res=-1;
break;
}
id=atoi(s7); /*fetchid */
if ((lalares=find_identifier(id,AST_PGSQL_ID_FETCHID))==NULL) {
i=0; /* fetching the very first row */
} else {
i=*lalares;
free(lalares);
del_identifier(id,AST_PGSQL_ID_FETCHID); /* will re-add it a bit later */
}
if (i<PQntuples(PGSQLres)) {
nres=PQnfields(PGSQLres);
ast_log(LOG_WARNING,"ast_PGSQL_fetch : nres = %d i = %d ;\n",nres,i);
for (j=0;j<nres;j++) {
s5=strsep(&stringp," ");
if (s5==NULL) {
ast_log(LOG_WARNING,"ast_PGSQL_fetch : More tuples (%d) than variables (%d)\n",nres,j);
break;
}
s6=PQgetvalue(PGSQLres,i,j);
if (s6==NULL) {
ast_log(LOG_WARNING,"PWgetvalue(res,%d,%d) returned NULL in ast_PGSQL_fetch\n",i,j);
break;
}
ast_log(LOG_WARNING,"===setting variable '%s' to '%s'\n",s5,s6);
pbx_builtin_setvar_helper(chan,s5,s6);
}
lalares=malloc(sizeof(int));
*lalares = ++i; /* advance to the next row */
id1 = add_identifier(AST_PGSQL_ID_FETCHID,lalares);
} else {
ast_log(LOG_WARNING,"ast_PGSQL_fetch : EOF\n");
id1 = 0; /* no more rows */
}
snprintf(s, sizeof(s), "%d", id1);
ast_log(LOG_WARNING,"Setting var '%s' to value '%s'\n",fetchid_var,s);
pbx_builtin_setvar_helper(chan,fetchid_var,s);
break;
}
free(s1);
free(s2);
return(res);
}
static int aPGSQL_reset(struct ast_channel *chan, void *data) {
char *s1,*s3;
int l;
PGconn *karoto;
int id;
char *stringp=NULL;
l=strlen(data)+2;
s1=malloc(l);
strncpy(s1, data, l - 1);
stringp=s1;
strsep(&stringp," "); /* eat the first token, we already know it :P */
s3=strsep(&stringp," ");
id=atoi(s3);
if ((karoto=find_identifier(id,AST_PGSQL_ID_CONNID))==NULL) {
ast_log(LOG_WARNING,"Invalid connection identifier %d passed in aPGSQL_reset\n",id);
} else {
PQreset(karoto);
}
free(s1);
return(0);
}
static int aPGSQL_clear(struct ast_channel *chan, void *data) {
char *s1,*s3;
int l;
PGresult *karoto;
int id;
char *stringp=NULL;
l=strlen(data)+2;
s1=malloc(l);
strncpy(s1, data, l - 1);
stringp=s1;
strsep(&stringp," "); /* eat the first token, we already know it :P */
s3=strsep(&stringp," ");
id=atoi(s3);
if ((karoto=find_identifier(id,AST_PGSQL_ID_RESID))==NULL) {
ast_log(LOG_WARNING,"Invalid result identifier %d passed in aPGSQL_clear\n",id);
} else {
PQclear(karoto);
del_identifier(id,AST_PGSQL_ID_RESID);
}
free(s1);
return(0);
}
static int aPGSQL_disconnect(struct ast_channel *chan, void *data) {
char *s1,*s3;
int l;
PGconn *karoto;
int id;
char *stringp=NULL;
l=strlen(data)+2;
s1=malloc(l);
strncpy(s1, data, l - 1);
stringp=s1;
strsep(&stringp," "); /* eat the first token, we already know it :P */
s3=strsep(&stringp," ");
id=atoi(s3);
if ((karoto=find_identifier(id,AST_PGSQL_ID_CONNID))==NULL) {
ast_log(LOG_WARNING,"Invalid connection identifier %d passed in aPGSQL_disconnect\n",id);
} else {
PQfinish(karoto);
del_identifier(id,AST_PGSQL_ID_CONNID);
}
free(s1);
return(0);
}
static int aPGSQL_debug(struct ast_channel *chan, void *data) {
ast_log(LOG_WARNING,"Debug : %s\n",(char *)data);
return(0);
}
static int PGSQL_exec(struct ast_channel *chan, void *data)
{
struct localuser *u;
int result;
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "APP_PGSQL requires an argument (see manual)\n");
return -1;
}
LOCAL_USER_ADD(u);
result=0;
if (strncasecmp("connect",data,strlen("connect"))==0) {
result=(aPGSQL_connect(chan,data));
} else if (strncasecmp("query",data,strlen("query"))==0) {
result=(aPGSQL_query(chan,data));
} else if (strncasecmp("fetch",data,strlen("fetch"))==0) {
result=(aPGSQL_fetch(chan,data));
} else if (strncasecmp("reset",data,strlen("reset"))==0) {
result=(aPGSQL_reset(chan,data));
} else if (strncasecmp("clear",data,strlen("clear"))==0) {
result=(aPGSQL_clear(chan,data));
} else if (strncasecmp("debug",data,strlen("debug"))==0) {
result=(aPGSQL_debug(chan,data));
} else if (strncasecmp("disconnect",data,strlen("disconnect"))==0) {
result=(aPGSQL_disconnect(chan,data));
} else {
ast_log(LOG_WARNING, "Unknown APP_PGSQL argument : %s\n",(char *)data);
result=-1;
}
LOCAL_USER_REMOVE(u);
return result;
}
int unload_module(void)
{
int res;
res = ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
return res;
}
int load_module(void)
{
struct PGSQLidshead *headp;
headp=&PGSQLidshead;
AST_LIST_HEAD_INIT(headp);
return ast_register_application(app, PGSQL_exec, synopsis, descrip);
}
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