Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment Table of Contents Introduction Audience Scope Related Documents Overview Summary of Tasks in this Document Requirements Configuring Asterisk for a SPA8800 Summary: ...
Page 3
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment Upgrading the SPA8800's Firmware Configuring Phone Extensions on the SPA8800 FXS Phone Ports Configuring FXO Line Ports on the SPA8800 Configuring FXO Line Dial Plans for inbound PSTN call Routing ...
Page 4
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment Trace of Call between SPA8800 FXS1 and FXS2 Trace of SPA8800 FXS Port Calling SPA922 IP Phone Trace of SPA8800 FXS 1 Making Outbound Call ...
Many interesting call routing options are possible using Asterisk to control the SPA8800 gateway. Asterisk can be configured to trunk the SPA8800's four FXO ports together into a trunk group. A trunk group allows the PSTN lines connected to the FXO ports to be over-subscribed and shared among all configured analog and IP phones, effectively lowering telephony costs by not requiring a dedicated line per phone.
Small Business Community ATA Support Overview Configuring the SPA8800 is a relatively trivial task and is similar to configuring any of the Sipura / Linksys / Cisco ATA and SPA9000 Voice System devices. Troubleshooting configuration problems due to incorrectly typed information in configuration fields requires advanced network and Asterisk troubleshooting skills.
Before you configure your Asterisk server for the SPA8000, you need to gather some basic information: Static IP address for the SPA8800. By default, this device is a DHCP client, but will be of no use to you if it is assigned a new dynamic IP address periodically. In this document, I use 192.168.2.237/24...
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment Configuring the Asterisk Server Once you have gathered all of the basic information, you can begin configuring the Asterisk server. Editing the /etc/asterisk/sip.conf file # vim /etc/asterisk/sip.conf [general] …...
Page 9
;define SPA8800 pstn2 user [pstn2] type=friend host=192.168.2.237 ;IP address of the SPA8800 port=5161 ;5161 is the default SIP port for line 2 on the SPA8800 dtmfmode=rfc2833 context=pstn2 insecure=very ;define SPA8800 pstn3 user [pstn3] type=friend host=192.168.2.237 ;IP address of the SPA8800 port=5261 ;5261 is the default SIP port for line 2 on the SPA8800...
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment nat=yes context=itsp1 ;eof Editing the /etc/asterisk/extensions.conf file # vim /etc/asterisk/extensions.conf … … ; SPA8800 Changes ;outbound dialing [fxsgroup] ; dial 7 to explicitly use FXS3 exten => _7.,1,Dial(SIP/${EXTEN:1}@pstn3,60,r) ...
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment Configuring the SPA8800 SPA8800 Ports and Connections Figure 1The photograph shows the rear of the SPA8800 and its connections Connect the SPA8800 Connect the ETHERNET port of the SPA8800 to the LAN switch.
Press 1 to confirm reset Hang up when prompted Configuring Static IP Address Addressing You must configure the SPA8800 with a static IP address because this address is defined in the Asterisk Server's /etc/asterisk/sip.conf file. Determine the SPA8800's Dynamically Assigned IP Address i.
Page 14
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment m. Direct your browser to the SPA8800's web user interface (web-ui) http://<IP_address_of_SPA8800>/admin/advanced Change the following parameters: Network tab > Wan Status tab: Internet Connection Settings > Connection Type: Static IP ii.
Verify that Compare Network tab > Status tab > Product Information > Software Version: is up to date with SPA8800 firmware available at the Cisco.com site. If newer firmware is available, save it to disk and upgrade the SPA8800 as follows:...
Configuring Phone Extensions on the SPA8800 FXS Phone Ports In this section, you will point the SPA8800 to the Asterisk Server as the SIP proxy and the provide user credentials that you defined earlier in the sip.conf and extensions.conf Asterisk files.
Configuring FXO Line Ports on the SPA8800 In this section, you will point the SPA8800 to the Asterisk Server as the SIP proxy for the FXO ports and the provide user credentials that you defined earlier in the sip.conf and extensions.conf Asterisk files.
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment Configuring FXO Line Dial Plans for inbound PSTN call Routing In this section, you will configure FXO port dial plans. These dial plans affect inbound PSTN call routing and work in conjunction with definitions made in the /etc/asterisk/sip.conf and /etc/asterisk/extensions.conf files.
Optional: Verify that analog phones can call IP phones internally. For example, call from 101 to 200 [if configured] Test inbound calls: From the PSTN, call a phone line attached to the SPA8800's FXO line. Verify that the appropriate phone rings, analog phone 101 in this document's example.
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment T.38 Faxing The SPA8800 supports fax with G.711 pass-through or real-time fax over IP via T.38 fax relay. The only change from default setting for fax pass-through is to change from the default named signaling event (NSE) to ReINVITE: Web-ui >...
3 active SIP channels *CLI> Change the SPA8800 web-ui > Voice tab > Line 2 tab > Audio Configuration > Preferred Codec: to G729a and toggle Use Pref Codec Only: yes, save settings, and make a new call. The Asterisk server's /etc/asterisk/sip.conf must have the relevant codecs defined in the [general] section.
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment Troubleshooting Verify that the SPA8800's analog phones attached to the PHONE ports are registered. Direct your browser to the SPA8800's web user interface (web-ui) http://<IP_address_of_SPA8800>/admin/advanced Voice tab > Info tab > Phone N Status > Registration State Voice tab >...
Looking through extensions.conf and sip.conf, all is normal, yet the inbound call does not ring on extension 101. The problem in this scenario is that the SPA8800 Line N's dialplan has been incorrectly configured and is routing the call to extension 101 while extensions.conf is routing the call elsewhere.
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment SPA8800 Debug and syslog The SPA8800 supports writing debug and syslog messages to syslog servers. One server can be used, or separate servers can be used to receive messages. Four levels of verbosity are supported, 0 for no messages, 1 for terse, through 3 for verbose message output: Following is an example of syslog information produced at Debug Level 3 [numbers changed].
SPA8800 SIP Debugging The SPA8800 can also supply SIP debug information to assist with troubleshooting. Enable SIP debugging as follows: SPA8800 web-ui > Voice tab > Line N tab > SIP Settings > SIP Debug Option: Following is an example of syslog information produced at Debug Level 3 with SIP Debug Option set to full [numbers changed].
Page 28
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment a=ptime:20 a=sendrecv M0: CC:Ringback M0: [0:0]RTP Rx Dn M1: [1]->192.168.2.20:5060(305) M1: [1]->192.168.2.20:5060(305) SIP/2.0 100 Trying To: <sip:5551212@192.168.2.237:5161> From: "SPA8k8Phone1" <sip:101@192.168.2.20>;tag=as16cfeb3c Call-ID: 4a713b136335955e38e0dd821f5c50dc@192.168.2.20 CSeq: 102 INVITE Via: SIP/2.0/UDP 192.168.2.20:5060;branch=z9hG4bK58d12649 Server: Cisco/SPA8800-6.1.7(GW)
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment Content-Length: 0 Troubleshooting with Asterisk CLI Commands The following Asterisk CLI commands are useful for troubleshooting the environment: • core show version • sip show peers • sip show peer itsp1 •...
Page 30
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment CallingPres : Presentation Allowed, Not Screened FromUser : 3615551212 FromDomain : sip.broadvoice.com Callgroup Pickupgroup Mailbox VM Extension : asterisk LastMsgsSent : 32767/65535 Call limit Dynamic : No Callerid : "" <>...
*CLI> Sample Traces Sometimes, the best way to troubleshoot Asterisk and SPA8800 interaction issues is to capture a trace and compare it against a similar transaction. Following are three traces showing in order: A successful registration between the SPA8800 and the Asterisk server and a successful registration between the Asterisk server and the broadvoice.com SIP proxy.
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment Trace of Asterisk Server Registering to ITSP Frame 11 (453 bytes on wire, 453 bytes captured) Ethernet II, Src: Internet_1c:33:a1 (00:e0:4d:1c:33:a1), Dst: Cisco-Li_9c:e3:2c (00:1d:7e:9c:e3:2c) Internet Protocol, Src: 192.168.2.20 (192.168.2.20), Dst: 147.135.32.221 (147.135.32.221)
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment Trace of SPA922 Registering to an Asterisk Server Frame 13 (683 bytes on wire, 683 bytes captured) Ethernet II, Src: CiscoLin_db:51:d2 (00:0e:08:db:51:d2), Dst: Internet_1c:33:a1 (00:e0:4d:1c:33:a1) Internet Protocol, Src: 192.168.2.13 (192.168.2.13), Dst: 192.168.2.20 (192.168.2.20)
Page 34
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment Frame 15 (548 bytes on wire, 548 bytes captured) Ethernet II, Src: Internet_1c:33:a1 (00:e0:4d:1c:33:a1), Dst: CiscoLin_db:51:d2 (00:0e:08:db:51:d2) Internet Protocol, Src: 192.168.2.20 (192.168.2.20), Dst: 192.168.2.13 (192.168.2.13) User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060) Session Initiation Protocol Status-Line: SIP/2.0 401 Unauthorized...
Page 35
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment Frame 17 (485 bytes on wire, 485 bytes captured) Ethernet II, Src: Internet_1c:33:a1 (00:e0:4d:1c:33:a1), Dst: CiscoLin_db:51:d2 (00:0e:08:db:51:d2) Internet Protocol, Src: 192.168.2.20 (192.168.2.20), Dst: 192.168.2.13 (192.168.2.13) User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060) Session Initiation Protocol Status-Line: SIP/2.0 100 Trying...
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment Trace of SPA8800 Phone Ports Registering Each enabled FXS port on the SPA8800 registers to the Asterisk server. The following trace shows phone ports 1 and 2 registering to the Asterisk server:...
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment Trace of Call between SPA8800 FXS1 and FXS2 Frame 77 (1087 bytes on wire, 1087 bytes captured) Ethernet II, Src: 00:24:97:f0:50:3c (00:24:97:f0:50:3c), Dst: Internet_1c:33:a1 (00:e0:4d:1c:33:a1) Internet Protocol, Src: 192.168.2.237 (192.168.2.237), Dst: 192.168.2.20 (192.168.2.20)
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment Frame 13 (595 bytes on wire, 595 bytes captured) Ethernet II, Src: 00:24:97:f0:50:3c (00:24:97:f0:50:3c), Dst: Internet_1c:33:a1 (00:e0:4d:1c:33:a1) Internet Protocol, Src: 192.168.2.237 (192.168.2.237), Dst: 192.168.2.20 (192.168.2.20) User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060) Session Initiation Protocol Request-Line: ACK sip:201@192.168.2.20 SIP/2.0...
Page 53
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment Session Name (s): - Connection Information (c): IN IP4 192.168.2.237 Time Description, active time (t): 0 0 Media Description, name and address (m): audio 16420 RTP/AVP 0 2 4 8 18 96 97 98...
Page 54
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060) Session Initiation Protocol Request-Line: INVITE sip:85551313@192.168.2.20 SIP/2.0 Message Header Via: SIP/2.0/UDP 192.168.2.237:5060;branch=z9hG4bK-2bd81ced Transport: UDP Sent-by Address: 192.168.2.237 Sent-by port: 5060 Branch: z9hG4bK-2bd81ced From: "SPA8k8Phone1"...
Page 55
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment Supported: replaces Contact: <sip:85551313@192.168.2.20> Contact Binding: <sip:85551313@192.168.2.20> Content-Length: 0 Frame 6 (1036 bytes on wire, 1036 bytes captured) Ethernet II, Src: Internet_1c:33:a1 (00:e0:4d:1c:33:a1), Dst: 00:24:97:f0:50:3c (00:24:97:f0:50:3c) Internet Protocol, Src: 192.168.2.20 (192.168.2.20), Dst: 192.168.2.237 (192.168.2.237)
Page 56
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment Supported: replaces Contact: <sip:85551313@192.168.2.20> Contact Binding: <sip:85551313@192.168.2.20> Content-Length: 0 Frame 8 (347 bytes on wire, 347 bytes captured) Ethernet II, Src: 00:24:97:f0:50:3c (00:24:97:f0:50:3c), Dst: Internet_1c:33:a1 (00:e0:4d:1c:33:a1) Internet Protocol, Src: 192.168.2.237 (192.168.2.237), Dst: 192.168.2.20 (192.168.2.20)
Page 57
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment Sent-by Address: 192.168.2.20 Sent-by port: 5060 Branch: z9hG4bK538bb7bc RPort: rport From: "SPA8k8Phone1" <sip:101@192.168.2.20>;tag=as7b52add2 SIP Display info: "SPA8k8Phone1" SIP from address: sip:101@192.168.2.20 SIP tag: as7b52add2 To: <sip:5551313@192.168.2.237:5161>;tag=e7777c28b5e7542i1 SIP to address: sip:5551313@192.168.2.237:5161 SIP tag: e7777c28b5e7542i1 Contact: <sip:101@192.168.2.20>...
Page 58
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment SIP from address: sip:101@192.168.2.20 SIP tag: 432331171f77868do0 To: <sip:85551313@192.168.2.20>;tag=as62288bf1 SIP to address: sip:85551313@192.168.2.20 SIP tag: as62288bf1 Call-ID: c6e3a35f-e0a478e5@192.168.2.237 CSeq: 102 ACK Max-Forwards: 70 Proxy-Authorization: Digest username="101",realm="asterisk",nonce="05ce1ccc",uri="sip:85551313@192.168.2.20",algorithm=MD5 ,response="18deca64e8376d23f2d9a70790b1eda9" Authentication Scheme: Digest Username: "101"...
Page 59
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment Contact: <sip:85551313@192.168.2.20> Contact Binding: <sip:85551313@192.168.2.20> Content-Length: 0 Frame 15 (407 bytes on wire, 407 bytes captured) Ethernet II, Src: Internet_1c:33:a1 (00:e0:4d:1c:33:a1), Dst: 00:24:97:f0:50:3c (00:24:97:f0:50:3c) Internet Protocol, Src: 192.168.2.20 (192.168.2.20), Dst: 192.168.2.237 (192.168.2.237)
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment Trace of FAX Line Toggle Code #99 Following are two trace segments of a SIP INVITE showing the difference in the INVITE when #99 is dialed. This trace shows the SDP information from a call made where 85551212 was dialed where 8 is a steering digit.
Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment Gathering Information for Support In the event that you need to reach out for support, collect the following information first: SPA8800's configuration Web-UI > Admin Login > Advanced >...
Need help?
Do you have a question about the SPA8800 and is the answer not in the manual?
Questions and answers