Asterisk 11.4 with Cisco 8961 phone

Hi everyone,

I purchased today a Cisco 8961 phone, after doing some research on the Internet to validate its compatibility with Asterisk. I noticed that many used config files from 79XX models.
Currently, I’m in the process of creating a set of Asterisk rpm files for CentOS 6 which I plan to make available to everyone. I’m wondering if anyone else performed a successful 8961 setup. My goal is to get some guidelines on how to proceed. Here are some reference links I found:
fintechcommunications.com/blog/?p=95
labs.wrprojects.com/configuring- … -asterisk/

I plan to purchase few DID numbers and set them up with Asterisk and 8961.
If anyone has a more detailed guide or other advice, I would appreciate the input.

Regards,

Floren

Hi Floren,

I wrote the second article you provided:

labs.wrprojects.com/configuring- … -asterisk/

The article says it all, but to boil it down: from what I saw, the 89XX and 99XX phones are very similar to the 79XX phones, only there are a few catches. I’ve detailed those in the article.

There are a few other aspects of the phone that I’d like to figure out, namely voicemail integration. If anyone makes any progress on this, let me know and I’ll update the article.

Thanks!

Hi,

I worked today all day on the Cisco 8961 to register with Asterisk, it won’t like it.
So far the easiest thing was to build the CentOS 6.4 x86_64 rpm’s with the Cisco patch.

The phone upgraded to latest CUCM version without issues, I get proper packets, showing the communication between the phone and Asterisk:

[quote]21:23:26.939155 IP (tos 0x60, ttl 64, id 47687, offset 0, flags [+], proto UDP (17), length 1500)
cisco.axivo.com.49156 > apollo.axivo.com.sip: SIP, length: 1472
REFER sip:192.168.1.8 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.9:5060;branch=z9hG4bK5545495c
From: sip:58bc2774e853@192.168.1.9;tag=58bc2774e8530008013be703-0de808e2
To: sip:192.168.1.8
Call-ID: 58bc2774-e8530005-652e4e9e-204eb70f@192.168.1.9
Date: Fri, 01 Jan 1982 00:05:40 GMT
CSeq: 1000 REFER
User-Agent: Cisco-CP8961/9.3.2
Expires: 10
Max-Forwards: 70
Contact: sip:58bc2774e853@192.168.1.9:5060
Require: norefersub
Referred-By: sip:58bc2774e853@192.168.1.9
Refer-To: cid:00f9552c@192.168.1.9
Content-Id: 00f9552c@192.168.1.9
Allow: ACK,BYE,CANCEL,INVITE,NOTIFY,OPTIONS,REFER,REGISTER,UPDATE,SUBSCRIBE
Content-Length: 1192
Content-Type: application/x-cisco-alarm+xml
Content-Disposition: session;handling=required

    <?xml version="1.0" encoding="UTF-8"?>\0x0a<x-cisco-alarm>\0x0a<Alarm Name="LastOutOfServiceInformation">\0x0a<ParameterList>\0x0a<String name="DeviceName">SEP58BC2774E853</String>\0x0a<String name="DeviceIPv4Address">192.168.1.9/24</String>\0x0a<String name="IPv4DefaultGateway">192.168.1.1</String>\0x0a<String name="DeviceIPv6Address"></String>\0x0a<String name="IPv6DefaultGateway"></String>\0x0a<String name="ModelNumber">CP-8961</String>\0x0a<String name="NeighborIPv4Address">192.168.1.2</String>\0x0a<String name="NeighborIPv6Address"></String>\0x0a<String name="NeighborDeviceID">5835d9946d32</String>\0x0a<String name="NeighborIPortID">gi8</String>\0x0a<Enum name="DHCPv4Status">1</Enum>\0x0a<Enum name="DHCPv6Status">3</Enum>\0x0a<Enum name="TFTPCfgStatus">1</Enum>\0x0a<Enum name="DNSS[|sip]

