Monday, September 09, 2013

Cisco VG224 CPTONE usage and send custom tones to FXS port

See some official documentation here:
http://www.cisco.com/en/US/docs/ios/12_3t/voice/command/reference/vrht_t1_ps5207_TSD_Products_Command_Reference_Chapter.html#wp1645172

Customer had requirements of a third party fax server, served by analog ports on a VG224, to send custom tones to the devices on the FXS side.  The devices in this case were analog Dialogic board ports of some sort.

My first instinct was to create a new voice class and apply it to the voice ports like so:

voice class custom-cptone MyFax
dualtone busy
frequency 425
cadence 250 250
dualtone reorder
frequency 425
cadence 320 320

voice-port 1/1/0
 supervisory custom-cptone MyFax

This not only won't work, it's not what it's for.

You need to use the "test voice tones" command.  The fact that the command is test seems counter-intuitive, but it works.

First, do a "test voice tones show" to display the default defined values. The C1 values are below:

MyVG224#test voice tone C1 show
Code: C1   Country: Custom1
DTMF freq.(Hz) Row / col:  697,  770,  852,  941 / 1209, 1336, 1477, 1633
Pulse dial: normal, Percent make: 40%, DTMF low Amp. = 65446,  high Amp. = 65467,   Pcm: u-Law
     Tone      NF   FOF  FOS  AOF_FXS AOF_FXO AOF_EM AOS_FXS AOS_FXO AOS_EM  ONTF  OFTF  ONTS  OFTS  ONTT  OFTT  ONT4  OFT4
BUSY           2   480   620    -170    -170    -240    -170    -170    -240   500   500     0     0     0     0     0     0
RING_BACK      2   440   480    -160    -160    -190    -160    -160    -190  2000  4000     0     0     0     0     0     0
CONGESTION     2   480   620    -170    -170    -190    -170    -170    -240   250   250     0     0     0     0     0     0
NUM_UNOBTAINAB 2   480   620    -170    -170    -190    -170    -170    -240   250   250     0     0     0     0     0     0
DIALTONE       2   350   440    -165    -165    -185    -165    -165    -185 65535     0     0     0     0     0     0     0
DIAL_TONE2     2   350   440    -165    -165    -185    -165    -165    -185 65535     0     0     0     0     0     0     0
OUT_OF_SERVICE 1   950     0    -150    -150    -185      0      0      0   330   330     0     0     0     0     0     0
ADDR_ACK       1   600     0    -240    -240    -240      0      0      0   125   125   125 65535     0     0     0     0
DISCONNECT     1   600     0    -150    -150    -185      0      0      0   330   330   330 65535     0     0     0     0
OFFHOOK_NOTICE 2  1400  2040    -240    -240    -240    -240    -240    -240   100   100     0     0     0     0     0     0
OFFHOOK_ALERT  4  1400  2040    -150    -150    -185    -150    -150    -185   100   100     0     0     0     0     0     0

If, for example you want to modify what dial tone sounds like when an FXS port goes off-hook, you would execute:

test voice tone C1 DIALTONE       2   340   440    -165    -165    -185    -165    -165    -185 65535     0     0     0     0     0     0     0

In this case, I am changing the first frequency in a dual tone frequency from the default 350 to 340.

You then simply apply the new settings to the voice port via 

voice-port 2/0
 cptone C1

You can verify the changes / new settings by simply running "test voice tone C1 show" again, and your modifications should have replaced the defaults.

This change DOES NOT show in the running-configuration and WILL NOT survive a gateway reboot.

The make them "permanent" you need to add commands to reapply the changes when a syslog "restarted" event is raised.  For example, to make my change above get reapplied after a reboot, you must add the following to your running config:

event manager applet Tone-application
 event syslog pattern "%SYS-5-RESTART: System restarted"
 action 1.0 cli command "enable"
 action 1.1 cli command "test voice tone C1 DIALTONE       2   340   440    -165    -165    -185    -165    -165    -185 65535     0     0     0     0     0     0     0"

Note here that you can make changes to any number of tones like BUSY, RING_BACK, etc. by adding additional lines to the config and incrementing the action 1.X command.  For example, changing both DIALTONE and BUSY on a restart, you would enter the following.

event manager applet Tone-application
 event syslog pattern "%SYS-5-RESTART: System restarted"
 action 1.0 cli command "enable"
 action 1.1 cli command "test voice tone C1 DIALTONE       2   340   440    -165    -165    -185    -165    -165    -185 65535     0     0     0     0     0     0     0"
 action 1.2 cli command "test voice tone C1 BUSY           2   500     0    -170    -170    -240    -170    -170    -240   550   550     0     0     0     0     0     0"

If you want to get crazy, try changing the DIALTONE and RING_BACK tones to something high like 1000 and / or changing the on / off times to something short like 100 so you're confident, just by ear, the changes are effective.

No comments:

Post a Comment