asterisk常用命令

合集下载

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

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 安装

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拨号方案常用函数

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配置文件列表及常用指令

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使用方法

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命令大全

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命令

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。

Asterisk CLI 命令列表

Asterisk CLI 命令列表

以下的命令是在CLI控制台上用help命令列出的集合:!: 执行一个shell command用法:!<command>说明:执行一个shell命令abort halt: 取消一个暂停用法:abort shutdown说明:让Asterisk放弃一个正在执行的shutdown或者restart,正常继续运行呼叫操作add extension: 增加新的extension到context用法:add extension <exten>,<priority>,<app>,<app-data> into <context> [replace]说明:这个命令会增加一个新的extension到<context>。

如果已经有了同样的priority的extension‘,最后的replace’参数可以替代这个extension例子:add extension 6123,1,Dial,IAX/216.207.245.56/6123 into local现在,你可以拨打6123,并且和Markster交谈了。

add ignorepat:增加新的匹配模式用法:add ignorepat <pattern> into <context>说明:这个命令增加一个新的匹配模式到context <context>例子:add ignorepat _3XX into localadd queue member: 向指定的队列增加一个通道用法:add queue member <channel> to <queue> [penalty <penalty>]说明:向一个队列增加一个通道成员,[penalty <penalty>]指明这个通道成员的优先级ael debug contexts:启用AEL contexts调试ael debug macros:启用AEL macros调试ael debug read:启用AEL read调试ael debug tokens:启用AEL tokens调试ael no debug:关闭AEL调试信息ael reload:重载AEL配置agent logoff:让一个座席离线用法:agent logoff <channel> [soft]说明:让一个座席不在登录进来,如果指定了soft选项,不会强行挂机退出通话agi debug:启用AGI调试用法:agi debug说明:启用为调试目的而将AGI传输的内容输出agi no debug:关闭AGI调试用法:agi no debug说明:关闭为调试目的而将AGI传输的内容输出到控制台cb mysql status:显示CBMySQL的连接状态信息用法:cb mysql status说明:列出当前CBMySQL的mysql连接状态结果例子:Connected to conference@localhost, port 3306 with username mvb2000user for 6 days, 10 hours, 11 minutes, 40 seconds.Wrote 0 records since last restart.cdr mysql status:显示cdr_mysql的连接状态信息用法:cdr mysql status说明:显示cdr_mysql的当前连接状态例子:Connected to mvb2000cdrdb@localhost, port 3306 using table cdr for 6 days, 10 hours, 14 minutes, 46 seconds.Wrote 7 records since last restart.cdr status:Display the CDR status用法:cdr status说明:显示通话详细记录引擎的系统状态例子:CDR logging: enabledCDR mode: simpleCDR registered backend: csvCDR registered backend: mysqlCDR registered backend: cdr_managerdatabase del:删除数据库的key/value用法:database del <family> <key>说明:删除Asterisk数据库中指定的family和key的记录database deltree: Removes database keytree/values用法:database deltree <family> [keytree]说明:在Asterisk数据库中删除一个family或者指定的在family中的keytreedatabase get: Gets database value用法:database get <family> <key>说明:在Asterisk数据库中为指定的family和key检索记录database put: Adds/updates database value用法:database put <family> <key> <value>说明:在asterisk数据库中以指定的famliy、key、value新增或者修改一个记录database show显示数据库内容用法:database show [family [keytree]]说明:显示Asterisk数据库的内容,可选的关联一个指定的family或者family和keytreedatabase showkey显示数据库内容用法:database showkey <keytree>说明:显示Asterisk数据库内容,关联到指定的keydebug channel:启用在一个通道上的调试信息用法:debug channel <channel>说明:在指定的通道上打开调试信息debug level:设置全局调试信息的等级用法:debug level <level> [filename]说明:设置调试为指定的等级(0为关闭调试)。

queue命令 asterisk

queue命令 asterisk

