
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
282
|
Chapter 12: PSTN Trunks
Using some Asterisk dial-plan wizardry, you can preserve the original caller’s caller
ID information throughout the interswitch calling process:
# West office extensions.conf
...
[default]
exten => _30XX,1,SetCIDNum(${EXTEN})
exten => _30XX,2,Dial(Zap/1/5551300,35,mD(${EXTEN}))
In this case, Asterisk will supply the originating extension number as the caller ID
number.
SetCIDNum establishes the caller ID number for outgoing channels on the
current extension. This config would, of course, have to be mirrored for the East
office:
# East office extensions.conf
...
[default]
exten => _34XX,1,SetCIDNum(${EXTEN})
exten => _34XX,2,Dial(Zap/1/5551340,35,mD(${EXTEN}))
Asterisk’s built-in variables, like EXTEN, are case-sensitive! ${EXTEN}
works fine but ${exten} does not. User-defined variables, on the other
hand, are case-insensitive.
Routing PSTN Calls at Connect Points
In the previous section, we covered using PSTN trunks to facilitate users in the same
organization calling each other. The following projects describe ways of using PSTN
connect points for elegantly interfacing your PBX to the PSTN. This includes setting
up outbound rollover groups, using automatic call distribution (ACD) to intelli-
gently handle incoming calls, and leveraging common PSTN trunk features