Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved audio connect and transfer #7404

Merged
merged 1 commit into from May 9, 2019

Conversation

capilkey
Copy link
Contributor

@capilkey capilkey commented May 9, 2019

This PR changes how the client determines when it's in the echo test and when the transfer to the conference is successful. The new method is to have the FreeSWITCH dialplan send back DTMF INFO messages so that we don't have to rely on guessing or the server components.

In order for this to work there are some dialplan changes required. The first two files already exist and need to be changed and the third file is new.

/opt/freeswitch/conf/dialplan/default/bbb_conference.xml

<include>
    <extension name="bbb_conferences_ws">
      <condition field="${bbb_authorized}" expression="true" break="on-false"/>
      <condition field="${sip_via_protocol}" expression="^wss?$"/>
      <condition field="destination_number" expression="^(\d{5,6})$">
        <action application="set" data="jitterbuffer_msec=20:400"/>
        <action application="answer"/>
        <action application="set" data="dtmf_type=info"/>
        <action application="send_dtmf" data="0"/>
        <action application="conference" data="$1@cdquality"/>
      </condition>
    </extension>
    <extension name="bbb_conferences">
      <condition field="${bbb_authorized}" expression="true" break="on-false"/>
      <condition field="destination_number" expression="^(\d{5,6})$">
        <action application="set" data="jitterbuffer_msec=20:400"/>
        <action application="answer"/>
        <action application="conference" data="$1@cdquality"/>
      </condition>
    </extension>
</include>

/opt/freeswitch/conf/dialplan/default/bbb_echo_test.xml

<include>
  <extension name="bbb_echo_test_direct">
    <condition field="${bbb_authorized}" expression="true" break="on-false"/>
    <condition field="destination_number" expression="^9196$|^9196(\d{5,6})$">
      <action application="set" data="vbridge=$1"/>
      <action application="answer"/>
      <action application="set" data="bbb_from_echo=true"/>
      <action application="set" data="dtmf_type=info"/>
      <action application="send_dtmf" data="0"/>
      <action application="bind_digit_action" data="direct_from_echo,1,exec:execute_extension,ECHO_TO_CONFERENCE XML default"/>
      <action application="sleep" data="500"/>
      <action application="echo"/>
    </condition>
  </extension>
</include>

/opt/freeswitch/conf/dialplan/default/bbb_echo_to_conference.xml

<include>
  <extension name="ECHO_TO_CONFERENCE">
    <condition field="${bbb_from_echo}" expression="true" break="on-false"/>
    <condition field="destination_number" expression="^(ECHO_TO_CONFERENCE)$">
      <action application="set" data="jitterbuffer_msec=20:400"/>
      <action application="answer"/>
      <action application="set" data="dtmf_type=info"/>
      <action application="send_dtmf" data="7"/>
      <action application="conference" data="${vbridge}@cdquality"/>
    </condition>
  </extension>
</include>

Thanks to @hostbbb for the assist on the dialplan changes.

@hostbbb
Copy link
Contributor

hostbbb commented May 10, 2019

So no change to Flash webrtc bridge code? will flash client still work with new dialplan?

@capilkey
Copy link
Contributor Author

The new dialplans just gives more information to the client that it can optionally use. The Flash client's bridge code will just ignore the incoming DTMF and have the same detection as it had before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants