A
A
Alexander2015-02-20 12:26:20
Asterisk
Alexander, 2015-02-20 12:26:20

What variable does asterisk have when determining the caller's number?

There is a macro in asterisk,

exten => 123456,1,Set(fname=${STRFTIME(${EPOCH},,%H%M)}-${CALLERID(number)}-${EXTEN})

which creates for us the parameters of the file name in which the call will be written. The file format is as follows:
hours-minutes-number from which the call was made-number to which they called.wav
Question - how to put the parameter "internal phone number that received the call" into the name of this file? (${DIALEDPEERNUMBER} returns empty)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Armenian Radio, 2015-02-20
@gbg

You need to study this in your extensions.conf, because, apparently, after that, the number gets somewhere, where the internal number is already selected by $ {EXTEN}, which means that at the time the recording starts, this number is naturally unknown.

V
Vladimir, 2015-02-20
@rostel

  1. you should not name the call recording files based on the number of the person who received the call, because at the time of the formation of the file name, it may often be unknown who will answer;
  2. for app_queue answering at ${CHANNEL(Name)} calling at ${CONNECTEDLINE(number)};
  3. for app_dial, you can peep by calling DumpChan in a macro or sub (see the M and U parameters of app_dial), perhaps they will be the same as for app_queue.

D
Dima Petrov, 2018-09-18
@sajor2006

here it is described how to get the number from the headers
https://tech.iprock.com/?p=17039
here${CUT(CUT(SIP_HEADER(To),@,1),:,2)}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question