Ever wanted to be able to echo a calling party’s phone number back to them, in much the same way a telco-provided ANI/ALI line does? Here’s a way to do it using the ANI as presented to your PBX by the PSTN.

There are a lot of vector steps, and a lot of announcements required. For the announcements specifically – the announcements that are named with only digits are simply those spoken digits (I haven’t bothered customizing this for inflection). The announcement named “ani_response” is a message to the effect of “Your telephone number is: “.

I’m hoping that this will be self-explanatory to a lot of you – but I’m more than willing to answer any questions anyone might have, or to try to clarify what happens and when. Feel free to get in touch.

list announcement                                                      Page   x

                           ANNOUNCEMENTS/AUDIO SOURCES
Announcement                                                  Source      Num of
Extension             Type       Name                        Pt/Bd/Grp    Files
6989                  integrated ani_response                 G2          2
6990                  integrated 0                            G2          2
6991                  integrated 1                            G2          2
6992                  integrated 2                            G2          2
6993                  integrated 3                            G2          2
6994                  integrated 4                            G2          2
6995                  integrated 5                            G2          2
6996                  integrated 6                            G2          2
6997                  integrated 7                            G2          2
6998                  integrated 8                            G2          2
6999                  integrated 9                            G2          2
61160                 integrated 740569                       G2          2
61161                 integrated 740652                       G2          2
61162                 integrated 740653                       G2          2
61163                 integrated 740654                       G2          2
61164                 integrated 740681                       G2          2
61165                 integrated 740687                       G2          2
61166                 integrated 740689                       G2          2
list vdn 7995

                          VECTOR DIRECTORY NUMBERS

                                                                        Evnt
                                      VDN         Vec           Orig    Noti
Name (22 characters)   Ext/Skills     Ovr COR TN  PRT Num  Meas Annc    Adj

ANIResp                7995            n  1   1    V  160  none
display vdn 7995                                                Page   1 of   3
                            VECTOR DIRECTORY NUMBER

                             Extension: 7995
                                 Name*: ANIResp
                           Destination: Vector Number        160
                   Attendant Vectoring? n
                  Meet-me Conferencing? n
                    Allow VDN Override? n
                                   COR: 1
                                   TN*: 1
                              Measured: none


        VDN of Origin Annc. Extension*:
                            1st Skill*:
                            2nd Skill*:
                            3rd Skill*:



* Follows VDN Override Rules
display vdn 7995                                                Page   2 of   3
                            VECTOR DIRECTORY NUMBER

                            AUDIX Name:
                   Return Destination*:
               VDN Timed ACW Interval*:      After Xfer or Held Call Drops*? n
                      BSR Application*:
         BSR Available Agent Strategy*: 1st-found      Used for BSR Polling? n
                     BSR Tie Strategy*: system

               Observe on Agent Answer? n

  Send VDN as Called Ringing Name Over QSIG? n

              Display VDN for Route-To DAC*? n
            VDN Override for ASAI Messages*: no

                       BSR Local Treatment*? n

              Reporting for PC or POM Calls? n
           Pass Prefixed CPN to VDN/Vector*? system
* Follows VDN Override Rules
display vdn 7995                                                Page   3 of   3
                            VECTOR DIRECTORY NUMBER

                                VDN VARIABLES*

                    Var  Description       Assignment
                    V1
                    V2
                    V3
                    V4
                    V5
                    V6
                    V7
                    V8
                    V9

                    VDN Time-Zone Offset*: + 00:00
                    Daylight Saving Rule*: system
 Use VDN Time Zone For Holiday Vectoring*? n
    Apply Ringback for Auto Answer calls*? y

* Follows VDN Override Rules
display vector 160                                              Page   x
                                  CALL VECTOR

    Number: 160              Name: ANIResp-1
Multimedia? n      Attendant Vectoring? n    Meet-me Conf? n           Lock? n
     Basic? y   EAS? y   G3V4 Enhanced? y   ANI/II-Digits? y   ASAI Routing? y
 Prompting? y   LAI? y  G3V4 Adv Route? y   CINFO? y   BSR? y   Holidays? y
 Variables? y   3.0 Enhanced? y
