1 like 0 dislike
1.2k views
in Computers & Internet by (30 points)

How Can we execute a Agi script after hangup ,Actually i am using queue with local channel, I m trying with "h,1,AGI()".but it is executing two times after hangup but i want to execute it one time after hangup of both channels

by
0 0
Pastillas Cytotec Donde Las Venden  [url=http://ordercheapvia.com]******[/url] Ciprofloxacin Generic Doryx Website Discount On Line Cialis Pas Cher Internet

2 Answers

0 like 0 dislike
by (1.4k points)

You can simply do like this

exten => _X.,1,Answer
exten => _X.,2,Set(CDR(accountcode}=CODE123)
exten => _X.,3,Hangup()
exten => h,n,AGI(any.php,${UNIQUEID})

Or you can write your code here for further assistance..

Thanks..

by (30 points)
0 0
Thanks for Reply..
Your dialplan is absolute fine for single number but i want to use it in queue as you know that if we used queue with local channels(outside mobile numbers) it takes two channel for a single call so. on the hangup two channels goes down then h extension is executing two times..but i want to execute it one time after hangup of both channel.
by (1.4k points)
0 0
are you bridging the 2 calls?
by (30 points)
0 0
yes i m bridging the incoming call to executives.
by (30 points)
0 0
exten => _X.,1,Answer();
exten => _X.,2,Queue(test);
exten => _X.,3,Hangup();

[test]

member => local/[email protected];
member => local/[email protected];
by (1.4k points)
0 0
so where r u writing ur AGI..in queues.conf?
by (30 points)
0 0
Actually i want to send a  sms to caller and executive.So i want to execute AGI file after hangup..

   
exten => _X.,1,Answer();
exten => _X.,2,Queue(test);
exten => _X.,3,Hangup();

exten => h,1,AGI(abcd.php);
by (1.4k points)
0 0
As what I am seeing in your Queue "test" you have defined member and I guess you cannot do bridging like this....
by (1.4k points)
0 0
I can suggest you one thing as I have done the same thing you can do by callfile in asterisk..and send sms by AGI which will run only 1 time
by (30 points)
0 0
Hello Sam,
Can you give me a example for it?

Thanks
0 like 0 dislike
by (1.4k points)
reshown by

I can suggest you one thing as I have done the same thing you can do by callfile in asterisk..and send sms by AGI which will run only 1 time

by (30 points)
0 0
Sam,
Can you give me an example for it.

Thanks
by (1.4k points)
0 0
by (30 points)
0 0
I think callfile concept not suitable for my project.

thanks sam
by (1.4k points)
0 0
the same concept I had already implemented with sms...and it will work..you need to create a callfile from PHP and other leg was generated in extensions.conf and after that call will bridge and you can call AGI for sending SMS...

Related questions

0 like 0 dislike
1 answer 163 views
1 like 0 dislike
1 answer 808 views
1 like 0 dislike
1 answer 366 views
0 like 0 dislike
1 answer 2.2k views
1 like 0 dislike
1 answer 255 views
0 like 0 dislike
1 answer 526 views

Where your donation goes
Technology: We will utilize your donation for development, server maintenance and bandwidth management, etc for our site.

Employee and Projects: We have only 15 employees. They are involved in a wide sort of project works. Your valuable donation will definitely boost their work efficiency.

How can I earn points?
Awarded a Best Answer 10 points
Answer questions 10 points
Asking Question -20 points

...