Claim your Biolink Click Here
1 like 0 dislike
2.7k views

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

in Computers & Internet by (-50 points) | 2.7k views
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

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 (1.6k 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.
0 0
are you bridging the 2 calls?
0 0
yes i m bridging the incoming call to executives.
0 0
exten => _X.,1,Answer();
exten => _X.,2,Queue(test);
exten => _X.,3,Hangup();

[test]

member => local/XXXXXXXXXX@outgoing-extension;
member => local/YYYYYYYYYY@outgoing-extension;
0 0
so where r u writing ur AGI..in queues.conf?
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);
0 0
As what I am seeing in your Queue "test" you have defined member and I guess you cannot do bridging like this....
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
0 0
Hello Sam,
Can you give me a example for it?

Thanks
0 like 0 dislike

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 (1.6k points)
reshown by
0 0
Sam,
Can you give me an example for it.

Thanks
0 0
0 0
I think callfile concept not suitable for my project.

thanks sam
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
1 like 0 dislike
1 answer
1 like 0 dislike
1 answer
0 like 0 dislike
1 answer
1 like 0 dislike
1 answer
0 like 0 dislike
1 answer

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

1,310 questions
1,471 answers
569 comments
4,809 users