Use DTMF to enable asterisk to automatically call the extension

Source: Internet
Author: User
Background

System Structure

Extension 1026 and extension 1027 are used in the existing telephone system, and an asterisk is implemented under extension 1026 and extension 1027. A: In the 1027 system, ext. B: 1011 in the 1026 system, ext. 1012 is now called B through a. Because the language menu is implemented in the 1026 system, first, you can use the 91026 incoming call 1026 system (with an external dialing 9), and then enter 1012 according to the prompt. The existing vswitch does not support direct dialing by number (the solution is not found for the time being). That is, a can call 910261012 directly from a and cannot complete the call to B.

Principle

Dual-Tone Multi-frequency DTMF (Dual Tone Multi frequency) Dual-Tone Multi-frequency DTMF (DTMF) is a type of user signaling between telephones and switches in the telephone system and is usually used to send called numbers. Dual-Tone Multi-frequency signals were invented by Bell Labs to automatically complete long-distance calls. Valid Character Set: "0123456789 * # abcdabcd" character W can be used for waiting. One W represents the waiting time of 0.5 seconds. If it takes a longer time, multiple W combinations are required, example: 123456wwww789

Configure extensions. conf implementation
 
[Macro-DTMF] exten => S, 1, wait (8) exten => S, N, senddtmf ($ {arg1}) [dlpn_testout2] exten => _ 9 XXXXXXXX, 1, dial (dahdi/G1/$ {exten: 1}, 30, M (DTMF, $ {exten: 5}) [dlpn_dialplan1]; Include = dlpn_testout; define in extension. luainclude = dlpn_testout2
Configure extension. Lua implementation (LUA implementation)
  extensions = {dlpn_testout = {["_ 9 XXXXXXXX"] = function (context, extension) -- app. dial ("dahdi/G1 /".. "1026", "10", "m (DTMF) TR") num1 = string. sub (extension, 2, 5) num2 = string. sub (extension, 6) app. dial ("dahdi/G1 /".. num1, "30", "d (wwwwwwwwwwwwwww ".. num2 .. ")") end ;}} 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.