21:23:26.939165 IP (tos 0x60, ttl 64, id 47687, offset 1480, flags [none], proto UDP (17), length 482)
cisco.axivo.com > apollo.axivo.com: udp
21:23:26.939182 IP (tos 0xc0, ttl 64, id 63868, offset 0, flags [none], proto ICMP (1), length 576)
apollo.axivo.com > cisco.axivo.com: ICMP host apollo.axivo.com unreachable - admin prohibited, length 556
IP (tos 0x60, ttl 64, id 47687, offset 0, flags [none], proto UDP (17), length 1962)
cisco.axivo.com.49156 > apollo.axivo.com.sip: SIP, length: 1934
REFER sip:192.168.1.8 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.9:5060;branch=z9hG4bK5545495c
From: sip:58bc2774e853@192.168.1.9;tag=58bc2774e8530008013be703-0de808e2
To: sip:192.168.1.8
Call-ID: 58bc2774-e8530005-652e4e9e-204eb70f@192.168.1.9
Date: Fri, 01 Jan 1982 00:05:40 GMT
CSeq: 1000 REFER
User-Agent: Cisco-CP8961/9.3.2
Expires: 10
Max-Forwards: 70
Contact: sip:58bc2774e853@192.168.1.9:5060
Require: norefersub
Referred-By: sip:58bc2774e853@192.168.1.9
Refer-To: cid:00f9552c@192.168.1.9
Content[|sip]
21:23:31.436211 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has apollo.axivo.com tell cisco.axivo.com, length 50
21:23:31.436219 ARP, Ethernet (len 6), IPv4 (len 4), Reply apollo.axivo.com is-at 00:25:64:8c:41:15 (oui Unknown), length 28[/quote]

Right now, my goal is to register the phone. I use a vanilla sip.conf, with no configuration settings added. This being the first time I touch a PBX, I need some guidance from other users to understand how to configure an Asterisk extension (i.e. 100) and register properly the Cisco phone. Thank you.

Just to make things clearer, I simply don’t know what to enter into sip.conf and extensions.conf.
For example, I have this into sip.conf:

[101] nat=never type=friend secret=blah qualify=no cisco_usecallmanager=yes
Could you be kind and post a working configuration for both files? Thanks.

OK, I made some progress. My phone registers properly with a basic Asterisk configuration. :smile:
Now, the goal is to get voip.ms working. The issue I’m dealing with is related to NAT. As soon as the configuration is changed from nat=no, the phone does not register anymore.

This is what I use now as configuration for 123456_1 sub-account:

sip.conf

[code][general]
context = default
udpbindaddr = 192.168.1.8:5060
tcpenable = no
tcpbindaddr = 192.168.1.8:5060
transport = udp
srvlookup = yes
dtmfmode = auto
register => 123456_1:voipmspassword@montreal.voip.ms:5060
mwi => 123456_1:voipmspassword@montreal.voip.ms:5060/234561

;[authentication]
;auth = 123456_1:voipmspassword@montreal.voip.ms

voipms
type = friend
host = dynamic
fromdomain = montreal.voip.ms
allow = !all,ulaw
cisco_usecallmanager = yes
insecure = invite
canreinvite = no
nat = comedia
trustrpid = yes
sendrpid = yes

101
defaultuser = 123456_1
fromuser = 123456_1
secret = blah[/code]

extensions.conf

[code][general]
static = yes
writeprotect = yes
clearglobalvars = no

[globals]
CONSOLE = Console/dsp
IAXINFO = guest
TRUNK = DAHDI/G2
TRUNKMSD = 1

[default]
include => ext101in
include => ext101out

[ext101in]
exten => 5142121122,1,Answer()

[ext101out]
exten => _1NXXNXXXXXX,1,Dial(SIP/${EXTEN}@101)
exten => _1NXXNXXXXXX,n,Hangup()
exten => _NXXNXXXXXX,1,Dial(SIP/1${EXTEN}@101)
exten => _NXXNXXXXXX,n,Hangup()
exten => _011.,1,Dial(SIP/${EXTEN}@101)
exten => _011.,n,Hangup()
exten => _00.,1,Dial(SIP/${EXTEN}@101)
exten => _00.,n,Hangup()[/code]

CLI> sip show registry Host dnsmgr Username Refresh State Reg.Time montreal.voip.ms:5060 N 123456_1 105 Registered Mon, 01 Jul 2013 20:48:31 1 SIP registrations.

Is there a way to bypass the nat=no limitation? If I place a call I get a busy signal, but the stacks are arriving with the right info:
pastie.org/private/zyyzoeszhjgcsbe7qc02ka

Also, changing the host to host=montreal.voip.ms will result in:

[quote][Jul 1 20:44:01] ERROR[12416]: chan_sip.c:17270 register_verify: Peer ‘101’ is trying to register, but not configured as host=dynamic
[Jul 1 20:44:01] NOTICE[12416]: chan_sip.c:30288 handle_request_register: Registration from ‘sip:101@192.168.1.8’ failed for ‘192.168.1.9:49295’ - Peer is not supposed to register[/quote]

Will the [authentication] section help? There is a lot of info condensed, so I hope is clear what I did so far. Thank you for your help!

Why don’t you want nat=no? Standard NAT scenarios are handled using externip, externaddr or stunaddr, not with the NAT parameter.

Why is an ITSP even trying to register with you; that is most unusual!

Hi David,