Queues.confQueues.conf-[general];; Global settings for call queues;全局设置; Persistent Members; Store each dynamic member in each queue in the astdb so that; when asterisk is restarted, each member will be automatically; read into their recorded queues. Default is 'yes'.;把每一个QUEUE里面的成员都存到astDB里面,这样当asterisk重启的时候,每一个成员都能够自动的恢复到Queue当中,default='yes'persistentmembers = yes;; AutoFill Behavior; The old/current behavior of the queue has a serial type behavior; in that the queue will make all waiting callers wait in the queue; even if there is more than one available member ready to take; calls until the head caller is connected with the member they; were trying to get to. The next waiting caller in line then; becomes the head caller, and they are then connected with the; next available member and all available members and waiting callers; waits while this happens. The new behavior, enabled by setting; autofill=yes makes sure that when the waiting callers are connecting; with available members in a parallel fashion until there are; no more available members or no more waiting callers. This is; probably more along the lines of how a queue should work and; in most cases, you will want to enable this behavior. If you; do not specify or comment out this option, it will default to no; to keep backward compatibility with the old behavior.;会记住每一个成员和用户当前的状态,自动去尝试连接坐席,并自动更新用户当前的状态.比如之前还有几个人在等待.下一个等待的用户将会变成第一个用户,然后他们会连接到第一个可用的分机。

Asterisk常用调试命令

Asterisk常用调试命令

Asterisk基本配置Asterisk译为星号(*在很多应用中被用做通配符,Astrisk做为PBX系统的完美名称,原因之一是Asterisk可以连接数目庞大的接口类型,包括:1模拟接接口,如你的电话线或模拟电话.2数字线路,如T-1和E-1线路3Voip协议,如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.soAsterisk译为星号(*在很多应用中被用做通配符,Astrisk做为PBX系统的完美名称,原因之一是Asterisk可以连接数目庞大的接口类型,包括:1模拟接接口,如你的电话线或模拟电话.2数字线路,如T-1和E-1线路3Voip协议,如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******SIPSIP(会话初始协议,通常用于VOIP电话,进行呼叫建立,呼叫协商,呼叫结束.它帮助两个端互相通认,但它不处理媒体;当呼叫建立后,他通过实时传输协议(RTP在电话A到电话B直接传输媒体SIP和RTPSIP是一个应用层的信令协议.他使用的端口是5060(通常进行通信.SIP可以通过UDP和TCP传输层协议进行传输.Asterisk目前没有TCP用于传输SIP信息.RTP用于端点间传输媒体(语音,Asterisk中RTP使用大数字的无特权端口(默认10,000到20,000SIP优点:普通的被接受和结构灵活.其它的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 reloadsip set debug 设置显示更多的sip信息sip set debug off关闭显示更多的sip信息sip show channels 显示所有活动的SIP通道sip show peers 显示所有已定义的SIP peersip show channels 查看当前SIP协议的并发。

Asterisk配置笔记(yiqiangsong)

Asterisk配置笔记(yiqiangsong)

Asterisk配置笔记(yiqiangsong)一、Aterik接口类型二、使用接口配置文件1.Zaptel.conf:硬件接口基层配置,我们将建立一个F某0和一个F 某S通道.2.zapata.conf:硬件配置Aterik的接口.3.e某tenion.conf:拨号方案文件.4.ip.conf:配置SIP协议的文件5.ia某.conf:配置呼入和呼出IA某通道的文件三、F某O与F某S通信区别:区别简单,就在于连接的那端提供拨号音.F某O不生成拨号音,而是接收.F某S端口提供拨号音和震铃电压,在有呼叫的时候提醒用户.两者接口都提供双向通讯(同时双方向的通讯传输).F某S卡必须像中心局(CO)进行运转,使用F某O信令.同理,F某O卡连接CO,就意味着它需要像终端进行运转,使用F某S信令.四、接口文件配置1、Zaptel配置(F某O)在/etc/zaptel.conf文件,用于配置硬件,可以定义F某S端口与F 某O信令的配置f某k=1;定义f某端口采用通道1以k信令协议;f某ok=2;定义f某o端口采用通道2以k信令协议loadzone=udefaultzone=u信令协议:Looptart(l),groundtart(g),kewltart(k),使用k外信令协议,把f某ok中的k替换l或g,Aterik的模拟电路推荐k信令协议.某某某某某某编辑完zaptel.conf文件,需要使用/bin/ztcfg-vv装载配置到硬件(不须要详细输出可以省略-vv);修改信令方法需要重启.在编辑ip.conf和ia某.conf文档后,分别需要装载chan_ia某2.o和chan_ip.o2、Zapata配置硬件配置Aterik的接口[trunkgroup];定义一个主干组;defineanytrunkgroup[channel];硬件通道和他们选项信令方式.;hardwarechannel;硬件通道;default;默认buydetect=ye;增加这两行,要不F某O口不能检测到挂机信号。

Asterisk学习笔记

Asterisk学习笔记

Asterisk学习笔记Asterisk学习笔记1.安装Asterisk需要那些安装包。

a)Asterisk(pure voip only need this)b)Zaptel(support 硬件板卡支持)c)Pri(libpri)2.Asterisk的版本a)Asterisk目前有1.4和1.6两个分支,我们的HCC系统采用的是1.4分支上进行扩展开发。

1.6 no longer support zaptel,增加了很多新features,相对与1.4版本变动比价大。

b)Upgrade:ael 取消了Macro() 用Gosub()来代替。

Applications:ChanIsAvail()增加-t选项3.How to install Asterisk on Linux.a)Login as rootb)tar zxvf Asterisk-1.6…解压c)进入sub folderd)#make cleane)#./configuref)#makeg)#make installh)#make samples(安装示例配置)4.How to run/stop Asteriska)进入console,直接运行#asterisk 来运行b)进入asterisk命令提示界面:#asterisk –r 然后CLI>stop nowc)Asterisk可以用safe_asterisk来安全启动,通过safe_asterisk 启动后如果asterisk crash会dump core到/tmp目录,并且给administrator发email告警。

