Russell Bryant
f8483a0d04
Do a massive conversion for using the ast_verb() macro
...
(closes issue #10277 , patches by mvanbaak)
Basically, this changes ...
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3, "Something\n");
to ...
ast_verb(3, "Something\n");
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-26 15:49:18 +00:00
Steve Murphy
0e969271ae
After some study, thought, comparing, etc. I've backed out the previous universal mod to make ast_flags a 64 bit thing. Instead, I added a 64-bit version of ast_flags (ast_flags64), and 64-bit versions of the test-flag, set-flag, etc. macros, and an app_parse_options64 routine, and I use these in app_dial alone, to eliminate the 30-option limit it had grown to meet. There is room now for 32 more options and flags. I was heavily tempted to implement some of the other ideas that were presented, but this solution does not intro any new versions of dial, doesn't have a different API, has a minimal/zero impact on code outside of dial, and doesn't seriously (I hope) affect the code structure of dial. It's the best I can think of right now. My goal was NOT to rewrite dial. I leave that to a future, coordinated effort.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75983 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-19 23:24:27 +00:00
Steve Murphy
5ac24b25d3
This corrects the problem with flags and %lld formats on 64-bit machines, where uint64_t is NOT acceptable for %lld, and also works on 32-bit machines. At least, with gcc.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 14:35:07 +00:00
Steve Murphy
8a7732f067
via 10206, I have added an option (e) to Dial to allow the h exten to get run on peer. Had to upgrade ast_flag stuff to 64 bits to do this.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17 19:40:29 +00:00
Joshua Colp
96a646734f
It is no longer required for each module that deals with a channel to call ast_module_user_hangup_all in it's unload function. The loader will automatically perform this action for it.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-16 13:35:20 +00:00
Joshua Colp
f80af1ff80
Use linkedlist macros for parking.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@73964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-09 02:29:00 +00:00
Russell Bryant
cf6ee48b5b
ast_exists_extension() does not return an ast_device_state, so change this
...
function to explicitly check for the int return value. Also, make a few
other minor changes such as removing a variable.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@73886 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-08 13:22:30 +00:00
Russell Bryant
6643934403
Merged revisions 73512 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r73512 | russell | 2007-07-05 15:50:08 -0500 (Thu, 05 Jul 2007) | 5 lines
Pass HOLD and UNHOLD frames to the other channel when they are returned from a
native bridge function. This fixes a problem where when two zap channels are
natively bridged and one does a flash hook, the other channel did not receive
music on hold. (Reported to me directly by Doug Bailey at Digium)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@73513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-05 20:51:08 +00:00
Luigi Rizzo
ad42dfe1dd
move variable declarations to the beginning of a block.
...
Not applicable to previous branches.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-28 19:02:31 +00:00
Tilghman Lesher
2e4b41841d
Merged revisions 71291 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r71291 | tilghman | 2007-06-24 12:50:24 -0500 (Sun, 24 Jun 2007) | 2 lines
Issue 10044 - chan->cdr is NULL here, so peer->cdr is what we really wanted to use
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71292 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-24 17:51:55 +00:00
Steve Murphy
d17beedd5a
Merged revisions 71230 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r71230 | murf | 2007-06-22 21:29:48 -0600 (Fri, 22 Jun 2007) | 1 line
This patch is meant to fix 8433; where clid and src are lost via bridging.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71231 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-23 03:32:59 +00:00
Joshua Colp
c6755754d1
Merged revisions 69847 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r69847 | file | 2007-06-19 09:00:57 -0400 (Tue, 19 Jun 2007) | 10 lines
Merged revisions 69846 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r69846 | file | 2007-06-19 08:57:55 -0400 (Tue, 19 Jun 2007) | 2 lines
Add parked call extension AFTER the parking slot has been announced, otherwise two threads will try to handle the same channel and it will go kaboom. (issue #9191 reported by japple)
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-19 13:04:24 +00:00
Russell Bryant
b179e2155f
Convert uses of strdup() to ast_strdup()
...
(issue #9983 , eliel)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14 23:01:01 +00:00
Russell Bryant
055d82cbce
Add a massive set of changes for converting to use the ast_debug() macro.
...
(issue #9957 , patches from mvanbaak, caio1982, critch, and dimas)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14 19:39:12 +00:00
Tilghman Lesher
9d05ff8ed5
Issue 9869 - replace malloc and memset with ast_calloc, and other coding guidelines changes
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06 21:20:11 +00:00
Russell Bryant
65e8178c2b
Constify the return values of ast_parking_ext() and ast_pickup_ext()
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67853 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06 21:08:07 +00:00
Russell Bryant
baf596a954
Another tiny formatting change for testing ...
...
(issue #9828 )
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06 18:43:12 +00:00
Russell Bryant
6ddcfff1c7
Change "show parkedcalls" to "parkedcalls show" and mark the previous command
...
as deprecated. Also, convert the CLI command to the new style.
(issue #9861 , patch from eliel)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06 14:45:29 +00:00
Joshua Colp
6e6d4be830
Merged revisions 67064 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r67064 | file | 2007-06-04 13:41:59 -0400 (Mon, 04 Jun 2007) | 2 lines
Returning a value that indicates the parking of a call was a success when it really wasn't (because the parking slot selected was in use) is the wrong thing to do. (issue #9723 reported by mdu113)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-04 17:43:21 +00:00
Russell Bryant
8d0124aba3
Add support for configuring named groups of custom call features in
...
features.conf. This allows you to create a feature one time, and then map it
into groups for various different key mappings for the same feature, as well
as easy access control to groups of features.
(patch from bbryant)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@66774 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-31 18:21:47 +00:00
Russell Bryant
cc35dc8999
Revert changes that snuck in with revision 66724.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@66773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-31 18:09:50 +00:00
Russell Bryant
8ea9dcc221
Fix a crash on reload by using calloc() instead of malloc() to ensure that
...
data is properly initialized.
(issue #9765 , reported by MatsK, patch from eliel)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@66724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-31 14:52:30 +00:00
Joshua Colp
5b4de10a12
Don't overwrite a pointer to the first channel... that is bad. (issue #9770 reported by tfbu)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@65376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-22 12:58:38 +00:00
Russell Bryant
16a9f0844f
Merged revisions 64426 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r64426 | russell | 2007-05-15 14:52:18 -0500 (Tue, 15 May 2007) | 3 lines
Properly fix a problem that occurs when you set PARKINGEXTEN to an exten where
a call is already parked. (issue #9723 , patch by me)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@64427 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-15 19:57:02 +00:00
Russell Bryant
17ab54e52a
Merged revisions 64353 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r64353 | russell | 2007-05-14 16:16:39 -0500 (Mon, 14 May 2007) | 4 lines
When someone requests a specific parking space using the PARKINGEXTEN variable,
ensure that no other caller is already there.
(issue #9723 , reported by mdu113, patch by me)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@64354 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-14 21:17:52 +00:00
Joshua Colp
4765d4145e
Merged revisions 63872 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r63872 | file | 2007-05-11 11:43:14 -0400 (Fri, 11 May 2007) | 2 lines
Make the PARKINGEXTEN feature of parking actually work. (issue #9708 reported by mdu113)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63873 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-11 15:48:38 +00:00
Russell Bryant
a9bd9e39d5
Merged revisions 63448 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r63448 | russell | 2007-05-08 11:53:09 -0500 (Tue, 08 May 2007) | 4 lines
I mixed up the use of the find_feature() function, so I renamed it
find_dynamic_feature, and changed the code to use the correct lock when
using it.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-08 16:54:02 +00:00
Russell Bryant
314c874d7d
I noted this on the dev list but got no response, so I just did it myself.
...
Lock the call features when being used in chan_sip.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-08 16:41:35 +00:00
Russell Bryant
42a62a3c21
Merged revisions 63445 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r63445 | russell | 2007-05-08 11:30:43 -0500 (Tue, 08 May 2007) | 2 lines
Use a read/write lock when accessing the built-in features.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-08 16:31:16 +00:00
Steve Murphy
7ec9a2fb57
According to my testing, it's better if the ast_find_call_feature func ran this way instead, as far as the snom record button is concerned
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-04 18:47:19 +00:00
Steve Murphy
02337303ef
a small upgrade to the coding standard, and an update to the code that triggered the upgrade.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-04 17:49:20 +00:00
Steve Murphy
3ee0077f04
Added a small bit of code to support the SNOM 360's Record button. Made the find_feature func in res_features.c public, so I could use it to find the automon dial sequence as configured by the user. When the INFO packet has a Record: header with on/off, the sequence is sent as consecutive DTMF frames on the phone's channel, triggering the automon functionality. The user has to configure the automon in features.conf, and set up his dialplan accordingly.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63046 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-04 16:37:23 +00:00
Russell Bryant
7df63e233c
In addition to making it so attended transfers don't fail unnecessarily,
...
add some new options to control what happens when you hangup on an attended
transfer before the target extension answers the transferred channel. You
can now have it send the transferee back to the transferer.
(issue #8413 , patch from sergee with very minor modifications by me)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@62593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-01 22:24:51 +00:00
Russell Bryant
37d94ceab9
Merged revisions 62548 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r62548 | russell | 2007-05-01 16:57:10 -0500 (Tue, 01 May 2007) | 12 lines
Merged revisions 62547 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r62547 | russell | 2007-05-01 16:55:19 -0500 (Tue, 01 May 2007) | 4 lines
Remove an unnecessary check that makes it so if you hang up after doing an
attended transfer before the target extension answers the channel, the transfer
is not successful. (issue #9338 , patch by svanlund)
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@62549 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-01 21:57:58 +00:00
Russell Bryant
9c8c9c5fa1
Merge changes from team/russell/issue_5841:
...
This patch adds a "Bridge" Manager action, as well as a "Bridge" dialplan
application. The manager action will allow you to steal two active channels
in the system and bridge them together. Then, the one that did not hang up
will continue in the dialplan. Using the application will bridge the calling
channel to an arbitrary channel in the system. Whichever channel does not
hang up here will continue in the dialplan, as well.
This patch has been touched by a bunch of people over the course of a couple
years. Please forgive me if I have missed your name in the history of things.
The most recent patch came from issue #5841 , but there is also a reference to
an earlier version of this patch from issue #4297 . The people involved in writing
and/or reviewing the code include at least: twisted, mflorrel, heath1444, davetroy,
tim_ringenbach, moy, tmancill, serge-v, and me. There are also positive test
reports from many people.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-10 20:44:44 +00:00
Steve Murphy
ecaf781933
Merged revisions 60989 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r60989 | murf | 2007-04-09 12:32:07 -0600 (Mon, 09 Apr 2007) | 1 line
This is a big improvement over the current CDR fixes. It may still need refinement, but this won't have as many folks bothered.
This also adds the mods from 1.4/r.61136;
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-10 05:41:34 +00:00
Steve Murphy
09c0d56c5c
Merged revisions 59522 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r59522 | murf | 2007-03-30 11:51:17 -0600 (Fri, 30 Mar 2007) | 1 line
several changes via kpflemings review
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@59523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-30 17:57:47 +00:00
Steve Murphy
0f11d3c8c3
Merged revisions 59486 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r59486 | murf | 2007-03-30 08:11:59 -0600 (Fri, 30 Mar 2007) | 1 line
These mods fix CDR issues from 8221, 8593, 8680, 8743, and perhaps others. Mainly with CDRs generated from transfer situations.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@59500 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-30 14:37:21 +00:00
Olle Johansson
4561b7a83b
Being picky...
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@55330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-18 15:11:52 +00:00
Olle Johansson
7f0934b6f4
Simplify post_manager_event()
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@55323 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-18 15:01:07 +00:00
Joshua Colp
b8ab0abb83
Allow the user to specify where to enable the respective features for when a parked call is picked up. (ie: transfers and parking)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54910 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-16 18:08:34 +00:00
Russell Bryant
a8309d1a3c
Merged revisions 54888 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r54888 | russell | 2007-02-16 11:40:38 -0600 (Fri, 16 Feb 2007) | 3 lines
Clean up a few coding guidelines issues - spaces to tabs, use sizeof() to pass
the size of a static buffer, add spaces ...
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-16 17:44:39 +00:00
Joshua Colp
ae6898cbe5
Add option to features.conf that enables parking via DTMF on picked up parked calls. (issue #9082 reported by francesco_r)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-16 17:41:27 +00:00
Russell Bryant
f60efe347a
This introduces a new dialplan function, DEVSTATE, which allows you to do some
...
pretty cool things.
First, you can get the device state of anything in the dialplan:
NoOp(SIP/mypeer has state ${DEVSTATE(SIP/mypeer)})
NoOp(The conference room 1234 has state ${DEVSTATE(MeetMe:1234)})
Most importantly, this allows you to create custom device states so you can
control phone lamps directly from the dialplan.
Set(DEVSTATE(Custom:mycustomlamp)=BUSY)
...
exten => mycustomlamp,hint,Custom:mycustomlamp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-13 22:02:20 +00:00
Olle Johansson
38341590a3
Formatting changes
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@53054 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-01 00:38:43 +00:00
Steve Murphy
80435b54a5
Merged revisions 51716 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r51716 | murf | 2007-01-23 13:32:54 -0700 (Tue, 23 Jan 2007) | 1 line
this mod from 8593 (dstchannel in cdr is empty when transfer call).
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-23 20:36:08 +00:00
Joshua Colp
10e3cba61e
Add parkedcalltransfers option for res_features. This basically enables/disables DTMF based transfers. If you want to get former behavior you will have to make sure it is enabled.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-16 17:50:25 +00:00
Joshua Colp
0f456a07e3
Merged revisions 51148 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r51148 | file | 2007-01-16 12:39:50 -0500 (Tue, 16 Jan 2007) | 10 lines
Merged revisions 51145 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r51145 | file | 2007-01-16 12:36:50 -0500 (Tue, 16 Jan 2007) | 2 lines
Return previous behavior. ParkedCalls will be able to do DTMF based transfers again. trunk however will get an option to allow this to be set on/off. (issue #8804 reported by nortex)
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-16 17:42:47 +00:00
Jason Parker
5abda34cd9
Merged revisions 49742 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r49742 | qwell | 2007-01-05 18:24:38 -0600 (Fri, 05 Jan 2007) | 7 lines
Save 1 whopping byte of allocated memory!
This looks like it may have been a chicken/egg scenario..
You had to call a cleanup func, because everything was allocated.
Then since you had to call a cleanup func, you were forced to allocate - ie; strdup("").
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49743 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-06 00:28:16 +00:00
Kevin P. Fleming
87b9abc892
Merged revisions 49676 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r49676 | kpfleming | 2007-01-05 16:16:33 -0600 (Fri, 05 Jan 2007) | 2 lines
reduce stack consumption for AMI and AMI/HTTP requests by nearly 20K in most cases
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-05 22:43:18 +00:00