Hi
We have a realtime Asterisk configuration for each extension, which is similar to below:
1 AGI call_inbound.agi|reception|8
2 AGI call_inbound.agi|all|12
3 Voicemail 200@internal|su
The problem is that when somebody calls this extension (reception) and it gets answered, when the person at that extension hangs up, the second priority (all) is still executed unless the caller hangs up as well.
CLI shows in realtime exactly what’s described above, i.e.:
-- Executing AGI("SIP/ip.ip.ip.ip-085f22f8", "call_inbound.agi|reception|8")
-- Launched AGI Script /var/lib/asterisk/agi-bin/call_inbound.agi
-- AGI Script Executing Application: (Dial) Options: (SIP/200|8)
-- Called 200
-- SIP/200-0862abe0 is ringing
-- SIP/200-0862abe0 answered SIP/ip.ip.ip.ip-085f22f8
-- Packet2Packet bridging SIP/ip.ip.ip.ip-085f22f8 and SIP/200-0862abe0
-- AGI Script call_inbound.agi completed, returning 0
-- Executing AGI("SIP/ip.ip.ip.ip-085f22f8", "call_inbound.agi|all|12")
-- Launched AGI Script /var/lib/asterisk/agi-bin/call_inbound.agi
-- AGI Script Executing Application: (Dial) Options: (SIP/201|12)
-- Called 201
-- SIP/201-085e4930 is ringing
We tried adding Hangup command at the end of the agi script, however the next priority still gets executed regardless. We also tried adding Hangup command as a 4th priority, but that didn’t make any difference. Would anyone be able to point in the right direction of using a Hangup command, or perhaps show an example of working Hangup command within the agi script please?
We are having the same issue with both Asterisk 1.4.20 and 1.8.
Many thanks!