5.Asterisk目录结构a)/usr/lib/asterisk/modules 这个目录下包含所有可加载的asterisk模块b)/var/spool/asterisk 这个目录下包括outgoing gcall tmp voicemail目录asterisk会去monitor这个目录,可以用在做自动外呼等等c)/var/log/asterisk用来store logsd)/var/log/asterisk/cdr-csv用来store cdrs in csv format. CSV=comma-separate-value6.SIP in Asteriska)Asterisk中sip配置文件为/etc/asterisk/sip.confb)Asterisk支持IAX与SIP VOIP协议。

Asterisk的AMI中常用的重要的AMI操作

Asterisk的AMI中常用的重要的AMI操作

Asterisk的AMI中常用的重要的AMI操作1. AbsoluteTimeoutAbsoluteTimeout :这个命令将要求Asterisk在指定秒数后挂断特定的通道,从而有效地结束通话。

参数:Channel :哪些渠道挂断,如SIP/123-1c20Timeout :到通道应挂断的秒数例子:请求信息Action: AbsoluteTimeoutChannel: SIP/123-1c20Timeout: 20返回成功信息Response: SuccessMessage: Timeout Set返回失败信息Response: ErrorMessage: No such channelChangeMonitor :更改记录某通道信息文件名。

参数:Channel:通道名称File:文件名例子:发送请求ACTION: ChangeMonitorChannel: SIP/x7065558529-1c20File: 20050103-140105_cc51返回失败信息Response: ErrorMessage: No such channel返回成功信息Response: SuccessMessage: Stopped monitoring channel2. CommandCommand :发送Asterisk CLI命令。

参数:Command:Asterisk CLI 命令。

例子:发送请求ACTION: COMMANDcommand: Show Channels返回信息Response: FollowsChannel (Context Extension Pri ) State Appl. Data0 active channel(s)--END COMMAND-3 EventsEvents :事件控制流,用于启用/禁用发送给管理客户端的事件。

参数:EventMask: 'on'表示所有事件均会被发送到管理客户端。

asterisk安装和asterisk_sip控制台信息

asterisk安装和asterisk_sip控制台信息