I started using Asterisk 2 days ago, so I apologize for any lack of knowledge. I simply posted what voip.ms wants into Asterisk config files. If you can give me a hand with my phone setup, it will be really appreciated.
Here it is some additional info, setting the registerWithProxy to “false” allows me to place outbound calls only. I have sound but the callerid is not listed properly, it shows 101, instead of the designated value I placed into SEPMAC.cnf.xml file:

<registerWithProxy>false</registerWithProxy> ... <featureID>9</featureID> <featureLabel>Home</featureLabel> <name>101</name> <displayName>Floren Munteanu</displayName> <contact>5142121122</contact> <proxy>USECALLMANAGER</proxy> <port>5060</port> <autoAnswer> <autoAnswerEnabled>3</autoAnswerEnabled> </autoAnswer> <callWaiting>1</callWaiting> <authName>101</authName> <authPassword>blah</authPassword> <sharedLine>false</sharedLine>

I looked at the 8961 phone logs (not Asterisk logs) and I get no errors related to an improper configuration file or anything else. All this is run through a Cisco SA520W with SIP ALG enabled, which makes signaling and audio traffic between the client behind NAT and the SIP endpoint possible.

sip.conf

[code][general]
context = default
udpbindaddr = 192.168.1.8:5060
tcpenable = no
tcpbindaddr = 192.168.1.8:5060
nat = auto_force_rport,auto_comedia
;nat = no
transport = udp
srvlookup = yes
dtmfmode = auto
register => 123456_1:voipmspassword@montreal.voip.ms:5060
mwi => 123456_1:voipmspassword@montreal.voip.ms:5060/234561

[authentication]
auth = 123456_1:voipmspassword@montreal.voip.ms

voipms
type = peer
host = montreal.voip.ms
allow = !all,ulaw
cisco_usecallmanager = yes
insecure = invite
canreinvite = no
trustrpid = yes
sendrpid = yes

101
defaultuser = 123456_1
fromuser = 123456_1
secret = blah[/code]

Regards,

Floren

