Пожалуйста, войдите здесь. Часто задаваемые вопросы О нас
Задайте Ваш вопрос

Очередь+ GoSub

0

Asterisk 11. Нужно звонок поставить в очередь и от этого сразу сделать GoSub или Macro. Именно не по ответу, а при постановке в саму очередь. Читал что в 16м Астериске есть опция b и B по которой делается GoSub при постановке звонка в очередь. Как это сделать в 11м? Есть у кого какие идеи?

удалить закрыть спам изменить тег редактировать

спросил 2022-08-18 17:41:37 +0400

анонимный пользователь

Аноним

2 Ответа

0

Опции B и b отрабатывают ПЕРЕД ПОПЫТКОЙ ВЫЗОВА агента, то есть перед тем, как уже зазвонит телефон. Если у Вас есть свободный агент -- фактически это произойдет сразу после постановки в очередь. Но если свободных агентов нет, придется ждать, пока кто-то освободится. Ну либо лепить костыль с фейковым агентом в очереди через Local :) Я бы рекомендовал все-таки выполнять необходимые действия сразу перед постановкой в очередь.

pbx*CLI> core show application Queue


  -= Info about application 'Queue' =-

[Synopsis]
Queue a call for a call queue.

[Description]
In addition to transferring the call, a call may be parked and then picked up
by another user.
This application will return to the dialplan if the queue does not exist, or
any of the join options cause the caller to not enter the queue.
This application does not automatically answer and should be preceeded by an
application such as Answer(), Progress(), or Ringing().
This application sets the following channel variables upon completion:
${QUEUESTATUS}: The status of the call as a text string.
    TIMEOUT
    FULL
    JOINEMPTY
    LEAVEEMPTY
    JOINUNAVAIL
    LEAVEUNAVAIL
    CONTINUE
${ABANDONED}: If the call was not answered by an agent this variable will be
TRUE.
    TRUE

[Syntax]
Queue(queuename[,options[,URL[,filename[&filename2[&...]][,timeout[,AGI[,macro[,gosub[,rule[,position]]]]]]]]])

[Arguments]
options
    b([[context^]exten^]priority[(arg1[^...][^argN])]): Before initiating an
    outgoing call, 'Gosub' to the specified location using the newly created
    channel.  The 'Gosub' will be executed for each destination channel.

    B([[context^]exten^]priority[(arg1[^...][^argN])]): Before initiating the
    outgoing call(s), 'Gosub' to the specified location using the current
    channel.

    C: Mark all calls as "answered elsewhere" when cancelled.

    c: Continue in the dialplan if the callee hangs up.

    d: data-quality (modem) call (minimum delay).

    F([[context^]exten^]priority): When the caller hangs up, transfer the
    *called member* to the specified destination and *start* execution at that
    location.
    NOTE: Any channel variables you want the called channel to inherit from the
    caller channel must be prefixed with one or two underbars ('_').

    F: When the caller hangs up, transfer the *called member* to the next
    priority of the current extension and *start* execution at that location.
    NOTE: Any channel variables you want the called channel to inherit from the
    caller channel must be prefixed with one or two underbars ('_').
    NOTE: Using this option from a Macro() or GoSub() might not make sense as
    there would be no return points.

    h: Allow *callee* to hang up by pressing '*'.

    H: Allow *caller* to hang up by pressing '*'.

    n: No retries on the timeout; will exit this application and go to the next
    step.

    i: Ignore call forward requests from queue members and do nothing when they
    are requested.

    I: Asterisk will ignore any connected line update requests or any
    redirecting party update requests it may receive on this dial attempt.

    r: Ring instead of playing MOH. Periodic Announcements are still made, if
    applicable.

    R: Ring instead of playing MOH when a member channel is actually ringing.

    t: Allow the *called* user to transfer the calling user.

    T: Allow the *calling* user to transfer the call.

    w: Allow the *called* user to write the conversation to disk via Monitor.

    W: Allow the *calling* user to write the conversation to disk via Monitor.

    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".

    x: Allow the *called* user to write the conversation to disk via
    MixMonitor.

    X: Allow the *calling* user to write the conversation to disk via
    MixMonitor.

URL
    <URL> will be sent to the called party if the channel supports it.
filename
    Announcement file(s) to play to agent before bridging call, overriding the
    announcement(s) configured in "queues.conf", if any.
timeout
    Will cause the queue to fail out after a specified number of seconds,
    checked between each "queues.conf" <timeout> and <retry> cycle.
AGI
    Will setup an AGI script to be executed on the calling party's channel once
    they are connected to a queue member.
macro
    Will run a macro on the called party's channel (the queue member) once the
    parties are connected.
    NOTE: Macros are deprecated, GoSub should be used instead.
gosub
    Will run a gosub on the called party's channel (the queue member) once the
    parties are connected.  The subroutine execution starts in the named
    context at the s exten and priority 1.
rule
    Will cause the queue's defaultrule to be overridden by the rule specified.
position
    Attempt to enter the caller into the queue at the numerical position
    specified. '1' would attempt to enter the caller at the head of the queue,
    and '3' would attempt to place the caller third in the queue.

[See Also]
Queue(), QueueLog(), AddQueueMember(), RemoveQueueMember(), PauseQueueMember(),
UnpauseQueueMember(), QUEUE_VARIABLES, QUEUE_MEMBER, QUEUE_MEMBER_COUNT,
QUEUE_EXISTS, QUEUE_GET_CHANNEL, QUEUE_WAITING_COUNT, QUEUE_MEMBER_LIST,
QUEUE_MEMBER_PENALTY
ссылка удалить спам редактировать

ответил 2022-08-22 12:21:49 +0400

tesak89 Gravatar tesak89 flag of Russian Federation
422 25 3 16

обновил 2022-08-22 12:22:34 +0400

0
core show application Queue
Queue(queuename[,options[,URL[,announceoverride[,timeout[,AGI[,macro[,gosub[,rule[,position]]]]]]]]])

Внимательно читайте описание синтаксиса .

ссылка удалить спам редактировать

ответил 2022-08-19 12:52:59 +0400

zzuz Gravatar zzuz flag of Russian Federation
7174 2 6 75
http://line24.ru/

Comments

Опции AGI, Macro и Gosub выполняются при ответе оператора, судя по синтаксису. Лично я не понимаю, почему нельзя сначала отработать Gosub или Macro до постановки в очередь.

tesak89 ( 2022-08-22 12:17:45 +0400 )редактировать

Ваш ответ

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
[скрыть предварительный просмотр]

Закладки и информация

Добавить закладку

подписаться на rss ленту новостей

Статистика

Задан: 2022-08-18 17:41:37 +0400

Просмотрен: 2,158 раз

Обновлен: Aug 22 '22

Проект компании "АТС Дизайн"
Asterisk® и Digium® являются зарегистрированными торговыми марками компании Digium, Inc., США.
IP АТС Asterisk распространяется под лицензией GNU GPL.