Cisco 7911 with SIP - can't dial but can answer

Hello!

I’am fighting with this problem from 2 days and have no idea how to resolv it…
I’am trying to use Cisco 7911 phones with Asterisk. On configuration with works correctly with softphones I connect Cisco phones and gave Cisco phones settings from softphones. Hardphones are registered correctly. I can dial from softphones to Cisco and make normal conversation. But if i try to call from Cisco to Cisco or softphone I hear busy signal after I press first digit of phone numer (6 or 1) and get in console “== Using SIP RTP CoS mark 5”. When I press numer 2 (or 3,4,5,7,8,9,0) i get:
NOTICE[15248][C-0000001a]: chan_sip.c:25628 handle_request_invite: Call from ‘108’ (192.168.211.132:49155) to extension ‘2’ rejected because extension not found in context ‘from-internal’.
== Using SIP RTP CoS mark 5

6004 and 6005 are softphones,

Please help.

sip.conf

[general]
context=from-internal
;#callcounter=yes

[6001]
type=friend
context=from-internal
host=dynamic
secret=pass123
nat=no
disallow=all
allow=g729
allow=ulaw
allow=alaw
allow=gsm

[6002]
type=friend
context=from-internal
host=dynamic
secret=pass123
nat=no
disallow=all
allow=ulaw
allow=alaw
allow=gsm

[6003]
type=friend
context=from-internal
host=dynamic
secret=pass123
nat=no
disallow=all
allow=ulaw
allow=alaw
allow=gsm

[6004]
type=friend
context=from-internal
host=dynamic
secret=pass123
nat=no
disallow=all
allow=ulaw
allow=alaw
allow=gsm

[6005]
type=friend
context=from-internal
host=dynamic
secret=pass123
nat=no
disallow=all
allow=ulaw
allow=alaw
allow=gsm

extensions.conf

[from-internal]
exten = 100,1,Answer()
same = n,Wait(1)
same = n,Playback(hello-world)
same = n,Hangup()

exten = 101,1,Answer()
exten = 101,n,MixMonitor(out.wav)
same = n,Wait(5)
same = n,Playback(hello-world)
same = n,Hangup()

exten = 6001,1,Dial(SIP/6001)
exten = 6002,1,Dial(SIP/6002)
exten = 6003,1,Dial(SIP/6003)
exten = 6004,1,Dial(SIP/6004)
exten = 6005,1,Dial(SIP/6005)

Detailed logs from sip:

<--- SIP read from UDP:192.168.211.132:49155 --->
INVITE sip:6@192.168.211.249;user=phone SIP/2.0
Via: SIP/2.0/UDP 192.168.211.132:5060;branch=z9hG4bKb612375f
From: "6003" <sip:6003@192.168.211.249>;tag=0025841914d200062083e352-88265ca9
To: <sip:6@192.168.211.249;user=phone>
Call-ID: 00258419-14d20006-d5af728c-7a92f433@192.168.211.132
Max-Forwards: 70
Date: Sun, 27 Sep 2015 19:31:44 GMT
CSeq: 101 INVITE
User-Agent: Cisco-CP7911G/8.5.2
Contact: <sip:6003@192.168.211.132:5060;transport=udp>
Expires: 180
Accept: application/sdp
Allow: ACK,BYE,CANCEL,INVITE,NOTIFY,OPTIONS,REFER,REGISTER,UPDATE,SUBSCRIBE
Supported: replaces,join,norefersub
Allow-Events: kpml,dialog
Content-Length: 330
Content-Type: application/sdp
Content-Disposition: session;handling=optional

v=0
o=Cisco-SIPUA 18143 0 IN IP4 192.168.211.132
s=SIP Call
t=0 0
m=audio 23098 RTP/AVP 0 8 18 116 101
c=IN IP4 192.168.211.132
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:116 iLBC/8000
a=fmtp:116 mode=20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
<------------->
--- (18 headers 15 lines) ---
Sending to 192.168.211.132:5060 (no NAT)
Sending to 192.168.211.132:5060 (no NAT)
Using INVITE request as basis request - 00258419-14d20006-d5af728c-7a92f433@192.168.211.132
Found peer '6003' for '6003' from 192.168.211.132:49155

<--- Reliably Transmitting (no NAT) to 192.168.211.132:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.211.132:5060;branch=z9hG4bKb612375f;received=192.168.211.132
From: "6003" <sip:6003@192.168.211.249>;tag=0025841914d200062083e352-88265ca9
To: <sip:6@192.168.211.249;user=phone>;tag=as6269418f
Call-ID: 00258419-14d20006-d5af728c-7a92f433@192.168.211.132
CSeq: 101 INVITE
Server: Asterisk PBX 11.13.1~dfsg-2+b1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="10e7a25d"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '00258419-14d20006-d5af728c-7a92f433@192.168.211.132' in 32000 ms (Method: INVITE)