Hello Florian,
Either I do not understand or you are really confused,
you should have an extension for your carrier and one for your phone,
I won`t mod your carrier details as I assume they work.

sip.conf

register => 123456_1:voipmspassword@montreal.voip.ms:5060
mwi => 123456_1:voipmspassword@montreal.voip.ms:5060/234561

[authentication]
auth = 123456_1:voipmspassword@montreal.voip.ms

[voipms]
nat = yes
type = peer
host = montreal.voip.ms
allow = !all,ulaw
insecure = invite
canreinvite = no
trustrpid = yes
sendrpid = yes

[101]
secret=password
canreinvite=yes
context=from-internal
host=dynamic
trustrpid=yes
sendrpid=no
type=friend
nat=never
port=5060
qualify=no
qualifyfreq=60
transport=tcp,udp
cisco_usecallmanager = yes

Those are device entries, not extensions, at least not in the sense in which Asterisk uses the word.

If this is a NAT situation, it is likely to be an outgoing NAT situation, in which case there should be one of externip, externaddr or stunaddr set, and nat= is probably not needed. For minimum hassle, any router support for SIP (“SIPALG”) should be turned off.

Thanks alot guys for the good information, I apologize for the spoon feeding requests but I had my first contact with Asterisk PBX only last week.

Now, back to my configuration. I had no idea that I have to have to configure voip.ms as separate extension into sip.conf. That creates a little confusion into my head how to deal with contexts. Before, it was simple: I create multiple voip.ms extensions with one default context. Based on your suggestions, this is what i have now in my configuration files:

sip.conf

[quote][general]
udpbindaddr = 192.168.1.8:5060
tcpenable = no
tcpbindaddr = 192.168.1.8:5060
localnet = 192.168.1.0/24
externip = 70.51.13.39
transport = udp
srvlookup = yes
dtmfmode = auto
register => 123456:voipmspassword@montreal.voip.ms:5060
mwi => 123456:voipmspassword@montreal.voip.ms:5060

[authentication]
auth = 123456:voipmspassword@montreal.voip.ms

cisco
type=friend
context = default
host = dynamic
canreinvite = yes
cisco_usecallmanager = yes
nat = no
trustrpid = yes
sendrpid = no

[color=#0000FF]; !!! Using a template style because later on, I will add more extensions[/color]
101
secret = blah

voipms
type = peer
context = voipms
host = montreal.voip.ms
fromdomain = montreal.voip.ms
allow = !all,ulaw
insecure = invite
canreinvite = no
nat = yes
trustrpid = yes
sendrpid = yes

201
callbackextension = 101
defaultuser = 123456
fromuser = 123456
secret = voipmspassword
remotesecret = blah[/quote]

extensions.conf

[quote][general]
static = yes
writeprotect = yes
clearglobalvars = no

[globals]
CONSOLE = Console/dsp
IAXINFO = guest
TRUNK = DAHDI/G2
TRUNKMSD = 1

[default]
[color=#0000FF]; !!! I have no idea if I need to add something here[/color]

[voipms]
include => ext201in
include => ext201out

[ext201in]
exten => 5143602121,1,Answer()

[ext201out]
exten => _1NXXNXXXXXX,1,Dial(SIP/${EXTEN}@201)
exten => _1NXXNXXXXXX,n,Hangup()
exten => _NXXNXXXXXX,1,Dial(SIP/1${EXTEN}@201)
exten => _NXXNXXXXXX,n,Hangup()
exten => _011.,1,Dial(SIP/${EXTEN}@201)
exten => _011.,n,Hangup()
exten => _00.,1,Dial(SIP/${EXTEN}@201)
exten => _00.,n,Hangup()[/quote]

This is what I want to achieve: have my Cisco phone with 3 DID lines on it.
I disabled ALG on my router. I still need your help to see if my logic is right. I looked at the documentation and I’m not sure if callbackextension and remotesecret should be used to push back the 201 voip.ms info to 101. What I don’t understand is how calls are pushed from 101 to 201 and viceversa.

Again, thank you for your help.

friend should be peer (best practice)

canreinvite should be directmedia (deprecated name).

remotesecret should be voipmspassword (and secret and insecure should be removed).

You do need a default context, and if you don’t know why, you need to do more reading, as that is too fundamental to explain here.

callbackextension = 101 is strange, and I am not sure how it interacts with an explicit register line. In any case, you do not have an extension 101 in any context, let alone the voipms one.

If it weren’t that incoming callers cannot call anyone, because you are forcing an extension of 101, but don’t have an extension 101, incoming callers would be able to make toll calls (security).

You have allowguest enabled (security).

There is no extension which dials device 101.

TRUNK is set but not referenced. That is probably true of everything in globals.

I strongly suspect a failure to understand the difference between an Asterisk extension (a number pattern) and a device (something that might be reached using an extension).

I think you need to book yourself into an Asterisk course.

I really appreciate your willing to help David, as well of others. It looks like I can’t just copy paste some configurations and voip.ms simply don’t care/know about a proper setup. I’ve been a Linux administrator and developer for last 15 years but setting properly Asterisk is much more complex than I thought. I recently switched to VOIP from a landline and I did not wanted to get some plug&play device, but rather have an elegant solution like Cisco 8961 + Asterisk.

If possible, can you please post a basic canvas as startup for my setup?
As I mentioned before, the goal is to have my Cisco 8961 with 3 functional DID numbers provided by voip.ms. Having that on hand will allow me to have a proper structure of Asterisk, from there I can read the documentation to further develop the configuration.

Thank you for taking the time to read this.

There should be examples for well behaved ITSP’s in the sample configuration files supplied with Asterisk and with other postings on this forum. If voip.ms are weird, only a user would know how to deal with the weirdness.

My sip.conf entry for voip.ms is not much different from yours, except that it has user entries. It’s probably not necessary to have all three, but it works perfectly well.


register => xxxxxx:xxxxxxxxx@newyork.voip.ms:5060

[voip-ms0]
type=peer
authuser=xxxxxx (as provided)
defaultuser=xxxxxx
fromuser=xxxxxx
host=newyork.voip.ms
secret=xxxxxxxxx (as provided)
fromdomain=newyork.voip.ms
dtmfmode=rfc2833
trustrpid=yes
sendrpid=yes
insecure=invite
context=incoming-on-voip-ms
accountcode=def-voip-ms0
allow=g729
allow=ulaw
directmedia=yes

Regards
Ian

I’m getting a hang of it, thanks to Bob (ChannelZ). :smile:
So far, I created a basic configuration and tested the connectivity.

There is something weird about this phone. Even if properly registered as peer, I get a lot of XML data and retransmissions:

apollo*CLI> sip show peers Name/username Host Dyn Forcerport ACL Port Status Description 101/101 192.168.1.9 D 5060 Unmonitored 1 sip peers [Monitored: 0 online, 0 offline Unmonitored: 1 online, 0 offline]

SIP trace:
codepad.org/MuCQxXew

sip.conf

[quote][general]
transport = udp
allowguest = no
srvlookup = yes
pedantic = no
tcpenable = no

[101]
type = peer
context = cisco
host = dynamic
cisco_usecallmanager = yes
defaultuser = 101
secret = password
nat = no[/quote]