Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Question on DeadAGI


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
nhadie.ramos at yahoo.com
Guest





PostPosted: Fri Jun 06, 2008 6:25 pm    Post subject: [asterisk-users] Question on DeadAGI Reply with quote

Hi,

How can i get the deadAGI to work at this scenario

Basically when someonc calls international,  i will get the remaining balance using AGI get-available.php.

but after the call i would like to get the usage by calling get-usage.php so i can update users balance, but looking at the debug it seems the AGI was not called. is there som

exten => _00.,1,AGI(get-available.php)
exten => _00.,n,GotoIf($["${CALLSTATUS}" = "1"]?70)
exten => _00.,n,GotoIf($["${CALLSTATUS}" = "2"]?80)
exten => _00.,70,Dial(SIP/${EXTEN}@sb-trunk)
exten => _00.,n,Hangup
exten => _00.,n,DEADAGI(get-usage.php)
exten => _00.,80,Busy
exten => _00.,n,Hangup
Regards,
Nhadie




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080606/111abd18/attachment.htm
Back to top
kevin.smith at mercury...
Guest





PostPosted: Fri Jun 06, 2008 7:14 pm    Post subject: [asterisk-users] Question on DeadAGI Reply with quote

I have always had problems getting the script to run during an active
channel through hang up with DeadAGI. I found it best just to use it on
the hang up extension like below: Maybe that is how it is supposed to be
run, but from what I have read and you have, I don't see any flaws.

exten => h,1,DeadAGI(get-usage.php)

Another thing I do is I put a simple verbose statement letting me know
that the script was called, or entered some part of execution.

Kevin


Nhadie Ramos wrote:
Quote:
Hi,

How can i get the deadAGI to work at this scenario

Basically when someonc calls international, i will get the remaining
balance using AGI get-available.php.

but after the call i would like to get the usage by calling
get-usage.php so i can update users balance, but looking at the debug
it seems the AGI was not called. is there som

exten => _00.,1,AGI(get-available.php)
exten => _00.,n,GotoIf($["${CALLSTATUS}" = "1"]?70)
exten => _00.,n,GotoIf($["${CALLSTATUS}" = "2"]?80)
exten => _00.,70,Dial(SIP/${EXTEN}@sb-trunk)
exten => _00.,n,Hangup
exten => _00.,n,DEADAGI(get-usage.php)
exten => _00.,80,Busy
exten => _00.,n,Hangup


Regards,
Nhadie


------------------------------------------------------------------------

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users


--
Kevin Smith

---
Mercury Network
Technical Support
Phone: 989.837.3790
Toll Free: 888.866.4638
www.mercury.net
Back to top
lenz-ml at loway.it
Guest





PostPosted: Sat Jun 07, 2008 7:50 am    Post subject: [asterisk-users] Question on DeadAGI Reply with quote

You should use it on the hang-up extension and only after the channel is
technically dead.
It works fine for that.
l.


On Sat, 07 Jun 2008 01:25:37 +0200, Nhadie Ramos <nhadie.ramos at yahoo.com>
wrote:

Quote:
Hi,

How can i get the deadAGI to work at this scenario

Basically when someonc calls international,&nbsp; i will get the
remaining balance using AGI get-available.php.

but after the call i would like to get the usage by calling
get-usage.php so i can update users balance, but looking at the debug it
seems the AGI was not called. is there som

exten =&gt; _00.,1,AGI(get-available.php)
exten =&gt; _00.,n,GotoIf($["${CALLSTATUS}" = "1"]?70)
exten =&gt; _00.,n,GotoIf($["${CALLSTATUS}" = "2"]?80)
exten =&gt; _00.,70,Dial(SIP/${EXTEN}@sb-trunk)
exten =&gt; _00.,n,Hangup
exten =&gt; _00.,n,DEADAGI(get-usage.php)
exten =&gt; _00.,80,Busy
exten =&gt; _00.,n,Hangup


Regards,
Nhadie






--
Loway Research - Home of QueueMetrics
http://queuemetrics.com
Back to top
nhadie.ramos at yahoo.com
Guest





PostPosted: Sat Jun 07, 2008 4:55 pm    Post subject: [asterisk-users] Question on DeadAGI Reply with quote

Hi sir,

i'm sorry but how can i use it on a hangup channel?

&gt;&gt; exten =&amp;gt; _00.,1,AGI(get-available.php)
&gt;&gt; exten =&amp;gt; _00.,n,GotoIf($["${CALLSTATUS}" = "1"]?70)
&gt;&gt; exten =&amp;gt; _00.,n,GotoIf($["${CALLSTATUS}" = "2"]?80)
&gt;&gt; exten =&amp;gt; _00.,70,Dial(SIP/${EXTEN}@sb-trunk)
&gt;&gt; exten =&amp;gt; _00.,n,Hangup
&gt;&gt; exten =&amp;gt; h,n,DEADAGI(get-usage.php)&nbsp;&nbsp; &lt;-------should i do it like this?
&gt;&gt; exten =&amp;gt; _00.,80,Busy
&gt;&gt; exten =&amp;gt; _00.,n,Hangup

