Hangup extension inside macro

Hi guys,

i’m trying to implent missed calls email. I used this script:

theschmandts.org/blog/email- … n-asterisk

My macro looks like this:

[code][macro-simple]
exten => s,1,Dial(${ARG1},30)
exten => s,n,Goto(s-${DIALSTATUS},1)

exten => s-NOANSWER,1,VoiceMail(${ARG2},u)
exten => s-BUSY,1,VoiceMail(${ARG2},b)"
exten => _s-.,1,Goto(s-NOANSWER,1)
exten => h,1,System(/bin/sh /usr/local/share/asterisk/agi-bin/processCallEmail.sh “${ARG3}” “${CALLERID(num)}” “${CALLERID(name)}” “${DIALSTATUS}” “${VMSTATUS}”)[/code]

ARG1=Device
ARG2=Extension
ARG3=E-Mail Address

My problem is, that the hangup extension is totaly ignored by my asterisk. I’ve set devug and verbose to 5, but the hangup extension was never called.

I’m running Asterisk 1.8.8.1 on FreeBSD 8.1-RELEASE-p13.

Any ideas?