dial-peer voice 100 pots
destination-pattern ...%
port 0/0/0
forward-digits all
!
The above will take all calls that are 3 digits or longer and dial them exactly. (Note: periods are wild cards, and % are 0 or more of the preceding character). The key is to have asterisk send exactly the digits to call and no more. If your like my office, you have an external access number (in my case it is 8). Using ${EXTEN:1} you can drop that in asterisk before it calls out to the cisco. Below is an example of my asterisk's extensions.conf (Note: 10.10.10.10 is the example IP for the cisco)
[outgoing-calls]
ignorepat => 8
exten => _8011.,1,Dial(SIP/${EXTEN:1}@10.10.10.10)
exten => _81XXXNXXXXXX,1,Dial(SIP/${EXTEN:1}@10.10.10.10)
exten => _8NXXXXXX,1,Dial(SIP/${EXTEN:1}@10.10.10.10)
exten => _8911,1,Dial(SIP/${EXTEN:1}@10.10.10.10)
exten => _8611,1,Dial(SIP/${EXTEN:1}@10.10.10.10)
exten => _8411,1,Dial(SIP/${EXTEN:1}@10.10.10.10)
I could have setup a wild card for 911,611,411 and others, but I'd rather have specific control over what number people can call. Of the same is true with the international calling, but for now I don't have to worry about that.