01 wait-time    2   secs hearing ringback
02 announcement 6989
03 set          B      = V4     ADD   none
04 goto step    41            if B                =      740652+
05 goto step    45            if B                =      740569+
06 goto step    49            if B                =      740653+
07 goto step    53            if B                =      740654+
08 goto step    19            if B                =      1+
09 goto step    21            if B                =      2+
10 goto step    23            if B                =      3+
11 goto step    25            if B                =      4+
12 goto step    27            if B                =      5+
13 goto step    29            if B                =      6+
14 goto step    31            if B                =      7+
15 goto step    33            if B                =      8+
16 goto step    35            if B                =      9+
17 goto step    37            if B                =      0+
18 stop
19 announcement 6991
20 goto vector  161  @step 1  if unconditionally
21 announcement 6992
22 goto vector  161  @step 1  if unconditionally
23 announcement 6993
24 goto vector  161  @step 1  if unconditionally
25 announcement 6994
26 goto vector  161  @step 1  if unconditionally
27 announcement 6995
28 goto vector  161  @step 1  if unconditionally
29 announcement 6996
30 goto vector  161  @step 1  if unconditionally
31 announcement 6997
32 goto vector  161  @step 1  if unconditionally
33 announcement 6998
34 goto vector  161  @step 1  if unconditionally
35 announcement 6999
36 goto vector  161  @step 1  if unconditionally
37 announcement 6990
38 goto vector  161  @step 1  if unconditionally
39 stop
40
41 #    begins with 740-652
42 announcement 61161
43 goto vector  166  @step 1  if unconditionally
44 stop
45 #    begins with 740-569
46 announcement 61160
47 goto vector  166  @step 1  if unconditionally
48 stop
49 #    begins with 740-653
50 announcement 61162
51 goto vector  166  @step 1  if unconditionally
52 stop
53 #    begins with 740-654
54 announcement 61163
55 goto vector  166  @step 1  if unconditionally
56 stop
display vector 161                                              Page   x
                                  CALL VECTOR

    Number: 161              Name: ANIResp-2
Multimedia? n      Attendant Vectoring? n    Meet-me Conf? n           Lock? n
     Basic? y   EAS? y   G3V4 Enhanced? y   ANI/II-Digits? y   ASAI Routing? y
 Prompting? y   LAI? y  G3V4 Adv Route? y   CINFO? y   BSR? y   Holidays? y
 Variables? y   3.0 Enhanced? y
01
02
03 goto step    14            if ani              =      ?1+
04 goto step    16            if ani              =      ?2+
05 goto step    18            if ani              =      ?3+
06 goto step    20            if ani              =      ?4+
07 goto step    22            if ani              =      ?5+
08 goto step    24            if ani              =      ?6+
09 goto step    26            if ani              =      ?7+
10 goto step    28            if ani              =      ?8+
11 goto step    30            if ani              =      ?9+
12 goto step    32            if ani              =      ?0+
13 stop
14 announcement 6991
15 goto vector  162  @step 1  if unconditionally
16 announcement 6992
17 goto vector  162  @step 1  if unconditionally
18 announcement 6993
19 goto vector  162  @step 1  if unconditionally
20 announcement 6994
21 goto vector  162  @step 1  if unconditionally
22 announcement 6995
23 goto vector  162  @step 1  if unconditionally
24 announcement 6996
25 goto vector  162  @step 1  if unconditionally
26 announcement 6997
27 goto vector  162  @step 1  if unconditionally
28 announcement 6998
29 goto vector  162  @step 1  if unconditionally
30 announcement 6999
31 goto vector  162  @step 1  if unconditionally
32 announcement 6990
33 goto vector  162  @step 1  if unconditionally
34 stop
display vector 162                                              Page   x
                                  CALL VECTOR

    Number: 162              Name: ANIResp-3
Multimedia? n      Attendant Vectoring? n    Meet-me Conf? n           Lock? n
     Basic? y   EAS? y   G3V4 Enhanced? y   ANI/II-Digits? y   ASAI Routing? y
 Prompting? y   LAI? y  G3V4 Adv Route? y   CINFO? y   BSR? y   Holidays? y
 Variables? y   3.0 Enhanced? y
