New Tcl IVR command option for "infotag get leg_dnis" and "infotag get leg_ani"

Blog Post created by cdnadmin on Mar 18, 2014
This blog was generated from CDN blog

Created by: Yaw-Ming Chen on 04-01-2012 02:05:21 PM
In IOS 15.2(2)T a new option    is introduced for infotag get leg_dnis and infotag get leg_ani

"callnumber" is keyword

infotag get leg_dnis 
infotag get leg_ani 


infotag get leg_dnis callnumber leg_incoming

This option services the following purposes:

1. Return number portion only for DNIS or ANI in SIP trunk
Without this option we need to use regular expression to extract the number portion after we use ¿infotag get¿ to get the ANI or DNIS
For example:
set dnis [infotag get leg_dnis]
regexp {[0-9]+} $dnis dnis
With using this option we don¿t need to use regular expression anymore. The command will return number only.

2. In certain configuration if we use ¿voip-incoming translation-profile¿ then use after translation number to trigger Tcl script, the ¿infotag get leg_dnis¿ command will return the number before translation.
For example:
The incoming number is 7771234 and we need have it translated to 8881234 via ¿voip-incoming translation-profile¿ command. We will expect 8881234 to hit Tcl application in dial-peer for incoming 8881234. Script will be triggered as expected but ¿infotag get leg_dnis¿ will return 7771234 but not 8881234. Use new option can fix this issue.