asterisk安装和asterisk_sip控制台信息1. 检查依赖的包是否安装:依赖的包有gcc--libpri,zaptelasteriskncurses-devellibtermcap-develkernel-develkernel-smp-develgcc-c++openssl-develnewt-develzlib-develunixODBC-devellibtoolmake利用 rpm -q 名称进行查询看是否安装,无时进行安装,当然用源安装快!2.asterisk 的安装和环境的搭建首先在FTP上(自己Google)得到压缩包,或者ssh 远程得到命令为 get 名称自己的主机名称:放置目录安装到/usr/src目录下解压缩、切换目录(/usr/src/asterisk-xxx)、执行(sudo ./configure)、sudo make、sudo make install 、sudo make samples、sudo make progdocs修改配置: 1.1 在/etc/asterisk/sip.conf 中添加用户:[1001]type=friendsecret=testhost=dynamic[1002]type=friendsecret=testhost=dynamic1.2 /etc/asterisk/extensions.conf 中添加:[test]exten => 1001,1,Dial(SIP/1001)exten => 1002,1,Dial(SIP/1002)===============================各项讲解=================================== sip环境的简易配置:(所有的配置文件都在/etc/asterisk目录下,其它地方的配置无效) sip.conf[general] 所有用户和对端的默认选项allowoverlap=nobindport=5060 监听端口bindaddr=0.0.0.0 监听所有过来的电话srvlookup=yes 使用 DNS 服务qualify=yescontext=test 拨号方案[1001]type=friend 类型用户类型的用于认证呼入呼叫端Peer 是用于呼出呼叫朋友类型两者都有secret=test 密码host=dynamic 动态IP[1002]type=friendsecret=testhost=dynamicextensions.conf在文档的最后添加:[test]exten => 1001,1,Dial(SIP/1001) 呼叫超时秒数exten => 1002,1,Dial(SIP/1002)====================================== ===================================运行asterisk的命令为:asterisk & or sudo /usr/sbin/asterisk -vvvvvvcg停止命令为:stop now连接到命令行:asterisk -rvvvdialplan reloadsip reload显示支持的通信类型: show channeltypes打开调试信息: sip set debug现在astersik下的sip环境就搭建完成了,开启astersik ================================== sudo /usr/sbin/asterisk -vvvvvvcg =============================== ==登录到Astersk服务器运行控制台: asterisk -crvvv查看登录用户 : sip shwo peers*CLI> sip show peersName/username Host Dyn Nat ACL Port Status1004 (Unspecified) D 0 UNKNOW N1003 (Unspecified) D 0 UNKNOW N1002 (Unspecified) D 0 UNKNOW N1001/1001 192.168.123.58 D 39478 OK (101 ms)4 sip peers [Monitored: 1 online, 3 offline Unmonitored: 0 online, 0 offline]*CLI>查看详细记录: sip show peer 1001*CLI> sip show peer 1002 ////注意与查看全部的区别 peers peer* Name : 1002Secret : <Set>MD5Secret : <Not set>Context : testSubscr.Cont. : <Not set>Language :AMA flags : UnknownTransfer mode: openCallingPres : Presentation Allowed, Not ScreenedCallgroup :Pickupgroup :Mailbox :VM Extension : asteriskLastMsgsSent : 32767/65535Call limit : 0Dynamic : YesCallerid : "" <>MaxCallBR : 384 kbpsExpire : -1Insecure : noNat : RFC3581ACL : NoT38 pt UDPTL : NoCanReinvite : YesPromiscRedir : NoUser=Phone : NoVideo Support: NoTrust RPID : NoSend RPID : NoSubscriptions: YesOverlap dial : NoDTMFmode : rfc2833LastMsg : 0ToHost :Addr->IP : (Unspecified) Port 0 Defaddr->IP : 0.0.0.0 Port 5060Def. Username:SIP Options : (none)Codecs : 0x8000e (gsm|ulaw|alaw|h263) Codec Order : (none)Auto-Framing: NoStatus : UNKNOWNUseragent :Reg. Contact :*CLI>重新加载拨号方案:dialplan reload*CLI> dialplan reload== Parsing '/etc/asterisk/extensions.conf': Found== Setting global variable 'CONSOLE' to 'Console/dsp'== Setting global variable 'IAXINFO' to 'guest'== Setting global variable 'TRUNK' to 'Zap/G2'== Setting global variable 'TRUNKMSD' to '1'-- Registered extension context 'dundi-e164-canonical'-- Registered extension context 'dundi-e164-customers'-- Registered extension context 'dundi-e164-via-pstn'-- Registered extension context 'dundi-e164-local'-- Including context 'dundi-e164-canonical' in context 'dundi-e164-local'-- Including context 'dundi-e164-customers' in context 'dundi-e164-local'-- Including context 'dundi-e164-via-pstn' in context 'dundi-e164-local'-- Registered extension context 'dundi-e164-switch'-- Including switch 'DUNDi/e164' in context 'dundi-e164-switch'-- Registered extension context 'dundi-e164-lookup'-- Including context 'dundi-e164-local' in context 'dundi-e164-lookup'-- Including context 'dundi-e164-switch' in context 'dundi-e164-lookup'-- Registered extension context 'macro-dundi-e164'-- Added extension 's' priority 1 to macro-dundi-e164-- Including context 'dundi-e164-lookup' in context 'macro-dundi-e164'-- Registered extension context 'iaxtel700'-- Added extension '_91700XXXXXXX' priority 1 to iaxtel700 -- Registered extension context 'iaxprovider'-- Registered extension context 'trunkint'-- Added extension '_9011.' priority 1 to trunkint-- Added extension '_9011.' priority 2 to trunkint-- Registered extension context 'trunkld'-- Added extension '_91NXXNXXXXXX' priority 1 to trunkld -- Added extension '_91NXXNXXXXXX' priority 2 to trunkld -- Registered extension context 'trunklocal'-- Added extension '_9NXXXXXX' priority 1 to trunklocal-- Registered extension context 'trunktollfree'-- Added extension '_91800NXXXXXX' priority 1 to trunktollfree-- Added extension '_91888NXXXXXX' priority 1 to trunktollfree-- Added extension '_91877NXXXXXX' priority 1 to trunktollfree-- Added extension '_91866NXXXXXX' priority 1 to trunktollfree-- Registered extension context 'international'-- Including context 'longdistance' in context 'international' -- Including context 'trunkint' in context 'international'-- Registered extension context 'longdistance'-- Including context 'local' in context 'longdistance'-- Including context 'trunkld' in context 'longdistance'-- Registered extension context 'local'-- Including context 'default' in context 'local'-- Including context 'trunklocal' in context 'local'-- Including context 'iaxtel700' in context 'local'-- Including context 'trunktollfree' in context 'local'-- Including context 'iaxprovider' in context 'local'-- Including context 'parkedcalls' in context 'local'-- Registered extension context 'macro-trunkdial'-- Added extension 's' priority 1 to macro-trunkdial-- Added extension 's' priority 2 to macro-trunkdial-- Added extension 's-NOANSWER' priority 1 to macro-trunkdial-- Added extension 's-BUSY' priority 1 to macro-trunkdial-- Added extension '_s-.' priority 1 to macro-trunkdial-- Registered extension context 'macro-stdexten'-- Added extension 's' priority 1 to macro-stdexten-- Added extension 's' priority 2 to macro-stdexten-- Added extension 's-NOANSWER' priority 1 to macro-stdexten-- Added extension 's-NOANSWER' priority 2 to macro-stdexten-- Added extension 's-BUSY' priority 1 to macro-stdexten-- Added extension 's-BUSY' priority 2 to macro-stdexten-- Added extension '_s-.' priority 1 to macro-stdexten-- Added extension 'a' priority 1 to macro-stdexten-- Registered extension context 'macro-stdPrivacyexten'-- Added extension 's' priority 1 to macro-stdPrivacyexten -- Added extension 's' priority 2 to macro-stdPrivacyexten -- Added extension 's-NOANSWER' priority 1 to macro-stdPrivacyexten-- Added extension 's-NOANSWER' priority 2 to macro-stdPrivacyexten-- Added extension 's-BUSY' priority 1 to macro-stdPrivacyexten-- Added extension 's-BUSY' priority 2 to macro-stdPrivacyexten-- Added extension 's-DONTCALL' priority 1 to macro-stdPrivacyexten-- Added extension 's-TORTURE' priority 1 to macro-stdPrivacyexten-- Added extension '_s-.' priority 1 to macro-stdPrivacyexten -- Added extension 'a' priority 1 to macro-stdPrivacyexten -- Registered extension context 'macro-page'-- Added extension 's' priority 1 to macro-page-- Added extension 's' priority 2 to macro-page-- Added extension 's' priority 3 to macro-page-- Added extension 's' priority 4 to macro-page-- Added extension 's' priority 5 to macro-page-- Added extension 's' priority 6 to macro-page-- Added extension 's' priority 7 to macro-page-- Registered extension context 'demo'-- Added extension 's' priority 1 to demo-- Added extension 's' priority 2 to demo-- Added extension 's' priority 3 to demo-- Added extension 's' priority 4 to demo-- Added extension 's' priority 5 to demo-- Added extension 's' priority 6 to demo-- Added extension 's' priority 7 to demo-- Added extension '2' priority 1 to demo-- Added extension '2' priority 2 to demo-- Added extension '3' priority 1 to demo-- Added extension '3' priority 2 to demo-- Added extension '1000' priority 1 to demo-- Added extension '1234' priority 1 to demo-- Added extension '1234' priority 2 to demo -- Added extension '1235' priority 1 to demo -- Added extension '1236' priority 1 to demo -- Added extension '1236' priority 2 to demo -- Added extension '#' priority 1 to demo-- Added extension '#' priority 2 to demo-- Added extension 't' priority 1 to demo-- Added extension 'i' priority 1 to demo-- Added extension '500' priority 1 to demo -- Added extension '500' priority 2 to demo -- Added extension '500' priority 3 to demo -- Added extension '500' priority 4 to demo -- Added extension '600' priority 1 to demo -- Added extension '600' priority 2 to demo -- Added extension '600' priority 3 to demo -- Added extension '600' priority 4 to demo -- Added extension '76245' priority 1 to demo -- Added extension '_7XXX' priority 1 to demo -- Added extension '7999' priority 1 to demo -- Added extension '7999' priority 2 to demo -- Added extension '8500' priority 1 to demo -- Added extension '8500' priority 2 to demo -- Registered extension context 'page'-- Added extension '_X.' priority 1 to page-- Registered extension context 'default'-- Including context 'demo' in context 'default' -- Registered extension context 'test'-- Added extension '1001' priority 1 to test-- Added extension '1002' priority 1 to test-- Added extension '1003' priority 1 to test-- Added extension '1004' priority 1 to test== Parsing '/etc/asterisk/users.conf': FoundDialplan reloaded.*CLI>重新加载SIP方案:sip reload*CLI> sip reload*CLI> Reloading SIP== Parsing '/etc/asterisk/sip.conf': Found== Parsing '/etc/asterisk/users.conf': Found== Parsing '/etc/asterisk/sip_notify.conf': Found*CLI>=========================sip 控制台信息=====================================1. 运行调试常用命令./asterisk & 在后台运行./asterisk -vvvc 启动并尽量多的在控制台显示调试信息./asterisk -r 连接控制台set verbose 9999 设置打印详细信息2. 控制台下常用命令sip reload 重新加载sip信息sip set debug 设置显示更多的sip信息sip set debug off 关闭显示更多的sip信息sip show channels 显示所有活动的sip通道sip show users 显示用户情况sip show user xxx 显示用户xxx的情况dialplan show 显示拨号方案dialplan reload 重新加载拨号方案stop gracefully 优雅的停止asteriskstop now 立即停止运行module show 显示已有的加载module load cdr_radius.so 加载模块 cdrxxxmodule reload cdr_radius.so 重新加载模块 cdrxxxmodule unload cdr_radius.so 卸载模块 cdrxxxcore show applications 显示所有的应用比如Dial Radius Hangup Answer等core show channels 显示所有的通话通道core show codecs 显示所有支持的编码core show functions 显示所有的功能函数-------------------------------------------------------------------------*CLI> help! Execute a shell commandabort halt Cancel a running haltael 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 configurationagent logoff Sets an agent offlineagent show Show status of agentsagent show online Show all online agentsagi 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 helpcdr status Display the CDR statusconsole 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 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 channel core show channeltypes List available channel typescore show channeltype Give more details on that channeltypecore 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 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 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 contextdialplan save Save dialplandialplan show Show dialplandnsmgr reload Reloads the DNS manager configurationdnsmgr status Display the DNS manager statusdundi 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 recordsfeature show Lists configured featuresfile convert Convert audio filegroup show channels Display active channels with group(s) help Display help list, or specific help on a commandhttp show status Display HTTP server statusiax2 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 percentage indication add Add the given indication to the countryindication remove Remove the given indication from the countryindication 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 channelsmanager show command Show a manager interface commandmanager show commands List manager interface commandsmanager show connected List connected manager interface usersmanager show eventq List manager interface queued events manager show users List configured manager usersmanager show user Display information on a specific manager usermgcp 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 endpointsmixmonitor Execute a MixMonitor command.module 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 namemoh reload Music On Holdmoh show classes List MOH classesmoh show files List MOH file-based classesno debug channeloriginate Originate a callqueue add member Add a channel to a specified queuequeue remove member Removes a channel from a specified queuequeue show Show status of a specified queuerealtime load Used to print out RealTime variables.realtime pgsql status Shows connection information for the Postgresql RealTime driverrealtime update Used to update RealTime variables.restart gracefully Restart Asterisk gracefullyrestart now Restart Asterisk immediatelyrestart when convenient Restart Asterisk at empty call volumertcp 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 queuessip 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 Peernamesip 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 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 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 volumestun debug Enable STUN debuggingstun debug off Disable STUN debuggingudptl debug Enable UDPTL debuggingudptl debug ip Enable UDPTL debugging on IPudptl debug off Disable UDPTL debuggingvoicemail show users List defined voicemail boxesvoicemail show zones List zone message formats*CLI> [Jan 20 16:15:05] NOTICE[6579]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1001。

asterisk安装调试文档

asterisk安装调试文档

Asterisk安装:安装命令: yum instll asterisk这个命令安装的普通的release版本如果需要调试:到SVN下载asterisk-1.8.8.1上传到虚拟机上执行./configure --配置makefile文件Make --编译asteriskMake install --安装asteriskAsterisk一般配置用户配置:用户是在数据库中配置的相关配置文件:1.extconfig.conf,配置用户数据来源sipusers => mysql,global,soc_pbx_users;sippeers => mysql,general,soc_pbx_users;mysql:固定,是指用户加载方式general:对接res_mysql.conf的数据库连接配置soc_pbx_users:用户所在的表2.res_mysql.conf配置数据库连接串[general]dbhost = 10.1.18.105数据库地址dbname = asterisk 数据库表空间dbuser = asterisk 数据库用户名dbpass = asterisk 数据库密码dbport = 3306 数据库端口话单配置: 如不需要话单,可以不配置该项配置文件:cdr_mysql.conf配置项:[general] 和extconfig.conf中配置对应dbhost = 10.1.18.105数据库地址dbname = asterisk 数据库表空间dbuser = asterisk 数据库用户名dbpass = asterisk 数据库密码dbport = 3306 数据库端口[produre] 标志调用存储过程配置项produrename=p_insert_record存储过程名次paraNum=7 存储过程参数paraname1=src 下面是存储过程参数列表,值需要对应cdr的关键字paraname2=dstparaname3=dcontextparaname4=clidparaname5=channelparaname6=dstchannel拨号方案配置:[default-test] --对应USER表中的context字段exten => _XXX.,1,Set(CALLFILENAME=${CALLERID(num)}_${EXTEN}_${UNIQUEID})exten => _XXX.,n,Dial(SIP/${EXTEN},10,m)exten => _XXX.,n,Hangup()运行命令: service asterisk start 开始Service asterisk stop 停止Service asterisk restart 重启调试步骤:1.执行gdb asterisk2.由于涉及到动态库调用,在asterisk主程序中可能没有涉及到所需要调试的代码,所以需要先预先找到所涉及的代码路径,代码文件名称,需要断点的行数执行 b chan_sip.c:20333 b 是break简称chan_sip.c文件名20333行号可能会提示:No source file named chan_sip.c.Make breakpoint pending on future shared library load? (y or [n])选y执行info break可以看到当前断点列表,如下Num Type Disp Enb Address What1 breakpoint keep y <PENDING> chan_sip.c:203333.运行程序Run -vvvvvvvvg -vvvvvvg是程序运行阐述4.使用软终端调用服务,确保调用流程可以走到所设立的断点处Gdb命令N单步执行C 执行到下一个断点,如果只有一个断点,直接走完liucS 进入到函数中执行Bt 查看进程调用堆栈,可以直观的看到程序调用路径P变量名限制变量的值一.ASTERISK各个模块功能介绍:内核模块内部核心由以下六个部分组成:PBX交换核心模块(PBX Switching Core)、调度和I/O管理模块(Scheduler and I/O Manager)、应用调用模块(Application Launcher)、编解码转换模块(Codec Translator)、动态模块加载器模块(Dynamic Module Loader)和CDR生成模块(CDR Core)。