01
02
03 goto step    14            if ani              =      ??1+
04 goto step    16            if ani              =      ??2+
05 goto step    18            if ani              =      ??3+
06 goto step    20            if ani              =      ??4+
07 goto step    22            if ani              =      ??5+
08 goto step    24            if ani              =      ??6+
09 goto step    26            if ani              =      ??7+
10 goto step    28            if ani              =      ??8+
11 goto step    30            if ani              =      ??9+
12 goto step    32            if ani              =      ??0+
13 stop
14 announcement 6991
15 goto vector  163  @step 1  if unconditionally
16 announcement 6992
17 goto vector  163  @step 1  if unconditionally
18 announcement 6993
19 goto vector  163  @step 1  if unconditionally
20 announcement 6994
21 goto vector  163  @step 1  if unconditionally
22 announcement 6995
23 goto vector  163  @step 1  if unconditionally
24 announcement 6996
25 goto vector  163  @step 1  if unconditionally
26 announcement 6997
27 goto vector  163  @step 1  if unconditionally
28 announcement 6998
29 goto vector  163  @step 1  if unconditionally
30 announcement 6999
31 goto vector  163  @step 1  if unconditionally
32 announcement 6990
33 goto vector  163  @step 1  if unconditionally
34 stop
display vector 163                                              Page   x
                                  CALL VECTOR

    Number: 163              Name: ANIResp-4
Multimedia? n      Attendant Vectoring? n    Meet-me Conf? n           Lock? n
     Basic? y   EAS? y   G3V4 Enhanced? y   ANI/II-Digits? y   ASAI Routing? y
 Prompting? y   LAI? y  G3V4 Adv Route? y   CINFO? y   BSR? y   Holidays? y
 Variables? y   3.0 Enhanced? y
01
02
03 goto step    14            if ani              =      ???1+
04 goto step    16            if ani              =      ???2+
05 goto step    18            if ani              =      ???3+
06 goto step    20            if ani              =      ???4+
07 goto step    22            if ani              =      ???5+
08 goto step    24            if ani              =      ???6+
09 goto step    26            if ani              =      ???7+
10 goto step    28            if ani              =      ???8+
11 goto step    30            if ani              =      ???9+
12 goto step    32            if ani              =      ???0+
13 stop
14 announcement 6991
15 goto vector  164  @step 1  if unconditionally
16 announcement 6992
17 goto vector  164  @step 1  if unconditionally
18 announcement 6993
19 goto vector  164  @step 1  if unconditionally
20 announcement 6994
21 goto vector  164  @step 1  if unconditionally
22 announcement 6995
23 goto vector  164  @step 1  if unconditionally
24 announcement 6996
25 goto vector  164  @step 1  if unconditionally
26 announcement 6997
27 goto vector  164  @step 1  if unconditionally
28 announcement 6998
29 goto vector  164  @step 1  if unconditionally
30 announcement 6999
31 goto vector  164  @step 1  if unconditionally
32 announcement 6990
33 goto vector  164  @step 1  if unconditionally
34 stop
display vector 164                                              Page   x
                                  CALL VECTOR

    Number: 164              Name: ANIResp-5
Multimedia? n      Attendant Vectoring? n    Meet-me Conf? n           Lock? n
     Basic? y   EAS? y   G3V4 Enhanced? y   ANI/II-Digits? y   ASAI Routing? y
 Prompting? y   LAI? y  G3V4 Adv Route? y   CINFO? y   BSR? y   Holidays? y
 Variables? y   3.0 Enhanced? y
