<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1226" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>
<DIV><FONT color=#0000ff>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=110455313-04092003>Thomas,</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=110455313-04092003>your
suggestion does work better.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=110455313-04092003>However, I doesn't solve my problem. Here is
callscript.pl:</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=110455313-04092003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=110455313-04092003>#!/usr/bin/perl<BR>print "waiting...\n";<BR>sleep
5;<BR>`cp /usr/src/asterisk/sample.call /var/spool/asterisk/outgoing`;<BR>print
"call created\n";</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=110455313-04092003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=110455313-04092003>The
problem is the incoming and outgoing calls are made on the same channel
(Zap/1).</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=110455313-04092003>I
believe the porblem is that, s</SPAN></FONT><FONT face=Arial color=#0000ff
size=2><SPAN class=110455313-04092003>ince the incoming call is not "closed"
before the outgoing call is created, the outgoing call does not
work.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=110455313-04092003>I was
hoping the delay would solve this problem... but obviously it
doesn't.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=110455313-04092003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=110455313-04092003>Do you
have any suggestions?</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=110455313-04092003>Thank
you.</SPAN></FONT></DIV> </FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> Thomas Haeger
[mailto:thomas.haeger@beronet.com] <BR><B>Sent:</B> 4 septembre, 2003
09:42<BR><B>To:</B> asterisk-users@lists.digium.com<BR><B>Subject:</B> AW:
[Asterisk-Users] Call script after hangup<BR><BR></FONT></DIV>
<DIV><SPAN class=919523913-04092003><FONT face=Arial color=#0000ff size=2>Hi
Frank,</FONT></SPAN></DIV>
<DIV><SPAN class=919523913-04092003><FONT face=Arial color=#0000ff size=2>why
you so complicated ?</FONT></SPAN></DIV>
<DIV><SPAN class=919523913-04092003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=919523913-04092003><FONT face=Arial color=#0000ff size=2>Try
following:</FONT></SPAN></DIV>
<DIV><SPAN class=919523913-04092003></SPAN> </DIV>
<DIV><SPAN class=919523913-04092003>
<DIV><FONT face=Arial color=#0000ff size=2>[incoming]</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2>exten =>
s,1,Playback,welcome</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2>exten =>
s,2,Record,msgfile:gsm</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2>exten => h,1,<SPAN
class=919523913-04092003>System</SPAN>(<SPAN
class=919523913-04092003>/home/frank/</SPAN>callscript<SPAN
class=919523913-04092003>.pl</SPAN>)</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=919523913-04092003><FONT face=Arial color=#0000ff size=2>as
sample ... :-)</FONT></SPAN></DIV>
<DIV><SPAN class=919523913-04092003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=919523913-04092003><FONT face=Arial color=#0000ff
size=2>Regards,</FONT></SPAN></DIV>
<DIV><SPAN class=919523913-04092003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=919523913-04092003><FONT face=Arial color=#0000ff
size=2>Thomas.</FONT></SPAN></DIV></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Ursprüngliche Nachricht-----<BR><B>Von:</B>
asterisk-users-admin@lists.digium.com
[mailto:asterisk-users-admin@lists.digium.com]<B>Im Auftrag von </B>Frank
N.<BR><B>Gesendet:</B> Donnerstag, 4. September 2003 14:54<BR><B>An:</B>
asterisk-users@lists.digium.com<BR><B>Betreff:</B> [Asterisk-Users] Call
script after hangup<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Beginner: How can a script be called after a
calling user hangup?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>What's wrong with this:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>[incoming]</FONT></DIV>
<DIV><FONT face=Arial size=2>exten => s,1,Playback,welcome</FONT></DIV>
<DIV><FONT face=Arial size=2>exten => s,2,Record,msgfile:gsm</FONT></DIV>
<DIV><FONT face=Arial size=2>exten =>
h,1,Goto(callscript,1,1)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>[callscript]</FONT></DIV>
<DIV><FONT face=Arial size=2>exten => 1,1,Wait,5</FONT></DIV>
<DIV><FONT face=Arial size=2>exten =>
1,2,System("SomeScript")</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thank
you</FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></FONT></DIV></FONT></DIV></BODY></HTML>