freeswitch 拨号时添加自定义变量

Using Channel Variables in Dialplan Condition Statements

Channel variables can be used in conditions:

  • See dialplan conditions for specifics.
  • Keep in mind that some channel variables may not be set during the dialplan parsing phase. See inline actions section of Dialplan_XML for more information.

Custom Channel Variables

Additionally, you may set any number of unique channel variables for your own purposes and even elect to log them to the CDR. In order to set any channel variable, use the application "set" to effect the setting. You can also set channel variables on the command issued via XML-RPC or Event Socket by adding {myvar=myval,myvar1=myval1} e.g.

originate {ignore_early_media=true}sofia/mydomain.com/18005551212@1.2.3.4 15555551212

If the value you are setting has a space in it then you will need to enclose the value in quotes. For example:

originate {fax_ident=1231231234,fax_header='Fax Test'}sofia/gateway/outbound.fax/1004 &txfax(/tmp/fax.tiff)
原文地址:https://www.cnblogs.com/cloudshadow/p/4629991.html