[Asterisk-Users] Call script after hangup

Dave Wilson dave at autosdirect2u.com
Thu Sep 4 07:24:23 MST 2003


Hey guys,

I've been trying to do something similar. Basically I want to call a script
with AGI every time a call is hungup, regardless of who hangs up. The
purpose of which is to record call end time and duration in another app.

is 'h' a reserved extension number for capturing hangups?

TIA,
Dave
  -----Original Message-----
  From: asterisk-users-admin at lists.digium.com
[mailto:asterisk-users-admin at lists.digium.com]On Behalf Of Thomas Haeger
  Sent: 04 September 2003 14:42
  To: asterisk-users at lists.digium.com
  Subject: AW: [Asterisk-Users] Call script after hangup


  Hi Frank,
  why you so complicated ?

  Try following:

  [incoming]
  exten => s,1,Playback,welcome
  exten => s,2,Record,msgfile:gsm
  exten => h,1,System(/home/frank/callscript.pl)

  as sample ... :-)

  Regards,

  Thomas.
    -----Ursprüngliche Nachricht-----
    Von: asterisk-users-admin at lists.digium.com
[mailto:asterisk-users-admin at lists.digium.com]Im Auftrag von Frank N.
    Gesendet: Donnerstag, 4. September 2003 14:54
    An: asterisk-users at lists.digium.com
    Betreff: [Asterisk-Users] Call script after hangup


    Beginner: How can a script be called after a calling user hangup?

    What's wrong with this:

    [incoming]
    exten => s,1,Playback,welcome
    exten => s,2,Record,msgfile:gsm
    exten => h,1,Goto(callscript,1,1)

    [callscript]
    exten => 1,1,Wait,5
    exten => 1,2,System("SomeScript")

    Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20030904/de2e0c4e/attachment.htm


More information about the asterisk-users mailing list