I’m rewriting dialplan from AEL to LUA. By accident, we found a weird behaviour. Using AEL dialplan stops processing command immediately after user hangup which is expected.
While using LUA, after hangup logs show that the next commands are executed. Which in case of app queue triggers AMI event (join queue)
The question is if it’s normal behaviour? Could I change it?
I’m including logs from each case. I’m disconnecting during intro message.
Steps in AEL and LUA are the same. I’m including logs and extensions.[ael|lua]
I’m using Asterisk 14.7.5
#############################
Using AEL
context queues {
3000 => {
Set(CHANNEL(musicclass)=xxxxmusic);
Answer();
Wait(0.5);
Playback(audio_prompts/xxxx/intro);
Playback(audio_prompts/xxxx/committed);
Queue(customerservices,Rt,);
Hangup();
};
}
— Log
– Executing [3000@pstn-inbound:9] Playback(“SIP/voicegateway01-00000000”, “audio_prompts/xxxx/intro”) in new stack
– <SIP/voicegateway01-00000000> Playing ‘audio_prompts/xxxx/intro.ulaw’ (language ‘en’)
> 0x7f0f24069890 – Strict RTP learning complete - Locking on source address x.x.x.x:17880
#############################
Using LUA
extensions = {
queues = {
["3000"] = function()
queue_store(“xxxx”)
end;
}
function queue_store(store)
log_call(store)
channel.CHANNEL(“musicclass”):set(stores[store][“music_on_hold”])
local caller = channel.CALLERID(“num”):get()
app.Answer()
app.Wait(1)
app.Playback(“audio_prompts/” … store … “/intro”)
app.Playback(“audio_prompts/” … store … “/committed”)
app.Queue(customer_services_queue, Rt)
app.Hangup()
end
— Log
== Using SIP RTP CoS mark 5
> 0x7ff3800725e0 – Strict RTP learning after remote address set to: x.x.x.x:18810
– Executing [3000@pstn-inbound:1] Answer(“SIP/voicegateway01-00000002”, “”)
> 0x7ff3800725e0 – Strict RTP switching to RTP target address x.x.x.x:18810 as source
– Executing [3000@pstn-inbound:1] Wait(“SIP/voicegateway01-00000002”, “1”)
– Executing [3000@pstn-inbound:1] Playback(“SIP/voicegateway01-00000002”, “audio_prompts/xxxx/intro”)
– <SIP/voicegateway01-00000002> Playing ‘audio_prompts/xxxx/intro.ulaw’ (language ‘en’)
> 0x7ff3800725e0 – Strict RTP learning complete - Locking on source address x.x.x.x:18810
– Executing [3000@pstn-inbound:1] Playback(“SIP/voicegateway01-00000002”, “audio_prompts/xxxx/committed”)
– <SIP/voicegateway01-00000002> Playing ‘audio_prompts/xxxx/committed.ulaw’ (language ‘en’)
– Executing [3000@pstn-inbound:1] Queue(“SIP/voicegateway01-00000002”, “customerservices,”)
– Started music on hold, class ‘xxxxmusic’, on channel ‘SIP/voicegateway01-00000002’
== Spawn extension (pstn-inbound, 3000, 1) exited non-zero on ‘SIP/voicegateway01-00000002’
– Stopped music on hold on SIP/voicegateway01-00000002