thank you
--- On Sat, 6/7/08, Lenz &lt;lenz-ml at loway.it&gt; wrote:
From: Lenz &lt;lenz-ml at loway.it&gt;
Subject: Re: [asterisk-users] Question on DeadAGI
To: "Asterisk Users Mailing List - Non-Commercial Discussion" &lt;asterisk-users at lists.digium.com&gt;
Date: Saturday, June 7, 2008, 12:50 PM

You should use it on the hang-up extension and only after the channel is
technically dead.
It works fine for that.
l.




On Sat, 07 Jun 2008 01:25:37 +0200, Nhadie Ramos &lt;nhadie.ramos at yahoo.com&gt;

wrote:

&gt; Hi,
&gt;
&gt; How can i get the deadAGI to work at this scenario
&gt;
&gt; Basically when someonc calls international,&amp;nbsp; i will get the
&gt; remaining balance using AGI get-available.php.
&gt;
&gt; but after the call i would like to get the usage by calling
&gt; get-usage.php so i can update users balance, but looking at the debug it
&gt; seems the AGI was not called. is there som
&gt;
&gt; exten =&amp;gt; _00.,1,AGI(get-available.php)
&gt; exten =&amp;gt; _00.,n,GotoIf($["${CALLSTATUS}" =
"1"]?70)
&gt; exten =&amp;gt; _00.,n,GotoIf($["${CALLSTATUS}" =
"2"]?80)
&gt; exten =&amp;gt; _00.,70,Dial(SIP/${EXTEN}@sb-trunk)
&gt; exten =&amp;gt; _00.,n,Hangup
&gt; exten =&amp;gt; _00.,n,DEADAGI(get-usage.php)
&gt; exten =&amp;gt; _00.,80,Busy
&gt; exten =&amp;gt; _00.,n,Hangup
&gt;
&gt;
&gt; Regards,
&gt; Nhadie
&gt;
&gt;
&gt;



--
Loway Research - Home of QueueMetrics
http://queuemetrics.com

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080607/fb858e1c/attachment.htm
Back to top
nhadie.ramos at yahoo.com
Guest





PostPosted: Sat Jun 07, 2008 5:39 pm    Post subject: [asterisk-users] Question on DeadAGI Reply with quote

Hi Sir,

I tried it this way, and now i can see my DEADGI being called next prob is on&nbsp; that script i query the cdr table with the uniqueid. tried counting the row result first , and result was 0.

how can i make sure that it was already at the CDR table before i call my agi? i tried to use ResetCDR() and also without ResetCDR() but still 0 result on the row.

but when i query manully on the mysql console, i can see the cll was logged.

Thank You
[macro-dialout-trunk]
exten =&gt; s,1,Wait(1)
exten =&gt; s,n,Dial(SIP/${ARG1}@${ARG2},30,t)
exten =&gt; s,n.ResetCDR()
exten =&gt; s,n,Hangup
exten =&gt; h,1,DEADAGI(get-total.php)
--- On Sat, 6/7/08, Lenz &lt;lenz-ml at loway.it&gt; wrote:
From: Lenz &lt;lenz-ml at loway.it&gt;
Subject: Re: [asterisk-users] Question on DeadAGI
To: "Asterisk Users Mailing List - Non-Commercial Discussion" &lt;asterisk-users at lists.digium.com&gt;
Date: Saturday, June 7, 2008, 12:50 PM

You should use it on the hang-up extension and only after the channel is
technically dead.
It works fine for that.
l.




On Sat, 07 Jun 2008 01:25:37 +0200, Nhadie Ramos &lt;nhadie.ramos at yahoo.com&gt;

wrote:

&gt; Hi,
&gt;
&gt; How can i get the deadAGI to work at this scenario
&gt;
&gt; Basically when someonc calls international,&amp;nbsp; i will get the
&gt; remaining balance using AGI get-available.php.
&gt;
&gt; but after the call i would like to get the usage by calling
&gt; get-usage.php so i can update users balance, but looking at the debug it
&gt; seems the AGI was not called. is there som
&gt;
&gt; exten =&amp;gt; _00.,1,AGI(get-available.php)
&gt; exten =&amp;gt; _00.,n,GotoIf($["${CALLSTATUS}" =
"1"]?70)
&gt; exten =&amp;gt; _00.,n,GotoIf($["${CALLSTATUS}" =
"2"]?80)
&gt; exten =&amp;gt; _00.,70,Dial(SIP/${EXTEN}@sb-trunk)
&gt; exten =&amp;gt; _00.,n,Hangup
&gt; exten =&amp;gt; _00.,n,DEADAGI(get-usage.php)
&gt; exten =&amp;gt; _00.,80,Busy
&gt; exten =&amp;gt; _00.,n,Hangup
&gt;
&gt;
&gt; Regards,
&gt; Nhadie
&gt;
&gt;
&gt;



