AMI - Originate

manager show command Originate

Action: Originate
[ActionID:] <value>
Channel: <value>
[Exten:] <value>
[Context:] <value>
[Priority:] <value>
[Application:] <value>
[Data:] <value>
[Timeout:] <value>
[CallerID:] <value>
[Variable:] <value>
[Account:] <value>
[EarlyMedia:] <value>
[Async:] <value>
[Codecs:] <value>
[ChannelId:] <value>
[OtherChannelId:] <value>

Описание команды

Инициирует вызов на <Extension>/<Context>/<Priority> или <Appl ication>/<Data>

Аргументы

  • ActionID - Идентификатор для этого действия(транзакции).
  • Channel - Имя канала с которым будет соединен вызываемый номер (например SIP/1000 или Local/s@context.
  • Exten - Вызываемый номер (используется совместно 'Context' и 'Priority')
  • Context - Контекст используемый для вызова номера Exten ('Exten' и 'Priority' должны быть заданы)
  • Priority - Приоритет в используемом контексте (требует 'Exten' и 'Context')
  • Application Исполняемое приложение .
  • Data - Данные для 'Application'.
  • Timeout - Сколько ждать ответа (in ms.).
  • CallerID - Caller ID назначается
  • Variable - Channel variable to set, multiple Variable: headers are allowed.
  • Account - Account code.
  • EarlyMedia - Set to 'true' to force call bridge on early media..
  • Async - Set to 'true' for fast origination.
  • Codecs - Comma-separated list of codecs to use for this call.
  • ChannelId - Channel UniqueId to be set on the channel.
  • OtherChannelId - Channel UniqueId to be set on the second local channel.

Пример использования команды "Originate" для инициации вызова из 1С 7.7

ТекстКоманды=
	 "Action: Originate"+CRLF
            +"Channel: Local/"+СокрЛП(Источник)+"@outbound-context"+CRLF
            +"CallerIDNum: "+СокрЛП("+78123216111")+CRLF
	    +"Context: "+СокрЛП(АМИКонтекст)+CRLF
	    +"Exten: " +СокрЛП(СтрЗаменить(Приемник,"+",""))+CRLF
	    +"Dialstring: Local/"+СокрЛП(СтрЗаменить(Приемник,"+",""))+CRLF
	    +"Priority: 1"+CRLF
	    +"Callerid: " +СокрЛП(СтрЗаменить(Приемник,"+",""))+CRLF
	    +"Variable: _SIPADDHEADER51=Call-Info: answer-after=1"+CRLF
	    +"Variable: timeout1=30"+CRLF // в секундах
	    +"Async: true"+CRLF+CRLF;

Пример использования команды Originate из CLI Asterisk

 channel originate SIP/1000 extension 3216111@from-internal
 channel originate Local/1000@from-internal  extension *43@from-internal
asterisk*CLI> core show help channel originate
  There are two ways to use this command. A call can be originated between a
channel and a specific application, or between a channel and an extension in
the dialplan. This is similar to call files or the manager originate action.
Calls originated with this command are given a timeout of 30 seconds.

Usage1: channel originate <tech/data> application <appname> [appdata]
  This will originate a call between the specified channel tech/data and the
given application. Arguments to the application are optional. If the given
arguments to the application include spaces, all of the arguments to the
application need to be placed in quotation marks.

Asterisk Manager Interface (AMI)

  • asterisk/ami/originate.txt
  • Последние изменения: 2018/03/12