<--- SIP read from UDP:192.168.211.132:49163 --->
ACK sip:6@192.168.211.249;user=phone SIP/2.0
Via: SIP/2.0/UDP 192.168.211.132:5060;branch=z9hG4bKb612375f
From: "6003" <sip:6003@192.168.211.249>;tag=0025841914d200062083e352-88265ca9
To: <sip:6@192.168.211.249;user=phone>;tag=as6269418f
Call-ID: 00258419-14d20006-d5af728c-7a92f433@192.168.211.132
Date: Sun, 27 Sep 2015 19:31:44 GMT
CSeq: 101 ACK
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---

<--- SIP read from UDP:192.168.211.132:49155 --->
INVITE sip:6@192.168.211.249;user=phone SIP/2.0
Via: SIP/2.0/UDP 192.168.211.132:5060;branch=z9hG4bK19de74d0
From: "6003" <sip:6003@192.168.211.249>;tag=0025841914d200062083e352-88265ca9
To: <sip:6@192.168.211.249;user=phone>
Call-ID: 00258419-14d20006-d5af728c-7a92f433@192.168.211.132
Max-Forwards: 70
Date: Sun, 27 Sep 2015 19:31:44 GMT
CSeq: 102 INVITE
User-Agent: Cisco-CP7911G/8.5.2
Contact: <sip:6003@192.168.211.132:5060;transport=udp>
Authorization: Digest username="6003",realm="asterisk",uri="sip:6@192.168.211.249;user=phone",response="3c2d9bbdd3493fe9ce98b192e1d0623b",nonce="10e7a25d",algorithm=MD5
Expires: 180
Accept: application/sdp
Allow: ACK,BYE,CANCEL,INVITE,NOTIFY,OPTIONS,REFER,REGISTER,UPDATE,SUBSCRIBE
Supported: replaces,join,norefersub
Allow-Events: kpml,dialog
Content-Length: 330
Content-Type: application/sdp
Content-Disposition: session;handling=optional

v=0
o=Cisco-SIPUA 18143 0 IN IP4 192.168.211.132
s=SIP Call
t=0 0
m=audio 23098 RTP/AVP 0 8 18 116 101
c=IN IP4 192.168.211.132
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:116 iLBC/8000
a=fmtp:116 mode=20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
<------------->
--- (19 headers 15 lines) ---
Sending to 192.168.211.132:5060 (no NAT)
Using INVITE request as basis request - 00258419-14d20006-d5af728c-7a92f433@192.168.211.132
Found peer '6003' for '6003' from 192.168.211.132:49155
  == Using SIP RTP CoS mark 5
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 18
Found RTP audio format 116
Found RTP audio format 101
Found audio description format PCMU for ID 0
Found audio description format PCMA for ID 8
Found audio description format G729 for ID 18
Found audio description format iLBC for ID 116
Found audio description format telephone-event for ID 101
Capabilities: us - (gsm|ulaw|alaw), peer - audio=(ulaw|alaw|g729|ilbc)/video=(nothing)/text=(nothing), combined - (ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 192.168.211.132:23098
Looking for 6 in from-internal (domain 192.168.211.249)

<--- Reliably Transmitting (no NAT) to 192.168.211.132:5060 --->
SIP/2.0 484 Address Incomplete
Via: SIP/2.0/UDP 192.168.211.132:5060;branch=z9hG4bK19de74d0;received=192.168.211.132
From: "6003" <sip:6003@192.168.211.249>;tag=0025841914d200062083e352-88265ca9
To: <sip:6@192.168.211.249;user=phone>;tag=as6269418f
Call-ID: 00258419-14d20006-d5af728c-7a92f433@192.168.211.132
CSeq: 102 INVITE
Server: Asterisk PBX 11.13.1~dfsg-2+b1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '00258419-14d20006-d5af728c-7a92f433@192.168.211.132' in 32000 ms (Method: INVITE)

<--- SIP read from UDP:192.168.211.132:49164 --->
ACK sip:6@192.168.211.249;user=phone SIP/2.0
Via: SIP/2.0/UDP 192.168.211.132:5060;branch=z9hG4bK19de74d0
From: "6003" <sip:6003@192.168.211.249>;tag=0025841914d200062083e352-88265ca9
To: <sip:6@192.168.211.249;user=phone>;tag=as6269418f
Call-ID: 00258419-14d20006-d5af728c-7a92f433@192.168.211.132
Date: Sun, 27 Sep 2015 19:31:44 GMT
CSeq: 102 ACK
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---
Really destroying SIP dialog 'RK5tmjQXKR1vK5sqBxf8_w..' Method: REGISTER
Really destroying SIP dialog 'Is1FouGi_q_xmSOdWsFxUA..' Method: REGISTER
Really destroying SIP dialog '00258419-14d20006-d5af728c-7a92f433@192.168.211.132' Method: ACK

Anyone something? :smile:

The log doesn’t match the error message, but you have neither an extension 2 nor an extension 6 defined in your dialplan.

You are getting address incomplete for 6, rather than not found in context, because you do have some numbers beginning with 6. Maybe the phone has a bad dialplan and is sending the number too soon.

Also, having from-internal as your default context is bad security practice. The default context should not be able to make any toll calls.

Yes, it was the problem - I need to modified dialplan.xml in phones to wait for full number.

Thanks for information, this configuration was created only for testing :smile: