asterisk常用命令
Asterisk使用命令

Asterisk使用命令收藏运行调试Asterisk 1. 运行调试常用命令./asterisk & 在后台启动asterisk ./asterisk –vvvc 启动asterisk并尽量多的在控制台显示调试信息./asterisk –r 连接asterisk控制台set verbose 9999 设置打印详细信息/usr/sbin/asterisk -cvvv 启动并连接到CLI,使用3级复杂度调试/usr/sbin/asterisk -vvvr 连接到CLI,使用3级复杂度调试/usr/sbin/asterisk命令参数* -c console 控制以,用于连接到CLI界面* -v 简繁程度,设置CLI的调试信息的多少* -g 核心。
如果asterisk突然瘫痪,在接下来的时间,为了用gdb来做trace,可以产生一个核心文件* -r 远程。
用来远程重新连接到一个已经运行的asterisk进程中。
* -rx “restart now”执行一个CLI命令,而不需要连接到CLI并手动输入命令 2.asterisk控制台下常用命令sip show subscriptions sip notify Send a notify packet to a SIP peer sip prune realtime [peer|user| Prune cached Realtime users/peers sip reload Reload SIP configuration sip set debug {on|off|ip|peer} Enable/Disable SIP debugging sip set history {on|off} Enable/Disable SIP history sip show {channels|subscriptio List active SIP channels/subscriptions sip show channel Show detailed SIP channel info sip show domains List our local SIP domains. sip show history Show SIP dialog history sip show inuse List all inuse/limits sip show objects List all SIP object allocations sip show peers List defined SIP peers sip show peer Show details on specific SIP peer sip show registry List SIP registration status sip show settings Show SIP global settings sip show tcp List TCP Connections sip show users List defined SIP users sip show user Show details on specific SIP user sip unregister Unregister (force expiration) a SIP peer from the registery dialplan show 显示拨号方案dialplan reload重新加载拨打方案stop gracefully 优雅地停止asterisk stop now 立即停止运行asterisk module show 显示所有已加载模块module load cdr_radius.so 加载模块cdr_radius.so module reload cdr_radius.so 重新加载模块cdr_radius.so module unload cdr_radius.so 卸载模块cdr_radius.so core show applications 显示所有的应用,比如Dial, Radius, Hangup, Answer等core show channels 显示所有的通话频道core show codecs 显示所有支持的编解码器core show functions 显示所有的功能函数For more information on applications, just type "core show applications" at your ; friendly Asterisk CLI prompt. ; ; "core show application <command>" will show details of how you ; use that particular application in this file, the dial plan. ; "core show functions" will list all dialplan functions ; "core show function <COMMAND>" will show you more information about ; one function. Remember that function names are UPPER CASE.本文来自CSDN博客,转载请标明出处:/jrbu59/archive/2008/06/22/2575229.aspx2007-05-13 18:30asterisk1*CLI> help! Execute a shell commandabort halt Cancel a running haltadd extension Add new extension into contextadd ignorepat Add new ignore patternadd queue member Add a channel to a specified queueael debug contexts Enable AEL contexts debugael debug macros Enable AEL macros debugael debug read Enable AEL read debugael debug tokens Enable AEL tokens debugael no debug Disable AEL debug messagesael reload Reload AEL configurationagent logoff Sets an agent offlineagi debug Enable AGI debuggingagi no debug Disable AGI debuggingcdr mysql status Show connection status of cdr_mysqlcdr status Display the CDR statusdatabase del Removes database key/valuedatabase deltree Removes database keytree/valuesdatabase get Gets database valuedatabase put Adds/updates database valuedatabase show Shows database contentsdatabase showkey Shows database contentsdebug channel Enable debugging on a channeldebug level Set global debug leveldnsmgr reload Reloads the DNS manager configurationdnsmgr status Display the DNS manager statusdont include Remove a specified include from context dump agihtml Dumps a list of agi command in html format dundi debug Enable DUNDi debuggingdundi flush Flush DUNDi cachedundi lookup Lookup a number in DUNDidundi no debug Disable DUNDi debuggingdundi no store history Disable DUNDi historic recordsdundi precache Precache a number in DUNDidundi query Query a DUNDi EIDdundi show entityid Display Global Entity IDdundi show mappings Show DUNDi mappingsdundi show peers Show defined DUNDi peersdundi show peer Show info on a specific DUNDi peerdundi show precache Show DUNDi precachedundi show requests Show DUNDi requestsdundi show trans Show active DUNDi transactionsdundi store history Enable DUNDi historic recordsextensions reload Reload extensions and *only* extensions feature show channels Show status of feature channelsgroup show channels Show active channels with group(s)help Display help list, or specific help on a command iax2 debug Enable IAX debuggingiax2 jb debug Enable IAX jitterbuffer debuggingiax2 no debug Disable IAX debuggingiax2 no jb debug Disable IAX jitterbuffer debuggingiax2 no trunk debug Disable IAX trunk debuggingiax2 provision Provision an IAX deviceiax2 prune realtime Prune a cached realtime lookupiax2 reload Reload IAX configurationiax2 set jitter Sets IAX jitter bufferiax2 show cache Display IAX cached dialplaniax2 show channels Show active IAX channelsiax2 show firmware Show available IAX firmwaresiax2 show netstats Show active IAX channel netstatsiax2 show peer Show details on specific IAX peeriax2 show peers Show defined IAX peersiax2 show provisioning Show iax provisioningiax2 show registry Show IAX registration statusiax2 show stats Display IAX statisticsiax2 show users Show defined IAX usersiax2 test losspct Set IAX2 incoming frame loss percentage iax2 trunk debug Enable IAX trunk debugginginclude context Include context in other contextindication add Add the given indication to the country indication remove Remove the given indication from the countryinit keys Initialize RSA key passcodesload Load a dynamic module by namelocal show channels Show status of local channelslogger reload Reopens the log fileslogger rotate Rotates and reopens the log fileslogger show channels List configured log channelsmeetme Execute a command on a conference or confereemgcp audit endpoint Audit specified MGCP endpointmgcp debug Enable MGCP debuggingmgcp no debug Disable MGCP debuggingmgcp reload Reload MGCP configurationmgcp show endpoints Show defined MGCP endpointsmixmonitor Execute a MixMonitor commandmoh classes show List MOH classesmoh files show List MOH file-based classesmoh reload Music On Holdno debug channel Disable debugging on a channelodbc connect Connect to ODBC DSNodbc disconnect Disconnect from ODBC DSNodbc show Show ODBC DSN(s)pri debug span Enables PRI debugging on a spanpri intense debug span Enables REALLY INTENSE PRI debuggingpri no debug span Disables PRI debugging on a spanpri set debug file Sends PRI debug output to the specified file pri show debug Displays current PRI debug settingspri show span Displays PRI Informationpri unset debug file Ends PRI debug output to filerealtime load Used to print out RealTime variables.realtime mysql status Shows connection information for the MySQL RealTime d riverrealtime update Used to update RealTime variables.reload Reload configurationremove extension Remove a specified extensionremove ignorepat Remove ignore pattern from contextremove queue member Removes a channel from a specified queue restart gracefully Restart Asterisk gracefullyrestart now Restart Asterisk immediatelyrestart when convenient Restart Asterisk at empty call volumertp debug Enable RTP debuggingrtp debug ip Enable RTP debugging on IPrtp no debug Disable RTP debuggingset debug Set level of debug chattinessset verbose Set level of verbosenessshow agents Show status of agentsshow agi Show AGI commands or specific helpshow applications Shows registered dialplan applications show application Describe a specific dialplan application show audio codecs Shows audio codecsshow channel Display information on a specific channel show channels Display information on channelsshow channeltypes Show available channel typesshow codecs Shows codecsshow codec Shows a specific codecshow conferences Show status of conferencesshow config mappings Show Config mappings (file names to config engines)show dialplan Show dialplanshow features Lists configured featuresshow file formats Displays file formatsshow functions Shows registered dialplan functionsshow function Describe a specific dialplan functionshow hints Show dialplan hintsshow image codecs Shows image codecsshow image formats Displays image formatsshow indications Show a list of all country/indications show keys Displays RSA key informationshow license Show the license(s) for this copy of Asteriskshow manager command Show a manager interface commandshow manager commands List manager interface commandsshow manager connected Show connected manager interface users show modules List modules and infoshow modules like List modules and infoshow parkedcalls Lists parked callsshow queue Show status of a specified queueshow queues Show status of queuesshow switches Show alternative switchesshow translation Display translation matrixshow uptime Show uptime informationshow version Display version infoshow version files Show versions of files used to build Asteriskshow video codecs Shows video codecsshow voicemail users List defined voicemail boxesshow voicemail zones List zone message formatsshow warranty Show the warranty (if any) for this copy of Asterisksip debug Enable SIP debuggingsip debug ip Enable SIP debugging on IPsip debug peer Enable SIP debugging on Peernamesip history Enable SIP historysip no debug Disable SIP debuggingsip no history Disable SIP historysip notify Send a notify packet to a SIP peersip prune realtime Prune cached Realtime object(s)sip prune realtime peer Prune cached Realtime peer(s)sip prune realtime user Prune cached Realtime user(s)sip reload Reload SIP configurationsip show channels Show active SIP channelssip show channel Show detailed SIP channel infosip show domains List our local SIP domains.sip show history Show SIP dialog historysip show inuse List all inuse/limitssip show objects Show all SIP object allocationssip show peer Show details on specific SIP peersip show peers Show defined SIP peerssip show registry Show SIP registration statussip show settings Show SIP global settingssip show subscriptions Show active SIP subscriptionssip show users Show defined SIP userssip show user Show details on specific SIP userskinny debug Enable Skinny debuggingskinny no debug Disable Skinny debuggingskinny show devices Show defined Skinny devicesskinny show lines Show defined Skinny lines per devicesoft hangup Request a hangup on a given channelstop gracefully Gracefully shut down Asteriskstop now Shut down Asterisk immediatelystop when convenient Shut down Asterisk at empty call volume unload Unload a dynamic module by namezap destroy channel Destroy a channelzap show cadences List cadenceszap show channels Show active zapata channelszap show channel Show information on a channelzap show status Show all Zaptel cards status。
AsteriskWin32

4.單擊Next, 4.單擊Next,
5.選擇安裝目錄,並單擊Next 5.選擇安裝目錄,並單擊Next
6.選擇Full installation和PBX New Installation 6.選擇Full installation和
7.You can create an desktop icon in this step
database put mgcpphone 333 aaln/1@192.168.1.254
5.SIP 測試 5.1 SIP 測試中moderm鍴的設置與之前的 設置 測試中moderm鍴的設置與之前的 步驟是一樣的 5.2 我們在callagent鍴,可以通過脩改sip.conf來 我們在callagent callagent鍴,可以通過脩改sip.conf sip.conf來 增加或者刪除電話號碼 5.3 打開sip.conf ,我們會看到幾組電話號碼, 打開sip.conf 格式如下圖:
AsteriskWin32使用指南 AsteriskWin32使用指南
安裝AsteriskWin32 安裝AsteriskWin32
1.雙擊AsteriskWin32-0.601.雙擊AsteriskWin32-0.60-Setup.exe
2.單擊Next,開始安裝 2.單擊Next,開始安裝
ห้องสมุดไป่ตู้
3.選擇 I accept the agreement,單擊Next
4.MGCP測試 4.MGCP測試 4.1 配置moderm 配置moderm voice mgcp config callagentaddr=192.168.1.00 voice mgcp config callagentport=2427 4.2 添加電話號碼到database 添加電話號碼到database 在GUI的CLI提示符后執行: GUI的CLI提示符后執行: database put mgcpphone 111 aaln/1@192.168.1.254 aaln/1@192.168.1.254 database put mgcpphone 222 aaln/2@192.168.1.254 aaln/2@192.168.1.254 4.3 添加mgcp 電話號碼 添加mgcp 脩改mgcp.conf,並添加至database 脩改mgcp.conf,並添加至database
Asterisk 入门一 --- Asterisk 1.6.2.6 安装

Asterisk 入门一 --- Asterisk 1.6.2.6 安装2010-04-28 16:27其实asterisk安装灰常简单只要跟着安装包中的readme 文档一步一步走就可以了:1.安装测试环境虚拟机:Sun VirtualBox 3.1X操作系统:CentOS 52.Astrisk各稳定版本以及附加工具/downloads改页面有很多下载选项大概的介绍一下1.AsteriskAsterisk 源码压缩包,这就是我们要用的2.AsteriskNOWAsteriskNOW 是一个光盘镜像包含了linux 系统,一旦安装完成就有一套简单的PBX 系统了3.Asterisk Add-OnsAsterisk Add-Ons 是Asterisk 和Asterisk 一些相关的驱动和组件等。
3.下载安装# wget/pub/telephony/asterisk/releases/asteris k-1.6.2.6.tar.gz#tar -zxvf asterisk-1.6.2.6.tar.gz# cd asterisk-1.6.2.6运行配置脚本检测依赖关系并设置安装目录# ./configure --prefix=/usr/local/asterisk看到硕大的星号了嘛哈哈配置成功.$$$$$$$$$$$$$$$=...$7$7.. .7$$7:..$$:. ,$7.7.$7. 7$$$$ .$$77..$$. $$$$$ .$$$7..7$ .?. $$$$$ .?. 7$$$.$.$. .$$$7. $$$$7 .7$$$. .$$$..777. .$$$$$$77$$$77$$$$$7. $$$,$$$~ .7$$$$$$$$$$$$$7. .$$$..$$7 .7$$$$$$$7: ?$$$.$$$ ?7$$$$$$$$$$I .$$$7$$$ .7$$$$$$$$$$$$$$$$ :$$$.$$$ $$$$$$7$$$$$$$$$$$$ .$$$.$$$ $$$ 7$$$7 .$$$ .$$$.$$$$ $$$$7 .$$$.7$$$7 7$$$$ 7$$$$$$$$ $$$$$$$7. $$ (TM)$$$$$$$. .7$$$$$$ $$$$$$$$$$$$$$7$$$$$$$$$.$$$$$$ $$$$$$$$$$$$$$$$.该步骤可选,该步骤用于选择一些模块#make menuselect编译安装#make#make install安装一些简单的配置文件#make samples好了现在都安装结束了--------------------------------------------------------------------------------------------启动守护进程# safe_asterisk进入CLI#asteriks -r更多的命令可以使用 #man asterisk查看按q退出Asterisk 入门二 --- Asterisk 配置以及控制台命令2010-04-28 16:52接下来我们开始学习asterisk先提供个学习的教材和网址大部分的问题可以在/中找到解答其次提供一本 Asterisk 入门教程叫Asterisk,电话未来之路第二书签版.pdf自个摆渡下吧-------------------------------------------------------------------------------------Asterisk 几个相关目录配置文件/usr/local/asterisk/etc/asterisk可执行文件目录 /usr/local/asterisk/sbin先启动asterisk守护进程#safe_asterisk进入控制台#asterisk -rAsterisk 1.6.2.6, Copyright (C) 1999 - 2010 Digium, Inc. and others.Created by Mark Spencer <markster@>Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General PublicLicense version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details.=========================================================================Connected to Asterisk 1.6.2.6 currently running on localhost (pid = 18023)Verbosity is at least 3localhost*CLI>看看有啥命令>core show help或者具体的命令帮助>core show help <command>Asterisk app命令中文翻译2008-11-06 15:15常规指令Authenticate:鉴别用户VMAuthenticate:根据“voicemail.conf”鉴别用户Curl:接受外接URLs的修复。
Asterisk拨号方案常用函数

Asterisk拨号方案常用函数说明(1)Answer()应用于接听正在响铃通道,它不需要任何参数.(2)Playback()应用在通道上播放事先录制好的语音文件.指定一个文件名(不带扩展名),可以使用绝对路径与相对路径.(3)Hangup()应用在于挂断一个正在活动的通道.(4)Background()它也播放事先录制好的语音文件,但它等待按键,然后执行对应extension.防止Background()后超出按键范围,使用i来解决问题.防止Background长时间没有选择,使用t来决解问题.(5)Goto()Goto应用使得在拨号方案的不同部分有序的转移非常容易. Goto()应用有三个参量分别是context,extension,和priority.即Goto(context,extension,priority)(6)Dial()Dial()有4个参数.(a)第一个是:呼叫的被叫地.如:SIP/50000或Zap/1.可以同时拨打多个通道如: exten =>601,1,Dial(Zap/1&SIP/50000&IAX/60000)(b)第二个是:超时,单位"秒".给定超时参量Dial会一直对被叫地进行呼叫,直到超时后才放弃,如果没有给定,将直到接听或主叫挂机,如果呼叫在超时前接听,通道就被桥接,拨号完。
成补充:如果超时后被叫地没有应答,则会继续Dial()的extension下一个priority.如果被叫地通道忙,Dial()将转到priority n+101(n是Dial()被调用的priority),如果存在的话,将能够处理被叫地忙的方式接叫未接电话.(c)第三个是:可选择参量,它会可以影响到Dial()的行为,如: exten =>601,1,Dial(SIP/50000,30,Ttwr) 其中T表示允许主叫用户按"#"转接呼叫;t表示允许被叫用户按"#"转接呼叫;r表示为被叫用户产生振铃声;w用户按"*"键开始录音(d)最后一个是:URL参量.如: exten =>601,1,Dial([email=SIP/60000@]SIP/60000@[/email]) exten => 602,1,Dial(Zap/1/5732381) 任何参量都可以为空如: exten => 601,1,Dial(SIP/60000,,T) 或 exten => 601,1,Dial(SIP/60000)AddQueueMember: Dynamically adds queue membersADSIProg: Load Asterisk ADSI Scripts into phoneAGI: Executes an AGI compliant applicationAMD: Attempts to detect answering machinesAnswer: Answer a channel if ringingAppendCDRUserField: Append to the CDR user fieldAuthenticate: Authenticate a userBackGround: Play an audio file while waiting for digits of an extension to go to.BackgroundDetect: Background a file with talk detectBusy: Indicate the Busy conditionChangeMonitor: Change monitoring filename of a channelChanIsAvail: Check channel availabilityChannelRedirect: Redirects given channel to a dialplan target.ChanSpy: Listen to a channel, and optionally whisper into itCongestion: Indicate the Congestion conditionContinueWhile: Restart a While loopControlPlayback: Play a file with fast forward and rewindDAHDIBarge: Barge in (monitor) DAHDI channelDAHDIRAS: Executes DAHDI ISDN RAS applicationDAHDIScan: Scan Zap channels to monitor callsDAHDISendKeypadFacility: Send digits out of band over a PRIDateTime: Says a specified time in a custom formatDBdel: Delete a key from the databaseDBdeltree: Delete a family or keytree from the databaseDeadAGI: Executes AGI on a hungup channelDial: Place a call and connect to the current channelDictate: Virtual Dictation MachineDirectory: Provide directory of voicemail extensionsDISA: DISA (Direct Inward System Access)DumpChan: Dump Info About The Calling ChannelEAGI: Executes an EAGI compliant applicationEcho: Echo audio, video, or DTMF back to the calling partyEndWhile: End a while loopExec: Executes dialplan applicationExecIf: Executes dialplan application, conditionallyExecIfTime: Conditional application execution based on the current timeExitWhile: End a While loopExtenSpy: Listen to a channel, and optionally whisper into itExternalIVR: Interfaces with an external IVR applicationFlash: Flashes a DAHDI trunkForkCDR: Forks the Call Data RecordGetCPEID: Get ADSI CPE IDGosub: Jump to label, saving return addressGosubIf: Conditionally jump to label, saving return addressGoto: Jump to a particular priority, extension, or contextGotoIf: Conditional gotoGotoIfTime: Conditional Goto based on the current timeHangup: Hang up the calling channelHasNewVoicemail: Conditionally branches to priority + 101 with the right options set HasVoicemail: Conditionally branches to priority + 101 with the right options setIAX2Provision: Provision a calling IAXy with a given templateICES: Encode and stream using 'ices'ImportVar: Import a variable from a channel into a new variableLog: Send arbitrary text to a selected log levelLookupBlacklist: Look up Caller*ID name/number from blacklist databaseLookupCIDName: Look up CallerID Name from local databaseMacro: Macro ImplementationMacroExclusive: Exclusive Macro ImplementationMacroExit: Exit From MacroMacroIf: Conditional Macro ImplementationMailboxExists: Check to see if Voicemail mailbox existsMeetMe: MeetMe conference bridgeMeetMeAdmin: MeetMe conference AdministrationMeetMeCount: MeetMe participant countMilliwatt: Generate a Constant 1004Hz tone at 0dbm (mu-law)MixMonitor: Record a call and mix the audio during the recordingMonitor: Monitor a channelMorsecode: Plays morse codeMP3Player: Play an MP3 file or streamMusicOnHold: Play Music On Hold indefinitelyNBScat: Play an NBS local streamNoCDR: Tell Asterisk to not maintain a CDR for the current callNoOp: Do NothingPage: Pages phonesPark: Park yourselfParkAndAnnounce: Park and AnnounceParkedCall: Answer a parked callPauseMonitor: Pause monitoring of a channel PauseQueueMember: Pauses a queue memberPickup: Directed Call PickupPlayback: Play a filePlayTones: Play a tone listPrivacyManager: Require phone number to be entered, if no CallerID sent Progress: Indicate progressQueue: Queue a call for a call queueQueueLog: Writes to the queue_logRandom: Conditionally branches, based upon a probabilityRead: Read a variableReadFile: ReadFile(varname=file,length)RealTime: Realtime Data LookupRealTimeUpdate: Realtime Data RewriteRecord: Record to a fileRemoveQueueMember: Dynamically removes queue membersResetCDR: Resets the Call Data RecordRetryDial: Place a call, retrying on failure allowing optional exit extension.Return: Return from gosub routineRinging: Indicate ringing toneSayAlpha: Say AlphaSayDigits: Say DigitsSayNumber: Say NumberSayPhonetic: Say PhoneticSayUnixTime: Says a specified time in a custom formatSendDTMF: Sends arbitrary DTMF digitsSendImage: Send an image fileSendText: Send a Text MessageSendURL: Send a URLSet: Set channel variable(s) or function value(s)SetAMAFlags: Set the AMA FlagsSetCallerID: Set CallerIDSetCallerPres: Set CallerID PresentationSetCDRUserField: Set the CDR user fieldSetGlobalVar: Set a global variable to a given valueSetMusicOnHold: Set default Music On Hold classSetTransferCapability: Set ISDN Transfer CapabilitySIPAddHeader: Add a SIP header to the outbound callSIPDtmfMode: Change the dtmfmode for a SIP callSLAStation: Shared Line Appearance StationSLATrunk: Shared Line Appearance TrunkSMS: Communicates with SMS service centres and SMS capable analogue phonesSoftHangup: Soft Hangup ApplicationSpeechActivateGrammar: Activate a GrammarSpeechBackground: Play a sound file and wait for speech to be recognizedSpeechCreate: Create a Speech StructureSpeechDeactivateGrammar: Deactivate a GrammarSpeechDestroy: End speech recognitionSpeechLoadGrammar: Load a GrammarSpeechProcessingSound: Change background processing soundSpeechStart: Start recognizing voice in the audio streamSpeechUnloadGrammar: Unload a GrammarStackPop: Remove one address from gosub stackStartMusicOnHold: Play Music On HoldStopMixMonitor: Stop recording a call through MixMonitorStopMonitor: Stop monitoring a channelStopMusicOnHold: Stop Playing Music On HoldStopPlayTones: Stop playing a tone listSystem: Execute a system commandTestClient: Execute Interface Test ClientTestServer: Execute Interface Test ServerTransfer: Transfer caller to remote extensionTryExec: Executes dialplan application, always returningTrySystem: Try executing a system commandUnpauseMonitor: Unpause monitoring of a channelUnpauseQueueMember: Unpauses a queue memberUserEvent: Send an arbitrary event to the manager interfaceVerbose: Send arbitrary text to verbose outputVMAuthenticate: Authenticate with Voicemail passwordsVoiceMail: Leave a Voicemail messageVoiceMailMain: Check Voicemail messagesWait: Waits for some timeWaitExten: Waits for an extension to be enteredWaitForRing: Wait for Ring ApplicationWaitForSilence: Waits for a specified amount of silenceWaitMusicOnHold: Wait, playing Music On HoldWhile: Start a while loopZapateller: Block telemarketers with SITZapBarge: Barge in (monitor) Zap channelZapRAS: Executes Zaptel ISDN RAS applicationZapScan: Scan Zap channels to monitor calls ZapSendKeypadFacility: Send digits out of band over a PRIAddQueueMember: Dynamically adds queue membersADSIProg: Load Asterisk ADSI Scripts into phoneAGI: Executes an AGI compliant applicationAMD: Attempts to detect answering machinesAnswer: Answer a channel if ringingAppendCDRUserField: Append to the CDR user fieldAuthenticate: Authenticate a userBackGround: Play an audio file while waiting for digits of an extension to go to. BackgroundDetect: Background a file with talk detectBusy: Indicate the Busy conditionChangeMonitor: Change monitoring filename of a channelChanIsAvail: Check channel availabilityChannelRedirect: Redirects given channel to a dialplan target.ChanSpy: Listen to a channel, and optionally whisper into itCongestion: Indicate the Congestion conditionContinueWhile: Restart a While loopControlPlayback: Play a file with fast forward and rewindDAHDIBarge: Barge in (monitor) DAHDI channelDAHDIRAS: Executes DAHDI ISDN RAS applicationDAHDIScan: Scan Zap channels to monitor calls DAHDISendKeypadFacility: Send digits out of band over a PRIDateTime: Says a specified time in a custom formatDBdel: Delete a key from the databaseDBdeltree: Delete a family or keytree from the databaseDeadAGI: Executes AGI on a hungup channelDial: Place a call and connect to the current channelDictate: Virtual Dictation MachineDirectory: Provide directory of voicemail extensionsDISA: DISA (Direct Inward System Access)DumpChan: Dump Info About The Calling ChannelEAGI: Executes an EAGI compliant applicationEcho: Echo audio, video, or DTMF back to the calling partyEndWhile: End a while loopExec: Executes dialplan applicationExecIf: Executes dialplan application, conditionallyExecIfTime: Conditional application execution based on the current time ExitWhile: End a While loopExtenSpy: Listen to a channel, and optionally whisper into itExternalIVR: Interfaces with an external IVR applicationFlash: Flashes a DAHDI trunkForkCDR: Forks the Call Data RecordGetCPEID: Get ADSI CPE IDGosub: Jump to label, saving return addressGosubIf: Conditionally jump to label, saving return addressGoto: Jump to a particular priority, extension, or contextGotoIf: Conditional gotoGotoIfTime: Conditional Goto based on the current timeHangup: Hang up the calling channelHasNewVoicemail: Conditionally branches to priority + 101 with the right options set HasVoicemail: Conditionally branches to priority + 101 with the right options set IAX2Provision: Provision a calling IAXy with a given templateICES: Encode and stream using 'ices'ImportVar: Import a variable from a channel into a new variableLog: Send arbitrary text to a selected log levelLookupBlacklist: Look up Caller*ID name/number from blacklist database LookupCIDName: Look up CallerID Name from local databaseMacro: Macro ImplementationMacroExclusive: Exclusive Macro ImplementationMacroExit: Exit From MacroMacroIf: Conditional Macro ImplementationMailboxExists: Check to see if Voicemail mailbox existsMeetMe: MeetMe conference bridgeMeetMeAdmin: MeetMe conference AdministrationMeetMeCount: MeetMe participant countMilliwatt: Generate a Constant 1004Hz tone at 0dbm (mu-law)MixMonitor: Record a call and mix the audio during the recordingMonitor: Monitor a channelMorsecode: Plays morse codeMP3Player: Play an MP3 file or streamMusicOnHold: Play Music On Hold indefinitelyNBScat: Play an NBS local streamNoCDR: Tell Asterisk to not maintain a CDR for the current callNoOp: Do NothingPage: Pages phonesPark: Park yourselfParkAndAnnounce: Park and AnnounceParkedCall: Answer a parked callPauseMonitor: Pause monitoring of a channelPauseQueueMember: Pauses a queue memberPickup: Directed Call PickupPlayback: Play a filePlayTones: Play a tone listPrivacyManager: Require phone number to be entered, if no CallerID sent Progress: Indicate progressQueue: Queue a call for a call queueQueueLog: Writes to the queue_logRandom: Conditionally branches, based upon a probabilityRead: Read a variableReadFile: ReadFile(varname=file,length)RealTime: Realtime Data LookupRealTimeUpdate: Realtime Data RewriteRecord: Record to a fileRemoveQueueMember: Dynamically removes queue membersResetCDR: Resets the Call Data RecordRetryDial: Place a call, retrying on failure allowing optional exit extension. Return: Return from gosub routineRinging: Indicate ringing toneSayAlpha: Say AlphaSayDigits: Say DigitsSayNumber: Say NumberSayPhonetic: Say PhoneticSayUnixTime: Says a specified time in a custom formatSendDTMF: Sends arbitrary DTMF digitsSendImage: Send an image fileSendText: Send a Text MessageSendURL: Send a URLSet: Set channel variable(s) or function value(s)SetAMAFlags: Set the AMA FlagsSetCallerID: Set CallerIDSetCallerPres: Set CallerID PresentationSetCDRUserField: Set the CDR user fieldSetGlobalVar: Set a global variable to a given valueSetMusicOnHold: Set default Music On Hold class SetTransferCapability: Set ISDN Transfer CapabilitySIPAddHeader: Add a SIP header to the outbound callSIPDtmfMode: Change the dtmfmode for a SIP callSLAStation: Shared Line Appearance StationSLATrunk: Shared Line Appearance TrunkSMS: Communicates with SMS service centres and SMS capable analogue phones SoftHangup: Soft Hangup ApplicationSpeechActivateGrammar: Activate a GrammarSpeechBackground: Play a sound file and wait for speech to be recognized SpeechCreate: Create a Speech Structure SpeechDeactivateGrammar: Deactivate a Grammar SpeechDestroy: End speech recognitionSpeechLoadGrammar: Load a Grammar SpeechProcessingSound: Change background processing sound SpeechStart: Start recognizing voice in the audio stream SpeechUnloadGrammar: Unload a GrammarStackPop: Remove one address from gosub stack StartMusicOnHold: Play Music On HoldStopMixMonitor: Stop recording a call through MixMonitor StopMonitor: Stop monitoring a channelStopMusicOnHold: Stop Playing Music On HoldStopPlayTones: Stop playing a tone listSystem: Execute a system commandTestClient: Execute Interface Test ClientTestServer: Execute Interface Test ServerTransfer: Transfer caller to remote extensionTryExec: Executes dialplan application, always returningTrySystem: Try executing a system commandUnpauseMonitor: Unpause monitoring of a channel UnpauseQueueMember: Unpauses a queue memberUserEvent: Send an arbitrary event to the manager interface Verbose: Send arbitrary text to verbose outputVMAuthenticate: Authenticate with Voicemail passwordsVoiceMail: Leave a Voicemail messageVoiceMailMain: Check Voicemail messagesWait: Waits for some timeWaitExten: Waits for an extension to be enteredWaitForRing: Wait for Ring ApplicationWaitForSilence: Waits for a specified amount of silence WaitMusicOnHold: Wait, playing Music On HoldWhile: Start a while loopZapateller: Block telemarketers with SITZapBarge: Barge in (monitor) Zap channelZapRAS: Executes Zaptel ISDN RAS applicationZapScan: Scan Zap channels to monitor calls ZapSendKeypadFacility: Send digits out of band over a PRI你可以得到当前系统可用的App 命令集合通过在CLI里面输入"show applications "和"showapplication <name>" 在1.6版本之前,或者使用"core show applications" 和"core showapplication <name>" 在版本1.4中注意:标题特殊字符含义标题特殊字符或文字颜色代表了不同含义+ 绿色:是增加的/功能的函数~ 黄色:表示弃用的函数- 红色:移处或不在原先版本中使用的函数∙ADSI 相关命令∙DAHDI (was ZAP)相关命令∙SIP命令∙SMS短消息命令∙vISDN 命令∙主叫来电演示命令(Caller presentation (ID, Name etc) )∙呼叫控制命令∙声音处理命令∙外部应用命令∙字符串及变量处理命令∙常规命令∙录音及监听功能命令∙扩展应用集成命令∙控制流程和超时命令∙数据库处理命令∙无线电技术及中继链接(Amateur Radio/Repeater Linking )∙警告监控及总站(Alarm Monitoring/Central Station )∙计费相关的命令∙语音信箱及会议相关命令∙队列及ACD管理相关命令/index.php?q=content/asterisk-%E6%8B%A8%E5%8F%B7%E6%96%B9 %E6%A1%88dialplan%E5%91%BD%E4%BB%A4%E6%89%8B%E5%86%8C。
asterisk配置文件列表及常用指令

配置文件说明列表:常规指令Authenticate:鉴别用户VMAuthenticate:根据“voicemail.conf”鉴别用户Curl:接受外接URLs的修复。
支持POSTingDUNDiLookup:用DUNDi查寻号码SendDTMF:发送独裁的DTMF数据SendImage:发送图像档案SendText:发送给客户正文消息SendURL:发送给客户USL以显示System:执行系统命令Transfer:将访客转移到另一个扩展名TrySystem:0回复执行系统命令Wait:稍等WaitExten稍等:WaitForRing:等待呼叫申请WaitMusicOnHold:等待,在线音乐BillingForkCDR:将CDR分成两个独立的实体NoCDR:确保 asterisk没有把CRD保存为特定的呼叫ResetCDR:重新安装CDR数据SetAccount:设置帐簿号码SetAMAflags:开通AMA标志开户的渠道SetCDRUserField:建立CDR用户领域AppendCDRUserField:给CDR用户附加数据Call management (hangup, answer, dial, etc)Answer:如果呼叫回复一个信道Busy:显示忙的情形等待挂断ChanIsAvail:如果信道可以利用即核查Congestion:显示拥塞等待挂断Dial:设置一个指令连接当前的信道DISA:直接访问内在系统Hangup: 无条件挂断Ringing显示呼叫Caller presentation (ID, Name etc)CallingPres:更改呼叫者的身份介绍LookupBlacklist: 从黑名单数据库上查询访客的身份姓名和号码LookupCIDName: 从当地的数据库查询访客的身份和姓名PrivacyManager:如果没有CallerID过来,要求输入电话号码SetCallerID: 建立CallerID,发生矛盾服从CallerIDSetCallerPres:建立访客资料的独立信道SetCIDName:建立呼叫者身份姓名,发生矛盾服从CallerID SetCIDNum: 只建立访客的身份号码(没有姓名),发生矛盾服从CallerID SoftHangup: 请求挂断转到另一个信道Zapateller:拥SIT阻止远程商人ADSI• ADSIProg:将 Asterisk ADSI Scripts 加载到电话• GetCPEID: 获得 ADSI CPE IDDatabase handling• DBdel: 从数据库中删除一个键. 发生矛盾服从 DB.• DBdeltree: 从数据库中删除群. 发生矛盾服从 DB.• DBget:从数据库中找回数值. 发生矛盾服从DB.• DBput: 在数据库中储存一个数值. 发生矛盾服从DB.• MYSQL:执行不同的 mySQL 数据库行为查 Asterisk database 找更多的信息.Application integration• AGI: 执行一套AGI 适应程序• DeadAGI: 在中断的信道上执行AGI• EAGI: 执行一套 AGI 适应程序• EnumLookup:在 ENUM 中查找号码• Macro: 执行较大的程序• NoOp: 不进行操作,可将数值打印到控制太进行调试• Perl: res perl 是Apache 的 mod_perl, 只适用于 Asterisk • PHP: res_php 不需要就可将PHP与进行一体化处理• Read: 用DTMF读变量• TXTCIDName: 从 TXT 记录中查找访客的姓名• UserEvent:发送任意结果给界面处理器Control flow & timeouts• AbsoluteTimeout: 建立呼叫最长时间• DigitTimeout: 建立数据间的最长时间间隔• Goto:转到优先码,扩展名和过渡段• GotoIf: 条件展转接• GotoIfTime: 当前的条件转接• Random: 在拨号栏中随机跳动• ResponseTimeout: 设置等候回应的最长时间• While: 开始一个当循环- *1.2beta• EndWhile: 结束一个当循环 - *1.2beta• ExecIf: 条件执行 - *1.2betaString & variable manipulation• Cut: 串处理功能,发生矛盾支持 CUT.• ImportVar: 赋数值变量• Math: 进行简单的计算• Prefix: 预设主要的数据• SetGlobalVar:赋数值变量• Set: 设信道变量和功能值• SetVar: 赋数值变量(如果不允许,使用 Set)• StripLSD: 消除附加的数据• StripMSD: 消除主要的数据• SubString: 在一个预设的变量中保存子链数据• Suffix:添加附加数据Sounds:录音重放• Background: 当执行其它命令的时候播放声音文件• BackgroundDetect: 用谈话探测背景文件• ControlPlayback: 用快进,重绕和离开当前命令控制器播放声音文件• DateTime: 显示日期/和时间• Echo: 重复声音回复到永福端• Festival: 使用欢快的声音合成器朗诵课文• Milliwatt: 在0分贝产生持续的1000赫兹的音调• MP3Player: 播放MP3声音文件• MusicOnHold: 无限度地播放音乐• Playback: 播放一个声音文件• Playtones: 当执行其它命令的时候播放声音列表• SayUnixTime: 显示日期/和时间• SayAlpha: 显示字母• SayDigits: 显示阿拉伯数字• SayNumber: 显示数字• SayPhonetic:显示语音• SetMusicOnHold: 在控制系统上显示默认的音乐• SetLanguage: 为录音重放显示语言转换• StopPlaytones: 停止播放音调列表查看Asterisk sound files 获取更多信息语音: 录音和监测• ALSAMonitor: 监测ALSA控制台• ChangeMonitor: 转换监测的路线文件名• ChanSpy:通用的路线干涉• Dictate: 听写的录音和播放• Monitor: 录音电话会话到声音文件• MuxMon:记录和混合电话支架• Record: 记录电话会话到语音文件• StopMonitor: 停止监测路线SIP 命令• SIPdtmfMode: 在SIP呼叫过程中转换DTMF模式• SIPGetHeader: 从SIP邀请信息中获取标题• SIPAddHeader: 填标题到外部的SIP邀请• suplimental resource SIPCallPickup:在获取组中获取打入的电话• sipredirect: 发送SIP 302信息到呼叫者ZAP 命令• Flash: 编辑到Zap主页• ZapBarge: 干涉Zap路线• ZapRAS: 提供ISDN数据服务• ZapScan: 扫描Zap路线到监督程序调用•查看 Asterisk zap channels, zapata.conf 获取等多信息.语音邮件和会议• Directory: 规定语音邮件扩展目录• HasNewVoicemail: 有条件的分枝到优先权+101• MailboxExists: 检查邮箱是否存在• MeetMe:简单的 MeetMe 会议桥• MeetMeAdmin: MeetMe 会议管理• MeetMeCount: MeetMe参与者计算• VoiceMail: 语音留言• VoiceMailMain: 进入语音系统• VMAuthenticate: 基于语音邮箱鉴别用户查看 voicemail.conf 获取更多的信息列队和ACD操纵• AddQueueMember: 自动添加排队成员• AgentCallbackLogin: 呼叫代理商回叫注册• AgentLogin: 呼叫代理商注册• AgentMonitorOutgoing: 记录代理商的外出呼叫• ParkAndAnnounce: 停放和宣告• ParkedCall: 回复被停放的呼叫• PauseQueueMemeber: 中止代理• Queue: 排队等代呼叫• RemoveQueueMember: 自动移交列队成员• UnpauseQueueMemeber: 重新开始代理警报监测/中心站警报接受站:仿效一个Ademco 连接ID的警报接受站业余无线电接受装置/转发器连接Rpt:支持业余无线电接受装置和商业化的两种转发器连接外部应用(不是在CVS里)Asterisk app_dbodc:用unixODBC进行拨号方案修正DynExtenDB:数据库中的存储扩充Iconv:字符切换设置app Prepaid:为Postgres 所设计的PPPD:邮件后台程序连接器Bristuff & zaphfc applications• PickUp: 大多数路线是独立的;是bristuff片的一部分• PickUpChan:接收指定路线• PickupSIPuri• PickDown: 挂断长途电话• Steal: 接受中转电话• Devstate: 产生一种安装设备驱动程序状态来改变事件(忙,打电话…)• Segfault:用 segfault 撞击Asterisk• ZapEC: 对于Zap能或者不能的回波消除• Autoanswer: 在指定范围内自动回话• AutoanswerLogin: 登陆到自动回话应用程序vISDN applicationsVISDN交叠拨号Sirrix 路径的应用• SrxEchoCan: 不能/能回波消除• SrxDeflect: 偏转进入的电话• SrxMWI:在Sirrix组上设置/重新设置信息等待指示(MWI)。
asterisk中dail使用方法

asterisk 中dail使用方法1)dail格式:Dial(type/identifier, timeout, options, URL)Dial(type1/identifier1[&type2/identifier2[&type3/identifier3... ] ], timeout, options, URL) RetryDial(announce|sleep|loops|Technology/resource[&Technology2/resource2...][|[timeout][|[options][|URL]]])a)如果呼叫在超时之前被接听,通道就被桥接,拨号方案完成,如果被叫地没有应答,Dial( ) 会继续到该extension 的下一个priority。
但是,如果被叫通道忙,Dial( )将转到priority n+101,如果其存在的话(其中的n 是Dial( )被调用的priority)b)参数t或T:表示允许被叫通过拍xfer键进行呼叫转移。
xfer键的定义在features.conf中r:强制产生回铃音,呼叫过程中没有语音直到被叫摘机。
没有这个选项,aserisk会适当地根据情况自动地产生回铃音。
强制产生回铃有可能使主叫听不到忙音,彩铃。
在呼叫多个被叫时,回铃音不通被透传,这时需要强制一个回铃音。
R:当被叫在震铃时通知主叫被在震铃,,呼叫过程中没有语音直到被叫摘机。
这个选项仅在kapejod's Bristuff有用。
注:BRIstuff 是一个BRI驱动和补丁集m:提供Music on Hold给主叫直到被叫摘机。
注:与r不同的时m可以指定一类Music on Hold的音乐o:传送主叫ID,默认是送分机的号码(extension's number)j:如果所有通道忙跳到n+101M(x):当通道一旦连接执行宏x,比如被叫摘机时。
Asterisk CLI命令大全

Asterisk CLI命令大全2010-05-01 11:54:09| 分类:Asterisk|字号订阅General CLI commands! - Execute a shell commandabort halt - Cancel a running haltcdr status - Display the CDR statusfeature show - Lists configured featuresfeature show channels - List status of feature channelsfile convert - Convert audio filegroup show channels - Display active channels with group(s)help - Display help list, or specific help on a commandindication add - Add the given indication to the countryindication remove - Remove the given indication from the country indication show - Display a list of all countries/indicationskeys init - Initialize RSA key passcodeskeys show - Displays RSA key informationlocal show channels - List status of local channelslogger mute - Toggle logging output to a consolelogger reload - Reopens the log fileslogger rotate - Rotates and reopens the log fileslogger show channels - List configured log channelsmeetme - Execute a command on a conference or confereemixmonitor - Execute a MixMonitor command.moh reload - Music On Holdmoh show classes - List MOH classesmoh show files - List MOH file-based classesno debug channel (null)originate - Originate a callrealtime load - Used to print out RealTime variables.realtime update - Used to update RealTime variables.restart gracefully - Restart Asterisk gracefullyrestart now - Restart Asterisk immediatelyrestart when convenient - Restart Asterisk at empty call volume sla show - Show status of Shared Line Appearancessoft hangup - Request a hangup on a given channelstop gracefully - Gracefully shut down Asteriskstop now - Shut down Asterisk immediatelystop when convenient - Shut down Asterisk at empty call volume stun debug - Enable STUN debuggingstun debug off - Disable STUN debuggingudptl debug - Enable UDPTL debuggingudptl debug ip - Enable UDPTL debugging on IPudptl debug off - Disable UDPTL debuggingAEL commandsael debug contexts - Enable AEL contexts debug (does nothing) ael debug macros - Enable AEL macros debug (does nothing) ael debug read - Enable AEL read debug (does nothing)ael debug tokens - Enable AEL tokens debug (does nothing)ael nodebug - Disable AEL debug messagesael reload - Reload AEL configurationAgents commandsagent logoff - Sets an agent offlineagent show - Show status of agentsagent show online - Show all online agentsAGI commandsagi debug - Enable AGI debuggingagi debug off - Disable AGI debuggingagi dumphtml - Dumps a list of agi commands in html format agi show- List AGI commands or specific helpdnsmgr reload - Reloads the DNS manager configuration dnsmgr status - Display the DNS manager statushttp show status - Display HTTP server statusConsole commandsconsole active - Sets/displays active consoleconsole answer - Answer an incoming console callconsole autoanswer - Sets/displays autoanswerconsole boost - Sets/displays mic boost in dBconsole dial - Dial an extension on the consoleconsole flash - Flash a call on the consoleconsole hangup - Hangup a call on the consoleconsole mute - Disable mic inputconsole send text - Send text to the remote deviceconsole transfer - Transfer a call to a different extensionconsole unmute - Enable mic inputCore related commandscore clear profile - Clear profiling infocore set debug channel - Enable/disable debugging on a channelcore set debug - Set level of debug chattinesscore set debug off - Turns off debug chattinesscore set global - Set global dialplan variablecore set verbose - Set level of verbosenesscore show applications - Shows registered dialplan applicationscore show application - Describe a specific dialplan applicationcore show audio codecs - Displays a list of audio codecscore show channels - Display information on channelscore show channel - Display information on a specific channelcore show channeltypes - List available channel typescore show channeltype - Give more details on that channel typecore show codecs - Displays a list of codecscore show codec - Shows a specific codeccore show config mappings - Display config mappings (file names to config engines) core show file formats - Displays file formatscore show file version - List versions of files used to build Asteriskcore show functions - Shows registered dialplan functionscore show function - Describe a specific dialplan functioncore show globals - Show global dialplan variablescore show hints - Show dialplan hintscore show image codecs - Displays a list of image codecscore show image formats - Displays image formatscore show license - Show the license(s) for this copy of Asteriskcore show profile - Display profiling infocore show switches - Show alternative switchescore show threads - Show running threadscore show translation - Display translation matrixcore show uptime - Show uptime informationcore show version - Display version infocore show video codecs - Displays a list of video codecscore show warranty - Show the warranty (if any) for this copy of AsteriskDatabase commandsdatabase del - Removes database key/valuedatabase deltree - Removes database keytree/valuesdatabase get - Gets database valuedatabase put - Adds/updates database valuedatabase show - Shows database contentsdatabase showkey - Shows database contentsDialplan commandsdialplan add extension - Add new extension into contextdialplan add ignorepat - Add new ignore patterndialplan add include - Include context in other contextdialplan reload - Reload extensions and *only* extensionsdialplan remove extension - Remove a specified extensiondialplan remove ignorepat - Remove ignore pattern from contextdialplan remove include - Remove a specified include from context dialplan save - Save dialplandialplan show - Show dialplanDUNDI commandsdundi debug - Enable DUNDi debuggingdundi flush - Flush DUNDi cachedundi lookup - Lookup a number in DUNDidundi no debug - Disable DUNDi debuggingdundi no store history - Disable DUNDi historic recordsdundi precache - Precache a number in DUNDidundi query - Query a DUNDi EIDdundi show entityid - Display Global Entity IDdundi show mappings - Show DUNDi mappingsdundi show peers - Show defined DUNDi peersdundi show peer - Show info on a specific DUNDi peerdundi show precache - Show DUNDi precachedundi show requests - Show DUNDi requestsdundi show trans - Show active DUNDi transactionsdundi store history - Enable DUNDi historic recordsGTalk & Jabber commandsgtalk reload - Enable Jabber debugginggtalk show channels - Show GoogleTalk Channelsjabber debug - Enable Jabber debuggingjabber debug off - Disable Jabber debugjabber reload - Enable Jabber debuggingjabber show connected - Show state of clients and components jabber test - Shows roster, but is generally used for mog's debugging.IAX2 commandsiax2 provision - Provision an IAX deviceiax2 prune realtime - Prune a cached realtime lookupiax2 reload - Reload IAX configurationiax2 set debug - Enable IAX debuggingiax2 set debug jb - Enable IAX jitterbuffer debuggingiax2 set debug jb off - Disable IAX jitterbuffer debuggingiax2 set debug off - Disable IAX debuggingiax2 set debug trunk - Enable IAX trunk debuggingiax2 set debug trunk off - Disable IAX trunk debuggingiax2 show cache - Display IAX cached dialplaniax2 show channels - List active IAX channelsiax2 show firmware - List available IAX firmwaresiax2 show netstats - List active IAX channel netstatsiax2 show peers - List defined IAX peersiax2 show peer - Show details on specific IAX peeriax2 show provisioning - Display iax provisioningiax2 show registry - Display IAX registration statusiax2 show stats - Display IAX statisticsiax2 show threads - Display IAX helper thread infoiax2 show users - List defined IAX usersiax2 test losspct - Set IAX2 incoming frame loss percentageManager commandsmanager show command - Show a manager interface command manager show commands - List manager interface commands manager show connected - List connected manager interface users manager show eventq - List manager interface queued events manager show users - List configured manager usersmanager show user - Display information on a specific manager userMGCP commandsmgcp audit endpoint - Audit specified MGCP endpointmgcp reload - Reload MGCP configurationmgcp set debug - Enable MGCP debuggingmgcp set debug off - Disable MGCP debuggingmgcp show endpoints - List defined MGCP endpointsModule managementmodule load - Load a module by namemodule reload - Reload configurationmodule show - List modules and infomodule show like - List modules and infomodule unload - Unload a module by namePRI commandspri debug span - Enables PRI debugging on a spanpri intense debug span - Enables REALLY INTENSE PRI debuggingpri no debug span - Disables PRI debugging on a spanpri set debug file - Sends PRI debug output to the specified filepri show debug - Displays current PRI debug settingspri show spans - Displays PRI Informationpri show span - Displays PRI Informationpri unset debug file - Ends PRI debug output to fileQueue commandsqueue add member - Add a channel to a specified queuequeue remove member - Removes a channel from a specified queue queue show - Show status of a specified queuertcp debug ip - Enable RTCP debugging on IPrtcp debug - Enable RTCP debuggingrtcp debug off - Disable RTCP debuggingrtcp stats - Enable RTCP statsrtcp stats off - Disable RTCP statsrtp debug ip - Enable RTP debugging on IPrtp debug - Enable RTP debuggingrtp debug off - Disable RTP debuggingsay load - Set/show the say modeshow parkedcalls - Lists parked callsshow queue - Show information for target queueshow queues - Show the queuesSIP commandssip history - Enable SIP historysip history off - Disable SIP historysip notify - Send a notify packet to a SIP peersip prune realtime - Prune cached Realtime object(s)sip prune realtime peer - Prune cached Realtime peer(s) sip prune realtime user - Prune cached Realtime user(s) sip reload - Reload SIP configurationsip set debug - Enable SIP debuggingsip set debug ip - Enable SIP debugging on IPsip set debug off - Disable SIP debuggingsip set debug peer - Enable SIP debugging on Peername sip show channels - List active SIP channelssip show channel - Show detailed SIP channel infosip show domains - List our local SIP domains.sip show history - Show SIP dialog historysip show inuse - List all inuse/limitssip show objects - List all SIP object allocationssip show peers - List defined SIP peerssip show peer - Show details on specific SIP peersip show registry - List SIP registration statussip show settings - Show SIP global settingssip show subscriptions - List active SIP subscriptionssip show users - List defined SIP userssip show user - Show details on specific SIP userSkinny commandsskinny reset - Reset Skinny device(s)skinny set debug - Enable Skinny debuggingskinny set debug off - Disable Skinny debuggingskinny show devices - List defined Skinny devicesskinny show lines - List defined Skinny lines per deviceVoicemail commandsvoicemail show users - List defined voicemail boxesvoicemail show users for - List defined voicemail boxes for target context voicemail show zones - List zone message formatsZaptel commandszap destroy channel - Destroys a channelzap restart - Fully restart zaptel channelszap show cadences - List cadenceszap show channels - Show active zapata channelszap show channel - Show information on a channelzap show status - Show all Zaptel cards status。
asterisk命令

asterisk是开源的VOIP系统。
是目前最流行的VOIP开源软件。
在使用过程中可以使用下述的命令,对系统进行监控调试。
下文来自网络,非本人原创1. 运行调试常用命令./asterisk & 在后台启动asterisk./asterisk –vvvc 启动asterisk并尽量多的在控制台显示调试信息./asterisk –r 连接asterisk控制台set verbose 9999 设置打印详细信息2.asterisk控制台下常用命令sip reload 重新加载sip配置信息sip set debug on 设置显示更多的sip信息ssip set debug off关闭显示更多的sip信息sip show channels 显示所有活动的SIP通道sip show peers 显示所有已定义的SIP peerdialplan show 显示拨号方案dialplan reload重新加载拨打方案stop gracefully 优雅地停止asteriskstop now 立即停止运行asteriskmodule show 显示所有已加载模块module load cdr_radius.so 加载模块cdr_radius.somodule reload cdr_radius.so 重新加载模块cdr_radius.somodule unload cdr_radius.so 卸载模块cdr_radius.socore show applications 显示所有的应用,比如Dial, Radius, Hangup, Answer等core show channels 显示所有的通话频道core show codecs 显示所有支持的编解码器core show functions 显示所有的功能函数ps -aux :显示进程命令。
asterisk -rvc 进入到asterisk。
输入: stop now 停止关闭asterisk。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
asterisk常用命令
Asterisk基本配置
Asterisk译为星号(*)在很多应用中被用做通配符,Astrisk做为PBX系统的完美名称,原因之一是Asterisk可以连接数目庞大的接口类型,包括:
1模拟接接口,如你的电话线或模拟电话.
2数字线路,如T-1和E-1线路
3V oip协议,如SIP和IAX
目前正式版本是IAX2,但是IAX1的所有格式都已经停掉.所以当说到IAX都是特拽IAX2
使用接口配置文件
1.Zaptel.conf:硬件接口基层配置,我们将建立一个FX0和一个FXS通道.
2.zapata.conf:硬件配置Asterisk的接口.
3.extension.conf:拨号方案文件.
4.sip.conf:配置SIP协议的文件
5.iax.conf:配置呼入和呼出IAX通道的文件
******编辑完zaptel.conf文件,需要使用/sbin/ztcfg -vv装载配置到硬件(不须要详细输出可以省略-vv);修改信令方法需要重启.在编辑sip.conf和iax.conf文档后,分别需要装载chan_iax2.so和chan_sip.so
Asterisk译为星号(*)在很多应用中被用做通配符,Astrisk做为PBX系统的完美名称,原因之一是Asterisk可以连接数目庞大的接口类型,包括:
1模拟接接口,如你的电话线或模拟电话.
2数字线路,如T-1和E-1线路
3V oip协议,如SIP和IAX
目前正式版本是IAX2,但是IAX1的所有格式都已经停掉.所以当说到IAX都是特拽IAX2
使用接口配置文件
1.Zaptel.conf:硬件接口基层配置,我们将建立一个FX0和一个FXS通道.
2.zapata.conf:硬件配置Asterisk的接口.
3.extension.conf:拨号方案文件.
4.sip.conf:配置SIP协议的文件
5.iax.conf:配置呼入和呼出IAX通道的文件
******编辑完zaptel.conf文件,需要使用/sbin/ztcfg -vv装载配置到硬件(不须要详细输出可以省略-vv);修改信令方法需要重启.在编辑sip.conf和iax.conf文档后,分别需要装载chan_iax2.so和chan_sip.so******
SIP
SIP(会话初始协议),通常用于VOIP电话,进行呼叫建立,呼叫协商,呼叫结束.它帮助两个端互相通认,但它不处理媒体;当呼叫建立后,他通过实时传输协议(RTP)在电话A到电话B直接传输媒体
SIP和RTP
SIP是一个应用层的信令协议.他使用的端口是5060(通常)进行通信.SIP可以通过UDP 和TCP传输层协议进行传输.Asterisk目前没有TCP用于传输SIP信息.
RTP用于端点间传输媒体(语音),Asterisk中RTP使用大数字的无特权端口(默认10,000到20,000)
SIP优点:普通的被接受和结构灵活.其它的VOIP协议还有H.323,IAX,MGCP.
SIP配置
/etc/asterisk/sip.conf文件中:
[general]
srvlookup=yet
[10000]
type=friend;可以定义用户\端\朋友
asterisk常用命令
1. 运行调试常用命令
./asterisk & 在后台启动asterisk
./asterisk –vvvc 启动asterisk并尽量多的在控制台显示调试信息
./asterisk –r 连接asterisk控制台
set verbose 9999 设置打印详细信息
2.asterisk控制台下常用命令
sip reload 重新加载sip配置信息
sip set debug 设置显示更多的sip信息
sip set debug off关闭显示更多的sip信息
sip show channels 显示所有活动的SIP通道
sip show peers 显示所有已定义的SIP peer
dialplan show 显示拨号方案
dialplan reload重新加载拨打方案
stop gracefully 优雅地停止asterisk
stop now 立即停止运行asterisk
module show 显示所有已加载模块
module load cdr_radius.so 加载模块cdr_radius.so
module reload cdr_radius.so 重新加载模块cdr_radius.so
module unload cdr_radius.so 卸载模块cdr_radius.so
core show applications 显示所有的应用,比如Dial, Radius, Hangup, Answer等core show channels 显示所有的通话频道
core show codecs 显示所有支持的编解码器
core show functions 显示所有的功能函数
asterisk -r之后
敲restart now,好像。