cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2448
Views
10
Helpful
10
Replies

Beginner guide to asterisk and CME

wkunice
Level 1
Level 1

I am setting up a cisco C5915.2 IOS with CME to relay calls to and from a Asterisk 13.2 server. Is there some type of beginners guide that has the basics?

Thx,

K-

10 Replies 10

Georgios Fotiadis
VIP Alumni
VIP Alumni

There three different things that need be accomplished here:

a) Configure CME

b) Configure a SIP trunk to make CME and Asterisk communication possible

c) Configure dial-plan rules at both CME (using dial-peers) and Asterisk (using extensions.conf)

 

There is no singe guide that describes all the above, but if you search the net there is plenty of resources and configuration examples.

Georgios
Please rate if you find this helpful.

The guide that I highlighted should be enough I would say. There is nothing like a physical SIP trunk that needs to be configured. A SIP dialpeer should be enough. Dial plan, phone registration and much more should all be in the CME admin guide.

Add following to the list as well if sip-ua needs to be configured and/or get a better understanding -
https://www.cisco.com/c/en/us/support/docs/voice-unified-communications/unified-communications-manager-express/91535-cme-sip-trunking-config.html

Here is my asterisk config:

[call-manager]

secret=welcome

 

Here is my cisco config:

sip-ua
credentials username call-manager password 7 120E001B11040101 realm 192.168.101.5
keepalive target ipv4:192.168.101.5
authentication username call-manager password 7 120E001B11040101
retry invite 2
retry response 2
retry bye 2
timers trying 150
timers expires 60000
registrar ipv4:192.168.101.5 expires 3600
sip-server ipv4:192.168.101.5

 

 

 

 

[Feb 7 08:33:23] NOTICE[28295]: chan_sip.c:28627 handle_request_register: Registration from '<sip:3301001@192.168.101.5>' failed for '192.168.101.102:63563' - Wrong password
[Feb 7 08:33:23] NOTICE[28295]: chan_sip.c:28627 handle_request_register: Registration from '<sip:3301002@192.168.101.5>' failed for '192.168.101.102:63563' - Wrong password

R0g22
Cisco Employee
Cisco Employee
Can you enable "debug ccsip message" on the CME and capture the registration messages ? Can you make sure the username/secret and realm are all correct ?

I made sure the 'authentication' and the 'credentials' settings had the right password 'welcome'.  Here is the trace:

Mar 2 00:09:30.640: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Sent:
REGISTER sip:192.168.101.5:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.101.102:5060;branch=z9hG4bK7A815D7
From: <sip:3301001@192.168.101.5>;tag=52F0944-2545
To: <sip:3301001@192.168.101.5>
Date: Tue, 02 Mar 1993 00:09:30 GMT
Call-ID: E9A4F213-152511CC-818D9137-5DF193D
User-Agent: Cisco-SIPGateway/IOS-15.2.4.GC
Max-Forwards: 70
Timestamp: 731030970
CSeq: 701 REGISTER
Contact: <sip:3301001@192.168.101.102:5060>
Expires: 3600
Supported: path
Content-Length: 0


Mar 2 00:09:30.640: //2692/000000000000/SIP/Msg/ccsipDisplayMsg:
Received:
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.101.102:5060;branch=z9hG4bK7A815D7;received=192.168.101.102
From: <sip:3301001@192.168.101.5>;tag=52F0944-2545
To: <sip:3301001@192.168.101.5>;tag=as015af5f2
Call-ID: E9A4F213-152511CC-818D9137-5DF193D
CSeq: 701 REGISTER
Server: Asterisk PBX 13.17.2~dfsg-1ubuntu1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="2135cc9d"
Content-Length: 0


Mar 2 00:09:30.644: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Sent:
REGISTER sip:192.168.101.5:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.101.102:5060;branch=z9hG4bK7A9C27
From: <sip:3301001@192.168.101.5>;tag=52F0944-2545
To: <sip:3301001@192.168.101.5>
Date: Tue, 02 Mar 1993 00:09:30 GMT
Call-ID: E9A4F213-152511CC-818D9137-5DF193D
User-Agent: Cisco-SIPGateway/IOS-15.2.4.GC
Max-Forwards: 70
Timestamp: 731030970
CSeq: 702 REGISTER
Contact: <sip:3301001@192.168.101.102:5060>
Expires: 3600
Authorization: Digest username="call-manager",realm="asterisk",uri="sip:192.168.101.5:5060",response="e9c1c0176000f74f70ca761b4aa56db9",nonce="2135cc9d",algorithm=MD5
Content-Length: 0


Mar 2 00:09:30.644: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Sent:
REGISTER sip:192.168.101.5:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.101.102:5060;branch=z9hG4bK7AA10C3
From: <sip:3301002@192.168.101.5>;tag=52F0948-270B
To: <sip:3301002@192.168.101.5>
Date: Tue, 02 Mar 1993 00:09:30 GMT
Call-ID: E9A4F213-152511CC-818E9137-5DF193D
User-Agent: Cisco-SIPGateway/IOS-15.2.4.GC
Max-Forwards: 70
Timestamp: 731030970
CSeq: 701 REGISTER
Contact: <sip:3301002@192.168.101.102:5060>
Expires: 3600
Supported: path
Content-Length: 0


