Shouldn't billsec be zero if person hangs up in VoiceMail before leaving message?

I’m testing Asterisk 17.7.0. PJSIP calls and leaving and retrieving voicemail work OK. Only a minor doubt: shouldn’t billsec in the CDR be zero if the person calling the unavailable endpoint hangs up before the “leave message” beep? That’s how cellphone operators here behave and I will need to replicate that shortly. I’ve looked up and saw no way to do that.

MariaDB [asterisk]> select uniqueid, start, answer, end, duration, billsec, disposition, lastapp from cdr;
+---------------+---------------------+---------------------+---------------------+----------+---------+-------------+---------------+
| uniqueid      | start               | answer              | end                 | duration | billsec | disposition | lastapp       |
+---------------+---------------------+---------------------+---------------------+----------+---------+-------------+---------------+
| 1602189140.0  | 2020-10-08 17:32:20 | 2020-10-08 17:32:23 | 2020-10-08 17:32:32 |       11 |       8 | ANSWERED    | Dial          |
| 1602189169.3  | 2020-10-08 17:32:49 | 2020-10-08 17:32:49 | 2020-10-08 17:32:54 |        4 |       4 | ANSWERED    | VoiceMailMain |
| 1602189189.5  | 2020-10-08 17:33:09 | 2020-10-08 17:33:09 | 2020-10-08 17:33:23 |       14 |      14 | ANSWERED    | Hangup        |
| 1602189249.7  | 2020-10-08 17:34:09 | 0000-00-00 00:00:00 | 2020-10-08 17:34:24 |       14 |       0 | NO ANSWER   | Dial          |
| 1602189249.7  | 2020-10-08 17:34:24 | 2020-10-08 17:34:24 | 2020-10-08 17:34:29 |        5 |       5 | ANSWERED    | VoiceMail     |
| 1602195563.11 | 2020-10-08 19:19:23 | 2020-10-08 19:19:23 | 2020-10-08 19:19:35 |       12 |      12 | ANSWERED    | Dial          |
| 1602195593.13 | 2020-10-08 19:19:53 | 2020-10-08 19:19:53 | 2020-10-08 19:19:59 |        5 |       5 | ANSWERED    | Dial          |
| 1602196547.15 | 2020-10-08 19:35:47 | 0000-00-00 00:00:00 | 2020-10-08 19:36:19 |       32 |       0 | NO ANSWER   | Dial          |
| 1602196547.15 | 2020-10-08 19:36:19 | 2020-10-08 19:36:19 | 2020-10-08 19:36:50 |       30 |      30 | ANSWERED    | VoiceMail     |
| 1602196718.19 | 2020-10-08 19:38:38 | 2020-10-08 19:38:38 | 2020-10-08 19:38:44 |        5 |       5 | ANSWERED    | VoiceMailMain |
| 1602196731.21 | 2020-10-08 19:38:51 | 2020-10-08 19:38:51 | 2020-10-08 19:39:20 |       29 |      29 | ANSWERED    | Dial          |
+---------------+---------------------+---------------------+---------------------+----------+---------+-------------+---------------+
11 rows in set (0.001 sec)

Cellphone operators are able to generate early media. If your callers are the other side of service provider, you will probably not have that luxury.

The voicemail application forces an answer indication when started.

If you are actually able to use early media, you should use Playback, before Voicemail, which has an option to disable answering the call. You may need to call Progress() first. Obviously you must not have called Answer earlier the dialplan (there is a fashion for starting all dialplans with Answer, which I never understood).

Obviously this won’t allow you to customize the message to any great extent.

1 Like

Actually, it is possible we will be able to use early media. In this case I believe it would be wise to call Progress() after Dial() and before Playback() / VoiceMail(), correct?

Would it be make sense / be useful it there was an option in VoiceMail() to send the initial prompts in early media and only call ast_answer() just before the beep? I could try to make such a patch. Should I?

Whoa! It worked! Here’s a patch against the 17 branch. Needs Progress() being called before VoiceMail() if it has the new ‘e’ option or the greetings go silent.

asterisk-voicemail-greetings-early-media.patch.txt (2.5 KB)

And here’s another one that does the ast_indicate() of the PROGRESS message by itself if it has the ‘e’ option so you don’t have to do it in the dialplan.

So… useful?

asterisk-voicemail-greetings-early-media-v2.patch.txt (2.5 KB)

If you want patches to be considered for the main version of Asterisk, you need to submit them through issues.asterisk.org, as they are only accepted with a contributor agreement.

1 Like

Cool. Moving conversation to private messages, I have a few questions about my JIRA account, ok?

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