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 ;}}