返回列表 發帖
备用帖子。

TOP

第一command,fs_cli

0061.png

TOP

CLI里的help有
  1. freeswitch@internal> /help
  2. Command                         Description
  3. -----------------------------------------------
  4. /help                           Help
  5. /exit, /quit, /bye, ...         Exit the program.
  6. /event, /noevents, /nixevent    Event commands.
  7. /log, /nolog                    Log commands.
  8. /uuid                           Filter logs for a single call uuid
  9. /filter                         Filter commands.
  10. /debug [0-7]                    Set debug level.

  11. freeswitch@internal>
複製代碼

TOP

估计大家用得最多的就是sofia status

0062.png

TOP

出了#18的简单help之外,如果单打help就有下面的详细能接受的commands
  1. freeswitch@internal> help

  2. Valid Commands:

  3. ...,,shutdown,mod_commands
  4. acl,<ip> <list_name>,compare an ip to an acl list,mod_commands
  5. alias,[add|stickyadd] <alias> <command> | del [<alias>|*],Alias,mod_commands
  6. banner,,Returns the system banner,mod_commands
  7. bg_system,<command>,Execute a system command in the background,mod_commands
  8. bgapi,<command>[ <arg>],Execute an api command in a thread,mod_commands
  9. break,<uuid> [all],Break,mod_commands
  10. cdr_csv,parameters,cdr_csv controls,mod_cdr_csv
  11. chat,<proto>|<from>|<to>|<message>|[<content-type>],chat,mod_dptools
  12. cluechoo,syntax,Cluechoo API,mod_cluechoo
  13. complete,add <word>|del [<word>|*],Complete,mod_commands
  14. cond,<expr> ? <true val> : <false val>,Eval a conditional,mod_commands
  15. conference,             list [delim <string>]|[count]
  16.                 xml_list
  17.                 energy <member_id|all|last|non_moderator> [<newval>]
  18.                 volume_in <member_id|all|last|non_moderator> [<newval>]
  19.                 volume_out <member_id|all|last|non_moderator> [<newval>]
  20.                 play <file_path> [async|<member_id>]
  21.                 say <text>
  22.                 saymember <member_id> <text>
  23.                 stop <[current|all|async|last]> [<member_id>]
  24.                 dtmf <[member_id|all|last|non_moderator]> <digits>
  25.                 kick <[member_id|all|last|non_moderator]> [<optional sound file>]
  26.                 hup <[member_id|all|last|non_moderator]>
  27.                 mute <[member_id|all]|last|non_moderator>
  28.                 unmute <[member_id|all]|last|non_moderator>
  29.                 deaf <[member_id|all]|last|non_moderator>
  30.                 undeaf <[member_id|all]|last|non_moderator>
  31.                 relate <member_id> <other_member_id> [nospeak|nohear|clear]
  32.                 lock
  33.                 unlock
  34.                 agc
  35.                 dial <endpoint_module_name>/<destination> <callerid number> <callerid name>
  36.                 bgdial <endpoint_module_name>/<destination> <callerid number> <callerid name>
  37.                 transfer <conference_name> <member id> [...<member id>]
  38.                 record <filename>
  39.                 chkrecord <confname>
  40.                 norecord <[filename|all]>
  41.                 pause <filename>
  42.                 resume <filename>
  43.                 recording [start|stop|check|pause|resume] [<filename>|all]
  44.                 exit_sound on|off|none|file <filename>
  45.                 enter_sound on|off|none|file <filename>
  46.                 pin <pin#>
  47.                 nopin
  48.                 get <parameter-name>
  49.                 set <parameter-name> <value>
  50.                 floor <member_id|last>
  51.                 enforce_floor <member_id|last>,Conference module commands,mod_conference
  52. console,loglevel [level]|colorize [on|toggle|off],Console,mod_console
  53. console_complete,<line>,,mod_commands
  54. console_complete_xml,<line>,,mod_commands
  55. create_uuid,<uuid> <other_uuid>,Create a uuid,mod_commands
  56. db,[insert|delete|select]/<realm>/<key>/<value>,db get/set,mod_db
  57. db_cache,status,db cache management,mod_commands
  58. domain_exists,<domain>,check if a domain exists,mod_commands
  59. echo,<data>,echo,mod_commands
  60. enum,,ENUM,mod_enum
  61. enum_auto,,ENUM,mod_enum
  62. escape,<data>,escape a string,mod_commands
  63. eval,[uuid:<uuid> ]<expression>,eval (noop),mod_commands
  64. event_sink,<web data>,event_sink,mod_event_socket
  65. expand,[uuid:<uuid> ]<cmd> <args>,expand vars and execute,mod_commands
  66. expr,<expr>,Eval an expression,mod_expr
  67. fifo,list|list_verbose|count|debug|status|importance [<fifo name>]|reparse [del_all],Return data about a fifo,mod_fifo
  68. fifo_add_outbound,<node> <url> [<priority>],Add outbound members to a fifo,mod_fifo
  69. fifo_check_bridge,<uuid>|<outbound_id>,check if uuid is in a bridge,mod_fifo
  70. fifo_member,[add <fifo_name> <originate_string> [<simo_count>] [<timeout>] [<lag>] [<expires>] [<taking_calls>] | del <fifo_name> <originate_string>],Add members to a fifo,mod_fifo
  71. file_exists,<file>,check if a file exists on server,mod_commands
  72. find_user_xml,<key> <user> <domain>,find a user,mod_commands
  73. fsctl,[send_sighup|hupall|pause [inbound|outbound]|resume [inbound|outbound]|shutdown [cancel|elegant|asap|now|restart]|sps|sync_clock|sync_clock_when_idle|reclaim_mem|max_sessions|min_dtmf_duration [num]|max_dtmf_duration [num]|default_dtmf_duration [num]|min_idle_cpu|loglevel [level]|debug_level [level]],control messages,mod_commands
  74. global_getvar,<var>,global_getvar,mod_commands
  75. global_setvar,<var>=<value> [=<value2>],global_setvar,mod_commands
  76. group,[insert|delete|call]:<group name>:<url>,group [insert|delete|call],mod_db
  77. group_call,<group>[@<domain>],Generate a dial string to call a group,mod_commands
  78. hash,[insert|delete|select]/<realm>/<key>/<value>,hash get/set,mod_hash
  79. hash_dump,all|limit|db [<realm>],dump hash/limit_hash data (used for synchronization),mod_hash
  80. hash_remote,list|kill [name]|rescan,hash remote,mod_hash
  81. help,,Show help for all the api commands,mod_commands
  82. host_lookup,<hostname>,host_lookup,mod_commands
  83. hostname,,Returns the system hostname,mod_commands
  84. httapi,[debug_on|debug_off],HT-TAPI Hypertext Telephony API,mod_httapi
  85. hupall,<cause> [<var> <value>],hupall,mod_commands
  86. in_group,<user>[@<domain>] <group_name>,determine if a user is in a group,mod_commands
  87. is_lan_addr,<ip>,see if an ip is a lan addr,mod_commands
  88. jsapi,jsapi <script> [additional_vars [...]],execute an api call,mod_spidermonkey
  89. jsrun,jsrun <script> [additional_vars [...]],run a script,mod_spidermonkey
  90. limit_hash_usage,<realm> <id>,Deprecated: gets the usage count of a limited resource,mod_commands
  91. limit_interval_reset,<backend> <realm> <resource>,Reset the interval counter for a limited resource,mod_commands
  92. limit_reset,<backend>,Reset the counters of a limit backend,mod_commands
  93. limit_status,<backend>,Gets the status of a limit backend,mod_commands
  94. limit_usage,<backend> <realm> <id>,Gets the usage count of a limited resource,mod_commands
  95. load,<mod_name>,Load Module,mod_commands
  96. log,<level> <message>,Log,mod_commands
  97. lua,<script>,run a script as an api function,mod_lua
  98. luarun,<script>,run a script,mod_lua
