如何让FreeSWITCH双标的执行某些路由
有人问到:能不能让FreeSWITCH中老板的电话机直接进入到某个电话会议,而其他人的则需要按pin键等。这里就标准的dialplan配置即可:<extension name="extension-inter4">
<condition field="caller_id_number" expression="^1000$"></condition>
<condition field="destination_number" expression="^7777$">
<action application="answer"></action>
<action application="conference" data="186215759083500@default"></action>
</condition>
</extension>
<extension name="extension-inter5">
<condition field="destination_number" expression="^7777$">
<action application="log" data="CRIT WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING "></action>
<action application="answer"></action>
<action application="conference" data="18621575908@default+5678"></action>
</condition>
</extension>
这里增加了一个条件 caller_id_number=1000,专门走一条路由,至于最简单的在下侧再建一个类似的路由即可,这里是非1000的呼叫时,直接会显示WANGING.
同样的,用于其它类似的判断,则如网络地址:
<extension name="Test1">
<condition field="network_addr" expression="^192\.168\.1\.1$"></condition>
<condition field="destination_number" expression="^(\d+)$">
<action application="bridge" data="sofia/profilename/18621575908@192.168.2.2"></action>
</condition>
</extension>