DND hangs up

Any of the DND options are not working (*78, *79, *76) I dial one of them, it acts like its going to call and then just hangs up. I’ve tried it from several phones including a softphone, all same effect.

Any advice would be great! Thanks!

here is my asterisk -vvvvvr output…

localhost*CLI>
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [*78@from-internal:1] Answer(“SIP/901-0000000e”, “”) in new stack
– Executing [*78@from-internal:2] Wait(“SIP/901-0000000e”, “1”) in new stack
> 0xb76735b8 – Probation passed - setting RTP source address to 192.168.1.20:53632
– Executing [*78@from-internal:3] Macro(“SIP/901-0000000e”, “user-callerid,”) in new stack
– Executing [s@macro-user-callerid:1] Set(“SIP/901-0000000e”, “TOUCH_MONITOR=1399073724.14”) in new stack
– Executing [s@macro-user-callerid:2] Set(“SIP/901-0000000e”, “AMPUSER=901”) in new stack
– Executing [s@macro-user-callerid:3] GotoIf(“SIP/901-0000000e”, “0?report”) in new stack
– Executing [s@macro-user-callerid:4] ExecIf(“SIP/901-0000000e”, “1?Set(REALCALLERIDNUM=901)”) in new stack
– Executing [s@macro-user-callerid:5] Set(“SIP/901-0000000e”, “AMPUSER=901”) in new stack
– Executing [s@macro-user-callerid:6] GotoIf(“SIP/901-0000000e”, “0?limit”) in new stack
– Executing [s@macro-user-callerid:7] Set(“SIP/901-0000000e”, “AMPUSERCIDNAME=MacSoftPhone”) in new stack
– Executing [s@macro-user-callerid:8] GotoIf(“SIP/901-0000000e”, “0?report”) in new stack
– Executing [s@macro-user-callerid:9] Set(“SIP/901-0000000e”, “AMPUSERCID=901”) in new stack
– Executing [s@macro-user-callerid:10] Set(“SIP/901-0000000e”, “__DIAL_OPTIONS=Ttr”) in new stack
– Executing [s@macro-user-callerid:11] Set(“SIP/901-0000000e”, “CALLERID(all)=“MacSoftPhone” <901>”) in new stack
– Executing [s@macro-user-callerid:12] GotoIf(“SIP/901-0000000e”, “0?limit”) in new stack
– Executing [s@macro-user-callerid:13] ExecIf(“SIP/901-0000000e”, “0?Set(GROUP(concurrency_limit)=901)”) in new stack
– Executing [s@macro-user-callerid:14] GosubIf(“SIP/901-0000000e”, “7?sub-ccss,s,1(from-internal,*78)”) in new stack
– Executing [s@sub-ccss:1] ExecIf(“SIP/901-0000000e”, “0?Return()”) in new stack
– Executing [s@sub-ccss:2] Set(“SIP/901-0000000e”, “CCSS_SETUP=TRUE”) in new stack
– Executing [s@sub-ccss:3] GosubIf(“SIP/901-0000000e”, “0?monitor_config,1(from-internal,*78):monitor_default,1(from-internal,*78)”) in new stack
– Executing [monitor_default@sub-ccss:1] GotoIf(“SIP/901-0000000e”, “0?is_exten”) in new stack
– Executing [monitor_default@sub-ccss:2] StackPop(“SIP/901-0000000e”, “”) in new stack
– Executing [monitor_default@sub-ccss:3] Return(“SIP/901-0000000e”, “FALSE”) in new stack
– Executing [s@macro-user-callerid:15] ExecIf(“SIP/901-0000000e”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [s@macro-user-callerid:16] GotoIf(“SIP/901-0000000e”, “0?continue”) in new stack
– Executing [s@macro-user-callerid:17] Set(“SIP/901-0000000e”, “__TTL=64”) in new stack
– Executing [s@macro-user-callerid:18] GotoIf(“SIP/901-0000000e”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,29)
– Executing [s@macro-user-callerid:29] Set(“SIP/901-0000000e”, “CALLERID(number)=901”) in new stack
– Executing [s@macro-user-callerid:30] Set(“SIP/901-0000000e”, “CALLERID(name)=MacSoftPhone”) in new stack
– Executing [s@macro-user-callerid:31] Set(“SIP/901-0000000e”, “CDR(cnum)=901”) in new stack
– Executing [s@macro-user-callerid:32] Set(“SIP/901-0000000e”, “CDR(cnam)=MacSoftPhone”) in new stack
– Executing [s@macro-user-callerid:33] Set(“SIP/901-0000000e”, “CHANNEL(language)=en”) in new stack
– Executing [*78@from-internal:4] Set(“SIP/901-0000000e”, “DB(DND/901)=YES”) in new stack
– Executing [*78@from-internal:5] Playback(“SIP/901-0000000e”, “do-not-disturb&activated”) in new stack
– Executing [*78@from-internal:6] Macro(“SIP/901-0000000e”, “hangupcall,”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“SIP/901-0000000e”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [s@macro-hangupcall:3] ExecIf(“SIP/901-0000000e”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [s@macro-hangupcall:4] Hangup(“SIP/901-0000000e”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/901-0000000e’ in macro ‘hangupcall’
== Spawn extension (from-internal, *78, 6) exited non-zero on ‘SIP/901-0000000e’
– Executing [h@from-internal:1] Hangup(“SIP/901-0000000e”, “”) in new stack
== Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/901-0000000e’

Yet it apparently accomplished it’s purpose:-

– Executing [*78@fromEmail links icon-internal:4] Set(“SIP/901-0000000e”, “DB(DND/901)=YES”) in new stack
– Executing [*78@fromEmail links icon-internal:5] Playback(“SIP/901-0000000e”, “do-not-disturb&activated”) in new stack
– Executing [*78@fromEmail links icon-internal:6] Macro(“SIP/901-0000000e”, “hangupcall,”) in new stack

Is DND turned on? You need to investigate why

– Executing [*78@fromEmail links icon-internal:5] Playback(“SIP/901-0000000e”, “do-not-disturb&activated”) in new stack

was not heard.

I saw that but why no audio/announcement was played? I’m fairly new to Asterisk/FreePBX. I thought maybe it was a codec issue but that’s not the case.

It was played, you see that, that you didn’t hear it is another issue. Yoou didn’t answer my question, did it successfully turn on DND?

Yes, it successfully turned on. It didn’t test that at first because I was expecting to hear something and I hadnt discovered that it did in fact turn it on until I looked closer at that log. So that partial good news.

Just trying to learn how to read these outputs can be a little troublesome at the moment.

Appreciate the help.

Here is some SIP debug output…for some reason Asterisk is sending back a 401 not found to my client. Not sure why.

localhost*CLI>

<— SIP read from UDP:192.168.1.20:53818 —>
INVITE sip:*[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.1.20:53818;branch=z9hG4bK-d8754z-c3ceac10e8273071-1—d8754z-;rport
Max-Forwards: 70
Contact: sip:[email protected]:53818
To: sip:*[email protected]
From: "MacSoft"sip:[email protected];tag=1fc27350
Call-ID: OTAwY2NlOTUzOTc1NjdiOTBlNDZmZGMzY2NkMDFlZmU
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite release 4.5.5 stamp 71241
Content-Length: 210

v=0
o=- 1399120605866209 1 IN IP4 192.168.1.20
s=X-Lite 4 release 4.5.5 stamp 71241
c=IN IP4 192.168.1.20
t=0 0
m=audio 63076 RTP/AVP 0 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
<------------->
— (13 headers 9 lines) —
Sending to 192.168.1.20:53818 (no NAT)
Sending to 192.168.1.20:53818 (no NAT)
Using INVITE request as basis request - OTAwY2NlOTUzOTc1NjdiOTBlNDZmZGMzY2NkMDFlZmU
Found peer ‘901’ for ‘901’ from 192.168.1.20:53818

<— Reliably Transmitting (no NAT) to 192.168.1.20:53818 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.20:53818;branch=z9hG4bK-d8754z-c3ceac10e8273071-1—d8754z-;received=192.168.1.20;rport=53818
From: "MacSoft"sip:[email protected];tag=1fc27350
To: sip:*[email protected];tag=as78728b93
Call-ID: OTAwY2NlOTUzOTc1NjdiOTBlNDZmZGMzY2NkMDFlZmU
CSeq: 1 INVITE
Server: FPBX-2.11.0(11.9.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="78b7828d"
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘OTAwY2NlOTUzOTc1NjdiOTBlNDZmZGMzY2NkMDFlZmU’ in 6400 ms (Method: INVITE)

<— SIP read from UDP:192.168.1.20:53818 —>
ACK sip:*[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.1.20:53818;branch=z9hG4bK-d8754z-c3ceac10e8273071-1—d8754z-;rport
Max-Forwards: 70
To: sip:*[email protected];tag=as78728b93
From: "MacSoft"sip:[email protected];tag=1fc27350
Call-ID: OTAwY2NlOTUzOTc1NjdiOTBlNDZmZGMzY2NkMDFlZmU
CSeq: 1 ACK
Content-Length: 0

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

<— SIP read from UDP:192.168.1.20:53818 —>
INVITE sip:*[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.1.20:53818;branch=z9hG4bK-d8754z-c7dc7e0a4b791a3d-1—d8754z-;rport
Max-Forwards: 70
Contact: sip:[email protected]:53818
To: sip:*[email protected]
From: "MacSoft"sip:[email protected];tag=1fc27350
Call-ID: OTAwY2NlOTUzOTc1NjdiOTBlNDZmZGMzY2NkMDFlZmU
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite release 4.5.5 stamp 71241
Authorization: Digest username=“901”,realm=“asterisk”,nonce=“78b7828d”,uri=“sip:*[email protected]”,response=“f582f2fa506302bad2686bc2159b1134”,algorithm=MD5
Content-Length: 210

v=0
o=- 1399120605866209 1 IN IP4 192.168.1.20
s=X-Lite 4 release 4.5.5 stamp 71241
c=IN IP4 192.168.1.20
t=0 0
m=audio 63076 RTP/AVP 0 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
<------------->
— (14 headers 9 lines) —
Sending to 192.168.1.20:53818 (no NAT)
Using INVITE request as basis request - OTAwY2NlOTUzOTc1NjdiOTBlNDZmZGMzY2NkMDFlZmU
Found peer ‘901’ for ‘901’ from 192.168.1.20:53818
Found RTP audio format 0
Found RTP audio format 101
Found audio description format telephone-event for ID 101
Capabilities: us - (gsm|ulaw|g729|g722), peer - audio=(ulaw)/video=(nothing)/text=(nothing), combined - (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 192.168.1.20:63076
Looking for *76 in from-internal (domain 192.168.1.110)
list_route: hop: sip:[email protected]:53818

<— Transmitting (no NAT) to 192.168.1.20:53818 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.20:53818;branch=z9hG4bK-d8754z-c7dc7e0a4b791a3d-1—d8754z-;received=192.168.1.20;rport=53818
From: "MacSoft"sip:[email protected];tag=1fc27350
To: sip:*[email protected]
Call-ID: OTAwY2NlOTUzOTc1NjdiOTBlNDZmZGMzY2NkMDFlZmU
CSeq: 2 INVITE
Server: FPBX-2.11.0(11.9.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: sip:*[email protected]:5060
Content-Length: 0

<------------>
Audio is at 10538
Adding codec 100003 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<— Reliably Transmitting (no NAT) to 192.168.1.20:53818 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.20:53818;branch=z9hG4bK-d8754z-c7dc7e0a4b791a3d-1—d8754z-;received=192.168.1.20;rport=53818
From: "MacSoft"sip:[email protected];tag=1fc27350
To: sip:*[email protected];tag=as0cfddaeb
Call-ID: OTAwY2NlOTUzOTc1NjdiOTBlNDZmZGMzY2NkMDFlZmU
CSeq: 2 INVITE
Server: FPBX-2.11.0(11.9.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: sip:*[email protected]:5060
Content-Type: application/sdp
Content-Length: 237

v=0
o=root 1943211044 1943211044 IN IP4 192.168.1.110
s=Asterisk PBX 11.9.0
c=IN IP4 192.168.1.110
t=0 0
m=audio 10538 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

<------------>

<— SIP read from UDP:192.168.1.20:53818 —>
ACK sip:*[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.20:53818;branch=z9hG4bK-d8754z-26469255e97e642f-1—d8754z-;rport
Max-Forwards: 70
Contact: sip:[email protected]:53818
To: sip:*[email protected];tag=as0cfddaeb
From: "MacSoft"sip:[email protected];tag=1fc27350
Call-ID: OTAwY2NlOTUzOTc1NjdiOTBlNDZmZGMzY2NkMDFlZmU
CSeq: 2 ACK
User-Agent: X-Lite release 4.5.5 stamp 71241
Content-Length: 0

<------------->
— (10 headers 0 lines) —
Scheduling destruction of SIP dialog ‘OTAwY2NlOTUzOTc1NjdiOTBlNDZmZGMzY2NkMDFlZmU’ in 6400 ms (Method: ACK)
set_destination: Parsing sip:[email protected]:53818 for address/port to send to
set_destination: set destination to 192.168.1.20:53818
Reliably Transmitting (no NAT) to 192.168.1.20:53818:
BYE sip:[email protected]:53818 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.110:5060;branch=z9hG4bK698c4871;rport
Max-Forwards: 70
From: sip:*[email protected];tag=as0cfddaeb
To: "MacSoft"sip:[email protected];tag=1fc27350
Call-ID: OTAwY2NlOTUzOTc1NjdiOTBlNDZmZGMzY2NkMDFlZmU
CSeq: 102 BYE
User-Agent: FPBX-2.11.0(11.9.0)
Proxy-Authorization: Digest username=“901”, realm=“asterisk”, algorithm=MD5, uri=“sip:192.168.1.110”, nonce=“78b7828d”, response="830538c4a858defa34b775e912a5354c"
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0


<— SIP read from UDP:192.168.1.20:53818 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.110:5060;branch=z9hG4bK698c4871;rport=5060
Contact: sip:[email protected]:53818
To: "MacSoft"sip:[email protected];tag=1fc27350
From: sip:*[email protected];tag=as0cfddaeb
Call-ID: OTAwY2NlOTUzOTc1NjdiOTBlNDZmZGMzY2NkMDFlZmU
CSeq: 102 BYE
User-Agent: X-Lite release 4.5.5 stamp 71241
Content-Length: 0

<------------->
— (9 headers 0 lines) —
SIP Response message for INCOMING dialog BYE arrived
Really destroying SIP dialog ‘OTAwY2NlOTUzOTc1NjdiOTBlNDZmZGMzY2NkMDFlZmU’ Method: ACK

<— SIP read from UDP:192.168.1.20:53818 —>

<------------->
localhost*CLI>

I mean 401 unauthorized above.

Not getting anywhere on the audio. I’ve done some research and some some supposed fixes but nothing. I turned off NAT totally even though everything is behind the firewall. Messed with codecs.

I’m not understanding where Asterisk is pulling the DND recording. Not found info on that just yet.

Tou are chasing the wrong rabbit. the SIP conversation also says that you successfully negotiated a g711 connection and completed the call allwaysauthreject=yes will trigger that 401 and cause the endpoint to properly authenticate. All sound files are in the sounds directory and then the language directory if more than english is used, the sound directory is in the structure defined in /etc/asterisk/asterisk.conf by

astvarlibdir => /var/lib/asterisk

To see if the sound file is actually playing you can set rdp debug on I see your phoe is a softphone on a mac , I would start off with a plain sip hardware phone.

But ultimately are all the other prompts being played and heard?

Okay. I will try that later today.

Yes, all the other sounds so far are being heard. VM IVR, Conference IVR, etc.

Yes, I have an X-lite softphone running on Mac and Windows, Polycom IP330, an Aastra 6731i, and Cisco SPA 525G2. We are testing different phones to see which ones we like and testing the PBX for any “bugs” or issues before we deploy. And I’m trying to learn this stuff as fast as I can.

I appreciate the help. I will let you know about the rdp debug later today. Thanks!

Here is my RTP output. So audio is happening.

localhost*CLI>
Sent RTP packet to 192.168.1.111:3000 (type 00, seq 040659, ts 000160, len 000160)
Sent RTP packet to 192.168.1.111:3000 (type 00, seq 040660, ts 000320, len 000160)
Sent RTP packet to 192.168.1.111:3000 (type 00, seq 040661, ts 000480, len 000160)
Sent RTP packet to 192.168.1.111:3000 (type 00, seq 040662, ts 000640, len 000160)
Got RTP packet from 192.168.1.111:3000 (type 00, seq 017925, ts 1026495755, len 000160)
Got RTP packet from 192.168.1.111:3000 (type 00, seq 017926, ts 1026495915, len 000160)
Got RTP packet from 192.168.1.111:3000 (type 00, seq 017927, ts 1026496075, len 000160)
Got RTP packet from 192.168.1.111:3000 (type 00, seq 017928, ts 1026496235, len 000160)
Got RTP packet from 192.168.1.111:3000 (type 00, seq 017929, ts 1026496395, len 000160)
Sent RTP packet to 192.168.1.111:3000 (type 00, seq 040663, ts 000800, len 000160)
Got RTP packet from 192.168.1.111:3000 (type 00, seq 017930, ts 1026496555, len 000160)
Sent RTP packet to 192.168.1.111:3000 (type 00, seq 040664, ts 000960, len 000160)
Got RTP packet from 192.168.1.111:3000 (type 00, seq 017931, ts 1026496715, len 000160)
Sent RTP packet to 192.168.1.111:3000 (type 00, seq 040665, ts 001120, len 000160)
Got RTP packet from 192.168.1.111:3000 (type 00, seq 017932, ts 1026496875, len 000160)
Sent RTP packet to 192.168.1.111:3000 (type 00, seq 040666, ts 001280, len 000160)
Got RTP packet from 192.168.1.111:3000 (type 00, seq 017933, ts 1026497035, len 000160)
Sent RTP packet to 192.168.1.111:3000 (type 00, seq 040667, ts 001440, len 000160)
Got RTP packet from 192.168.1.111:3000 (type 00, seq 017934, ts 1026497195, len 000160)
Sent RTP packet to 192.168.1.111:3000 (type 00, seq 040668, ts 001600, len 000160)
Got RTP packet from 192.168.1.111:3000 (type 00, seq 017935, ts 1026497355, len 000160)
Sent RTP packet to 192.168.1.111:3000 (type 00, seq 040669, ts 001760, len 000160)
Got RTP packet from 192.168.1.111:3000 (type 00, seq 017936, ts 1026497515, len 000160)

Well the problem might be that I have no DND audio file in my /var/lib/asterisk/sounds directory or any of the sub directories.

Why might that be?

I am using the latest version of FreePBX installed on CentOS 6.5 using the install script.

It didn’t work :slight_smile:

I don’t use that script but traditionally you will need the “extra sounds” in the right format from digium.

normally installed as an option when you build asterisk in make menuselect, but you can get them from

http://downloads.asterisk.org/pub/telephony/sounds/

So I decided to have some fun. I took this line…

exten => *78,n(hook_1),Playback(do-not-disturb&activated)

and made it like this…

exten => *78,n(hook_1),Playback(vmnotify-goodbye)

Reloaded Asterisks and it worked fine.

So I wonder if FreePBX know if this is an issue with their latest distro?

Awesome! Thanks much Dicko. We did build Asterisk/FreePBX from source but the script is rather nice and so far this has been the only issue with it.