複製代碼

TOP

  1. md5,<data>,md5,mod_commands
  2. module_exists,<module>,check if module exists,mod_commands
  3. msleep,<milliseconds>,sleep N milliseconds,mod_commands
  4. nat_map,[status|republish|reinit] | [add|del] <port> [tcp|udp] [static],nat_map,mod_commands
  5. originate,<call url> <exten>|&<application_name>(<app_args>) [<dialplan>] [<context>] [<cid_name>] [<cid_num>] [<timeout_sec>],Originate a Call,mod_commands
  6. pause,<uuid> <on|off>,Pause,mod_commands
  7. presence,[in|out] <user> <rpid> <message>,presence,mod_dptools
  8. reg_url,<user>@<realm>,,mod_commands
  9. regex,<data>|<pattern>[|<subst string>],Eval a regex,mod_commands
  10. reload,[-f] <mod_name>,Reload Module,mod_commands
  11. reloadacl,,Reload ACL,mod_commands
  12. reloadxml,,Reload XML,mod_commands
  13. replace,<data>|<string1>|<string2>,replace a string,mod_commands
  14. say_string,<module_name>[.<ext>] <lang>[.<ext>] <say_type> <say_method> [<say_gender>] <text>,,mod_commands
  15. sched_api,[+@]<time> <group_name> <command_string>[&],Schedule an api command,mod_commands
  16. sched_broadcast,[+]<time> <uuid> <path> [aleg|bleg|both],Schedule a broadcast event to a running call,mod_commands
  17. sched_del,<task_id>|<group_id>,Delete a Scheduled task,mod_commands
  18. sched_hangup,[+]<time> <uuid> [<cause>],Schedule a running call to hangup,mod_commands
  19. sched_transfer,[+]<time> <uuid> <extension> [<dialplan>] [<context>],Schedule a transfer for a running call,mod_commands
  20. show,codec|endpoint|application|api|dialplan|file|timer|calls [count]|channels [count|like <match string>]|calls|detailed_calls|bridged_calls|detailed_bridged_calls|aliases|complete|chat|management|modules|nat_map|say|interfaces|interface_types|tasks|limits,Show,mod_commands
  21. show_local_stream,[local_stream_name [xml]],Shows a local stream,mod_local_stream
  22. shutdown,,shutdown,mod_commands
  23. sofia,<cmd> <args>,Sofia Controls,mod_sofia
  24. sofia_contact,[profile/]<user>@<domain>,Sofia Contacts,mod_sofia
  25. sofia_count_reg,[profile/]<user>@<domain>,Count Sofia registration,mod_sofia
  26. sofia_dig,<url>,SIP DIG,mod_sofia
  27. sofia_gateway_data,<gateway_name> [ivar|ovar|var] <name>,Get data from a sofia gateway,mod_sofia
  28. sofia_username_of,[profile/]<user>@<domain>,Sofia Username Lookup,mod_sofia
  29. sql_escape,<string>,Escape a string to prevent sql injection,mod_commands
  30. start_local_stream,<local_stream_name> [<path>] [<rate>] [<shuffle>] [<prebuf>] [<channels>] [<interval>] [<timer_name>],Starts a new local_stream,mod_local_stream
  31. status,,status,mod_commands
  32. stop_local_stream,<local_stream_name>,Stops and unloads a local_stream,mod_local_stream
  33. strepoch,<string>,Convert a date string into epoch time,mod_dptools
  34. strftime,<format_string>,strftime,mod_dptools
  35. strftime_tz,<Timezone_name> [<epoch>|][format string],strftime_tz,mod_commands
  36. strmicroepoch,<string>,Convert a date string into micoepoch time,mod_dptools
  37. stun,<stun_server>[:port],stun,mod_commands
  38. switchname,,Returns the switch name,mod_commands
  39. system,<command>,Execute a system command,mod_commands
  40. time_test,<mss> [count],time_test,mod_commands
  41. timer_test,<10|20|40|60|120> [<1..200>] [<timer_name>],timer_test,mod_commands
  42. tone_detect,<uuid> <key> <tone_spec> [<flags> <timeout> <app> <args> <hits>],Start Tone Detection on a channel,mod_commands
  43. unload,[-f] <mod_name>,Unload Module,mod_commands
  44. unsched_api,<task_id>,Unschedule an api command,mod_commands
  45. url_decode,<string>,url decode a string,mod_commands
  46. url_encode,<string>,url encode a string,mod_commands
  47. user_data,<user>@<domain> [var|param|attr] <name>,find user data,mod_commands
  48. user_exists,<key> <user> <domain>,find a user,mod_commands
  49. uuid_audio,<uuid> [start [read|write] [mute|level <level>]|stop],uuid_audio,mod_commands
  50. uuid_break,<uuid> [all],Break,mod_commands
  51. uuid_bridge,,uuid_bridge,mod_commands
  52. uuid_broadcast,<uuid> <path> [aleg|bleg|holdb|both],broadcast,mod_commands
  53. uuid_buglist,<uuid>,List media bugs on a session,mod_commands
  54. uuid_chat,<uuid> <text>,Send a chat message,mod_commands
  55. uuid_debug_audio,<uuid> <read|write|both> <on|off>,debug audio,mod_commands
  56. uuid_deflect,<uuid> <uri>,Send a deflect,mod_commands
  57. uuid_displace,<uuid> [start|stop] <path> [<limit>] [mux],session displace,mod_commands
  58. uuid_display,<uuid> <display>,change display,mod_commands
  59. uuid_dual_transfer,<uuid> <A-dest-exten>[/<A-dialplan>][/<A-context>] <B-dest-exten>[/<B-dialplan>][/<B-context>],Transfer a session and its partner,mod_commands
  60. uuid_dump,<uuid> [format],uuid_dump,mod_commands
  61. uuid_exists,<uuid>,see if a uuid exists,mod_commands
  62. uuid_fileman,<uuid> <cmd>:<val>,uuid_fileman,mod_commands
  63. uuid_flush_dtmf,<uuid>,Flush dtmf on a given uuid,mod_commands
  64. uuid_getvar,<uuid> <var>,uuid_getvar,mod_commands
  65. uuid_hold,[off] <uuid> [<display>],hold,mod_commands
  66. uuid_jitterbuffer,<uuid> [0|<min_msec>[:<max_msec>]],Try to cut out of a call path / attended xfer,mod_commands
  67. uuid_kill,<uuid> [cause],Kill Channel,mod_commands
  68. uuid_limit,<uuid> <backend> <realm> <resource> [<max>[/interval]] [number [dialplan [context]]],Increase limit resource,mod_commands
  69. uuid_limit_release,<uuid> <backend> [realm] [resource],Release limit resource,mod_commands
  70. uuid_loglevel,<uuid> <level>,set loglevel on session,mod_commands
  71. uuid_media,[off] <uuid>,media,mod_commands
  72. uuid_outgoing_answer,<uuid>,Answer Outgoing Channel,mod_commands
  73. uuid_park,<uuid>,Park Channel,mod_commands
  74. uuid_phone_event,<uuid>,Send and event to the phone,mod_commands
  75. uuid_preprocess,<>,Pre-process Channel,mod_commands
  76. uuid_record,<uuid> [start|stop] <path> [<limit>],session record,mod_commands
  77. uuid_recovery_refresh,<uuid> <uri>,Send a recovery_refresh,mod_commands
  78. uuid_recv_dtmf,<uuid> <dtmf_data>,receive dtmf digits,mod_commands
  79. uuid_send_dtmf,<uuid> <dtmf_data>,send dtmf digits,mod_commands
  80. uuid_send_info,<uuid>,Send info to the endpoint,mod_commands
  81. uuid_session_heartbeat,<uuid> [sched] [0|<seconds>],uuid_session_heartbeat,mod_commands
  82. uuid_setvar,<uuid> <var> [value],uuid_setvar,mod_commands
  83. uuid_setvar_multi,<uuid> <var>=<value>;<var>=<value>...,uuid_setvar_multi,mod_commands
  84. uuid_simplify,<uuid>,Try to cut out of a call path / attended xfer,mod_commands
  85. uuid_transfer,<uuid> [-bleg|-both] <dest-exten> [<dialplan>] [<context>],Transfer a session,mod_commands
  86. uuid_video_refresh,<uuid>,Send video refresh.,mod_commands
  87. uuid_zombie_exec,<uuid>,Set zombie_exec flag on the specified uuid,mod_commands
  88. valet_info,[<lot name>],Valet Parking Info,mod_valet_parking
  89. version,,version,mod_commands
  90. vm_boxcount,[profile/]<user>@<domain>[|[new|saved|new-urgent|saved-urgent|all]],vm_boxcount,mod_voicemail
  91. vm_delete,<id>@<domain>[/profile] [<uuid>],vm_delete,mod_voicemail
  92. vm_fsdb_auth_login,<profile> <domain> <user> <password>,vm_fsdb_auth_login,mod_voicemail
  93. vm_fsdb_msg_count,<format> <profile> <domain> <user> <folder>,vm_fsdb_msg_count,mod_voicemail
  94. vm_fsdb_msg_delete,<profile> <domain> <user> <uuid>,vm_fsdb_msg_delete,mod_voicemail
  95. vm_fsdb_msg_email,<profile> <domain> <user> <uuid> <email>,vm_fsdb_msg_email,mod_voicemail
  96. vm_fsdb_msg_forward,<profile> <domain> <user> <uuid> <dst_domain> <dst_user> [prepend_file_location],vm_fsdb_msg_forward,mod_voicemail
  97. vm_fsdb_msg_get,<format> <profile> <domain> <user> <uuid>,vm_fsdb_msg_get,mod_voicemail
  98. vm_fsdb_msg_list,<format> <profile> <domain> <user> <folder> <filter>,vm_fsdb_msg_list,mod_voicemail
  99. vm_fsdb_msg_purge,<profile> <domain> <user>,vm_fsdb_msg_purge,mod_voicemail
  100. vm_fsdb_msg_save,<profile> <domain> <user> <uuid>,vm_fsdb_msg_save,mod_voicemail
  101. vm_fsdb_msg_undelete,<profile> <domain> <user> <uuid>,vm_fsdb_msg_undelete,mod_voicemail
  102. vm_fsdb_pref_greeting_set,<profile> <domain> <user> <slot> [file-path],vm_fsdb_pref_greeting_set,mod_voicemail
  103. vm_fsdb_pref_password_set,<profile> <domain> <user> <password>,vm_fsdb_pref_password_set,mod_voicemail
  104. vm_fsdb_pref_recname_set,<profile> <domain> <user> <file-path>,vm_fsdb_pref_recname_set,mod_voicemail
  105. vm_inject,[group=<group>[@domain]|domain=<domain>|<box>[@<domain>]] <sound_file> [<cid_num>] [<cid_name>],vm_inject,mod_voicemail
  106. vm_list,<id>@<domain>[/profile] [xml],vm_list,mod_voicemail
  107. vm_prefs,[profile/]<user>@<domain>[|[name_path|greeting_path|password]],vm_prefs,mod_voicemail
  108. vm_read,<id>@<domain>[/profile] <read|unread> [<uuid>],vm_read,mod_voicemail
  109. voicemail,rss [<host> <port> <uri> <user> <domain>] | [load|unload|reload] <profile> [reloadxml],voicemail,mod_voicemail
  110. voicemail_inject,[group=<group>[@domain]|domain=<domain>|<box>[@<domain>]] <sound_file> [<cid_num>] [<cid_name>],voicemail_inject,mod_voicemail
  111. xml_flush_cache,<id> <key> <val>,clear xml cache,mod_commands
  112. xml_locate,[root | <section> <tag> <tag_attr_name> <tag_attr_val>],find some xml,mod_commands
  113. xml_wrap,<command> <args>,Wrap another api command in xml,mod_commands

  114. freeswitch@internal>
