<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>New Tcl command option for "infotag get leg_dnis" and "infotag get leg_ani"</title>
  <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=4957065" />
  <subtitle>New Tcl command option for "infotag get leg_dnis" and "infotag get leg_ani"</subtitle>
  <id>http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=4957065</id>
  <updated>2013-05-19T07:45:15Z</updated>
  <dc:date>2013-05-19T07:45:15Z</dc:date>
  <entry>
    <title>RE: New Tcl command option for "infotag get leg_dnis" and "infotag get leg_</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5806872" />
    <author>
      <name>Yaw-Ming Chen</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5806872</id>
    <updated>2012-06-01T20:22:48Z</updated>
    <published>2012-06-01T20:22:48Z</published>
    <summary type="html">Sorry that I didn't make it clear. The callnumner is a key word

The legID you can use default "leg_incoming or you can get it from evt_legs tag

set legIDs [infotag get evt_legs]

infotag get leg_dnis callnumber leg_incoming
infotag get leg_ani  callnumber  leg_incoming</summary>
    <dc:creator>Yaw-Ming Chen</dc:creator>
    <dc:date>2012-06-01T20:22:48Z</dc:date>
  </entry>
  <entry>
    <title>RE: New Tcl command option for "infotag get leg_dnis" and "infotag get leg_</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5805507" />
    <author>
      <name>Keith Haugen</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5805507</id>
    <updated>2012-06-01T16:29:46Z</updated>
    <published>2012-06-01T16:29:46Z</published>
    <summary type="html">I am not sure I am understanding -- so if I have the command translation-profile outgoing remove_prefix_89 in my dial peer, and the number dialed is 8912345, there is some way in my TCL IVR script that I can get the translated number (i.e., 12345)?  How do I determine what the [callnumber] and [legID] options should be?</summary>
    <dc:creator>Keith Haugen</dc:creator>
    <dc:date>2012-06-01T16:29:46Z</dc:date>
  </entry>
  <entry>
    <title>New Tcl command option for "infotag get leg_dnis" and "infotag get leg_ani"</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4957064" />
    <author>
      <name>Yaw-Ming Chen</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4957064</id>
    <updated>2012-01-04T20:13:58Z</updated>
    <published>2012-01-04T20:13:58Z</published>
    <summary type="html">In IOS 15.2(2)T a new option [callnumber]   is introduced for infotag get leg_dnis and infotag get leg_ani

infotag get leg_dnis [callnumber] [legID]
infotag get leg_ani [callnumber] [legID]

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.</summary>
    <dc:creator>Yaw-Ming Chen</dc:creator>
    <dc:date>2012-01-04T20:13:58Z</dc:date>
  </entry>
</feed>

