版本14727中的逻辑是,如果源字符串匹配匹配到结果,那么条件为false,但是这里仍有一个匹配结果,结果是1001。(这里的翻译是照字面翻译,小伙伴们,你们看懂了没?) Logic in revision 14727 if the source string matches the result then the condition was false however there was a match and it is 1001.
regex 1001|(^\d{4}$)|$1
See also [[Regular_Expression]]
reload
重新加载模块。
用法: reload [-f]
reloadacl
重新加载ACL规则。
用法: reloadacl [reloadxml]
reloadxml
重新加载conf/freeswitch.xml的配置信息到内存中。
用法: reloadxml
show
输出多种(模块)状态报告。
用法: show
item类型如下:
codec
endpoint
application
api
dialplan
file
timer
calls [count]
channels [count|like ]
calls
detailed_calls
bridged_calls
detailed_bridged_calls
aliases
complete
chat
management
modules
nat_map
say
interfaces
interface_types
tasks
limits
XML格式输出: show foo as xml
修改输出分隔符: show foo as delim |
codec - 列出所有编码
endpoint - 列出所有endpoint类型模块
application - 列出所有应用程序
api - 列出所有api
dialplan - 列出拨号方案涉及的模块
file - 列出所有支持的文件类型
timer - 列出计时器timer模块
calls - 列出当前的通话[count]
channels - 列出当前的通道 [count|like ] 注:关于calls与channels的对比,请参考Channels vs Calls
originate sofia/example/[email protected] &conference(conf_uuid-TEST_CON)
originate sofia/example/[email protected] conference:conf_uuid-TEST_CON inline
( See [[Misc._Dialplan_Tools_InlineDialplan]] for more detail on 'inline' Dialplans )
API command to tell a channel to send a re-invite with optional list of new codecs
Usage: uuid_media_reneg
uuid_park
Park call
Usage: uuid_park
uuid_preanswer
Preanswer a channel.
Usage: uuid_preanswer
See Also: [[Misc._Dialplan_Tools_pre_answer]]
uuid_preprocess
Pre-process Channel
Usage: uuid_preprocess <>
uuid_recv_dtmf
Send DTMF digits to set.
Usage: uuid_recv_dtmf [@]
Use the character w for a .5 second delay and the character W for a 1 second delay.
Default tone duration is 2000ms .
uuid_send_dtmf
Send DTMF digits.
Usage: uuid_send_dtmf [@]
Use the character w for a .5 second delay and the character W for a 1 second delay.
Default tone duration is 2000ms .
uuid_send_info
Send info to the endpoint
Usage: uuid_send_info
uuid_session_heartbeat
Usage: uuid_session_heartbeat [sched] [0|]
uuid_setvar
Set a variable on a channel. If value is omitted, the variable is unset.
Usage: uuid_setvar [value]
uuid_setvar_multi
Set multiple vars on a channel.
Usage: uuid_setvar_multi =[;=[;...]]
uuid_simplify
This command directs FreeSWITCH to remove itself from the SIP signaling path if it can safely do so
Usage:
uuid_simplify
uuid_transfer
Transfers an existing call to a specific extension within a and . Dialplan may be "xml" or "directory".
Usage:
uuid_transfer [-bleg|-both] [] []
The optional first argument will allow you to transfer both parties (-both) or only the party to whom is talking.(-bleg)
NOTE: if the call has been bridged, and you want to transfer either sides of the call, then you will need to use (or the API equivalent). If it's not set, transfer doesn't really work as you'd expect, and leaves calls in limbo.
Record/Playback Commands
uuid_record
Record the audio associated with the given UUID into a file. The start command causes FreeSWITCH to start mixing all call legs together and saves the result as a file in the format that the file's extension dictates. (if available) The stop command will stop the recording and close the file. If media setup hasn't yet happened, the file will contain silent audio until media is available. Audio will be recorded for calls that are parked. The recording will continue through the bridged call. If the call is set to return to park after the bridge, the bug will remain on the call, but no audio is recorded until the call is bridged again. (TODO: What if media doesn't flow through FreeSWITCH? Will it re-INVITE first? Or do we just not get the audio in that case?)
Usage:
uuid_record [start|stop] []
Where limit is the max number of seconds to record.
If the path is not specified on start it will default to the channel variable "sound_prefix" or FreeSWITCH base_dir when the "sound_prefix" is empty.
You may also specify "all" for path when stop is used to remove all for this uuid
"stop" command must be followed by option.
[[Channel_Variables#Call_Recording_Related|See record's related variables]]
Limit Commands
[[Limit#API|limit_reset]]
Reset a limit backend.
[[Limit#API|limit_status]]
Retrieve status from a limit backend.
[[Limit#API|limit_usage]]
Retrieve usage for a given resource.
[[Limit#API|uuid_limit_release]]
Manually decrease a resource usage by one.
[[Limit#API|limit_interval_reset]]
Reset the interval counter to zero prior to the start of the next interval.
Misc. Commands
bg_system
Execute a system command in the background.
Usage: bg_system
echo
Echo input back to the console echo This text will appear This text will appear
'''Note''' this tests whether FreeSWITCH can see the file, but the file may still be unreadable (permissions).
find_user_xml
Checks to see if a user exists; Matches user tags found in the directory, similar to [[user_exists]], but returns an XML representation of the user as defined in the directory (like the one shown in [[Mod_commands#user_exists|user_exists]]).
Usage: find_user_xml
Where key references a key specified in a directory's user tag, user represents the value of the key, and the domain is the domain the user is assigned to.
freeswitch@localhost> list_users group default user 2004
userid|context|domain|group|contact|callgroup|effective_caller_id_name|effective_caller_id_number
2004|default|192.168.20.73|default|error/user_not_registered|techsupport|Test 2004|2004
+OK
sched_api
Schedule an API call in the future. Usage: sched_api [+@]
time is the UNIX timestamp at which the command should be executed. If it is prefixed by +, specifies the number of seconds to wait before executing the command. If prefixed by @, it will execute the command periodically everyseconds; for the first time it will be executed after seconds. group_name will be the value of "Task-Group" in generated events. "none" is the proper value for no group. command_string is the command executed
Scheduled task or group of tasks can be revoked with sched_del or unsched_api.
You could put "&" symbol at the end of the line to make command to be executed in its own thread.
Play a file to a specific call in the future. Usage: sched_broadcast [+] [aleg|bleg|both]
Schedule execution of an application on a chosen leg(s) with optional hangup: Usage: sched_broadcast [+] app[![hangup_cause]]::args [aleg|bleg|both]
time is the UNIX timestamp at which the command should be executed (or if it is prefixed by +, the number of seconds to wait before executing the command)
Removes a prior scheduled group or task ID Usage: sched_del
The one argument can either be a group of prior scheduled tasks or the returned task-id from sched_api.
Example: sched_del my_group sched_del 2
sched_hangup
Schedule a running call to hangup.
Usage: sched_hangup [+] []
Note: sched_hangup +0 is the same as uuid_kill
sched_transfer
Schedule a transfer for a running call.
Usage: sched_transfer [+] [] []
stun
Executes a STUN lookup. Usage: stun [:port]
Example: stun stun.freeswitch.org
system
Execute a system command.
Usage: system
The command is passed to the system shell, where it may be expanded or interpreted in ways you don't expect. This can lead to security bugs if you're not careful. For example, the following command is dangerous:
If a malicious remote caller somehow sets their caller ID name to "; rm -rf /", you would unintentionally be executing this shell command:
log_caller_name; rm -rf /
time_test
Time test.
Usage: time_test [count]
Runs a test to see how bad timer jitter is. It runs the test count times (default 10) and tries to sleep for mss microseconds. It returns the actual timer duration along with an average.
Sample:
time_test 100 5
test 1 sleep 100 99
test 2 sleep 100 97
test 3 sleep 100 96
test 4 sleep 100 97
test 5 sleep 100 102
avg 98
timer_test
Timer test.
Usage: timer_test <10|20|40|60|120> [<1..200>] []
Runs a test to see how bad timer jitter is. Unlike time_test, this uses the actual freeswitch timer infrastructure to do the timer test and exercises the timers used for call processing.
First argument is the timer interval. Second is the count. Third is the timer name ("show timers" will give you a list)
Retrieves user information (parameters or variables) as defined in the directory.
Usage: user_data @ [attr|var|param]
Where user is the user's id, domain is the user's domain, var|param specifies whether the info we're requesting is a variable/parameter, and the name is the name (key) of the variable.
will return the user's actual alphanumeric ID (i.e. "john") when number-alias="1000" was set as an attribute for that user.
user_exists
Checks to see if a user exists; Matches user tags found in the directory and returns either true/false:
Usage: user_exists
Where key references a key specified in a directory's user tag, user represents the value of the key, and the domain is the domain the user is assigned to.
Example:
user_exists id 1000 192.168.1.101
will return true where there exists in the directory a user with a key called id whose value equals 1000: In the above example, we also could have tested for randomvar:
声明: 本文只为方便我个人查阅和理解,详细的分析以及源代码请移步 原作者的博客http://chjavach.iteye.com/
public class Singleton {
}
/*
* 懒汉模式。注意,getInstance如果在多线程环境中调用,需要加上synchronized,否则存在线程不安全问题
*/
class LazySingleton
这个月公司安排我一个人做iOS客户端开发,由于急着用,我先发布一个版本,由于第一次发布iOS应用,期间出了不少问题,记录于此。
1、使用Application Loader 发布时报错:Communication error.please use diagnostic mode to check connectivity.you need to have outbound acc
/*
2013年3月15日15:16:24
malloc 就memory(内存) allocate(分配)的缩写
本程序没有实际含义,只是理解使用
*/
# include <stdio.h>
# include <malloc.h>
int main(void)
{
int i = 5; //分配了4个字节 静态分配
int * p
http://wiki.sdn.sap.com/wiki/display/BOBJ/Optimize+query+with+Query+Stripping+in+Web+Intelligence
and a very straightfoward video
http://www.sdn.sap.com/irj/scn/events?rid=/library/uuid/40ec3a0c-936