Asterisk的连接与管理

Asterisk的连接与管理

Asterisk的管理方法很晚了,刚才稍微看了一下Asterisk的管理方法。

现在想做一个记录。

Asterisk有三种管理方法,最常用的当然是通过asterisk命令进入CLI模式对Asterisk进行管理。

另外还有两种方法:1)用TCP协议,连接到5038端口,然后用AMI命令来管理Asterisk;2)用HTTP协议,连接到8080端口,通过WEB的形式对Asterisk进行管理;下面是基本的URL:http://xxx.xxx.xxx.xxx:8088/static/config/index.html1.Asterisk命令行命令行是最常用的方法,执行的命令有两种:或者:对应的套接字文件是:/var/run/asterisk/asterisk.ctl管理员可以配置cli_permissions.conf对操作系统用户登录asterisk进行授权。

具体的授权方法就不在这里介绍,有兴趣的人可以看看cli_premissions.conf中的说明。

rasterisk的作用基本上和asterisk –r是一致的,不作特别介绍,只对Asterisk命令进行分析。

下面是asterisk的帮助信息:2.使用AMI方法AMI方法是通过socket登录到Asterisk中,然后用AMI命令对Asterisk进行管理。

通过这个管理接口,我们可以用某种编程语言开发出自己的Asterisk管理平台。

