LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   asterisk bounce call (https://www.linuxquestions.org/questions/linux-software-2/asterisk-bounce-call-937994/)

depam 04-03-2012 10:18 PM

asterisk bounce call
 
I have a Atcom IP04 IP PABX that runs Asterisk 1.4.21.2 and two trunks configured. I wanted to implement a bounce calling. In a normal scenario, you call the trunk, IVR answers and ask you for the number you wish to call. The call will then hangup and the 1st trunk will call you and once you answered, it will call the number that you have input in the IVR and bridge the call. I know this is possible but I need to have an example of a working context and how to do it. Does anyone have any idea? Thanks.

depam 04-06-2012 09:54 PM

I was able to do this using combination of call files and DISA.

exten = s,1,NoOp(CallBack)
exten = s,2,Playback(goodbye)
exten = s,3,System(echo "${CALLERID(num)}" > /persistent/etc/NumberToCall.txt)
exten = s,4,System(/persistent/etc/CallBack.sh)
exten = s,5,Hangup

I created a shell script that will create the call file and pass to /var/spool/asterisk/outgoing and it works perfecty

#/bin/sh
# This will auto-dial the caller and initiate a DISA call

NumberToCall=`cat /persistent/etc/NumberToCall.txt`
echo "Channel: SIP/$NumberToCall\\nContext: voicemenu-custom-6\\nExtension: 1" > /persistent/staging/CallBack.call

## Pass to Asterisk for processing
mv /persistent/staging/CallBack.call /var/spool/asterisk/outgoing

## Clear Call Files
cat /dev/null > /persistent/etc/NumberToCall.txt
cat /dev/null > /persistent/staging/CallBack.call


All times are GMT -5. The time now is 03:50 AM.