|Summary:||ASTERISK-00188: [patch] new app "Dialtone" Patch for res_indications.c|
|Date Opened:||2003-08-28 05:19:18||Date Closed:||2011-06-07 14:05:19|
|Environment:||Attachments:||( 0) dialtone.diff|
( 1) PlayDialtone.diff
|Description:||This is a patch primarily from "Surfer Dude", Jason.|
With this app you can give the user a Dialtone for a specified time, so that the user can dial an extension.
This is useful, if you have the immediate option in zapata.conf on "yes"...
****** ADDITIONAL INFORMATION ******
exten => s,1,Dialtone(60)
the user hears a dialtone for 60 seconds and can dial a number...
|Comments:||By: oliver (oliver) 2003-08-28 07:44:58|
I have been using a home-made patch to do something similar for quite some time, which has also been posted to the list (PlayDialtone). What I'm missing in your patch, is the ability to (optionally) supply a specific indication you want to play as the dial-tone, in the same format as "Playtones" takes. You could change it so that if a full indication-tone is supplied, it will play that and not use the voicemail checking, but if only an indication-country is supplied, it would use the tones for that country and otherwise behave the same as it does now, including the voicemail-checking. Also, you might want to try to take the timeout from what's currently set as the "ResponseTimeout" and honour the "t"-extension of the current context on timeout, if it's available (if "ast_waitfordigit()" doesn't already do that, didn't try).
I'm using my patch to serve a second dial-tone to callers, which in some case also needs to be different from the one in my default indication-country. My patch is not really clean enough for inclusion into the main Asterisk-distribution, but yours might make it. :-)
edited on: 08-28-03 07:33
By: John Todd (jtodd) 2003-08-28 16:08:35
I'll second oliver's notes on the need for timeout. I have been considering having a PLAR (private line auto-ringdown - pick up the phone, it instantlydials a number) on my SIP phones that immediately calls a meta-extension on Asterisk, and I'd need to have identical functionality to a normal north american PSTN handset (for some value of "identical".) The whole point of the PLAR is so I can customize the prompts before and after the dialtone, and the timeout ("To place a call, please hang up and then re-dial your number") would be useful. SIP phones are notably poor in handling these types of situations, so I'd like to move that functionality into Asterisk.
You don't mention in your notes that the timeout and the voicemailbox can be specified in the command. Those are useful features; thanks!
By: John Todd (jtodd) 2003-09-08 18:30:03
Before adding this to CVS, perhaps it would be a good idea to see if it can be made generic enough to support the indication-country alternate tones, and the use of ResponseTimeout as a timer instead of an application-specific timer. (Maybe use DigitTimeout, too.)
By: Mark Spencer (markster) 2003-09-13 19:06:03
This sounds like a useful app, but perhaps extending the DISA would be the more appropriate direction, what do you guys think?
By: oliver (oliver) 2003-09-13 19:22:12
Sure, DISA would be a logical place to do it.
By: John Todd (jtodd) 2003-09-13 19:35:04
So, can the original author of this handy feature (thaeger) put his ideas into a patch for DISA?
By: John Todd (jtodd) 2003-09-13 20:04:41
Also, this may take some hacking on app_disa to make it work with the extended features. Note that app_disa apparently does not honor the DigitTimeout or ResponseTimeout features, according to the hardcoded millisecond timers I see at the top of the file (firstdigittimeout and digittimeout)
If someone wants to undertake the heroic task of re-writing DISA to match the way that Asterisk handles all of it's other timers, that would be great, and we would have a ticket-tape parade in your honor. Or maybe a dinner party. How about we send you an animated on-line greeting card with our best wishes? Seriously, this would be helpful to quite a few people who are using stupid SIP phones with "broken" call handling.
By: John Todd (jtodd) 2003-09-18 20:13:43
If thaeger is too busy.... oliver, do you want to take a stab at it?
By: oliver (oliver) 2003-09-18 21:35:55
Sorry, it would currently take me far too long to come up with something like that. My "PlayDialtone"-app pretty much does it all, except the voicemail-check. It behaves just like "BackGround" and honours all possible timers and such, as it hooks into "pbx.c" instead of trying to mimic it's functionality. It's very simple, but also somewhat of a dirty hack. Anyway, it works for me. :-) I'll upload it here.
By: John Todd (jtodd) 2003-09-19 01:07:07
Actually, now that I look at DISA, it doesn't appear that DISA honors "digittimeout" or "responsetimeout", and DISA doesn't appear to be country-specific (at least, the re-order tone seems to be "hard-coded", which was the only example I looked up in there.) I have sent mail to the author of DISA to see if maybe he wants to take a look at making the changes.
By: John Todd (jtodd) 2003-10-16 05:06:03
The author of DISA hasn't responded, so we're back to (perhaps) using PlayDialtone as a DISA replacement, but without the fancy password features (which really could be done with some dialplan logic, so it's not that big a loss)
oliver - does PlayDialtone honor localizations for dialtone production? How hard would it be for you to hack in the stutter dialtone feature as a modifiable flag?
In other news: I have had some good luck using PLARs with SIP phones to get to DISA. In other words, don't use the dialtone produced by my (ata-186, grandstream, etc) and use Asterisk to produce that dialtone. There are some advantages and disadvantages to that model. One of the big disadvantages right now is the lack of stutter dialtone for message waiting indicators, since DISA is dumb as a rock.
By: ewieling (ewieling) 2003-10-29 18:39:55.000-0600
dialtone.diff works for me with a Zap channel, but not with a SIP channel.
edited on: 10-30-03 13:54
By: oliver (oliver) 2003-11-04 08:05:31.000-0600
PlayDialtone takes and plays any indication you wish, just like PlayTones, so localizations shouldn't be a problem. Now that we have HasNewVoicemail, the stutter dial-tone should be possible from the standard dial-plan as well. I could try to add it as a seperate flag, but that might take a while and in it's current form, it's not likely to be added to CVS anyways, unless Mark changes his mind. :-)
By: exomorph (exomorph) 2003-11-24 22:44:17.000-0600
If someone would like, I can move this into DISA...
By: jrollyson (jrollyson) 2004-01-22 23:03:54.000-0600
A revised patch that extends DISA to have working timouts would be great.
By: Olle Johansson (oej) 2004-03-25 17:04:37.000-0600
Any update to this bug report? Any progress?
By: twisted (twisted) 2004-04-29 09:05:09
HouseKeeping - request for update posted on 3-25-05 (over a month ago) with no update made. Also, bug ASTERISK-739 is handling this (assuming we get an update from them) in PlayTones().