O
O
O. J2015-12-16 18:46:40
linux
O. J, 2015-12-16 18:46:40

Asterisk. How to get the number of the caller + the number of the operator who picked up the phone?

In general, there is the simplest extension of the following type

exten => s,1,Answer()
exten => s,n,Wait(5)
exten => s,n,Dial(SIP/100&SIP/101&SIP/102,25,mt(ss_moh))

The situation is an incoming call, one of the three operators is the first to answer the call.
How, at the moment of answering a call on the fly, to pull out the incoming number of the subscriber, and the internal number of the operator who answered the call?
And how to catch Hangup () after the call ends?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
D
Dmitry Chervonobab, 2015-12-24
@OrlovEvgeny

Christian, use the Queue() application. It has great options for you:
s - catches the caller's on-hook (continues the dialplan). You can, for example, use a standard MySQL() application to put the necessary channel variables into the base.
AGI or translation to Macro with the desired AGI - then in the script you catch the channel variables and put them in the base or use them at your discretion.

T
torr2009, 2015-12-16
@torr2009

And how to catch Hangup () after the call ends?
There is a special extension h for this.

F
fluffybear, 2015-12-16
@fluffybear

"Who in line took the call"
awsswa.livejournal.com/6172.html

S
Sergey, 2015-12-21
@goodcat32

And you can ask why you solve such a problem not by means of queues?
And where do you want to catch it all? In the console or in a log output?

M
mvlbrn, 2015-12-29
@mvlbrn

If it is necessary to use exactly Dial(), then the numbers can be caught in the macro when connecting (the M (x) parameter of the Dial command) and the termination can be caught in the h extension using the 'e' parameter of the Dial
command Description of the command - www.voip-info.org/ wiki/view/Asterisk+cmd+Dial

T
Taxist410, 2016-01-31
@Taksist410

This is easy to do on the operator's side if he has a "self-made" softphone written on the VoIP SDK (eg www.portsip.com/portsip-voip-sdk). Then all you ask is the events and event parameters of the softphone program.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question