Asterisk-channel

From 탱이의 잡동사니
Jump to navigation Jump to search

Overview

Asterisk channel 명령어 정리

help

channel 명령어 help

myworld*CLI> help channel
    channel originate Originate a call
    channel redirect Redirect a call
    channel request hangup Request a hangup on a given channel

originate

입력한 tech/data 로 발신을 한다. 발신이후, 콜을 지정된 application 혹은 extension 으로 전달한다.

pchero*CLI> 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.

Usage2: channel originate <tech/data> extension [exten@][context]
  This will originate a call between the specified channel tech/data and the
given extension. If no context is specified, the 'default' context will be
used. If no extension is given, the 's' extension will be used.
channel originate <tech/data> application <appname> [appdata]
channel originate <tech/data> extension [exten@][context]

Example

sip/200-test-1 로 발신을 해서, Camp200 이라는 큐로 넘기는 예제이다.

vpbx11*CLI> channel originate sip/200-test-1 application Queue Camp200
[2015-11-11 11:21:37.031]     -- Launching Queue(Camp200) on SIP/200-test-1-00000018
[2015-11-11 11:21:37.032]     -- Started music on hold, class 'default', on SIP/200-test-1-00000018

redirect

pchero*CLI> help channel redirect
Usage: channel redirect <channel> <[[context,]exten,]priority>
    Redirect an active channel to a specified extension.

request hangup

입력한 channel_id 콜을 종료한다.

pchero*CLI> help channel request hangup
Usage: channel request hangup <channel>|<all>
       Request that a channel be hung up. The hangup takes effect
       the next time the driver reads or writes from the channel.
       If 'all' is specified instead of a channel name, all channels
       will see the hangup request.
channel request hangup <channel_id>

중요한 것은 입력되는 파라미터가 call-id 가 아닌, channel-id 라는 것이다.