Calling email solution

Hi All,

Could anyone help me with this problem: currently i want to setup my Asterisk Box to automatically send an email to my appointed “master” email account when there is a call to any registered extension (all IAX) no matter the call has successfully answered/rejected/busy/redirect or goto voice mail.

Currently as i know the voice mail will automatically send a notification mail when there is a new message, but i couldn’t find any Ast Application for email manipulation.

I kinda of need this ability for management reasons, therefore could anyone suggest a possible solution?

Thanks in advance.

Hi,

You can use the system command in your dialplan, that sends command to the linux machine. In the system you can use a text-based mtc, i know there is more than one for linux, and sends email for any call. That’s a basic idea, than you can work around to tune it. Google a bit around about the system command and its option.

cheers
smaikol

Thanks Smaikol.

Now i run a little test by myself. For example, i have a macro:

exten=s,1,Dial(${ARG2},20)
exten=s,n,System(echo "A call for ${ARG1} has status ${DIALSTATUS}" > /tmp/${EXTEN}.txt)
exten=s,n,Goto(s-${DIALSTATUS},1)
exten=s-NOANSWER,1,Voicemail(${ARG1},u)
exten=s-NOANSWER,2,Goto(default,s,1)
exten=s-BUSY,1,Voicemail(${ARG1},b)
exten=s-BUSY,2,Goto(default,s,1)
exten=s-CANCEL,1,Playback(vm-goodbye)
exten=s-CANCEL,2,Goto(default,s,1)
......

Now this plan has never been executed (no txt file created after call):

exten=s,n,System(echo "A call for ${ARG1} has status ${DIALSTATUS}" > /tmp/${EXTEN}.txt)

I did the same stuff without macro and its work fine.

Any suggestion on this problem?

Thanks in advance.[/code]