[asterisk-users] Python AGI's and hangups
Dovid Bender
dovid at telecurve.com
Wed Dec 8 16:08:24 CST 2021
Hi,
I am trying to help a friend that is using Asterisk along with a Python
AGI. In the code I see:
agi.execute(pystrix.agi.core.StreamFile(MY_PATH+'/'+msg))
try:
agi.execute(pystrix.agi.core.RecordFile(rec_file,
format='wav', escape_digits='#', timeout=-1, sample_offset=0, beep=True,
silence=None))
except:
pass
Verbose("DOVID: 88")
attachments.append(rec_file+".wav")
If a call is made and the calling person presses # on the call then later
on in the code it emails a recording to him. OTH if the caller hangs up
while Asterisk is doing RecordFile then no email is sent. This makes sense
to me since if Asterisk sends a SIGHUP to the Python script it will die in
its tracks and not continue onwards. He says that in the past even if a
call was hung up on as RecordFile was being ran he would get an email. I
don't see any h extensions in the context that would handle the call should
it hang up. I vaguely remember in the past reading on the list that it was
possible with Python for the Agi to keep running even if the call was hung
up on. Is that possible here? Could some change had been made to Asterisk
that would alter how the Python script dies when there is a hangup?
TIA.
Dovid
P.S. I know this is not the dev list but if there is anyone that I can pay
to help me look at this and possibly resolve it please let me know.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20211208/2d7a2105/attachment.html>
More information about the asterisk-users
mailing list