01
02
03 goto step    14            if ani              =      ????1+
04 goto step    16            if ani              =      ????2+
05 goto step    18            if ani              =      ????3+
06 goto step    20            if ani              =      ????4+
07 goto step    22            if ani              =      ????5+
08 goto step    24            if ani              =      ????6+
09 goto step    26            if ani              =      ????7+
10 goto step    28            if ani              =      ????8+
11 goto step    30            if ani              =      ????9+
12 goto step    32            if ani              =      ????0+
13 stop
14 announcement 6991
15 goto vector  165  @step 1  if unconditionally
16 announcement 6992
17 goto vector  165  @step 1  if unconditionally
18 announcement 6993
19 goto vector  165  @step 1  if unconditionally
20 announcement 6994
21 goto vector  165  @step 1  if unconditionally
22 announcement 6995
23 goto vector  165  @step 1  if unconditionally
24 announcement 6996
25 goto vector  165  @step 1  if unconditionally
26 announcement 6997
27 goto vector  165  @step 1  if unconditionally
28 announcement 6998
29 goto vector  165  @step 1  if unconditionally
30 announcement 6999
31 goto vector  165  @step 1  if unconditionally
32 announcement 6990
33 goto vector  165  @step 1  if unconditionally
34 stop
display vector 165                                              Page   x
                                  CALL VECTOR

    Number: 165              Name: ANIResp-6
Multimedia? n      Attendant Vectoring? n    Meet-me Conf? n           Lock? n
     Basic? y   EAS? y   G3V4 Enhanced? y   ANI/II-Digits? y   ASAI Routing? y
 Prompting? y   LAI? y  G3V4 Adv Route? y   CINFO? y   BSR? y   Holidays? y
 Variables? y   3.0 Enhanced? y
01
02
03 goto step    14            if ani              =      ?????1+
04 goto step    16            if ani              =      ?????2+
05 goto step    18            if ani              =      ?????3+
06 goto step    20            if ani              =      ?????4+
07 goto step    22            if ani              =      ?????5+
08 goto step    24            if ani              =      ?????6+
09 goto step    26            if ani              =      ?????7+
10 goto step    28            if ani              =      ?????8+
11 goto step    30            if ani              =      ?????9+
12 goto step    32            if ani              =      ?????0+
13 stop
14 announcement 6991
15 goto vector  166  @step 1  if unconditionally
16 announcement 6992
17 goto vector  166  @step 1  if unconditionally
18 announcement 6993
19 goto vector  166  @step 1  if unconditionally
20 announcement 6994
21 goto vector  166  @step 1  if unconditionally
22 announcement 6995
23 goto vector  166  @step 1  if unconditionally
24 announcement 6996
25 goto vector  166  @step 1  if unconditionally
26 announcement 6997
27 goto vector  166  @step 1  if unconditionally
28 announcement 6998
29 goto vector  166  @step 1  if unconditionally
30 announcement 6999
31 goto vector  166  @step 1  if unconditionally
32 announcement 6990
33 goto vector  166  @step 1  if unconditionally
34 stop
display vector 166                                              Page   x
                                  CALL VECTOR

    Number: 166              Name: ANIResp-7
Multimedia? n      Attendant Vectoring? n    Meet-me Conf? n           Lock? n
     Basic? y   EAS? y   G3V4 Enhanced? y   ANI/II-Digits? y   ASAI Routing? y
 Prompting? y   LAI? y  G3V4 Adv Route? y   CINFO? y   BSR? y   Holidays? y
 Variables? y   3.0 Enhanced? y
01
02
03 goto step    14            if ani              =      ??????1+
04 goto step    16            if ani              =      ??????2+
05 goto step    18            if ani              =      ??????3+
06 goto step    20            if ani              =      ??????4+
07 goto step    22            if ani              =      ??????5+
08 goto step    24            if ani              =      ??????6+
09 goto step    26            if ani              =      ??????7+
10 goto step    28            if ani              =      ??????8+
11 goto step    30            if ani              =      ??????9+
12 goto step    32            if ani              =      ??????0+
13 stop
14 announcement 6991
15 goto vector  167  @step 1  if unconditionally
16 announcement 6992
17 goto vector  167  @step 1  if unconditionally
18 announcement 6993
19 goto vector  167  @step 1  if unconditionally
20 announcement 6994
21 goto vector  167  @step 1  if unconditionally
22 announcement 6995
23 goto vector  167  @step 1  if unconditionally
24 announcement 6996
25 goto vector  167  @step 1  if unconditionally
26 announcement 6997
27 goto vector  167  @step 1  if unconditionally
28 announcement 6998
29 goto vector  167  @step 1  if unconditionally
30 announcement 6999
31 goto vector  167  @step 1  if unconditionally
32 announcement 6990
33 goto vector  167  @step 1  if unconditionally
34 stop
display vector 167                                              Page   x
                                  CALL VECTOR

    Number: 167              Name: ANIResp-8
