I have an Asterisk server running where a lot of people will call on in the future.
Is it possible to configure the server that if the caller doesn't press a number (or * and #) on his phone for like 10 minutes it automatically hangs up?
Thanks for your help and best regards
I am not aware of any builtin functionality which would adresses your usecase.
There is the parameter L() of the Dial application which allows to limit the call duration and plays announcements before the limit is reached.
But that does not fit your usecase.
I expect you have to write a custom application which listens on the manager interface and track incoming calls and Events to hangup the channels by yourself...
You can use:
s,n,ResponseTimeout(600)
Or:
s,n,Set(TIMEOUT(response)=600)
Then add an extension to the dial plan to hang up the call:
t,1,Hangup()
You have two options.
1) use TIMEOUT(response). This one is exactly for your case, but not work for some dialplan.
2) Use TIMEOUT(absolute) and update it after any new input. This work for any dialplan, but it absolute(i.e will hangup even if you have input).
http://www.voip-info.org/wiki/view/Asterisk+func+timeout
Related
I am using Queues to handle incoming calls which works pretty well.
What I would like to do now is to get the info which extensions has answered a call in "sub-queue-answer" context of extensions_custom.conf to hand over this information via CURL to another - e.g. CRM-server via:
exten => s,n,Set(foo=${CURL(https://hostname/voipcr.php?device=pbx1.xxx\&agent=${???}...)})
anyone any idea which variable can be set in the spaceholder of the three ??? to hand over the extension number of the agent who has answered that call?
i usually use ${CUT(DIALEDPEERNUMBER,#,1)}
You can not do that using extensions. Queues are sending calls to users without passing through the dialplan (a queue will call a agent directly).
To access data about who answered the call (and also when that happened) you need to listen for the AgentConnect event on Asterisk Manager Interface. As you can see in the documentation, the AgentConnect event will pass a lot of properties that you can parse, to extract the information you need. Probably you want to check MemberName and Interface properties, but that is subject to your particular setup.
Queue logs / CDR will help you only if you want to send the data after the call has been completed, but, to do that, you probably need to create a pooling system (an undesirable solution, from my point of view).
I have an asterisk pbx server. I’m new to asterisk, I know there are dial plans extensions groups etc.
My goal is to handle a dial event do some checks then decide whether to let the call go through or not.
I read about ARI AGI AMI and dial plan but I got confused and don’t know how to proceed.
I just want to execute code (call an API for example) when any number is dialed, and drop the call or let it through according to that.
I know if I do more research I can get something working, but honestly I don’t have time. I just need to know where to look.
So I solved it. In case anyone needs this, here's what I did.
I used AsterNET fastAGI and created my service script, which does whatever checks I need and calls HangUp() when needed, else just returns and lets the call go through.
Then I called the fastAGI script in the dial plan and it's working perfectly.
Is it possible to use ARI to determine if a queue member is paused or not? I can't seem to find any documentation stating that its possible. The only way I can see anything related to a pause is by manually dialing *46 and watching the WebSocket events stream the DeviceStateChange.
Correct way is look for queue_log events. If you put queue_log into mysql it become trivial task.
You also can do queue_status
https://www.voip-info.org/asterisk-manager-api-action-queuestatus
I`m trying to build a script that will capture the credit card info like card number,cvc and expiration date using asterisk 11.x and asterisk-java library for AMI/AGI integration.
Right now I am able to build a script that will acquire that info if it is called via dialplan but i have a different scenario:
1. A call enters a queue.
2. An agent from the specific queue answer the call
3. The caller wants to input the card details
4. After the caller has entered the card details is redirected back to agent to continue the call.
My specific problem is related to step 3 as I do not know how to route the caller to my AGI and then back to the same agent. (eventually the agents has to be still involved in (some) call to guarantee that when the caller returns from agi it is still available)
Any idea how can I achieve that ? I know that this is a common practice so I think that there has to be a way.
When the call is delivered to the agent, use a macro to set a custom channel variable with the agent ID or extension in it.
Then, when your credit-card authentication function is done, read the variable and use an AGI command to transfer the call back to the agent.
Further Reading
http://www.voip-info.org/wiki/view/Asterisk+variables
http://www.voip-info.org/wiki/view/Asterisk+manager+Example:+Transfer
Note if this solution solves your problem, please 'accept' it to make it easier for others with the same issue to find it. thanks!
There are no any common practice for business process like you have. That depend of you and your client only.
You can use features conf or transfer. Can transfer to special extension or to conference room.
No way say what suite you better.
For sure you need understand how asterisk work before write any AGI/AMI or dialplan application. I can recommend ORelly's "Asterisk the future of telephony" book as start point.
I am new to Asterisk and Voip. I wanted to accomplish a following small thing using Asterisk.
Description
Asterisk is used as server
Several Voip clients. (Two types of clients possible. One which can start a conference call, other can't call but can only hear.) Only caller client can start/end this call.
The call can't be longer then a particular time.
Is it possible through Asterisk. How does asterisk help to implement this scenario. What does I need to learn? Any web links will be very helpful.
Thanks
You can do all that with Asterisk and ConfBridge:
http://www.voip-info.org/wiki/view/Asterisk+cmd+ConfBridge
Use the following options to accomplish your objectives:
'A' — Set marked mode
'm' — Set initially muted.
'w' — Wait until the marked user enters the conference
You can use another dial plan function: TIMEOUT(absolute) to limit the conference duration.
To start I would look at the examples in the above link.