I have a Cisco 2811 router with 2 x 4 port FXO cards and 2 x 2 port FXS cards. I want to use the FXO for PSTN gateway and the FXS for a couple of analog lines.
I have a working FreePBX install - working in that I have a SIP provider account that I can make inbound calls successfully to the PBX, so I know the extensions are working and the inbound route is working (I only have an any CID/DID route set up while testing).
I have not attempted to set up outbound routes to point to the Cisco as of yet. I looked at a number of posts, both on this forum and others, however none seem to have pointed me to the answer I need.
Specifics: FreePBX 13.0.95, installed from the ISO downloaded on the FreePBX site. Cisco 2811 ISR running IOS 12.4(12)b (image is c2800nm-advipservicesk9-mz.124-12b.bin).
The following configurations have been sanitized. The full US 10 digit number is shown as 555-555-1212, the FreePBX server is 10.10.10.10, the Cisco 2811 is 10.10.10.9.
On the Cisco side, I have the following configuration:
voice-card 0
no dspfarm
!
voice call carrier capacity active
voice rtp send-recv
!
voice service voip
allow-connections h323 to h323
allow-connections h323 to sip
allow-connections sip to h323
allow-connections sip to sip
supplementary-service h450.12
redirect ip2ip
signaling forward unconditional
fax protocol pass-through g711alaw
h323
no h225 timeout keepalive
modem passthrough nse codec g711alaw
sip
rel1xx disable
header-passing
no call service stop
!
voice class codec 1
codec preference 1 g711ulaw
codec preference 2 g711alaw
codec preference 3 g729br8
!
voice-port 0/0/0
supervisory disconnect dualtone pre-connect
supervisory answer dualtone
input gain 10
output attenuation 10
no vad
no comfort-noise
connection plar 5551212
description +1-555-555-1212
station-id number 555-1212
caller-id enable
!
no mgcp package-capability res-package
no mgcp package-capability fxr-package
no mgcp timer receive-rtcp
no mgcp explicit hookstate
!
dial-peer voice 5551212 voip
preference 1
service session
destination-pattern .
session protocol sipv2
session target ipv4:10.10.10.10:5060
session transport udp
dtmf-relay rtp-nte
codec g711ulaw
no vad
!
dial-peer voice 100 pots
numbering-type unknown
destination-pattern .T
incoming called-number .
direct-inward-dial
port 0/0/0
!
gateway
timer receive-rtp 1200
!
sip-ua
retry invite 3
retry response 3
retry bye 3
retry cancel 3
timers trying 1000
sip-server ipv4:10.10.10.10
!
On the FreePBX SIP (Chan_SIP) Trunk:
Outgoing:
Name:
PSTN1212
Details:
context=from-internal
host=10.10.10.9
type=friend
qualify=yes
dtmfmode=rfc2833
disallow=all
allow=ulaw&alaw
nat=no
insecure=very
Incoming:
USER Context: from-internal
USER Details:
type=friend
context=from-trunk
host=10.10.10.9
dtmfmode=rfc2833
disallow=all
allow=ulaw&alaw
nat=no
canreinvite=no
qualify=yes
When I make an inbound call (I.E. calling the PSTN number connected to port 0/0/0 from my mobile), it rings twice followed by a circuit busy (fast busy). Executing a CCSIP debug on the router, I get the following indicating a 500 error from the FreePBX box:
Sent:
INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 10.10.10.9:5060;branch=z9hG4bK15D22F1
From: sip:[email protected];tag=A47E4E4-68D
To: sip:[email protected]
Date: Wed, 23 Mar 2016 00:32:35 GMT
Call-ID: [email protected]
Supported: timer,replaces
Min-SE: 1800
Cisco-Guid: 2464071185-4022669797-2229131221-398373438
User-Agent: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, COMET, REFER, SUBSCRIBE, NOTIFY, INFO, UPDATE, REGISTER
CSeq: 101 INVITE
Max-Forwards: 70
Remote-Party-ID: sip:[email protected];party=calling;screen=no;privacy=off
Timestamp: 1458693155
Contact: sip:[email protected]:5060
Expires: 180
Allow-Events: telephone-event
MIME-Version: 1.0
Content-Type: multipart/mixed;boundary=uniqueBoundary
Content-Length: 511
–uniqueBoundary
Content-Type: application/sdp
v=0
o=CiscoSystemsSIP-GW-UserAgent 4127 1670 IN IP4 192.168.95.9
s=SIP Call
c=IN IP4 10.10.10.9
t=0 0
m=audio 17486 RTP/AVP 0 100 101
c=IN IP4 10.10.10.9
a=rtpmap:0 PCMU/8000
a=rtpmap:100 X-NSE/8000
a=fmtp:100 192-194
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
–uniqueBoundary
Content-Type: application/gtd
Content-Disposition: signal;handling=optional
IAM,
GCI,92debe11efc511e584ddd7d517beb23e
–uniqueBoundary–
Mar 23 00:32:35.653: //-1/xxxxxxxxxxxx/SIP/Info/HandleUdpSocketReads: Msg enqueued for SPI with IP addr: 192.168.95.10:5060
Mar 23 00:32:35.653: //-1/xxxxxxxxxxxx/SIP/Transport/sipTransportProcessNWNewConnMsg: context=0x4583BA14
Mar 23 00:32:35.653: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
SIP/2.0 500 Internal Server Error
Via: SIP/2.0/UDP 10.10.10.9:5060;rport=56874;received=10.10.10.9;branch=z9hG4bK15D22F1
Call-ID: [email protected]
From: sip:[email protected];tag=A47E4E4-68D
To: sip:[email protected];tag=z9hG4bK15D22F1
CSeq: 101 INVITE
Server: FPBX-13.0.95(13.7.1)
Content-Length: 0
I am focusing on getting one inbound line working, then I should be able to replicate the configuration across the remaining 4 lines. Why do I want to use the Cisco? We are a high school radio station with a limited budget for this. I have the 2811 router, so the cost to use it (other than my time, which is paid for already) is nothing. My alternative, which I am sure would work, is to pick up a 4 port FXO card for the PC running FreePBX and get a 4 port FXS gateway or an 8 port card with 4 FXS and 4 FXO (the PC is a small form factor, have to use a SFF card). Cost is a couple of hundred dollars. The phones were donated to us (Polycom VVX410). I have internal calling working just fine, now I need to get the inbound POTS lines working. Any help is greatly appreciated. If you want additional debug information or details, let me know. I did run some packet captures, they told me the same thing the Cisco debug record did.