A
A
alexdora2016-06-07 22:17:29
Asterisk
alexdora, 2016-06-07 22:17:29

How to hold an incoming call until the subscriber connects?

There is an iPhone with the Bria program. She can work in the background and keep the connection to the server. But not satisfied with the battery consumption of 35% per day Bria sucks. The server has the latest ASTERISK + FreePBX
Task:
On an incoming call, make the following scheme:
1. Incoming call to the trunk
2. Pick up the phone
2. Run the command (in this case, I want to curl on the API of the sms.ru site to send an SMS to a mobile phone)
3. Response beep
4. Cycle of checking the asterisk ext subscriber for availability. If available, move on. If unavailable - do nothing
5. At the end of N seconds, transfer to voice mail or terminate the call
Points 1.2 yes, and 3.5 I know how to do. But how to make a cycle and a condition, I'm lost. A big request to help in the implementation. Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir, 2016-06-08
@rostel

the usual queue is suitable
and you can put it in the parking lot

D
Dmitry Shitskov, 2016-06-08
@Zarom

Rough version of solving a piece with a loop:

same => n(here),Dial(...)
same => n,Wait(5)
same => n,Goto(here)

Can be improved slightly by adding a limited number of iterations.
Also, the option proposed by Vladimir , with a queue of one member, will probably be more careful.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question