--
Loway Research - Home of QueueMetrics
http://queuemetrics.com

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080607/d2338eac/attachment.htm
Back to top
nhadie.ramos at yahoo.com
Guest





PostPosted: Sat Jun 07, 2008 5:52 pm    Post subject: [asterisk-users] Question on DeadAGI Reply with quote

Thanks to all the help. I think i have it now. I reset the CDR on the hangup channel.

[macro-dialout-trunk]

exten =&gt; s,1,Wait(1)

exten =&gt; s,n,Dial(SIP/${ARG1}@${ARG2},30,t)

exten =&gt; s,n,Hangup()

exten =&gt; h,1,ResetCDR(w)

exten =&gt; h,n,NoCDR()

exten =&gt; h,n,DEADAGI(get-total.php)

AGI Rx &lt;&lt; EXEC Noop ROWCOUNT=1
&nbsp;&nbsp;&nbsp; -- AGI Script Executing Application: (Noop) Options: (ROWCOUNT=1)
AGI Tx &gt;&gt; 200 result=0
AGI Rx &lt;&lt; EXEC Noop BILLSEC=21
&nbsp;&nbsp;&nbsp; -- AGI Script Executing Application: (Noop) Options: (BILLSEC=21)

now i can see my billsec. thanks again for all the help.

regards,
nhadie
--- On Sat, 6/7/08, Nhadie Ramos &lt;nhadie.ramos at yahoo.com&gt; wrote:
From: Nhadie Ramos &lt;nhadie.ramos at yahoo.com&gt;
Subject: Re: [asterisk-users] Question on DeadAGI
To: "Asterisk Users Mailing List - Non-Commercial Discussion" &lt;asterisk-users at lists.digium.com&gt;
Date: Saturday, June 7, 2008, 10:39 PM

Hi Sir,

I tried it this way, and now i can see my DEADGI being called next prob is on&nbsp; that script i query the cdr table with the uniqueid. tried counting the row result first , and result was 0.

how can i make sure that it was already at the CDR table before i call my agi? i tried to use ResetCDR() and also without ResetCDR() but still 0 result on the row.

but when i query manully on the mysql console, i can see the cll was logged.

Thank You
[macro-dialout-trunk]
exten =&gt; s,1,Wait(1)
exten =&gt; s,n,Dial(SIP/${ARG1}@${ARG2},30,t)
exten =&gt; s,n.ResetCDR()
exten =&gt; s,n,Hangup
exten =&gt; h,1,DEADAGI(get-total.php)


--- On Sat, 6/7/08, Lenz
&lt;lenz-ml at loway.it&gt; wrote:
From: Lenz &lt;lenz-ml at loway.it&gt;
Subject: Re: [asterisk-users] Question on DeadAGI
To: "Asterisk Users Mailing List - Non-Commercial Discussion" &lt;asterisk-users at lists.digium.com&gt;
Date: Saturday, June 7, 2008, 12:50 PM

You should use it on the hang-up extension and only after the channel is
technically dead.
It works fine for that.
l.




On Sat, 07 Jun 2008 01:25:37 +0200, Nhadie Ramos &lt;nhadie.ramos at yahoo.com&gt;

wrote:

&gt; Hi,
&gt;
&gt; How can i get the deadAGI to work at this scenario
&gt;
&gt; Basically when someonc calls international,&amp;nbsp; i will get the
&gt; remaining balance using AGI get-available.php.
&gt;
&gt; but after the call i would like to get the usage by calling
&gt; get-usage.php so i
can update users balance, but looking at the debug it
&gt; seems the AGI was not called. is there som
&gt;
&gt; exten =&amp;gt; _00.,1,AGI(get-available.php)
&gt; exten =&amp;gt; _00.,n,GotoIf($["${CALLSTATUS}" =
"1"]?70)
&gt; exten =&amp;gt; _00.,n,GotoIf($["${CALLSTATUS}" =
"2"]?80)
&gt; exten =&amp;gt; _00.,70,Dial(SIP/${EXTEN}@sb-trunk)
&gt; exten =&amp;gt; _00.,n,Hangup
&gt; exten =&amp;gt; _00.,n,DEADAGI(get-usage.php)
&gt; exten =&amp;gt; _00.,80,Busy
&gt; exten =&amp;gt; _00.,n,Hangup
&gt;
&gt;
&gt; Regards,
&gt; Nhadie
&gt;
&gt;
&gt;



--
Loway Research - Home of QueueMetrics
http://queuemetrics.com

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:

http://lists.digium.com/mailman/listinfo/asterisk-users


_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080607/eedb1689/attachment.htm
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services