Multimedia? n      Attendant Vectoring? n    Meet-me Conf? n           Lock? n
     Basic? y   EAS? y   G3V4 Enhanced? y   ANI/II-Digits? y   ASAI Routing? y
 Prompting? y   LAI? y  G3V4 Adv Route? y   CINFO? y   BSR? y   Holidays? y
 Variables? y   3.0 Enhanced? y
01
02
03 goto step    14            if ani              =      ???????1+
04 goto step    16            if ani              =      ???????2+
05 goto step    18            if ani              =      ???????3+
06 goto step    20            if ani              =      ???????4+
07 goto step    22            if ani              =      ???????5+
08 goto step    24            if ani              =      ???????6+
09 goto step    26            if ani              =      ???????7+
10 goto step    28            if ani              =      ???????8+
11 goto step    30            if ani              =      ???????9+
12 goto step    32            if ani              =      ???????0+
13 stop
14 announcement 6991
15 goto vector  168  @step 1  if unconditionally
16 announcement 6992
17 goto vector  168  @step 1  if unconditionally
18 announcement 6993
19 goto vector  168  @step 1  if unconditionally
20 announcement 6994
21 goto vector  168  @step 1  if unconditionally
22 announcement 6995
23 goto vector  168  @step 1  if unconditionally
24 announcement 6996
25 goto vector  168  @step 1  if unconditionally
26 announcement 6997
27 goto vector  168  @step 1  if unconditionally
28 announcement 6998
29 goto vector  168  @step 1  if unconditionally
30 announcement 6999
31 goto vector  168  @step 1  if unconditionally
32 announcement 6990
33 goto vector  168  @step 1  if unconditionally
34 stop
display vector 168                                              Page   x
                                  CALL VECTOR

    Number: 168              Name: ANIResp-9
Multimedia? n      Attendant Vectoring? n    Meet-me Conf? n           Lock? n
     Basic? y   EAS? y   G3V4 Enhanced? y   ANI/II-Digits? y   ASAI Routing? y
 Prompting? y   LAI? y  G3V4 Adv Route? y   CINFO? y   BSR? y   Holidays? y
 Variables? y   3.0 Enhanced? y
01
02
03 goto step    14            if ani              =      ????????1+
04 goto step    16            if ani              =      ????????2+
05 goto step    18            if ani              =      ????????3+
06 goto step    20            if ani              =      ????????4+
07 goto step    22            if ani              =      ????????5+
08 goto step    24            if ani              =      ????????6+
09 goto step    26            if ani              =      ????????7+
10 goto step    28            if ani              =      ????????8+
11 goto step    30            if ani              =      ????????9+
12 goto step    32            if ani              =      ????????0+
13 stop
14 announcement 6991
15 goto vector  169  @step 1  if unconditionally
16 announcement 6992
17 goto vector  169  @step 1  if unconditionally
18 announcement 6993
19 goto vector  169  @step 1  if unconditionally
20 announcement 6994
21 goto vector  169  @step 1  if unconditionally
22 announcement 6995
23 goto vector  169  @step 1  if unconditionally
24 announcement 6996
25 goto vector  169  @step 1  if unconditionally
26 announcement 6997
27 goto vector  169  @step 1  if unconditionally
28 announcement 6998
29 goto vector  169  @step 1  if unconditionally
30 announcement 6999
31 goto vector  169  @step 1  if unconditionally
32 announcement 6990
33 goto vector  169  @step 1  if unconditionally
34 stop
display vector 169                                              Page   x
                                  CALL VECTOR

    Number: 169              Name: ANIResp-10
