|Summary:||ASTERISK-06506: [patch] new manager action: SendDTMF|
|Reporter:||Jon Hood (squinky86)||Labels:|
|Date Opened:||2006-03-08 14:26:55.000-0600||Date Closed:||2008-01-15 17:30:09.000-0600|
|Environment:||Attachments:||( 0) ast_trunk_manager_PlayDTMF.patch|
|Description:||This patch creates a new action: SendDTMF. When given the channel and a number, this will send the number to the channel using dtmf signalling. This is not to be confused with ASTERISK-6026082, which is dtmf event monitor. The disclaimer falls under Asteria Solutions Group, Inc.'s umbrella disclaimer.|
|Comments:||By: Olle Johansson (oej) 2006-03-14 01:40:41.000-0600|
1. You need to unregister the manager app before unloading
2. Manager is not meant for humans, it's for parsing by software.
Sending "Sent to channel" is more of a comment for humans. I suggest simply "SUCCESS" or "FAILURE"
3. Cosmetic: DTMF are not only numbers, so the variable name may change for readability, but
this is not an important issue as you understand... Maybe "number" is used elsewhere too ;-9
By: Jon Hood (squinky86) 2006-03-14 13:21:19.000-0600
2) agreed, and I changed it a bit from your suggestions; if it's not acceptable, please let me know
3) changed "Number" to "Digit"; you are correct that digit is more appropriate.
other: kpflemming told me to stop shoving it down the channel on IRC and instead to queue it, so this uses the channel queuing structures.
This updated patch works...the wrong way. I want to send the dtmf signal down the specified channel, not up it. It seems that the dtmf is going the wrong way. For example, when I call voicemail, I can use the senddtmf manager command to type in my mailbox and password now, when really I want to be able to hear the dtmf digit on my phone. Does anyone have any pointers for getting this to work the other way?
By: Olle Johansson (oej) 2006-03-14 14:47:35.000-0600
1. I would prefer no spaces in the response "NO CHANNEL" - like "NO_CHANNEL"
2. Do we have any other manager actions that return that response?
3. QUEUED is not a good response, since this has nothing to do with queues...
I prefer if we can reuse as much as possible from other manager commands. I know it's stupid and not very consistent, but I still don't really want to make it worse... ;-)
I can't personally help you much with the direction, but it sounds like an awful situation... Try the IRC asterisk-dev channel or the asterisk-dev mailing list to find gurus.
By: Jon Hood (squinky86) 2006-03-14 14:57:42.000-0600
Originate and redirect both send "No such channel" as errors, so I'm going to change it back to human-readable responses, as SUCCESS and FAILURE are already sent with the astman_send_error and astman_send_ack functions. As for the wrong-way dtmf, I'm asking on irc.
By: Jon Hood (squinky86) 2006-03-14 15:34:52.000-0600
There, the last patch keeps the same schema as most other actions and responses. No longer is the dtmf being sent as a queued frame, it is sent via ast_senddigit. Thanks for the help, oej!
By: Olle Johansson (oej) 2006-03-14 15:57:00.000-0600
I reluctantly agree with the changes to be compatible with the other commands. :-)
Thanks for being patient and trying hard to get this to work properly. It's a cool function!
By: Olle Johansson (oej) 2006-03-15 02:34:22.000-0600
Sorry, completely forgot. It would be great if you could use ast_manager_register2 with the documentation. We need documentation for all new manager commands.
Another thought is the name. Since this is the opposite of the senddtmf command, should we change this to "playdtmf" and implement a dialplan command called "playdtmf" that also plays this way?
My apologies for jumping back and forth, but well, as you think about stuff new thoughts keep popping up... :-)
By: Olle Johansson (oej) 2006-03-15 02:37:47.000-0600
Committed to "test-this-branch" with the name "playDTMF".
By: Jon Hood (squinky86) 2006-03-15 09:24:32.000-0600
I sure hope no one needs to unregister playDTMF in your test-this-branch ;). The attached patch will:
* correctly unregister the playdtmf action
* uses the register2 scheme
* will not bail if digit is null
By: Olle Johansson (oej) 2006-03-17 04:29:16.000-0600
Thanks for the patch. Removed it from here, since it is not for the trunk.
By: Jon Hood (squinky86) 2006-05-02 18:35:52
I had some requests for an updated cleaned full patch. The most recent attached file should apply to asterisk 220.127.116.11's app_senddtmf.c. I'd like to see this added to the stable branch of asterisk soon as I've put it under heavy testing.
By: BJ Weschke (bweschke) 2006-05-03 17:34:14
squinky86: we don't put new features into a "stable" branch. They only go into /trunk. Your contribution I'd say is getting real close to being ready. If you can, please rework the patch against /trunk and update doc/manager.txt to reflect the new command. Attach those back to the bug and we should be ready to go.
By: Jon Hood (squinky86) 2006-05-04 15:41:10
Really the only blurb it'll need is what the command and parameters are:
Parameters: Channel, Digit
An example would be overkill for a simple manager command.
By: BJ Weschke (bweschke) 2006-05-04 16:34:56
committed to /trunk. Thanks!
By: Digium Subversion (svnbot) 2008-01-15 17:30:09.000-0600
r13025 | oej | 2008-01-15 17:30:08 -0600 (Tue, 15 Jan 2008) | 2 lines
Issue ASTERISK-6506 - Add manager PlayDTMF command (Squinky86)