Dial
Команда плана набора Asterisk "Dial"
Краткий обзор
Приложение Asterisk 'Dial', пытается установить соединение, одного устройства с другим.
Описание
Данное приложение направляет вызовы на один или несколько назначенных каналов.
Как только один из запрашиваемых каналов отвечает, происходит соединение. Эти два канала и составляют активное соединение. Вызовы на остальные запрашиваемые каналы прекращаются (hangup).
Если тайм-аут не назначен, вызов будет ждать бесконечно, пока кто-то из пользователей не произведет отбой, или все вызываемые каналы получат статус «занят» или «недоступен»(busy or unavailable).
Если ${OUTBOUND_GROUP}переменная установлена, все каналы созданные этим приложением будут группированы, как (Set(GROUP()=…).
При использовании переменной ${OUTBOUND_GROUP_ONCE}все каналы созданные этим приложением будут также сгруппированы, как (Set(GROUP()=…),
но в отличии от ${OUTBOUND_GROUP}, после использование значение не сохранится и будет удалено.
Приложение «Dial» также возвращает следующие переменные:
${DIALEDTIME}: Время с начала набора до разъединения вызова.
${ANSWEREDTIME}: Фактическое время соединения (разговора).
${DIALSTATUS}: Состояние вызова.
- CHANUNAVAIL
- CONGESTION
- NOANSWER
- BUSY
- ANSWER
- CANCEL
- DONTCALL: Для Privacy и Screening Modes. Будет установлен, если вызываемый абонент выбирает для отправки вызывающему абоненту сценария «Go Away».
- TORTURE: Для Privacy и Screening Modes. Будет установлен, если вызываемый абонент выбирает для отправки вызывающему абоненту сценария «Torture».
- INVALIDARGS
Синтаксис
Dial(Technology/Resource[&Technology2/Resource2[&…]][,timeout[,options[,URL]]])
Аргументы
Technology/Resource - Определение устройств для вызова в формате 'Technology/Resource', где <Technology> означает специфическую технологию драйвера канала, а <Resource> доступные для заданной технологии каналы.
- DAHDI/1 - Вызов устройства DAHDI.
- DAHDI/g0/${EXTEN} - Вызов через группу каналов DAHDI
- SIP/100 - Вызов SIPпира.
- PJSIP/${EXTEN}@pjsip_trunk - вызов через PJSIP транк.
- Local/100@from-internal - вызов через локальный прокси драйвер Asterisk.
Technology2/Resource2 - Параллельный вызов дополнительных устройств. Если требуется вызвать более одного устройства используйте синтаксис: Technology2/Resource2&Technology3/Resourse3&…..
timeout - Время подачи вызова на указанные устройства. Если не задано, время по умолчанию 136 лет.
exten => _1XXX,1,Dial(PJSIP/${EXTEN},60,)
Опции
- A(x): Воспроизведение голосового сообщения для вызывающей стороны. Где (х) звуковой файл.
exten => _1XXX,1,Dial(PJSIP/${EXTEN},60,A(demo-congrats))
- a: Ответить на вызов, вне зависимости от состояния вызываемого канала. Обычно ответ на вызовпроисходит, когда отвечает вызываемый канал, но иногда требуется ответить до того, как поднимут трубку. Например при использовании опций A() и M().
- b([[context^]exten^]priority[(arg1[^...][^argN])]): Перед началом исходящего вызова создается новый канал и выполняется GoSub. Gosub будет выполняться для каждого канала назначения.
[icoming] exten => _9981138,1,Dial(SIP/666&PJSIP/89219981138@siptrunk,,b(option-b,s,1)) [option-b] exten => s,1,Verbose(*option b*) exten => s,n,return
- B([[context^]exten^]priority[(arg1[^...][^argN])]): Выполнить переход, аналогичный GoSub до того, как будет вызван канал указанный в Technology/Resource
Таким образом, опция 'b' работает для нескольких каналов, перечисленных в Technology/Resource, 'B' - для одного.
- C: Не создавать запись детализированного отчета о звонках (CDR) для этого вызова.
- c: Если приложение Dial() отменяет этот вызов, всегда устанавливать HANGUPCAUSE в 'answered elsewhere'
- d: Позволяет вызывающему абоненту набрать одну цифру, во время ожидания ответа. Расширение должно быть назначено в текущем контексте ил и в контексте определенном переменной EXITCONTEXT.
- D([called][:calling[:progress]]): Отправить DTMFстроку набора, после ответа на вызов, но до того как каналы будут соединены.
DTMFможет быть отправлен как вызываемой стороне, так и вызывающей. Оба аргумента могут быть использованы отдельно. Если указан PROGRESS, его DTMFпосылается к вызываемой стороне сразу после получения сообщения PROGRESS message. (пример: использовать для автоматического донабора пин-кода в карточных системах).
- e: Выполнить расширение 'h' после завершения вызова.
- f([x]): If <x> is not provided, force the CallerID sent on a call-forward or deflection to the dialplan extension of this Dial() using a dialplan 'hint'. For example, some PSTNs do not allow CallerID to be set to anything other than the numbers assigned to you.
Если <x> задано, принудительно подставить значение в качестве CallerID.
- F(context,exten,priority) - Когда вызывающийабонент завершает вызов, переадресовать вызываемого абонента аналогично GoTo по указанному назначению и выполнить.
- F - если вызывающийабонент завершает вызов а параметры не заданы, перейти на 'n' следующий приоритет в текущем контексте.
- g - Когда вызов завершен вызываемойстороной (в отличии от опции F), выполнить следующий приоритет в текущем контексте.
- G - Если вызов отвечен, переадресовать вызывающую сторону на указанный приоритет(context,exten,priority), а вызываемую на указанный приоритет плюс 1.
- h - Разрешить вызывающейстороне послать сигнал завершения вызова DTMFкодом из features.conf.
- H - Разрешить вызываемойстороне послать сигнал завершения вызова DTMFкодом из features.conf.
- i - Asterisk will ignore any forwarding requests it may receive on this dial attempt.
- I - Asterisk will ignore any connected line update requests or any redirecting party update requests it may receive on this dial attempt.
- k - Allow the called party to enable parking of the call by sending the DTMF sequence defined for call parking in features.conf.
- K - Allow the calling party to enable parking of the call by sending the DTMF sequence defined for call parking in features.conf.
- L - Limit the call to x milliseconds. Play a warning when y milliseconds are left. Repeat the warning every z milliseconds until time expires.
This option is affected by the following variables:
LIMIT_PLAYAUDIO_CALLER - If set, this variable causes Asterisk to play the prompts to the caller.
YES default: (true)
NO
LIMIT_PLAYAUDIO_CALLEE - If set, this variable causes Asterisk to play the prompts to the callee.
YES
NO default: (true)
LIMIT_TIMEOUT_FILE - If specified, filename specifies the sound prompt to play when the timeout is reached. If not set, the time remaining will be announced.
FILENAME
LIMIT_CONNECT_FILE - If specified, filename specifies the sound prompt to play when the call begins. If not set, the time remaining will be announced.
FILENAME
LIMIT_WARNING_FILE - If specified, filename specifies the sound prompt to play as a warning when time x is reached. If not set, the time remaining will be announced.
FILENAME
x - Maximum call time, in milliseconds
y - Warning time, in milliseconds
z - Repeat time, in milliseconds
- m - Provide hold music to the calling party until a requested channel answers. A specific music on hold class (as defined in musiconhold.conf) can be specified.
class
- M - Execute the specified macro for the called channel before connecting to the calling channel. Arguments can be specified to the Macro using ^ as a delimiter. The macro can set the variable MACRO_RESULT to specify the following actions after the macro is finished executing:
MACRO_RESULT - If set, this action will be taken after the macro finished executing.
ABORT - Hangup both legs of the call
CONGESTION - Behave as if line congestion was encountered
BUSY - Behave as if a busy signal was encountered
CONTINUE - Hangup the called party and allow the calling party to continue dialplan execution at the next priority
GOTO:[[<CONTEXT>^]<EXTEN>^]<PRIORITY> - Transfer the call to the specified destination.
macro - Name of the macro that should be executed.
arg - Macro arguments
- n - This option is a modifier for the call screening/privacy mode. (See the p and P options.) It specifies that no introductions are to be saved in the priv-callerintros directory.
delete - With delete either not specified or set to 0, the recorded introduction will not be deleted if the caller hangs up while the remote party has not yet answered.
With delete set to 1, the introduction will always be deleted.
- N - This option is a modifier for the call screening/privacy mode. It specifies that if Caller*ID is present, do not screen the call.
- o - If x is not provided, specify that the CallerID that was present on the calling channel be stored as the CallerID on the called channel. This was the behavior of Asterisk 1.0 and earlier. If x is provided, specify the CallerID stored on the called channel. Note that o(${CALLERID(all)}) is similar to option o without the parameter.
x
- O - Enables operator services mode. This option only works when bridging a DAHDI channel to another DAHDI channel only. if specified on non-DAHDI interfaces, it will be ignored. When the destination answers (presumably an operator services station), the originator no longer has control of their line. They may hang up, but the switch will not release their line until the destination party (the operator) hangs up.
mode - With mode either not specified or set to 1, the originator hanging up will cause the phone to ring back immediately. With mode set to 2, when the operator flashes the trunk, it will ring their phone back.
- p - This option enables screening mode. This is basically Privacy mode without memory.
- P - Enable privacy mode. Use x as the family/key in the AstDB database if it is provided. The current extension is used if a database family/key is not specified.
x
- r - Default: Indicate ringing to the calling party, even if the called party isn't actually ringing. Pass no audio to the calling party until the called channel has answered.
tone - Indicate progress to calling party. Send audio 'tone' from the indications.conf tonezone currently in use.
- R - Default: Indicate ringing to the calling party, even if the called party isn't actually ringing. Allow interruption of the ringback if early media is received on the channel.
- S(x) - Hang up the call x seconds after the called party has answered the call.
- s - Force the outgoing callerid tag parameter to be set to the string x.
Works with the f option.
- t - Allow the called party to transfer the calling party by sending the DTMF sequence defined in features.conf. This setting does not perform policy enforcement on transfers initiated by other methods.
- T - Allow the calling party to transfer the called party by sending the DTMF sequence defined in features.conf. This setting does not perform policy enforcement on transfers initiated by other methods.
- U - Execute via Gosub the routine x for the called channel before connecting to the calling channel. Arguments can be specified to the Gosub using ^ as a delimiter. The Gosub routine can set the variable GOSUB_RESULT to specify the following actions after the Gosub returns.
- GOSUB_RESULT
- ABORT - Hangup both legs of the call.
- CONGESTION - Behave as if line congestion was encountered.
- BUSY - Behave as if a busy signal was encountered.
- CONTINUE - Hangup the called party and allow the calling party to continue dialplan execution at the next priority.
- GOTO:[[<CONTEXT>^]<EXTEN>^]<PRIORITY> - Transfer the call to the specified destination.
- x - Name of the subroutine to execute via Gosub
- arg - Arguments for the Gosub routine
- u - Works with the f option.
- x - Force the outgoing callerid presentation indicator parameter to be set to one of the values passed in x:
- allowed_not_screened allowed_passed_screen
- allowed_failed_screen allowed
- prohib_not_screened prohib_passed_screen
- prohib_failed_screen prohib unavailable
- w - Allow the called party to enable recording of the call by sending the DTMF sequence defined for one-touch recording in features.conf.
- W - Allow the calling party to enable recording of the call by sending the DTMF sequence defined for one-touch recording in features.conf.
- x - Allow the called party to enable recording of the call by sending the DTMF sequence defined for one-touch automixmonitor in features.conf.
- X - Allow the calling party to enable recording of the call by sending the DTMF sequence defined for one-touch automixmonitor in features.conf.
- z - On a call forward, cancel any dial timeout which has been set for this call.
URL - The optional URL will be sent to the called party if the channel driver supports it.