Multimedia? n      Attendant Vectoring? n    Meet-me Conf? n           Lock? n
     Basic? y   EAS? y   G3V4 Enhanced? y   ANI/II-Digits? y   ASAI Routing? y
 Prompting? y   LAI? y  G3V4 Adv Route? y   CINFO? y   BSR? y   Holidays? y
 Variables? y   3.0 Enhanced? y
01
02
03 goto step    14            if ani              =      ?????????1+
04 goto step    16            if ani              =      ?????????2+
05 goto step    18            if ani              =      ?????????3+
06 goto step    20            if ani              =      ?????????4+
07 goto step    22            if ani              =      ?????????5+
08 goto step    24            if ani              =      ?????????6+
09 goto step    26            if ani              =      ?????????7+
10 goto step    28            if ani              =      ?????????8+
11 goto step    30            if ani              =      ?????????9+
12 goto step    32            if ani              =      ?????????0+
13 goto vector  170  @step 1  if unconditionally
14 announcement 6991
15 goto vector  170  @step 1  if unconditionally
16 announcement 6992
17 goto vector  170  @step 1  if unconditionally
18 announcement 6993
19 goto vector  170  @step 1  if unconditionally
20 announcement 6994
21 goto vector  170  @step 1  if unconditionally
22 announcement 6995
23 goto vector  170  @step 1  if unconditionally
24 announcement 6996
25 goto vector  170  @step 1  if unconditionally
26 announcement 6997
27 goto vector  170  @step 1  if unconditionally
28 announcement 6998
29 goto vector  170  @step 1  if unconditionally
30 announcement 6999
31 goto vector  170  @step 1  if unconditionally
32 announcement 6990
33 goto vector  170  @step 1  if unconditionally
34 stop
display vector 170                                              Page   x
                                  CALL VECTOR

    Number: 170              Name: ANIResp-11
Multimedia? n      Attendant Vectoring? n    Meet-me Conf? n           Lock? n
     Basic? y   EAS? y   G3V4 Enhanced? y   ANI/II-Digits? y   ASAI Routing? y
 Prompting? y   LAI? y  G3V4 Adv Route? y   CINFO? y   BSR? y   Holidays? y
 Variables? y   3.0 Enhanced? y
01
02
03 goto step    14            if ani              =      ??????????1+
04 goto step    16            if ani              =      ??????????2+
05 goto step    18            if ani              =      ??????????3+
06 goto step    20            if ani              =      ??????????4+
07 goto step    22            if ani              =      ??????????5+
08 goto step    24            if ani              =      ??????????6+
09 goto step    26            if ani              =      ??????????7+
10 goto step    28            if ani              =      ??????????8+
11 goto step    30            if ani              =      ??????????9+
12 goto step    32            if ani              =      ??????????0+
13 goto vector  171  @step 1  if unconditionally
14 announcement 6991
15 goto vector  171  @step 1  if unconditionally
16 announcement 6992
17 goto vector  171  @step 1  if unconditionally
18 announcement 6993
19 goto vector  171  @step 1  if unconditionally
20 announcement 6994
21 goto vector  171  @step 1  if unconditionally
22 announcement 6995
23 goto vector  171  @step 1  if unconditionally
24 announcement 6996
25 goto vector  171  @step 1  if unconditionally
26 announcement 6997
27 goto vector  171  @step 1  if unconditionally
28 announcement 6998
29 goto vector  171  @step 1  if unconditionally
30 announcement 6999
31 goto vector  171  @step 1  if unconditionally
32 announcement 6990
33 goto vector  171  @step 1  if unconditionally
34 stop
display vector 171                                              Page   x
                                  CALL VECTOR

    Number: 171              Name: ANIResp-Disc
Multimedia? n      Attendant Vectoring? n    Meet-me Conf? n           Lock? n
     Basic? y   EAS? y   G3V4 Enhanced? y   ANI/II-Digits? y   ASAI Routing? y
 Prompting? y   LAI? y  G3V4 Adv Route? y   CINFO? y   BSR? y   Holidays? y
 Variables? y   3.0 Enhanced? y
01 goto vector  160  @step 1  if unconditionally
02
03
04
05
06
07
08 #    step 1 should be disconnect, changed to go because of troubleshooting