Asterisk Version: 13.28.1 FreePBX 13.0.197.28
Hi. I’ve a dialplan that calls VoiceMail and then sends an SMS. I’ve found Asterisk behaves differently depending how the caller ends the call:
- If they press the # key then the script continues and the SMS is sent:
app.c: User ended message by pressing #
file.c: <SIP/501-00000015> Playing 'auth-thankyou.ulaw' (language 'en')
pbx.c: Executing [012345678@Inbound-Call-Filtering:100] Goto("SIP/501-00000015", "sendSMS") in new stack
[SMS code]
Executing [012345678@Inbound-Call-Filtering:109] Hangup("SIP/501-00000015", "") in new stack
Spawn extension (Inbound-Call-Filtering, 012345678, 109) exited non-zero on 'SIP/501-00000015'
- if they hang up then the script does not continue:
app.c: User hung up
pbx.c: Spawn extension (Inbound-Call-Filtering, 012345678, 99) exited non-zero on 'SIP/501-00000016'
Is this behaviour correct and is there a solution?
I did think about sending the SMS before calling VoiceMail but 1) I was worried about the delay and 2) I don’t want to send the SMS if they don’t leave a message.
Thanks for reading.
Alan