Trying to get phone to go to Voicemail

I have a tablet and a phone, I am able to call between the two using SIP (pjsip). However if I do not answer the phone they will not go to voicemail. I have set voicemail up and I can dial the voicemail ext and it will answer. But if I let the phone time out by ringing (unanswered) the calling device will send a cancel request at the end of (20 sec) and terminate the call. The call never goes to the next step to call voicemail. I have tried configuring a “t” extension to no avail. The calling phone sends a cancellation request in 20 seconds. I have changed it to 30 seconds with no success. Here is my Extension.conf. Can anyone help or has seen this problem and know why the phone is sending a cancellation request. My server is not behind a natted device but the phones are.

exten => t,1,Playback(vm-nobodyavail)
exten => n,Voicemail(${EXTEN}@default,u)
same => n,Hangup()

;include => restrict-outbound ; Included restricted dial context
include => standard-timeout

exten => horace,1,Answer()
exten => horace,n,Dial(PJSIP/horace_cellphone,20,g)
same => horace,n,GotoIf($[“${DIALSTATUS}” = “BUSY”]?busy:unavail)
same => horace,n,(busy),Playback(vm-busy)
same => horace,VoiceMail($$$@default,b)
same => horace,n,Hangup()
same => horace,n,(unavail),Playback(vm-nobodyavail)
same => horace,n,VoiceMail($$$@default,u)
same => horace,n,Hangup()

exten => tablet,1,Answer()
exten => tablet_new,n,Dial(PJSIP/tablet,20,g)
same => tablet_new,n,GotoIf($[“${DIALSTATUS}” = “BUSY”]?busy:unavail)
same => tablet_new,n,(busy),Playback(vm-busy)
same => tablet_new,n,VoiceMail(###@default,b)
same => tablet_new,n,Hangup()
same => tablet_new,n,(unavail),Playback(vm-nobodyavail)
same => tablet_new,n,VoiceMail(###@default,u)
same => tablet_new,n,Hangup()

t does not do what you think it does!

You’ve answered the call in the dialplan, so the calling phone’s no answer timer will have been cancelled, and, in any case, the protocol no longer allows CANCEL. And if you have got this far, the t extension will not trigger.

The above line is invalid.

When calling tablet_new, the unavailable greeting should be used for everything except busy, including if tablet_new accepts a call and hangs up first, which may confuse the caller.

You need to provide the full log, at a verbosity of, at least, three, to understand what is happening.

Hi David,
I intentionally do not answer the phone so it will go to voicemail, trying get it to work. The extension I put in the file is just a placeholder, too many people be trying to hack, so I didn’t want to list the actual ones. Also the tablet name is not real, but will show up in the log and wireshark files. Attached is a full log verbosity 5 and wireshare capture. Thanks alot for your help because you are always helpful.

fulllog.txt (226 KB)

(Attachment wireshark capture04-06-2024 is missing)

What makes this line invalid?
horace, extension
Voicemail() application
$$$ mailbox number
@ default context in voicemail
,b play busy message

What makes it invalid?

Ok I see why it is invalid, missing the priority n

You intentionally answer the calling phone in your dialplan!

[May 6 12:32:05] VERBOSE[13805][C-00000001] pbx.c: Executing [tablet@internal-phones:1] Answer("PJSIP/horace_cellphone-00000000", "") in new stack

[May  6 12:32:05] DEBUG[13542] manager.c: Examining AMI event:
Event: Newstate
Privilege: call,all
Channel: PJSIP/horace_cellphone-00000000
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: horace_cellphone
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
Context: internal-phones
Exten: tablet
Priority: 1
Uniqueid: 1715023925.0
Linkedid: 1715023925.0

In particular:

ChannelState: 6
ChannelStateDesc: Up

It’s saying that the unavail label doesn’t exist:

[May 6 12:32:25] NOTICE[13805][C-00000001] pbx.c: No such label 'unavail' in extension 'tablet' in context 'internal-phones'

The extension doesn’t match the one in your provided dialplan.

In any case:

Server: Asterisk PBX 16.13.0

is end of life and contains known bugs.

Good afternoon David,
After carefully reviewing your comments, I went back and did some more reading. I figure out my lack of understanding of how to use labels. I also found when I wanted to use the label I had to use exten and not same. I also had a misunderstanding of how ${EXTEN} is used and how it’s value is assigned. Additionally, t extension I found that it is based upon user input. So I created the dial plan and made unavail to be the default for all the extensions. Everything works now. Besides wanting more granular control for performance purposes, do we need to track other DIALSTATUS, such as congestion as an example, just for my knowledge. Once again thanks for your input, I will upgrade here soon one day as I have time too. Thank you soooo much for your input. Problem Solved!

Apologies for not spotting that before, but you can use labels with same, what you can’t do is use and extension!

I will continue to read and learn. I will be upgrading soon, just need to read the change logs first. Hopefully it is not too drastic I just don’t have a lot of time right now.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.