实际上,很多基于GUI的管理平台也是通过这种方法对Asterisk进行管理。

这种方法的配置文件是:manager.conf要使用这种方法,必须先要激活它,下面是配置文件中相关的配置内容:操作方式如下:3.WEB管理Web管理的配置文件是:http.conf要使用这种方法,需要修改下面配置内容:浏览器。

具体的登录路径类似于:http:// xxx.xxx.xxx.xxx:8088/static/config/index.html 使用的帐号密码是manager.conf中定义的帐号密码。

Asterisk命令MeetMe详解

Asterisk命令MeetMe详解

Asterisk命令MeetMe详解MeetMe概要MeetMe 会议桥描述语法:MeetMe([confno][,[options][,pin]])用途: 让用户进入一个指定的MeetMe会议。

如果省略了会议编号,系统会提示用户选择一个。

(注意:MeetMe会议需要一个Zaptel时钟才能工作,你可以不装任何板卡,但是你需要安装Zaptel)参数:options可以为空,也可以设置一个或者多个参数,参数有如下一些:•'1' —当会议室的第一个成员进入会议时,不向用户提示"you are currently the only person in this conference您是当前会议室唯一的成员" (Asterisk 1.2.11以上版本才支持)•'a' —设为管理员•'A' —设为标记成员•'b' —运行在${MEETME_AGI_BACKGROUND}指定的AGI脚本o缺省: conf-background.agi (注意:需要会议室内有ZAP 通道才能运行)•'c' —加入会议时提示会议成员数量•'d' —动态加入会议•'D' —动态加入会议,提示要求输入密码o如果用户不想给会议设密码,可以直接按井•'e' —选择一个空会议。

•'E' —选择一个没密码的空会议。

•'F' —在会议中透传DTMF按键,所有成员都能收到DTMF。

•'i' —提示有成员加入/离开会议with review—需要chan_zap.so (Asterisk 1.2以上版本才支持)•'I' --提示有成员加入/离开会议 without review•'M' —当会议室只有一个人的时候放等待音乐•'m' —旁听状态(只能听,不能说)•'p' —允许用户按井退出会议室•'P' —无论用户是否指定,总是提示用户输入会议密码•'q' —安静模式 (有成员加入/离开会议不做任何提示)•'r' —会议录音 (录音文件名${MEETME_RECORDINGFILE},格式${MEETME_RECORDINGFORMAT})。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 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,好像。

相关文档
最新文档