[Asterisk-Users] Callback
daniel schirrmacher
daschi at gmx.net
Sun Oct 3 10:13:23 MST 2004
Hi Steve,
I'm using * for the same purpose you want to use it for! I'm calling *
(connected to an ISDN pots line) from my cell phone and it call's me back.
Maybe it's helpfull for you to read my agi (just a simple bash shell script)
and configs.
Bye Daniel
simplified extensions.conf:
###beginning###
[default]
exten => s,1,Wait,1
exten => s,2,AGI(callback.agi)
exten => s,3,Hangup
[menu]
... whatever * should do here ...
###end###
Next thing is the configuration file for the shell script doing the callback
(file: /etc/asterisk/callback.conf)
###beginning###
MSN=YOUR_OUTGOING_MSN
INCOMINGMSN=YOUR_INCOMING_MSN
HANDY=YOUR_MOBILE_NO
###end###
End finally the callback application
file: .../agi-bin/callback
###beginning###
#!/bin/bash
src=`grep "^MSN=" /etc/asterisk/callback.conf | sed -e 's/MSN=//g'`
destination=`grep "^HANDY=" /etc/asterisk/callback.conf | sed -e
's/HANDY=//g'`
callpath="/var/spool/asterisk/outgoing/"
callfile=$callpath"call`date +%Y%m%d_%H%M%S`"
date=`date +%Y%m%d-%H%M%S`" > "
logfile=/var/log/asterisk/full
sleep 5
echo $date"new call" >> $logfile
echo $callfile >> $logfile
i=0
read -a name
while [ "${name[0]}" != "agi_callerid:" ]
do
read -a name
i=`expr $i + 1`
if [ $i -ge 20 ] ; then
break
fi
done
if [ ${name[0]} = "agi_callerid:" ] ; then
callerid=${name[1]}
echo $date"incoming call from: $callerid " >> $logfile
fi
call2=$callerid
if [ ${callerid:0:1} = "0" ] ; then
call2=${callerid:1}
fi
testvar=`echo $destination | grep $call2`
echo \"$testvar\" >> /var/log/asterisk/caller
if [ -n "$testvar" ] ; then
echo $date"callback to $callerid" >> $logfile
echo "Channel: CAPI/$src:$callerid" > $callfile
echo "Context: menu" >> $callfile
echo "Extension: $src" >> $callfile
echo "SetVar: CALLERIDNUM=$src" >> $callfile
echo "MaxRetries: 2" >> $callfile
echo "RetryTime: 10 " >> $callfile
fi
echo $date"end of entry" >> $logfile
###end###
---- that's all ;-) ----
> I am not really sure what to do with this. I extracted the file and put
> it
> in the agi-bin directory and updated my extensions.conf to call the app
> but
> it says " pbx.c:1285 pbx_extension_helper: No application 'Callback' for
> extension"
>
> Any ideas?
>
> Thanks,
> Steve
>
> ----- Original Message -----
> From: "Administrator" <admin at xvoip.com>
> To: "Asterisk Users Mailing List - Non-Commercial Discussion"
> <asterisk-users at lists.digium.com>
> Sent: Saturday, October 02, 2004 1:53 PM
> Subject: Re: [Asterisk-Users] Callback
>
>
> > Steve,
> >
> > Take a look at : http://bugs.digium.com/bug_view_page.php?bug_id=0002533
> >
> > I didn;t tried it, but I think this is what you need, if you can;t write
> > in AGI. Please let me know results, I want to test this today too.
> >
> >
> > Visit Asterisk Unofficial Forums at : http://asterisk.xvoip.com
> >
> >
> >
> >
> > -----Original Message-----
> > From: "Steve Totaro" <asterisk at totarotechnologies.com>
> > To: "Asterisk Users Mailing List - Non-Commercial Discussion" <asterisk-
> > users at lists.digium.com>
> > Date: Sat, 2 Oct 2004 13:31:51 -0400
> > Subject: Re: [Asterisk-Users] Callback
> >
> > > Jeremy,
> > >
> > > I am new to AGI and do not see anything about callback listed in the
> > > AGI
> > > section of voip-info.org. Is there a pre-existing AGI or do I have to
> > > create one.
> > >
> > > Thanks,
> > > Steve
> > > ----- Original Message -----
> > > From: "Jeremy McNamara" <jj at nufone.net>
> > > To: "Asterisk Users Mailing List - Non-Commercial Discussion"
> > > <asterisk-users at lists.digium.com>
> > > Sent: Saturday, October 02, 2004 12:16 PM
> > > Subject: Re: [Asterisk-Users] Callback
> > >
> > >
> > > > Steve Totaro wrote:
> > > >
> > > > > Hello all,
> > > > >
> > > > > I have a need to make * callback an phone number. I would like
> the
> > > > > callback to either be based on CID or a number inputted by the
> > > caller
> > > > > after say thirty seconds.
> > > > >
> > > > > Any clues?
> > > >
> > > >
> > > > AGI
> > > >
> > > >
> > > > Jeremy McNamara
> > > > _______________________________________________
> > > > Asterisk-Users mailing list
> > > > Asterisk-Users at lists.digium.com
> > > > http://lists.digium.com/mailman/listinfo/asterisk-users
> > > > To UNSUBSCRIBE or update options visit:
> > > > http://lists.digium.com/mailman/listinfo/asterisk-users
> > > >
> > >
> > > _______________________________________________
> > > Asterisk-Users mailing list
> > > Asterisk-Users at lists.digium.com
> > > http://lists.digium.com/mailman/listinfo/asterisk-users
> > > To UNSUBSCRIBE or update options visit:
> > > http://lists.digium.com/mailman/listinfo/asterisk-users
> >
> > _______________________________________________
> > Asterisk-Users mailing list
> > Asterisk-Users at lists.digium.com
> > http://lists.digium.com/mailman/listinfo/asterisk-users
> > To UNSUBSCRIBE or update options visit:
> > http://lists.digium.com/mailman/listinfo/asterisk-users
> >
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
--
+++ GMX DSL Premiumtarife 3 Monate gratis* + WLAN-Router 0,- EUR* +++
Clevere DSL-Nutzer wechseln jetzt zu GMX: http://www.gmx.net/de/go/dsl
More information about the asterisk-users
mailing list