複製代碼

TOP

我用zoiper安装了第一个extension 1001,它的credential是

FreeSWITCH IP: 192.168.1.6
Username (extension) : 1001
Password: 1234

0063.png

注册成功后拨打5000测试extension,成功了!

TOP

又要用command? 暈了! 有沒有辦法compile GUI?
Welcome to my TaoBao shop: http://mandymak520.taobao.com/

TOP

应该有两个GUI,但是我不知道QNAP是否有?

TOP

已经set了两个extensions,可以互打成功没有问题!

TOP

估计有些人看了这幅帖子,你Intel-based的QNAP NAS都心思思!!!

TOP

简单看了一下,说FreeSWITCH的中文网站真的不多!不知道Telecom-cafe是否会成为FreeSWITCH的中文第一大网站呢?

TOP

回復 26# 角色

是呀! 我download了但是未安裝, 光是linux和Asterisk command都搞到我暈!
Welcome to my TaoBao shop: http://mandymak520.taobao.com/

TOP

本帖最後由 角色 於 2012-10-14 17:41 編輯

回復 28# 雯雯

其实雯雯小师妹,你已经很厉害!很多女孩子都不能达到你这样的程度!

说回现在,其实现在你的问题不是programming,而是不熟悉editor,我们也没有做什么programming,因为你不熟vi,其实应该有别的代替品,但是我真的很少用!我想想看看,是否有一个简单在Unix-like的环境下可以编辑的editor。

TOP

下一步就难很多,例如

1. 外面的SIP Client怎样往我的NAT后面的FS注册呢?

2. SIP-based PSTN provider怎样注册,能打出打入呢?

TOP

返回列表