Auto-Attendant Script

Hi,

I´m new on Asterisk, but I started to learn it because I need a Auto-Attendant for my little company (it´s just me), so, when I´m not on office, the call is redirect to my cell phone. But, sometimes I´m on meetings and can´t answer the phone, so, I want to know the caller name and phone to I call back when possible.

The bad thing is if I don´t answer the phone, just few people leave a message to I return, so I think in create a script like this:

  1. Asteriks IVR says: “Good Morning, how can I help you ?” (Plays a pre-recorded WAV)
  2. Caller says something and Asterisk records what caller is saying
  3. Asteriks IVR says: “I´ll redirect your call soon, but, before that, please, tell me your name and phone ?”(Plays a pre-recorded WAV)
  4. Caller says something and Asterisk records what caller is saying
  5. Asteriks IVR says: “Thanks, I´ll redirect your call now” (Plays a pre-recorded WAV)
  6. Try to redirect to my cellphone

If I Answer

7.1 I answer the phone and before Asterisk connect me with the caller, Asterisk plays the records 2 and 4
7.1.2 Asterisk connect me with the caller and I talk to him

If I do not Answer

7.2 Asterisk says to caller "Ooh, the department is busy right now, but don´t worry, I already give your name and phone to them and they will call you back as soon as they can"
7.2.1 Asterisk send me a email with the records 2 and 4. 

Is it possible ?
How can I start configurate something like that ?

Thanks,
Renato F Ferreira

Probably.

Read asteriskdocs.org/ and extensions.conf.sample.

Pay particular attention to the subroutine and goto options of the Dial application.

This context records the calls and then sends you an email with the path of the recordings and also the file , if you have a web server like in my case you also can listening the recordings through the your-server-ip/${FECHA}.wav. This is not exactly what you want , but at least you can use part of the code

[recording]
exten=>s,1,Verbose(recording calls from the caller ${CALLERID(num)} )
same=>n,Set(FECHA=${STRFTIME(${EPOCH},%Y-%m-%d_%H-%M-%S)}_${CALLERID(num)})
same=>n,Playback(beep)
same=>n,MixMonitor(/var/www/${FECHA}.wav)
same=>n,Set(TIMEOUT(absolute)=90)
same=>n,Wait(90)
exten=>h,1,System(/usr/bin/mpack -s “Asterisk Dominicana ${FECHA}” /var/www/${FECHA}.wav ambiorixg12@hotmail.com,ambiorixg12@gmail.com)

Thanks david55 and ambiorixg12, I´ll try create the script, if I make work, I´ll post the answer here.

Thanks