Mar 2 00:09:30.648: //2692/000000000000/SIP/Msg/ccsipDisplayMsg:
Received:
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 192.168.101.102:5060;branch=z9hG4bK7A9C27;received=192.168.101.102
From: <sip:3301001@192.168.101.5>;tag=52F0944-2545
To: <sip:3301001@192.168.101.5>;tag=as015af5f2
Call-ID: E9A4F213-152511CC-818D9137-5DF193D
CSeq: 702 REGISTER
Server: Asterisk PBX 13.17.2~dfsg-1ubuntu1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


Mar 2 00:09:30.648: //2693/000000000000/SIP/Msg/ccsipDisplayMsg:
Received:
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.101.102:5060;branch=z9hG4bK7AA10C3;received=192.168.101.102
From: <sip:3301002@192.168.101.5>;tag=52F0948-270B
To: <sip:3301002@192.168.101.5>;tag=as3429a581
Call-ID: E9A4F213-152511CC-818E9137-5DF193D
CSeq: 701 REGISTER
Server: Asterisk PBX 13.17.2~dfsg-1ubuntu1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="4a4c5da6"
Content-Length: 0


Mar 2 00:09:30.652: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Sent:
REGISTER sip:192.168.101.5:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.101.102:5060;branch=z9hG4bK7AB692
From: <sip:3301002@192.168.101.5>;tag=52F0948-270B
To: <sip:3301002@192.168.101.5>
Date: Tue, 02 Mar 1993 00:09:30 GMT
Call-ID: E9A4F213-152511CC-818E9137-5DF193D
User-Agent: Cisco-SIPGateway/IOS-15.2.4.GC
Max-Forwards: 70
Timestamp: 731030970
CSeq: 702 REGISTER
Contact: <sip:3301002@192.168.101.102:5060>
Expires: 3600
Authorization: Digest username="call-manager",realm="asterisk",uri="sip:192.168.101.5:5060",response="4c88680fabe260a51baf9cb9357c16f6",nonce="4a4c5da6",algorithm=MD5
Content-Length: 0


Mar 2 00:09:30.652: //2693/000000000000/SIP/Msg/ccsipDisplayMsg:
Received:
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 192.168.101.102:5060;branch=z9hG4bK7AB692;received=192.168.101.102
From: <sip:3301002@192.168.101.5>;tag=52F0948-270B
To: <sip:3301002@192.168.101.5>;tag=as3429a581
Call-ID: E9A4F213-152511CC-818E9137-5DF193D
CSeq: 702 REGISTER
Server: Asterisk PBX 13.17.2~dfsg-1ubuntu1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


Mar 2 00:09:32.096: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:


Mar 2 00:09:35.096: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:


Mar 2 00:09:38.096: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:


Mar 2 00:09:41.096: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:


Mar 2 00:09:44.096: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:

 

R0g22
Cisco Employee
Cisco Employee
Asterisk is rejecting the REGISTER -

Mar 2 00:09:30.644: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Sent:
REGISTER sip:192.168.101.5:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.101.102:5060;branch=z9hG4bK7A9C27
From: <sip:3301001@192.168.101.5>;tag=52F0944-2545
To: <sip:3301001@192.168.101.5>
Date: Tue, 02 Mar 1993 00:09:30 GMT
Call-ID: E9A4F213-152511CC-818D9137-5DF193D
User-Agent: Cisco-SIPGateway/IOS-15.2.4.GC
Max-Forwards: 70
Timestamp: 731030970
CSeq: 702 REGISTER
Contact: <sip:3301001@192.168.101.102:5060>
Expires: 3600
Authorization: Digest username="call-manager",realm="asterisk",uri="sip:192.168.101.5:5060",response="e9c1c0176000f74f70ca761b4aa56db9",nonce="2135cc9d",algorithm=MD5
Content-Length: 0

Mar 2 00:09:30.648: //2692/000000000000/SIP/Msg/ccsipDisplayMsg:
Received:
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 192.168.101.102:5060;branch=z9hG4bK7A9C27;received=192.168.101.102
From: <sip:3301001@192.168.101.5>;tag=52F0944-2545
To: <sip:3301001@192.168.101.5>;tag=as015af5f2
Call-ID: E9A4F213-152511CC-818D9137-5DF193D
CSeq: 702 REGISTER
Server: Asterisk PBX 13.17.2~dfsg-1ubuntu1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0

Is it aware of "<sip:3301002@192.168.101.102:5060>" ?

my sip.conf shows:

 

[3301001]
type=peer
username=call-manager
secret=welcome
host=dynamic
disallow=all
allow=ulaw
transport=udp


[3301002]
type=peer
username=call-manager
secret=welcome
host=dynamic
disallow=all
allow=ulaw
transport=udp

 

The error message on asterisk changed to:

[Feb 7 09:57:23] NOTICE[28295] chan_sip.c: Registration from '<sip:3301001@192.168.101.5>' failed for '192.168.101.102:63563' - Username/auth name mismatch
[Feb 7 09:57:23] WARNING[28295] chan_sip.c: username mismatch, have <3301002>, digest has <call-manager>
[Feb 7 09:57:23] NOTICE[28295] chan_sip.c: Registration from '<sip:3301002@192.168.101.5>' failed for '192.168.101.102:63563' - Username/auth name mismatch

 

 

R0g22
Cisco Employee
Cisco Employee
It is telling it right here what the issue is -

[Feb 7 09:57:23] WARNING[28295] chan_sip.c: username mismatch, have <3301002>, digest has <call-manager>

Change the authentication/credentials under sip-ua to "3301002" rather than "call-manager" and then test.

Why don't you try unauthenticated registration; i.e. no registration at all? Can can allow/restrict access at Asterisk server using the IP address.

Georgios
Please rate if you find this helpful.