<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://docs.telcobridges.com/mediawiki/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://docs.telcobridges.com/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Adding_capture_dtmf_script</id>
		<title>Adding capture dtmf script - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://docs.telcobridges.com/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Adding_capture_dtmf_script"/>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/mediawiki/index.php?title=Adding_capture_dtmf_script&amp;action=history"/>
		<updated>2026-05-15T21:01:12Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.18.1</generator>

	<entry>
		<id>https://docs.telcobridges.com/mediawiki/index.php?title=Adding_capture_dtmf_script&amp;diff=28017&amp;oldid=prev</id>
		<title>Luc Morissette: Update</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/mediawiki/index.php?title=Adding_capture_dtmf_script&amp;diff=28017&amp;oldid=prev"/>
				<updated>2020-02-04T19:32:05Z</updated>
		
		<summary type="html">&lt;p&gt;Update&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 19:32, 4 February 2020&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;=== '''''Applies to version(s): v2.9, v2.10, v3.0, v3.1''''' ===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;{{DISPLAYTITLE:Adding Capture DTMF Script}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This shows how to add '''Capture DTMF''' script to any Routing scripts. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This shows how to add '''Capture DTMF''' script to any Routing scripts. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Luc Morissette</name></author>	</entry>

	<entry>
		<id>https://docs.telcobridges.com/mediawiki/index.php?title=Adding_capture_dtmf_script&amp;diff=28016&amp;oldid=prev</id>
		<title>Luc Morissette: New page for capture DTMF script</title>
		<link rel="alternate" type="text/html" href="https://docs.telcobridges.com/mediawiki/index.php?title=Adding_capture_dtmf_script&amp;diff=28016&amp;oldid=prev"/>
				<updated>2020-02-04T19:30:25Z</updated>
		
		<summary type="html">&lt;p&gt;New page for capture DTMF script&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This shows how to add '''Capture DTMF''' script to any Routing scripts. &lt;br /&gt;
&lt;br /&gt;
== Script description &amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
If the called number is a specific value, it will play an announcement and waits to capture digits. &lt;br /&gt;
# Call 1-800-999-4444&lt;br /&gt;
# Hear tone&lt;br /&gt;
# Enter 2 digit switch number optionally followed by #&lt;br /&gt;
# Hear tone&lt;br /&gt;
# Enter TG number – can be 4 or 5 digits depending on which switch the call goes to&lt;br /&gt;
# Hear tone&lt;br /&gt;
# Enter destination number&lt;br /&gt;
The call then routes to a TG (NAP) based on the 2 digit switch number and the INVITE contains the TG number in the TGRP= parameter.  &lt;br /&gt;
Sample INVITE with TGRP=  &lt;br /&gt;
  INVITE sip:18003608022@192.168.101.180;tgrp=98741 SIP/2.0&lt;br /&gt;
This will work with any TMG device with a license to play files. For ProSBC, it requires transcoding devices.&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== Add '''Capture DTMF''' Scripts in system&amp;lt;br&amp;gt;  ==&lt;br /&gt;
Download this file:&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; |Capture DTMF Script&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Media:capture_dtmf.zip|capture_dtmf.rb]]&lt;br /&gt;
|}&lt;br /&gt;
Then upload it in the system with these instructions:&lt;br /&gt;
[[Import_Customized_Routing_Script_C]]&lt;br /&gt;
&lt;br /&gt;
== Setting up '''Capture DTMF''' Scripts&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
To setup a Filter, the main script needs to be modified. The main script can be either simple_routing.rb, simple_routing_sbc.rb, or any other script.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
First, go to the routing script section of the Web portal &lt;br /&gt;
&amp;lt;pre&amp;gt;Gateway -&amp;amp;gt; Routing scripts -&amp;amp;gt; Example Scripts -&amp;amp;gt; simple_routing.rb [Edit]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Three things need to be added. At the start of the script:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;require 'capture_dtmf'&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
In the main class:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;include CaptureDTMF&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;after_filter :method =&amp;gt; :capture_dtmf&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
The final script will look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
require 'base_routing'&lt;br /&gt;
require 'capture_dtmf'&lt;br /&gt;
&lt;br /&gt;
class SimpleRouting &amp;lt; BaseRouting&lt;br /&gt;
  include CaptureDTMF&lt;br /&gt;
  &lt;br /&gt;
  route_match :call_field_name =&amp;gt; :called&lt;br /&gt;
  route_match :call_field_name =&amp;gt; :calling&lt;br /&gt;
  route_match :call_field_name =&amp;gt; :nap&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :called, :route_field_name =&amp;gt; :remapped_called&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :calling, :route_field_name =&amp;gt; :remapped_calling&lt;br /&gt;
  route_remap :call_field_name =&amp;gt; :nap, :route_field_name =&amp;gt; :remapped_nap&lt;br /&gt;
&lt;br /&gt;
  after_filter :method =&amp;gt; :capture_dtmf&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Upload audio file &amp;lt;br&amp;gt;  ==&lt;br /&gt;
The script will play a tone for the user to ask them to enter a dtmf string. This show how to add the default one which can be downloaded here:&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;200&amp;quot; style=&amp;quot;background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&amp;quot; |Sample Tone File&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Media:Fen-tone-400hz-300ms.wav|fen-tone-400hz-300ms.wav]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
# Click '''Audio Prompts''' in the navigation panel&lt;br /&gt;
# Click '''Browse''' and select 'fen-tone-400hz-300ms.wav' &lt;br /&gt;
# Click '''Upload'''&lt;br /&gt;
See instructions here: [[Toolpack:Configuring_Audio_Prompts_C]]  &amp;lt;br&amp;gt;&lt;br /&gt;
However any G.711 alaw or G.711 ulaw wav file can be added to the system to be played: you need to edit the capture_dtmf.rb script with the appropriate wav file.&lt;/div&gt;</summary>
		<author><name>Luc Morissette</name></author>	</entry>

	</feed>