# Asterisk and Cisco Router FXO Incoming Call

**URL:** https://forum.networklessons.com/t/asterisk-and-cisco-router-fxo-incoming-call/1048
**Category:** Lessons Discussion
**Created:** [December 26, 2016, 6:55pm UTC](https://forum.networklessons.com/t/asterisk-and-cisco-router-fxo-incoming-call/1048 "2016-12-26T18:55:37Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [December 26, 2016, 6:55pm UTC](https://forum.networklessons.com/t/asterisk-and-cisco-router-fxo-incoming-call/1048/1 "2016-12-26T18:55:37Z")

</div>

This topic is to discuss the following lesson:

> **[Asterisk and Cisco Router FXO Incoming Call](https://networklessons.com/miscellaneous/asterisk-and-cisco-router-fxo-incoming-call)**
>
> This lesson explains how to connect your Cisco Voice Gateway (Router with FXO port) to Asterisk.

---

<div class="post-metadata">

### Author: ![system](https://cdn-forum.networklessons.com/uploads/default/original/1X/1d2ef66728c7fbac8377748594345a3f474fce5f.png) [@system](https://forum.networklessons.com/u/system)
#### Post date: [September 6, 2013, 9:46pm UTC](https://forum.networklessons.com/t/asterisk-and-cisco-router-fxo-incoming-call/1048/2 "2013-09-06T21:46:57Z")

</div>

Thank you for sharing. Is it possible to configure the Cisco UC500 to connect to a VOIP GSM gateway (e.g. Portech MV-374)? How to configure it on the Cisco side such that you have four (4) trunks created each presenting a SIM card? If you any idea I will grateful if you can share it.

Thanks

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [September 7, 2013, 3:46pm UTC](https://forum.networklessons.com/t/asterisk-and-cisco-router-fxo-incoming-call/1048/3 "2013-09-07T15:46:04Z")

</div>

Hi Roosevelt,

I wish I could help you but I have no idea. I don’t do a lot of voip…

Rene

---

<div class="post-metadata">

### Author: ![system](https://cdn-forum.networklessons.com/uploads/default/original/1X/1d2ef66728c7fbac8377748594345a3f474fce5f.png) [@system](https://forum.networklessons.com/u/system)
#### Post date: [September 10, 2013, 7:22am UTC](https://forum.networklessons.com/t/asterisk-and-cisco-router-fxo-incoming-call/1048/4 "2013-09-10T07:22:31Z")

</div>

Hi Rene,

Can you do a lesson and configuration in connecting a Cisco VoIP system to Asterisk SIP system,  
Im planning to have a lab:

Branch 1 is using Cisco CUCM or CUCME  
Branch 2 is using Asterisk as thier Voip System

Can you do a configuration on both Cisco Router and Asterisk to able to connect each other and can call beetwen thier local extension numbers.

Thanks you.

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [September 15, 2013, 7:05pm UTC](https://forum.networklessons.com/t/asterisk-and-cisco-router-fxo-incoming-call/1048/5 "2013-09-15T19:05:14Z")

</div>

Hi Jay,

I’d love to do it some day but right now I don’t have much experience with CUCM or CUCME. I use Asterisk every now and then for some small setups where a Cisco router is used as gateway but that’s pretty much it…

Rene

---

<div class="post-metadata">

### Author: ![system](https://cdn-forum.networklessons.com/uploads/default/original/1X/1d2ef66728c7fbac8377748594345a3f474fce5f.png) [@system](https://forum.networklessons.com/u/system)
#### Post date: [February 12, 2014, 8:07am UTC](https://forum.networklessons.com/t/asterisk-and-cisco-router-fxo-incoming-call/1048/6 "2014-02-12T08:07:19Z")

</div>

Thanks for the post, is helping me out a great deal.

I am trying to use a 2621 as a PSTN gateway (2 lines) linked to a Raspberry Pi running FreePBX (Asterisk) but am having a few difficulties.

What I am trying to achieve is have the 1st line ring a call group (#601) and the second line ring a second call group (#602)

Also need the PBX extensions to be able to dial out to the PSTN on any available line. The outgoing has some very strange dial plans as is going to be attached to a work internal PBX which can connect to other sites PBX’s (via a 9 dial code) and also to the great outside world (this is achieved by 0 in front of the number you are dialing)

Any help or pointers on this is greatly appreciated as am pulling my hair out trying to get to the end of this project.

---

<div class="post-metadata">

### Author: ![system](https://cdn-forum.networklessons.com/uploads/default/original/1X/1d2ef66728c7fbac8377748594345a3f474fce5f.png) [@system](https://forum.networklessons.com/u/system)
#### Post date: [April 25, 2014, 8:34pm UTC](https://forum.networklessons.com/t/asterisk-and-cisco-router-fxo-incoming-call/1048/7 "2014-04-25T20:34:02Z")

</div>

Hello, first congratulations on such good Post, I wonder if I could you indicate how to protect your Asterisk server using a cisco router ACLS. Thank you very much for your answer.  
Greetings from Salvador

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [May 1, 2014, 12:10pm UTC](https://forum.networklessons.com/t/asterisk-and-cisco-router-fxo-incoming-call/1048/8 "2014-05-01T12:10:54Z")

</div>

Hello Jorge,

You can use a Cisco access-list for this. By default Asterisk uses SIP on port 5060 and I believe UDP port 10000 - 20000 for RTP traffic. An access-list outbound to the Asterisk server could look something like this:

```auto
Router(config)#ip access-list extended ASTERISK
Router(config-ext-nacl)#permit udp 192&#046;168&#046;1&#046;0 0&#046;0&#046;0&#046;255 host 192&#046;168&#046;2&#046;1 eq 5060
Router(config-ext-nacl)#permit udp 192&#046;168&#046;1&#046;0 0&#046;0&#046;0&#046;255 host 192&#046;168&#046;2&#046;1 range 10000 20000

```

In this example, 192.168.1.0/24 could be the subnet where your SIP phones are located and 192.168.2.1 would be the IP address of the Asterisk server. It’s a simple example but it should help to get you going.

Rene

---

<div class="post-metadata">

### Author: ![system](https://cdn-forum.networklessons.com/uploads/default/original/1X/1d2ef66728c7fbac8377748594345a3f474fce5f.png) [@system](https://forum.networklessons.com/u/system)
#### Post date: [August 25, 2014, 7:55am UTC](https://forum.networklessons.com/t/asterisk-and-cisco-router-fxo-incoming-call/1048/9 "2014-08-25T07:55:22Z")

</div>

Hi Rene, you have done a great job.

However i need help for outgoing. How can i do the same for outgoing ?

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [September 11, 2014, 11:00am UTC](https://forum.networklessons.com/t/asterisk-and-cisco-router-fxo-incoming-call/1048/10 "2014-09-11T11:00:52Z")

</div>

Hi Munib,

I don’t have an example right now for outgoing calls. Right now I’m a bit busy with R&S projects so maybe in the future I can create a tutorial for this.

Rene

---

<div class="post-metadata">

### Author: ![system](https://cdn-forum.networklessons.com/uploads/default/original/1X/1d2ef66728c7fbac8377748594345a3f474fce5f.png) [@system](https://forum.networklessons.com/u/system)
#### Post date: [September 22, 2014, 5:52pm UTC](https://forum.networklessons.com/t/asterisk-and-cisco-router-fxo-incoming-call/1048/11 "2014-09-22T17:52:16Z")

</div>

How did you solve the caller-id from the cisco router not being accepted by Asterisk? I have an ISR3825 with 1GB ram a PVDM16 and a VIC2-4FXO (all vic2 fxo cards support call id) that recieves the caller-id but asterisk is not doing anything, I do get a fast-busy. If I use clid strip in my dial-peer then calls are passed to asterisk and it does as expected but no caller-id info.

Thanks

Doug

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [September 22, 2014, 7:30pm UTC](https://forum.networklessons.com/t/asterisk-and-cisco-router-fxo-incoming-call/1048/12 "2014-09-22T19:30:59Z")

</div>

Hi Doug,

It’s been awhile since I configured this. I’m running Asterisk 1.8, here’s my config:

**sip.conf**

```auto
[my-trunk]
type=friend
host=x&#46;x&#46;x&#46;x
context=fxo
insecure=very
qualify=2000

```

And **extensions.conf** :

```auto
[fxo]
; my-trunk
exten =&gt; 104,1,Answer
exten =&gt; 104,n,MusicOnHold(mp3)

```

This works for me.

Rene

---

<div class="post-metadata">

### Author: ![system](https://cdn-forum.networklessons.com/uploads/default/original/1X/1d2ef66728c7fbac8377748594345a3f474fce5f.png) [@system](https://forum.networklessons.com/u/system)
#### Post date: [September 22, 2014, 7:52pm UTC](https://forum.networklessons.com/t/asterisk-and-cisco-router-fxo-incoming-call/1048/13 "2014-09-22T19:52:39Z")

</div>

Right now, my cisco uses plar 100 to get to the sip session and destination pattern 100 and session target ipv4:xxx.xxx.xxx.xxx to poing to asterisk (debian7 apt default version). My dial plan has exten =\> 100,1,Answer ()

This works as long as I use clid strip in my cisco dial peer voice voip. As soon as I remove it calls go nowhere.

This may be just a very poorly documented sip mangling by cisco that is causing this (not sending clid info in the correct setup message) or it is how asterisk deals with clid’s.

By the way, this site has helped me understand more clearly on how cisco and asterisk need to be setup to work together. If I didnt need caller id then it would be working perfectly! Thanks.

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [September 23, 2014, 10:24am UTC](https://forum.networklessons.com/t/asterisk-and-cisco-router-fxo-incoming-call/1048/14 "2014-09-23T10:24:15Z")

</div>

Hi Doug,

Did you try to debug both? Set Asterisk to debug as verbose as possible:

asterisk -rvvvv

And also enable some debugs on your Cisco router.

That might produce some useful messages to pinpoint where the problem is.

Rene

---

<div class="post-metadata">

### Author: ![system](https://cdn-forum.networklessons.com/uploads/default/original/1X/1d2ef66728c7fbac8377748594345a3f474fce5f.png) [@system](https://forum.networklessons.com/u/system)
#### Post date: [September 23, 2014, 1:57pm UTC](https://forum.networklessons.com/t/asterisk-and-cisco-router-fxo-incoming-call/1048/15 "2014-09-23T13:57:16Z")

</div>

Debug cisco: debug vpm signal  
Shows the clid incoming and readable.  
I have been using asterisk -cvvvvvvvvvvr to get as much detail but when I remove clid strip from my cisco the asterisk box shows nothing incoming.

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [September 23, 2014, 3:23pm UTC](https://forum.networklessons.com/t/asterisk-and-cisco-router-fxo-incoming-call/1048/16 "2014-09-23T15:23:13Z")

</div>

Hmm that is strange, you should receive something on your asterisk server. Sounds like your router doesn’t forward anything?

When my FXO port is receiving a call, I get a ton of debug info on my asterisk console.

Maybe run tcpdump on the asterisk server? see if it’s not receiving anything from your router? If so, it has to be something on the router…

---

<div class="post-metadata">

### Author: ![system](https://cdn-forum.networklessons.com/uploads/default/original/1X/1d2ef66728c7fbac8377748594345a3f474fce5f.png) [@system](https://forum.networklessons.com/u/system)
#### Post date: [September 23, 2014, 4:02pm UTC](https://forum.networklessons.com/t/asterisk-and-cisco-router-fxo-incoming-call/1048/17 "2014-09-23T16:02:03Z")

</div>

Thats what I was leaning towards, there is not a whole lot of information out there for this setup. Even though it seems to be a very common setup.

Thanks for the pointers.

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [September 23, 2014, 5:03pm UTC](https://forum.networklessons.com/t/asterisk-and-cisco-router-fxo-incoming-call/1048/18 "2014-09-23T17:03:26Z")

</div>

I agree, it’s hard to find a complete solution…only partial configs or outdated info. Good luck and let me know if you find it ok?

---

<div class="post-metadata">

### Author: ![phontakly](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/p/bcef8e/32.png) [@phontakly](https://forum.networklessons.com/u/phontakly)
#### Post date: [January 2, 2016, 7:00pm UTC](https://forum.networklessons.com/t/asterisk-and-cisco-router-fxo-incoming-call/1048/19 "2016-01-02T19:00:49Z")

</div>

Hello,  
I’m having problems with my outgoing settings.

Here are my settings of a Cisco 2811 router:

```auto
voice-port 0/1/0
trunk-group 1 1
supervisory disconnect dualtone pre-connect
supervisory answer dualtone
input gain 10
output attenuation -1
no vad
no comfort-noise
cptone AR
connection plar 400
description (54) 11-4922-5216
caller-id enable
!
dial-peer voice 1 pots
description Linea 541149225216
preference 1
destination-pattern 9T
port 0/1/0
forward-digits 8
!
dial-peer voice 400 voip
numbering-type unknown
destination-pattern .T
session protocol sipv2
session target ipv4:192.168.0.101:5060
session transport udp
dtmf-relay rtp-nte
codec g711ulaw
clid strip
no vad

```

Here’s the configuration of freepbx:

```auto
type=friend
qualify=yes
nat=no
insecure=very
host=192.168.0.2
dtmfmode=rfc2833
disallow=all
context=from-internal
allow=ulaw

```

when I want to make a call, it does not work.

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [January 3, 2016, 9:24pm UTC](https://forum.networklessons.com/t/asterisk-and-cisco-router-fxo-incoming-call/1048/20 "2016-01-03T21:24:32Z")

</div>

Hello Pablo,

It is difficult to troubleshoot this only by looking at the configurations. Do you see anything in particular if you enable a debug on the 2811 and freepbx? You can use this to verify if the 2811 is trying to connect to freepbx and/or to see why the call is being ignored.

Rene
