从python esl发起会议

时间:2016-04-18 06:05:14

标签: freeswitch conference

我想设置一个电话会议,从ESL计划开始。

在我的python脚本中,我调用了第一个数字:

freeswitchcon.api("originate","sofia/gateway/MySIP/91XXXXXXXXXX+" &conference(9099)"

然后我打电话给另一个号码:

freeswitchcon.bgapi("originate","sofia/gateway/MySIP/91XXXXXXXXXX+" &conference(radioHealth_${strftime(%Y-%m-%d)}+flags{mute})"

我的拨号方案是:

<extension name="conf_demo">
<condition field="destination_number" expression="^9099$">
<action application="conference" data="radioHealth_${strftime(%Y-%m-%d)}+flags{endconf}"/>
</condition>

<extension name="conf_demo">
<condition field="destination_number" expression="^9098$">
<action application="conference" data="radioHealth_${strftime(%Y-%m-%d)}+flags{mute}"/>
</condition>

我接到第一个号码的电话,但不接听第二个号码。 Freeswitch日志是:

2016-04-18 05:37:26.417807 [NOTICE] switch_channel.c:1055 New Channel sofia/external/91XXXXXXXXXX [a22ea00c-0527-11e6-86df-415bf8be0d99]
2016-04-18 05:37:26.777867 [NOTICE] sofia.c:7539 Hangup sofia/external/91XXXXXXXXXX [CS_CONSUME_MEDIA] [CALL_REJECTED]
2016-04-18 05:37:26.777867 [NOTICE] switch_core_session.c:1641 Session 24 (sofia/external/91XXXXXXXXXX) Ended
2016-04-18 05:37:26.777867 [NOTICE] switch_core_session.c:1645 Close Channel sofia/external/91XXXXXXXXXX [CS_DESTROY]

任何指导都将不胜感激

1 个答案:

答案 0 :(得分:0)

我意识到这已经晚了几年,但是我注意到您在第一个Origin命令中调用了普通的api:

freeswitchcon.api("originate","sofia/gateway/MySIP/91XXXXXXXXXX+" &conference(9099)"

这意味着将启动第一个调用,但是python将在继续之前等待该调用返回(即挂断时)。

如果您在第二次调用中使用freeswitchcon.bgapi,则该调用将在后台发起,并且python将不等待调用结束再继续。