Reputation:
I followed there official documentation ( https://freeswitch.org/confluence/display/FREESWITCH/Conference+Add+Call+Example ) but its not working for me.
When i make a call to a person he does not join the conference, but how can i let him join the conference and stay even i disconnect my call?
For example i am trying as following:
1 - Stackoverflow experts consulting is required by me and my other colleuges
2 - me and my other colleuges we joined a conference room
3 - now we need stackoverflow programmer give us 30 minutes of lecture so we call him up (me as admin here)
4 - when i am talking with stackoverflow nobody in the conference hearing stackoverflow experts.
So how can i bring him in the conference please?
<include>
<!-- Sample dialplan for sending member or moderator to a conference where he/she can add/remove calls -->
<!-- Dial 46xx for member, *46xx for moderator -->
<extension name="Simple add-caller conf: member">
<condition field="destination_number" expression="^(46\d{2})$">
<action application="answer"/>
<action application="conference" data="$1@simple"/>
</condition>
</extension>
<extension name="Simple add-caller conf: moderator">
<condition field="destination_number" expression="^\*(46\d{2}$)">
<action application="answer"/>
<!-- set up a few bind_digit_action (BDA) bindings for the moderator -->
<action application="bind_digit_action" data="moderator,*1,exec:execute_extension,ASK_FOR_NUMBER__$1 XML default"/>
<action application="bind_digit_action" data="moderator,*2,exec:execute_extension,CANCEL_LAST_CALL__$1 XML default"/>
<action application="digit_action_set_realm" data="moderator"/>
<action application="conference" data="$1@simple+flags{moderator}"/>
</condition>
</extension>
<extension name="Add new OB call to conference">
<condition field="destination_number" expression="^ASK_FOR_NUMBER__(\d+)$">
<!-- ask caller for a number + #, collect into ${target_num} variable -->
<action application="play_and_get_digits" data="4 20 1 5000 # ivr/ivr-enter_destination_telephone_number.wav ivr/ivr-that_was_an_invalid_entry.wav target_num \d+"/>
<!-- add this call to the conference -->
<action application="execute_extension" data="${target_num}"/>
</condition>
</extension>
<extension name="Remove last OB call added to conference">
<condition field="destination_number" expression="^CANCEL_LAST_CALL__(\d+)$">
<!-- remove a call from the conference -->
<action application="play_and_get_digits" data="4 11 1 5000 # ivr/ivr-enter_destination_telephone_number.wav ivr/ivr-that_was_an_invalid_entry.wav target_num \d+"/>
<action application="set" data="res=${uuid_kill ${hash(select/domain-${domain_name}/last_user_${target_num})}}"/>
</condition>
</extension>
<extension name="add that call">
<!-- if we have a four-digit number then attempt to dial it as a user ... -->
<condition field="destination_number" expression="^(\d{4})$" break="on-true">
<action application="set" data="new_uuid=${create_uuid foo}" inline="true"/>
<action application="hash" data="insert/domain-${domain_name}/last_user_$1/${new_uuid}" />
<action application="set" data="res=${bgapi originate {origination_uuid=${new_uuid}}user/$1 &conference(${conference_name})}"/>
</condition>
<!-- if we have a five+ digit number then attempt to dial it as a gw connection ... -->
<condition field="destination_number" expression="^(\d{5})$" break="on-true">
<action application="set" data="new_uuid=${create_uuid foo}" inline="true"/>
<action application="hash" data="insert/domain-${domain_name}/last_user_$1/${new_uuid}" />
<action application="set" data="res=${bgapi originate {origination_uuid=${new_uuid}}sofia/gateway/voipbuster/$1 &conference(${conference_name})}"/>
<!-- Alternatively, you can just use loopback, but that creates three call legs instead of one, so be warned -->
<!--
<action application="set" data="res=${bgapi originate {origination_uuid=${new_uuid}}loopback/$1 &conference(${conference_name})}"/>
-->
</condition>
<!-- ... otherwise inform moderator that the operation was not exactly successful -->
<condition field="destination_number" expression="^$">
<action application="playback" data="ivr/ivr-dude_you_suck.wav"/>
</condition>
</extension>
</include>
Upvotes: 1
Views: 3289
Reputation: 11
You should use call conference that will make your objective lot more easier.
Use Lua script called by XML dialplan:
function call_to_agent()
session:execute("conference_set_auto_outcall","user/[user_that_you_want]")
session:execute("conference","conference_name@default")
end
session:answer()
call_to_agent()
Upvotes: 1
Reputation: 1961
See bgdial
and dial
in mod_conference documentation.
What you are doing, looks quite OK, and needs debugging. But with conference dial
you would have it easier.
Upvotes: 2