Today we’ll go over the process to connect an IOS voice gateway/CME (Call Manager Express) to the PSTN. I set this up last night and thought it would be a good post. I’ll briefly touch on using a SIP trunk as backup/failover too.

 

I’ve been running a SIP trunk to Flowroute for quite awhile, but I just recently got a “landline” from my ISP because they’re doing a promotion where it’s basically free. I’m keeping my SIP trunk, but I’ll be using it as backup since all US calling through the ISP is free. I’m using a 2811 with an NM-HD-2V and a VIC2-4FXO.

 

First we’ll verify that the card is recognized and working:

EDGE#sEDGE#sh voice port summ
                                           IN       OUT
PORT            CH   SIG-TYPE   ADMIN OPER STATUS   STATUS   EC
=============== == ============ ===== ==== ======== ======== ==
1/1/0           --  fxo-ls      up    dorm idle     on-hook  y
1/1/1           --  fxo-ls      up    dorm idle     on-hook  y
1/1/2           --  fxo-ls      up    dorm idle     on-hook  y
1/1/3           --  fxo-ls      up    dorm idle     on-hook  y

Everything looks good there, the router is recognizing the card and its ports. 1/1/0 is connected to the ISP’s MTA.

 

Now we’ll configure the dial peers:

dial-peer voice 1 pots
 preference 1
 destination-pattern 1[2-9].[1-9].......
 incoming called-number .T
 port 1/1/0
 forward-digits all
!
dial-peer voice 2 pots
 preference 1
 destination-pattern 1800.......
 incoming called-number .T
 port 1/1/0
 forward-digits all
!
dial-peer voice 3 pots
 preference 1
 destination-pattern 911
 incoming called-number .T
 port 1/1/0
 forward-digits all

We’ve configured three dial peers here. First note that the dial peer type is “pots”, this is used when the destination is an analog port (like FXO). Next you see the “preference” command, lower is better, making these peers more preferred than my SIP peers (with a preference of 2). The “destination-pattern” command is matching the dialed string, sort of like a static route. For the first dial peer, We’re matching 11 digits including the 1, area code (digits 2 through 9, wildcard which matches 0 through 9, and then digits 1 through 9), then seven wildcards matching 0 through 9. This is my convoluted way of blocking 900 numbers. For the incoming call, we’re matching any digits. The “port” command tells the router where to send the call when it matches the patter, port 1/1/0 here. Then we tell the router to forward all digits. This is important because it will strip the explicitly defined digits, which we don’t want here, we want all digits sent to the PSTN.

 

Next we’ll configure incoming calling, using Private-line Automatic Ringdown (PLAR):

voice-port 1/1/0
 connection plar 5001
 caller-id enable

Not much to that one. We go into the port config and use the “connection plar ” command. PLAR tells the router to automatically forward to an extension when the line goes off-hook. So when this port gets an incoming call from the PSTN (which takes it off-hook), it will instantly forward it to extension 5001. We’ve also used the “caller-id enable”, which is pretty self-explanatory; it enables incoming caller-id on this FXO port.

 

That’s all for this one. This could be the first(ish) of many voice-related posts. I’ll be moving through the voice exams (hopefully quickly) in the next few months and if there is interest, I can try to do some posts on things I’m learning/studying. Real voice (CUCM) can be tough blog about because it’s mostly GUI based, which requires (lots of) screenshots. Making 11ty screenshots for every post could get old quick. Post in the comments if you’d like to see voice topics, and if you have anything specific you’d like to read about.

 

Disclaimer: I am, by no means, a voice guy (yet?), so if you see any errors please let me know in the comments. I can say that this works, but I wouldn’t doubt if it’s not the “best” way.

Colby

Colby Glass has been in IT since 2002. He is currently a Systems Engineer (presales) with a Cisco Gold partner and holds the CCNP R/S, CCNP DC, CCDP, CCIP, JNCIA-ER.

More Posts