[Asterisk-Dev] Callingcard - almost done. Now extensions.conf
brian k. west
brian at bkw.org
Thu May 13 19:13:07 MST 2004
Show application dial
look at option L
bkw
----- Original Message -----
From: "Terence Parker" <terence at parker.com.hk>
To: <asterisk-dev at lists.digium.com>
Sent: Thursday, May 13, 2004 6:42 PM
Subject: [Asterisk-Dev] Callingcard - almost done. Now extensions.conf
> I'm finally done with the PHP side of my calling card app - works nicely,
> and quite highly configurable/flexible. I've just got a few questions
> regarding the actual 'payment deduction' process though.
>
> My extensions.conf (relevant part) is currently :
> (actual dial string is pseudo only... bits need chopping off)
>
> exten => _007.,1,Answer
> exten => _007.,2,agi,prepaid.php
> exten => _007.,3,SetVar(DIAL=${EXTEN})
> exten => _007.,4,SetVar(EXTEN=[9999])
> exten => _007.,5,Dial(SIP/${DIAL})
> exten => _007.,4,Hangup
>
> exten => T,1,Festival("Sorry - but you are out of credit. Your call will
be
> disconnected");
> exten => T,2,Hangup
>
> exten => h,1,agi,prepaid.php
> exten => h,2,Hangup
>
> - i'm sure though that this isn't the best way to do things. What I did
was
> assumed that upon hangup, my AGI would execute again sending the same
> variable information that is usually sent - except this time with the
> extension set to 9999. Can you even rewrite the extension like that? What
I
> have currently doesn't work - the PHP script doesn't appear to deduct any
> money from my account... perhaps it's not getting the extension as 9999,
or
> something else is wrong, but I just want to check.
>
> I would have thought a better way would be to create some variables as
part
> of the dial plan - but when the AGI is executed again, are these variables
I
> created passed to the PHP script too? Or just the standard bunch?
>
> Any better suggestions on how to achieve this final bit?
>
> Thanks,
>
> Terence
>
>
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
>
More information about the asterisk-dev
mailing list