<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.9.1">
  <compounddef id="linphonecall_8c" kind="file" language="C++">
    <compoundname>linphonecall.c</compoundname>
    <includes refid="linphonecore_8h" local="yes">linphonecore.h</includes>
    <includes refid="sipsetup_8h" local="yes">sipsetup.h</includes>
    <includes refid="lpconfig_8h" local="yes">lpconfig.h</includes>
    <includes refid="private_8h" local="yes">private.h</includes>
    <includes local="no">ortp/event.h</includes>
    <includes local="no">ortp/b64.h</includes>
    <includes local="no">math.h</includes>
    <includes local="yes">mediastreamer2/mediastream.h</includes>
    <includes local="yes">mediastreamer2/msvolume.h</includes>
    <includes local="yes">mediastreamer2/msequalizer.h</includes>
    <includes local="yes">mediastreamer2/msfileplayer.h</includes>
    <includes local="yes">mediastreamer2/msjpegwriter.h</includes>
    <includes local="yes">mediastreamer2/mseventqueue.h</includes>
    <includes local="yes">mediastreamer2/mssndcard.h</includes>
    <incdepgraph>
      <node id="121">
        <label>mediastreamer2/mseventqueue.h</label>
      </node>
      <node id="122">
        <label>mediastreamer2/mssndcard.h</label>
      </node>
      <node id="119">
        <label>mediastreamer2/msfileplayer.h</label>
      </node>
      <node id="118">
        <label>mediastreamer2/msequalizer.h</label>
      </node>
      <node id="117">
        <label>mediastreamer2/msvolume.h</label>
      </node>
      <node id="112">
        <label>linphonecall.c</label>
        <link refid="linphonecall.c"/>
        <childnode refid="113" relation="include">
        </childnode>
        <childnode refid="114" relation="include">
        </childnode>
        <childnode refid="115" relation="include">
        </childnode>
        <childnode refid="116" relation="include">
        </childnode>
        <childnode refid="117" relation="include">
        </childnode>
        <childnode refid="118" relation="include">
        </childnode>
        <childnode refid="119" relation="include">
        </childnode>
        <childnode refid="120" relation="include">
        </childnode>
        <childnode refid="121" relation="include">
        </childnode>
        <childnode refid="122" relation="include">
        </childnode>
      </node>
      <node id="113">
        <label>ortp/event.h</label>
      </node>
      <node id="115">
        <label>math.h</label>
      </node>
      <node id="120">
        <label>mediastreamer2/msjpegwriter.h</label>
      </node>
      <node id="116">
        <label>mediastreamer2/mediastream.h</label>
      </node>
      <node id="114">
        <label>ortp/b64.h</label>
      </node>
    </incdepgraph>
    <innerclass refid="struct__CodecConstraints" prot="public">_CodecConstraints</innerclass>
      <sectiondef kind="define">
      <memberdef kind="define" id="linphonecall_8c_1ace069dd77bea8fa2d6ad7c504af360ea" prot="public" static="no">
        <name>EC_STATE_MAX_LEN</name>
        <initializer>1048576</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="41" column="9" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="41" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="typedef">
      <memberdef kind="typedef" id="linphonecall_8c_1a3a1310df15452851d131258783fbefc5" prot="public" static="no">
        <type>struct _CodecConstraints</type>
        <definition>typedef struct _CodecConstraints CodecConstraints</definition>
        <argsstring></argsstring>
        <name>CodecConstraints</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="374" column="1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="var">
      <memberdef kind="variable" id="linphonecall_8c_1a1f47dda67f53d4a4d3a9e4b208dc6498" prot="public" static="yes" mutable="no">
        <type>const char *</type>
        <definition>const char* EC_STATE_STORE</definition>
        <argsstring></argsstring>
        <name>EC_STATE_STORE</name>
        <initializer>= &quot;.linphone.ecstate&quot;</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="40" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="40" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="linphonecall_8c_1aa9dc277b972f3c68799988fa35f5915b" prot="public" static="yes" mutable="no">
        <type>int</type>
        <definition>int dtmf_tab[16]</definition>
        <argsstring>[16]</argsstring>
        <name>dtmf_tab</name>
        <initializer>={&apos;0&apos;,&apos;1&apos;,&apos;2&apos;,&apos;3&apos;,&apos;4&apos;,&apos;5&apos;,&apos;6&apos;,&apos;7&apos;,&apos;8&apos;,&apos;9&apos;,&apos;*&apos;,&apos;#&apos;,&apos;A&apos;,&apos;B&apos;,&apos;C&apos;,&apos;D&apos;}</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2505" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2505" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="func">
      <memberdef kind="function" id="linphonecall_8c_1a68ccfd3b9487d3a663a5b49557667bb5" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_stats_uninit</definition>
        <argsstring>(LinphoneCallStats *stats)</argsstring>
        <name>linphone_call_stats_uninit</name>
        <param>
          <type><ref refid="group__call__misc_1ga4d22764ac0e68a8d77670761429b2ee7" kindref="member">LinphoneCallStats</ref> *</type>
          <declname>stats</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="43" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4253" bodyend="4262"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1ae637aa887c24c7e9955bea6576125723" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void linphone_call_get_local_ip</definition>
        <argsstring>(LinphoneCall *call, const LinphoneAddress *remote_addr)</argsstring>
        <name>linphone_call_get_local_ip</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>const <ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref> *</type>
          <declname>remote_addr</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Fill the local ip that routes to the internet according to the destination, or guess it by other special means (upnp). </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="44" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="990" bodyend="1030"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a3ec96ab3a7d01c6fe72eb65012f8295f" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void _linphone_call_set_next_video_frame_decoded_trigger</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>_linphone_call_set_next_video_frame_decoded_trigger</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="45" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2143" bodyend="2148"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a23b3aeeb97aea65c7f249a1938a0b73a" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_handle_stream_events</definition>
        <argsstring>(LinphoneCall *call, int stream_index)</argsstring>
        <name>linphone_call_handle_stream_events</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>int</type>
          <declname>stream_index</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="46" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4281" bodyend="4341"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a74009af1fa4e23c03f6a3047a57707c7" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>MSWebCam *</type>
        <definition>MSWebCam* get_nowebcam_device</definition>
        <argsstring>()</argsstring>
        <name>get_nowebcam_device</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="49" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="49" bodyend="55"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1af777532bbb9c12cfc6fdfeec6a0a61b0" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>bool_t</type>
        <definition>static bool_t generate_b64_crypto_key</definition>
        <argsstring>(size_t key_length, char *key_out, size_t key_out_size)</argsstring>
        <name>generate_b64_crypto_key</name>
        <param>
          <type>size_t</type>
          <declname>key_length</declname>
        </param>
        <param>
          <type>char *</type>
          <declname>key_out</declname>
        </param>
        <param>
          <type>size_t</type>
          <declname>key_out_size</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="58" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="58" bodyend="87"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1gab4362397b265b81d5c2ea9b5a2999231" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref> *</type>
        <definition>LinphoneCore* linphone_call_get_core</definition>
        <argsstring>(const LinphoneCall *call)</argsstring>
        <name>linphone_call_get_core</name>
        <param>
          <type>const <ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Get the core that has created the specified call. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">call</parametername>
</parameternamelist>
<parameterdescription>
<para>LinphoneCall object </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>The LinphoneCore object that has created the specified call. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="89" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="89" bodyend="91"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1aeb063497e0a73274d16f9fe63cb40baa" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>const char *</type>
        <definition>const char* linphone_call_get_authentication_token</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_get_authentication_token</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="93" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="93" bodyend="95"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1gaed1e0517d15f86ad4a57f102fc78caf3" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>bool_t</type>
        <definition>bool_t linphone_call_get_authentication_token_verified</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_get_authentication_token_verified</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Returns whether ZRTP authentication token is verified. If not, it must be verified by users as described in ZRTP procedure. Once done, the application must inform of the results with <ref refid="group__call__control_1ga3ce1e87718e88df21bca4a19b6e80967" kindref="member">linphone_call_set_authentication_token_verified()</ref>. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>call</parametername>
</parameternamelist>
<parameterdescription>
<para>the LinphoneCall </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>TRUE if authentication token is verifed, false otherwise. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="105" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="105" bodyend="107"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a922fe4fe39fcde53dcfa4e5458cbfdb6" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>bool_t</type>
        <definition>static bool_t at_least_one_stream_started</definition>
        <argsstring>(const LinphoneCall *call)</argsstring>
        <name>at_least_one_stream_started</name>
        <param>
          <type>const <ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="109" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="109" bodyend="113"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1ac4f02ee43de0c6e0f5d3f80c2535d20d" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>bool_t</type>
        <definition>static bool_t linphone_call_all_streams_encrypted</definition>
        <argsstring>(const LinphoneCall *call)</argsstring>
        <name>linphone_call_all_streams_encrypted</name>
        <param>
          <type>const <ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="115" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="115" bodyend="135"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a4741d5a0b8692fff03069e5ff7f18e41" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>bool_t</type>
        <definition>static bool_t linphone_call_all_streams_avpf_enabled</definition>
        <argsstring>(const LinphoneCall *call)</argsstring>
        <name>linphone_call_all_streams_avpf_enabled</name>
        <param>
          <type>const <ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="137" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="137" bodyend="153"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a7530edfda658804c14476c61dd424d5d" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>uint16_t</type>
        <definition>static uint16_t linphone_call_get_avpf_rr_interval</definition>
        <argsstring>(const LinphoneCall *call)</argsstring>
        <name>linphone_call_get_avpf_rr_interval</name>
        <param>
          <type>const <ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="155" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="155" bodyend="171"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a8c1a42ae8d5c3fe85172067a8fde155d" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void propagate_encryption_changed</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>propagate_encryption_changed</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="173" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="173" bodyend="187"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1af9f4b17ca3765e41be0e54866ca9fb8b" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void linphone_call_audiostream_encryption_changed</definition>
        <argsstring>(void *data, bool_t encrypted)</argsstring>
        <name>linphone_call_audiostream_encryption_changed</name>
        <param>
          <type>void *</type>
          <declname>data</declname>
        </param>
        <param>
          <type>bool_t</type>
          <declname>encrypted</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="189" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="189" bodyend="217"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a1ed2ef5f28e51a5f218c906bb707e896" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void linphone_call_audiostream_auth_token_ready</definition>
        <argsstring>(void *data, const char *auth_token, bool_t verified)</argsstring>
        <name>linphone_call_audiostream_auth_token_ready</name>
        <param>
          <type>void *</type>
          <declname>data</declname>
        </param>
        <param>
          <type>const char *</type>
          <declname>auth_token</declname>
        </param>
        <param>
          <type>bool_t</type>
          <declname>verified</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="220" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="220" bodyend="229"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1ga3ce1e87718e88df21bca4a19b6e80967" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_set_authentication_token_verified</definition>
        <argsstring>(LinphoneCall *call, bool_t verified)</argsstring>
        <name>linphone_call_set_authentication_token_verified</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>bool_t</type>
          <declname>verified</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Set the result of ZRTP short code verification by user. If remote party also does the same, it will update the ZRTP cache so that user&apos;s verification will not be required for the two users. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>call</parametername>
</parameternamelist>
<parameterdescription>
<para>the LinphoneCall </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>verified</parametername>
</parameternamelist>
<parameterdescription>
<para>whether the ZRTP SAS is verified. </para></parameterdescription>
</parameteritem>
</parameterlist>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="238" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="238" bodyend="252"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1aa5d6ea4e775c5aa265338bac0dcd12f7" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>static int get_max_codec_sample_rate</definition>
        <argsstring>(const MSList *codecs)</argsstring>
        <name>get_max_codec_sample_rate</name>
        <param>
          <type>const MSList *</type>
          <declname>codecs</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="254" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="254" bodyend="268"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a90fd736e68bcd1ccaf70554ed47ef88e" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>static int find_payload_type_number</definition>
        <argsstring>(const MSList *assigned, const PayloadType *pt)</argsstring>
        <name>find_payload_type_number</name>
        <param>
          <type>const MSList *</type>
          <declname>assigned</declname>
        </param>
        <param>
          <type>const PayloadType *</type>
          <declname>pt</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="270" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="270" bodyend="286"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a970ea38abf1976793a507de71e6b74d5" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>bool_t</type>
        <definition>bool_t is_payload_type_number_available</definition>
        <argsstring>(const MSList *l, int number, const PayloadType *ignore)</argsstring>
        <name>is_payload_type_number_available</name>
        <param>
          <type>const MSList *</type>
          <declname>l</declname>
        </param>
        <param>
          <type>int</type>
          <declname>number</declname>
        </param>
        <param>
          <type>const PayloadType *</type>
          <declname>ignore</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="288" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="288" bodyend="295"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a6046d91d867f8b11b8929479ca7b670f" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void linphone_core_assign_payload_type_numbers</definition>
        <argsstring>(LinphoneCore *lc, MSList *codecs)</argsstring>
        <name>linphone_core_assign_payload_type_numbers</name>
        <param>
          <type><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref> *</type>
          <declname>lc</declname>
        </param>
        <param>
          <type>MSList *</type>
          <declname>codecs</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="297" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="297" bodyend="327"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1ab0e2a7b884e242b5066660ffb0503ce3" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>bool_t</type>
        <definition>static bool_t has_telephone_event_at_rate</definition>
        <argsstring>(const MSList *tev, int rate)</argsstring>
        <name>has_telephone_event_at_rate</name>
        <param>
          <type>const MSList *</type>
          <declname>tev</declname>
        </param>
        <param>
          <type>int</type>
          <declname>rate</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="329" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="329" bodyend="336"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a5d946b27276475fceb0809be6647e9a8" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>MSList *</type>
        <definition>static MSList* create_telephone_events</definition>
        <argsstring>(LinphoneCore *lc, const MSList *codecs)</argsstring>
        <name>create_telephone_events</name>
        <param>
          <type><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref> *</type>
          <declname>lc</declname>
        </param>
        <param>
          <type>const MSList *</type>
          <declname>codecs</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="338" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="338" bodyend="358"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1ac755053e64ca37a788a643d5b7f651f1" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>MSList *</type>
        <definition>static MSList* create_special_payload_types</definition>
        <argsstring>(LinphoneCore *lc, const MSList *codecs)</argsstring>
        <name>create_special_payload_types</name>
        <param>
          <type><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref> *</type>
          <declname>lc</declname>
        </param>
        <param>
          <type>const MSList *</type>
          <declname>codecs</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="360" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="360" bodyend="368"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1aacdb2461703187c1753a76241f29775a" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>MSList *</type>
        <definition>static MSList* make_codec_list</definition>
        <argsstring>(LinphoneCore *lc, CodecConstraints *hints, SalStreamType stype, const MSList *codecs)</argsstring>
        <name>make_codec_list</name>
        <param>
          <type><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref> *</type>
          <declname>lc</declname>
        </param>
        <param>
          <type>CodecConstraints *</type>
          <declname>hints</declname>
        </param>
        <param>
          <type>SalStreamType</type>
          <declname>stype</declname>
        </param>
        <param>
          <type>const MSList *</type>
          <declname>codecs</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="376" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="376" bodyend="415"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a7525fcbaa8f1315d1d297f7df431e4e2" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void update_media_description_from_stun</definition>
        <argsstring>(SalMediaDescription *md, const StunCandidate *ac, const StunCandidate *vc, const StunCandidate *tc)</argsstring>
        <name>update_media_description_from_stun</name>
        <param>
          <type>SalMediaDescription *</type>
          <declname>md</declname>
        </param>
        <param>
          <type>const StunCandidate *</type>
          <declname>ac</declname>
        </param>
        <param>
          <type>const StunCandidate *</type>
          <declname>vc</declname>
        </param>
        <param>
          <type>const StunCandidate *</type>
          <declname>tc</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="417" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="417" bodyend="435"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a8bed7a4e44969804494143a8f097bd8d" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>static int setup_encryption_key</definition>
        <argsstring>(SalSrtpCryptoAlgo *crypto, MSCryptoSuite suite, unsigned int tag)</argsstring>
        <name>setup_encryption_key</name>
        <param>
          <type>SalSrtpCryptoAlgo *</type>
          <declname>crypto</declname>
        </param>
        <param>
          <type>MSCryptoSuite</type>
          <declname>suite</declname>
        </param>
        <param>
          <type>unsigned int</type>
          <declname>tag</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="437" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="437" bodyend="461"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1aaf101a12340e598348db16bbdfd681e5" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void setup_dtls_keys</definition>
        <argsstring>(LinphoneCall *call, SalMediaDescription *md)</argsstring>
        <name>setup_dtls_keys</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>SalMediaDescription *</type>
          <declname>md</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="462" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="462" bodyend="477"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a42232537560180e3b9ac8d9b6af61475" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void setup_encryption_keys</definition>
        <argsstring>(LinphoneCall *call, SalMediaDescription *md)</argsstring>
        <name>setup_encryption_keys</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>SalMediaDescription *</type>
          <declname>md</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="478" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="478" bodyend="501"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1aee899437c70b8eeac10ca63824e3eded" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void setup_rtcp_fb</definition>
        <argsstring>(LinphoneCall *call, SalMediaDescription *md)</argsstring>
        <name>setup_rtcp_fb</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>SalMediaDescription *</type>
          <declname>md</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="503" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="503" bodyend="527"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1ae56b9174f78ab7b0d5c268afb9b72cb9" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void setup_rtcp_xr</definition>
        <argsstring>(LinphoneCall *call, SalMediaDescription *md)</argsstring>
        <name>setup_rtcp_xr</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>SalMediaDescription *</type>
          <declname>md</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="529" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="529" bodyend="552"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a9e3008967b7ed9101169d62f448183b8" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_increment_local_media_description</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_increment_local_media_description</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="554" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="554" bodyend="557"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a1a5a7b8b1327e609c7a3c4e7d7ccc7d0" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_update_local_media_description_from_ice_or_upnp</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_update_local_media_description_from_ice_or_upnp</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="559" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="559" bodyend="570"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a47cd2a7b927c47abe5a8e428bca335d9" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void transfer_already_assigned_payload_types</definition>
        <argsstring>(SalMediaDescription *old, SalMediaDescription *md)</argsstring>
        <name>transfer_already_assigned_payload_types</name>
        <param>
          <type>SalMediaDescription *</type>
          <declname>old</declname>
        </param>
        <param>
          <type>SalMediaDescription *</type>
          <declname>md</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="572" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="572" bodyend="578"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1afa96c092b3d2f480abd9481de074024a" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>const char *</type>
        <definition>static const char* linphone_call_get_bind_ip_for_stream</definition>
        <argsstring>(LinphoneCall *call, int stream_index)</argsstring>
        <name>linphone_call_get_bind_ip_for_stream</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>int</type>
          <declname>stream_index</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="580" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="580" bodyend="590"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a9e1a43c8047a0db0d293927d5cc16cce" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>const char *</type>
        <definition>static const char* linphone_call_get_public_ip_for_stream</definition>
        <argsstring>(LinphoneCall *call, int stream_index)</argsstring>
        <name>linphone_call_get_public_ip_for_stream</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>int</type>
          <declname>stream_index</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="592" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="592" bodyend="598"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a7980c493af99a400a0af57b0fb88191c" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_update_biggest_desc</definition>
        <argsstring>(LinphoneCall *call, SalMediaDescription *md)</argsstring>
        <name>linphone_call_update_biggest_desc</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>SalMediaDescription *</type>
          <declname>md</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="600" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="600" bodyend="610"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a8bfdcf6e615089b9577de7c58eb8ea33" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void force_streams_dir_according_to_state</definition>
        <argsstring>(LinphoneCall *call, SalMediaDescription *md)</argsstring>
        <name>force_streams_dir_according_to_state</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>SalMediaDescription *</type>
          <declname>md</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="612" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="612" bodyend="635"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a2a31fc9e74f88d4a50495d404f896756" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_make_local_media_description</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_make_local_media_description</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="637" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="637" bodyend="817"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a6e16977788e898f479c54e42ceedd8fa" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>static int find_port_offset</definition>
        <argsstring>(LinphoneCore *lc, int stream_index, int base_port)</argsstring>
        <name>find_port_offset</name>
        <param>
          <type><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref> *</type>
          <declname>lc</declname>
        </param>
        <param>
          <type>int</type>
          <declname>stream_index</declname>
        </param>
        <param>
          <type>int</type>
          <declname>base_port</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="819" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="819" bodyend="844"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a7c8fd418fa0c9a812cf6605cdbd70a91" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>static int select_random_port</definition>
        <argsstring>(LinphoneCore *lc, int stream_index, int min_port, int max_port)</argsstring>
        <name>select_random_port</name>
        <param>
          <type><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref> *</type>
          <declname>lc</declname>
        </param>
        <param>
          <type>int</type>
          <declname>stream_index</declname>
        </param>
        <param>
          <type>int</type>
          <declname>min_port</declname>
        </param>
        <param>
          <type>int</type>
          <declname>max_port</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="846" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="846" bodyend="871"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1adf4ded5f472c967f94a2861b17d3d32d" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void port_config_set_random</definition>
        <argsstring>(LinphoneCall *call, int stream_index)</argsstring>
        <name>port_config_set_random</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>int</type>
          <declname>stream_index</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="873" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="873" bodyend="876"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a3ff14ce1fa43d1844d03c4d87acd17a2" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void port_config_set</definition>
        <argsstring>(LinphoneCall *call, int stream_index, int min_port, int max_port)</argsstring>
        <name>port_config_set</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>int</type>
          <declname>stream_index</declname>
        </param>
        <param>
          <type>int</type>
          <declname>min_port</declname>
        </param>
        <param>
          <type>int</type>
          <declname>max_port</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="878" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="878" bodyend="895"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1ad4dc46edd71abcff023a5077b3f32978" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void linphone_call_init_common</definition>
        <argsstring>(LinphoneCall *call, LinphoneAddress *from, LinphoneAddress *to)</argsstring>
        <name>linphone_call_init_common</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref> *</type>
          <declname>from</declname>
        </param>
        <param>
          <type><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref> *</type>
          <declname>to</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="897" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="897" bodyend="928"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1ad573adae768e3e0eac8697d688f80c44" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_init_stats</definition>
        <argsstring>(LinphoneCallStats *stats, int type)</argsstring>
        <name>linphone_call_init_stats</name>
        <param>
          <type><ref refid="group__call__misc_1ga4d22764ac0e68a8d77670761429b2ee7" kindref="member">LinphoneCallStats</ref> *</type>
          <declname>stats</declname>
        </param>
        <param>
          <type>int</type>
          <declname>type</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="930" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="930" bodyend="940"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a83a30671425eb83d54a459d3f0688067" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void discover_mtu</definition>
        <argsstring>(LinphoneCore *lc, const char *remote)</argsstring>
        <name>discover_mtu</name>
        <param>
          <type><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref> *</type>
          <declname>lc</declname>
        </param>
        <param>
          <type>const char *</type>
          <declname>remote</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="943" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="943" bodyend="954"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1ae69b011300829bff3073b0cea66db378" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_create_op</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_create_op</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="956" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="956" bodyend="966"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a31185c97617a3627d4b2da1dadf02a53" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void linphone_call_outgoing_select_ip_version</definition>
        <argsstring>(LinphoneCall *call, LinphoneAddress *to, LinphoneProxyConfig *cfg)</argsstring>
        <name>linphone_call_outgoing_select_ip_version</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref> *</type>
          <declname>to</declname>
        </param>
        <param>
          <type><ref refid="group__proxies_1ga1879a0d59e068457b688138da97f2d0b" kindref="member">LinphoneProxyConfig</ref> *</type>
          <declname>cfg</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="976" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="976" bodyend="985"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a1c235d07c9f0c2d796b7adf2d4bc541b" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void linphone_call_destroy</definition>
        <argsstring>(LinphoneCall *obj)</argsstring>
        <name>linphone_call_destroy</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>obj</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1032" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1593" bodyend="1663"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a6761744669e834b5592ab584a5bb9354" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type></type>
        <definition>BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES</definition>
        <argsstring>(LinphoneCall)</argsstring>
        <name>BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref></type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1034" column="1"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a614fbce84b960cebf928f99eb500eda2" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type></type>
        <definition>BELLE_SIP_INSTANCIATE_VPTR</definition>
        <argsstring>(LinphoneCall, belle_sip_object_t,(belle_sip_object_destroy_t) linphone_call_destroy, NULL, NULL, FALSE)</argsstring>
        <name>BELLE_SIP_INSTANCIATE_VPTR</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref></type>
        </param>
        <param>
          <type>belle_sip_object_t</type>
        </param>
        <param>
          <type>(belle_sip_object_destroy_t)</type>
          <declname>linphone_call_destroy</declname>
        </param>
        <param>
          <type>NULL</type>
        </param>
        <param>
          <type>NULL</type>
        </param>
        <param>
          <type>FALSE</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1036" column="1"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1adba66c312ddf58a2e8369c7dde33439c" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_fill_media_multicast_addr</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_fill_media_multicast_addr</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1042" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1042" bodyend="1054"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a63c9fb7d679fe7344a093656707620a7" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
        <definition>LinphoneCall* linphone_call_new_outgoing</definition>
        <argsstring>(struct _LinphoneCore *lc, LinphoneAddress *from, LinphoneAddress *to, const LinphoneCallParams *params, LinphoneProxyConfig *cfg)</argsstring>
        <name>linphone_call_new_outgoing</name>
        <param>
          <type>struct _LinphoneCore *</type>
          <declname>lc</declname>
        </param>
        <param>
          <type><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref> *</type>
          <declname>from</declname>
        </param>
        <param>
          <type><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref> *</type>
          <declname>to</declname>
        </param>
        <param>
          <type>const <ref refid="group__call__control_1gaa91f7e76e8f038ae9acdf42d1bc80a22" kindref="member">LinphoneCallParams</ref> *</type>
          <declname>params</declname>
        </param>
        <param>
          <type><ref refid="group__proxies_1ga1879a0d59e068457b688138da97f2d0b" kindref="member">LinphoneProxyConfig</ref> *</type>
          <declname>cfg</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1056" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1056" bodyend="1092"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1aae3d780670612ec6e14e5d4ee1f0e672" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void linphone_call_incoming_select_ip_version</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_incoming_select_ip_version</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1094" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1094" bodyend="1098"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a58c910fc30010b4c3f50cac21cce998f" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_set_compatible_incoming_call_parameters</definition>
        <argsstring>(LinphoneCall *call, SalMediaDescription *md)</argsstring>
        <name>linphone_call_set_compatible_incoming_call_parameters</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>SalMediaDescription *</type>
          <declname>md</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Fix call parameters on incoming call to eg. enable AVPF if the incoming call propose it and it is not enabled locally. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1103" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1103" bodyend="1121"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1ad50dc2be78f980cf6fd22765c4a5eb99" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void linphone_call_compute_streams_indexes</definition>
        <argsstring>(LinphoneCall *call, const SalMediaDescription *md)</argsstring>
        <name>linphone_call_compute_streams_indexes</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>const SalMediaDescription *</type>
          <declname>md</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1123" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1123" bodyend="1220"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a3677642006905cdd6a6715a4a5239b09" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
        <definition>LinphoneCall* linphone_call_new_incoming</definition>
        <argsstring>(LinphoneCore *lc, LinphoneAddress *from, LinphoneAddress *to, SalOp *op)</argsstring>
        <name>linphone_call_new_incoming</name>
        <param>
          <type><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref> *</type>
          <declname>lc</declname>
        </param>
        <param>
          <type><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref> *</type>
          <declname>from</declname>
        </param>
        <param>
          <type><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref> *</type>
          <declname>to</declname>
        </param>
        <param>
          <type>SalOp *</type>
          <declname>op</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1222" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1222" bodyend="1337"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a2db07583754abc93fe52d91ad659ad3c" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_free_media_resources</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_free_media_resources</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1345" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1345" bodyend="1355"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a0e990263793292cd0309e1caf080d336" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void linphone_call_set_released</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_set_released</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1360" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1360" bodyend="1386"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a863079a7426a4e4ceaa8743d6e79bc8b" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void linphone_call_set_terminated</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_set_terminated</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1394" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1394" bodyend="1416"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a26589bc5183df768af1b75a426ef13d6" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_fix_call_parameters</definition>
        <argsstring>(LinphoneCall *call, SalMediaDescription *rmd)</argsstring>
        <name>linphone_call_fix_call_parameters</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>SalMediaDescription *</type>
          <declname>rmd</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1423" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1423" bodyend="1450"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a75e668938951575ba6f05f00a1943dd0" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>const char *</type>
        <definition>const char* linphone_call_state_to_string</definition>
        <argsstring>(LinphoneCallState cs)</argsstring>
        <name>linphone_call_state_to_string</name>
        <param>
          <type><ref refid="group__call__control_1ga37dad1a4f935d9cc26ec1f9d2b23691a" kindref="member">LinphoneCallState</ref></type>
          <declname>cs</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1452" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1452" bodyend="1498"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a7d0bf3158cd12e14f041344ab030786d" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_set_state</definition>
        <argsstring>(LinphoneCall *call, LinphoneCallState cstate, const char *message)</argsstring>
        <name>linphone_call_set_state</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type><ref refid="group__call__control_1ga37dad1a4f935d9cc26ec1f9d2b23691a" kindref="member">LinphoneCallState</ref></type>
          <declname>cstate</declname>
        </param>
        <param>
          <type>const char *</type>
          <declname>message</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1500" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1500" bodyend="1591"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1ga67f07db984bd9534117257723142d794" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
        <definition>LinphoneCall * linphone_call_ref</definition>
        <argsstring>(LinphoneCall *obj)</argsstring>
        <name>linphone_call_ref</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Acquire a reference to the call. An application that wishes to retain a pointer to call object must use this function to unsure the pointer remains valid. Once the application no more needs this pointer, it must call <ref refid="group__call__control_1gae69d2d9891695c07fca0637ef7fd7df6" kindref="member">linphone_call_unref()</ref>. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">call</parametername>
</parameternamelist>
<parameterdescription>
<para>The call. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>The same call. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1670" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1670" bodyend="1673"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1gae69d2d9891695c07fca0637ef7fd7df6" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_unref</definition>
        <argsstring>(LinphoneCall *obj)</argsstring>
        <name>linphone_call_unref</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Release reference to the call. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">call</parametername>
</parameternamelist>
<parameterdescription>
<para>The call. </para></parameterdescription>
</parameteritem>
</parameterlist>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1675" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1675" bodyend="1677"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1ga23372d75ffdeb9d6574010855dbda998" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>unsigned int</type>
        <definition>static unsigned int linphone_call_get_n_active_streams</definition>
        <argsstring>(const LinphoneCall *call)</argsstring>
        <name>linphone_call_get_n_active_streams</name>
        <param>
          <type>const <ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1679" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1679" bodyend="1686"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1ga768bbd4e2869556bc23830a7b1e4eb5c" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>const <ref refid="group__call__control_1gaa91f7e76e8f038ae9acdf42d1bc80a22" kindref="member">LinphoneCallParams</ref> *</type>
        <definition>const LinphoneCallParams* linphone_call_get_current_params</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_get_current_params</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Returns current parameters associated to the call. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1691" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1691" bodyend="1776"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1ga65b4ca2f01d684019f6ae5621eb430f6" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>const <ref refid="group__call__control_1gaa91f7e76e8f038ae9acdf42d1bc80a22" kindref="member">LinphoneCallParams</ref> *</type>
        <definition>const LinphoneCallParams* linphone_call_get_remote_params</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_get_remote_params</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Returns call parameters proposed by remote.</para><para>This is useful when receiving an incoming call, to know whether the remote party supports video, encryption or whatever. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1784" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1784" bodyend="1835"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1ga7c43232df9cd89feb0c68b68c34e6ace" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>const <ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref> *</type>
        <definition>const LinphoneAddress* linphone_call_get_remote_address</definition>
        <argsstring>(const LinphoneCall *call)</argsstring>
        <name>linphone_call_get_remote_address</name>
        <param>
          <type>const <ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Returns the remote address associated to this call </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1841" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1841" bodyend="1843"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1ga89252821dcaee90338937c7adb28db09" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>char *</type>
        <definition>char* linphone_call_get_remote_address_as_string</definition>
        <argsstring>(const LinphoneCall *call)</argsstring>
        <name>linphone_call_get_remote_address_as_string</name>
        <param>
          <type>const <ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Returns the remote address associated to this call as a string.</para><para>The result string must be freed by user using ms_free(). </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1850" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1850" bodyend="1852"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1ga4e66e41e6557ea35a07f266918741ffc" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__call__control_1ga37dad1a4f935d9cc26ec1f9d2b23691a" kindref="member">LinphoneCallState</ref></type>
        <definition>LinphoneCallState linphone_call_get_state</definition>
        <argsstring>(const LinphoneCall *call)</argsstring>
        <name>linphone_call_get_state</name>
        <param>
          <type>const <ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Retrieves the call&apos;s current state. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1857" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1857" bodyend="1859"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1ga312c73999c94f7e59f307423d40d16b2" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__misc_1gabe82a1a1ffc3d6b4e0b51a03028513b7" kindref="member">LinphoneReason</ref></type>
        <definition>LinphoneReason linphone_call_get_reason</definition>
        <argsstring>(const LinphoneCall *call)</argsstring>
        <name>linphone_call_get_reason</name>
        <param>
          <type>const <ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Returns the reason for a call termination (either error or normal termination) </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1864" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1864" bodyend="1866"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1gaf92313f94a06da10723d7d0e4b4506ad" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>const <ref refid="group__misc_1ga8f3b35ce44e1284465ac2859ffbb9db7" kindref="member">LinphoneErrorInfo</ref> *</type>
        <definition>const LinphoneErrorInfo* linphone_call_get_error_info</definition>
        <argsstring>(const LinphoneCall *call)</argsstring>
        <name>linphone_call_get_error_info</name>
        <param>
          <type>const <ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Returns full details about call errors or termination reasons. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1871" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1871" bodyend="1875"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1gaea8186825ead90bcb321d91d97b48fe5" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void *</type>
        <definition>void * linphone_call_get_user_data</definition>
        <argsstring>(const LinphoneCall *call)</argsstring>
        <name>linphone_call_get_user_data</name>
        <param>
          <type>const <ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Get the user pointer associated with the LinphoneCall</para><para><simplesect kind="return"><para>an opaque user pointer that can be retrieved at any time</para></simplesect>
Retrieve the user pointer associated with the call. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">call</parametername>
</parameternamelist>
<parameterdescription>
<para>The call. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>The user pointer associated with the call. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1883" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1883" bodyend="1886"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1gab4cc2d61a2c81bba6d4cbdfa836805ca" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_set_user_data</definition>
        <argsstring>(LinphoneCall *call, void *user_pointer)</argsstring>
        <name>linphone_call_set_user_data</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>void *</type>
          <declname>user_pointer</declname>
          <defname>ud</defname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Set the user pointer associated with the LinphoneCall</para><para>the user pointer is an opaque user pointer that can be retrieved at any time in the LinphoneCall</para><para>Assign a user pointer to the call. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">cfg</parametername>
</parameternamelist>
<parameterdescription>
<para>The call. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">ud</parametername>
</parameternamelist>
<parameterdescription>
<para>The user pointer to associate with the call. </para></parameterdescription>
</parameteritem>
</parameterlist>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1895" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1895" bodyend="1898"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1gab090be4c386d3131ecaea751ff76cd85" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
        <definition>LinphoneCallLog* linphone_call_get_call_log</definition>
        <argsstring>(const LinphoneCall *call)</argsstring>
        <name>linphone_call_get_call_log</name>
        <param>
          <type>const <ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Returns the call log associated to this call. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1903" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1903" bodyend="1905"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1ga155679984062a8e08b5f0e447784e6a0" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>const char *</type>
        <definition>const char* linphone_call_get_refer_to</definition>
        <argsstring>(const LinphoneCall *call)</argsstring>
        <name>linphone_call_get_refer_to</name>
        <param>
          <type>const <ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Returns the refer-to uri (if the call was transfered). </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1910" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1910" bodyend="1912"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1ga6ee40f9d651f21306b64ed15bfd37f81" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
        <definition>LinphoneCall* linphone_call_get_transferer_call</definition>
        <argsstring>(const LinphoneCall *call)</argsstring>
        <name>linphone_call_get_transferer_call</name>
        <param>
          <type>const <ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Returns the transferer if this call was started automatically as a result of an incoming transfer request. The call in which the transfer request was received is returned in this case. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1918" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1918" bodyend="1920"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1ga7084aa3aa5add54b991e0909080c586d" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
        <definition>LinphoneCall* linphone_call_get_transfer_target_call</definition>
        <argsstring>(const LinphoneCall *call)</argsstring>
        <name>linphone_call_get_transfer_target_call</name>
        <param>
          <type>const <ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>When this call has received a transfer request, returns the new call that was automatically created as a result of the transfer. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1925" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1925" bodyend="1927"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1ga9ba9ecf7390779c1fea3438e8dfad3af" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__call__logs_1ga779ac636d8b652c5130da18827c13e5a" kindref="member">LinphoneCallDir</ref></type>
        <definition>LinphoneCallDir linphone_call_get_dir</definition>
        <argsstring>(const LinphoneCall *call)</argsstring>
        <name>linphone_call_get_dir</name>
        <param>
          <type>const <ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Returns direction of the call (incoming or outgoing). </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1932" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1932" bodyend="1934"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1ga33969d008c7faf43c9a38348f559269e" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>const char *</type>
        <definition>const char* linphone_call_get_remote_user_agent</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_get_remote_user_agent</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Returns the far end&apos;s user agent description string, if available. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1939" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1939" bodyend="1944"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1ga6124b2e44ec3e79a0150fed322328880" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>const char *</type>
        <definition>const char* linphone_call_get_remote_contact</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_get_remote_contact</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Returns the far end&apos;s sip contact as a string, if available. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1949" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1949" bodyend="1958"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1ga43844da0d22ffe05c99476cae741fa50" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>bool_t</type>
        <definition>bool_t linphone_call_has_transfer_pending</definition>
        <argsstring>(const LinphoneCall *call)</argsstring>
        <name>linphone_call_has_transfer_pending</name>
        <param>
          <type>const <ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Returns true if this calls has received a transfer that has not been executed yet. Pending transfers are executed when this call is being paused or closed, locally or by remote endpoint. If the call is already paused while receiving the transfer request, the transfer immediately occurs. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1969" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1969" bodyend="1971"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1ga0ad1da7a56b11f5e0b2fe6f91d3d6bb5" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int linphone_call_get_duration</definition>
        <argsstring>(const LinphoneCall *call)</argsstring>
        <name>linphone_call_get_duration</name>
        <param>
          <type>const <ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Returns call&apos;s duration in seconds. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1976" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1976" bodyend="1979"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1ga9baae328206769b75aa8a3af9057d8a9" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
        <definition>LinphoneCall* linphone_call_get_replaced_call</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_get_replaced_call</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Returns the call object this call is replacing, if any. Call replacement can occur during call transfers. By default, the core automatically terminates the replaced call and accept the new one. This function allows the application to know whether a new incoming call is a one that replaces another one. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1987" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1987" bodyend="1993"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1gae51907817a70dd89d9f67aff13bf2eab" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_enable_camera</definition>
        <argsstring>(LinphoneCall *call, bool_t enable)</argsstring>
        <name>linphone_call_enable_camera</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>bool_t</type>
          <declname>enable</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Indicate whether camera input should be sent to remote end. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="1998" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="1998" bodyend="2012"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1ga7b713f067c9ca5a2f95bc0dd51c1787a" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_send_vfu_request</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_send_vfu_request</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Request remote side to send us a Video Fast Update. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2017" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2017" bodyend="2030"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1ga8a386f2d8bece0d3fe7d51a0de31741e" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int linphone_call_take_video_snapshot</definition>
        <argsstring>(LinphoneCall *call, const char *file)</argsstring>
        <name>linphone_call_take_video_snapshot</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>const char *</type>
          <declname>file</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Take a photo of currently received video and write it into a jpeg file. Note that the snapshot is asynchronous, an application shall not assume that the file is created when the function returns. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>call</parametername>
</parameternamelist>
<parameterdescription>
<para>a LinphoneCall </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>file</parametername>
</parameternamelist>
<parameterdescription>
<para>a path where to write the jpeg content. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>0 if successfull, -1 otherwise (typically if jpeg format is not supported). </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2040" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2040" bodyend="2048"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1ga7ecd5d57995205cde4abb2e6f4c2ab3c" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int linphone_call_take_preview_snapshot</definition>
        <argsstring>(LinphoneCall *call, const char *file)</argsstring>
        <name>linphone_call_take_preview_snapshot</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>const char *</type>
          <declname>file</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Take a photo of currently captured video and write it into a jpeg file. Note that the snapshot is asynchronous, an application shall not assume that the file is created when the function returns. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>call</parametername>
</parameternamelist>
<parameterdescription>
<para>a LinphoneCall </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>file</parametername>
</parameternamelist>
<parameterdescription>
<para>a path where to write the jpeg content. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>0 if successfull, -1 otherwise (typically if jpeg format is not supported). </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2057" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2057" bodyend="2066"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1ga6a5a1d9f49aee0666c137ce246bc85f6" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>bool_t</type>
        <definition>bool_t linphone_call_camera_enabled</definition>
        <argsstring>(const LinphoneCall *call)</argsstring>
        <name>linphone_call_camera_enabled</name>
        <param>
          <type>const <ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Returns TRUE if camera pictures are allowed to be sent to the remote party. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2071" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2071" bodyend="2073"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1gad13ca78a01934619b2ec52e803ff837d" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>const char *</type>
        <definition>const char* linphone_privacy_to_string</definition>
        <argsstring>(LinphonePrivacy privacy)</argsstring>
        <name>linphone_privacy_to_string</name>
        <param>
          <type><ref refid="group__call__control_1ga909923983eb026ab20a137972ded25c6" kindref="member">LinphonePrivacy</ref></type>
          <declname>privacy</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para><simplesect kind="return"><para>string value of LinphonePrivacy enum </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2080" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2080" bodyend="2091"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a847cd80b22d09ecb27b2106fcf53b23b" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_set_next_video_frame_decoded_callback</definition>
        <argsstring>(LinphoneCall *call, LinphoneCallCbFunc cb, void *user_data)</argsstring>
        <name>linphone_call_set_next_video_frame_decoded_callback</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>LinphoneCallCbFunc</type>
          <declname>cb</declname>
        </param>
        <param>
          <type>void *</type>
          <declname>user_data</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2150" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2150" bodyend="2154"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1ace600256bc35ef9bd66d6a009f6a2018" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void port_config_set_random_choosed</definition>
        <argsstring>(LinphoneCall *call, int stream_index, RtpSession *session)</argsstring>
        <name>port_config_set_random_choosed</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>int</type>
          <declname>stream_index</declname>
        </param>
        <param>
          <type>RtpSession *</type>
          <declname>session</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2156" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2156" bodyend="2159"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a20684b537ee9a9073661a7ccf061f52f" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void _linphone_call_prepare_ice_for_stream</definition>
        <argsstring>(LinphoneCall *call, int stream_index, bool_t create_checklist)</argsstring>
        <name>_linphone_call_prepare_ice_for_stream</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>int</type>
          <declname>stream_index</declname>
        </param>
        <param>
          <type>bool_t</type>
          <declname>create_checklist</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2161" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2161" bodyend="2177"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1ac8321dcbc677e85a9e53e60bf8bfb665" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int linphone_call_prepare_ice</definition>
        <argsstring>(LinphoneCall *call, bool_t incoming_offer)</argsstring>
        <name>linphone_call_prepare_ice</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>bool_t</type>
          <declname>incoming_offer</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2179" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2179" bodyend="2213"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1af09f331791ee631cfcff24768bcac482" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void linphone_call_join_multicast_group</definition>
        <argsstring>(LinphoneCall *call, int stream_index, MediaStream *ms)</argsstring>
        <name>linphone_call_join_multicast_group</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>int</type>
          <declname>stream_index</declname>
        </param>
        <param>
          <type>MediaStream *</type>
          <declname>ms</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2216" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2216" bodyend="2221"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a61d125a2497c399c05880bf96f5a11f2" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>SalMulticastRole</type>
        <definition>static SalMulticastRole linphone_call_get_multicast_role</definition>
        <argsstring>(const LinphoneCall *call, SalStreamType type)</argsstring>
        <name>linphone_call_get_multicast_role</name>
        <param>
          <type>const <ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>SalStreamType</type>
          <declname>type</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2223" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2223" bodyend="2249"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1af8509ef8e635eee21b8d97331ade5189" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void setup_dtls_params</definition>
        <argsstring>(LinphoneCall *call, MediaStream *stream)</argsstring>
        <name>setup_dtls_params</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>MediaStream *</type>
          <declname>stream</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2251" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2251" bodyend="2274"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1aa358401afe811e6082c9cc58b3e975d6" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_init_audio_stream</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_init_audio_stream</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2276" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2276" bodyend="2372"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1adb684fbdaa9914b3dda6840bf2305ada" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_init_video_stream</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_init_video_stream</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2374" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2374" bodyend="2445"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1afb4ea2cab7a823e273360d5c0e1e435a" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_init_text_stream</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_init_text_stream</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2447" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2447" bodyend="2496"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1ab3eae24dd687671b93c8d0e19d37a326" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_init_media_streams</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_init_media_streams</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2498" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2498" bodyend="2502"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a86e27046cc12fb0625102154920915cc" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void linphone_core_dtmf_received</definition>
        <argsstring>(LinphoneCall *call, int dtmf)</argsstring>
        <name>linphone_core_dtmf_received</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>int</type>
          <declname>dtmf</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2507" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2507" bodyend="2513"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a6aa804308bfed61943b19974a28afa30" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void parametrize_equalizer</definition>
        <argsstring>(LinphoneCore *lc, AudioStream *st)</argsstring>
        <name>parametrize_equalizer</name>
        <param>
          <type><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref> *</type>
          <declname>lc</declname>
        </param>
        <param>
          <type>AudioStream *</type>
          <declname>st</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2515" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2515" bodyend="2535"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a58349d458c976825b5bb5acac3ac0ba3" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void set_mic_gain_db</definition>
        <argsstring>(AudioStream *st, float gain)</argsstring>
        <name>set_mic_gain_db</name>
        <param>
          <type>AudioStream *</type>
          <declname>st</declname>
        </param>
        <param>
          <type>float</type>
          <declname>gain</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2537" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2537" bodyend="2539"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1ad24c5225984867d4df9011fa1d0cc136" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void set_playback_gain_db</definition>
        <argsstring>(AudioStream *st, float gain)</argsstring>
        <name>set_playback_gain_db</name>
        <param>
          <type>AudioStream *</type>
          <declname>st</declname>
        </param>
        <param>
          <type>float</type>
          <declname>gain</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2541" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2541" bodyend="2545"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a3fd67bc922489a954adbc5e63ccc84b0" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void _post_configure_audio_stream</definition>
        <argsstring>(AudioStream *st, LinphoneCore *lc, bool_t muted)</argsstring>
        <name>_post_configure_audio_stream</name>
        <param>
          <type>AudioStream *</type>
          <declname>st</declname>
        </param>
        <param>
          <type><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref> *</type>
          <declname>lc</declname>
        </param>
        <param>
          <type>bool_t</type>
          <declname>muted</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2548" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2548" bodyend="2604"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1ab77ffe1e0a9a10248c8a446cfea41db0" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void post_configure_audio_streams</definition>
        <argsstring>(LinphoneCall *call, bool_t muted)</argsstring>
        <name>post_configure_audio_streams</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>bool_t</type>
          <declname>muted</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2606" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2606" bodyend="2615"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1acc51059f65e11a8676e75e22f2d0ebfb" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>static int get_ideal_audio_bw</definition>
        <argsstring>(LinphoneCall *call, const SalMediaDescription *md, const SalStreamDescription *desc)</argsstring>
        <name>get_ideal_audio_bw</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>const SalMediaDescription *</type>
          <declname>md</declname>
        </param>
        <param>
          <type>const SalStreamDescription *</type>
          <declname>desc</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2617" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2617" bodyend="2647"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a9de41960d7a1d6a847dc65f54ad888d4" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>static int get_video_bw</definition>
        <argsstring>(LinphoneCall *call, const SalMediaDescription *md, const SalStreamDescription *desc)</argsstring>
        <name>get_video_bw</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>const SalMediaDescription *</type>
          <declname>md</declname>
        </param>
        <param>
          <type>const SalStreamDescription *</type>
          <declname>desc</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2649" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2649" bodyend="2661"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a2d981a2b4045ac02e1d7bfb7f62884f3" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>RtpProfile *</type>
        <definition>static RtpProfile* make_profile</definition>
        <argsstring>(LinphoneCall *call, const SalMediaDescription *md, const SalStreamDescription *desc, int *used_pt)</argsstring>
        <name>make_profile</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>const SalMediaDescription *</type>
          <declname>md</declname>
        </param>
        <param>
          <type>const SalStreamDescription *</type>
          <declname>desc</declname>
        </param>
        <param>
          <type>int *</type>
          <declname>used_pt</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2663" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2663" bodyend="2720"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a12b77fbebccd64f3c1af53ff3b5f386d" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void setup_ring_player</definition>
        <argsstring>(LinphoneCore *lc, LinphoneCall *call)</argsstring>
        <name>setup_ring_player</name>
        <param>
          <type><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref> *</type>
          <declname>lc</declname>
        </param>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2723" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2723" bodyend="2727"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a6eda22f96194dc7161268a10bd28bc45" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>bool_t</type>
        <definition>static bool_t linphone_call_sound_resources_available</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_sound_resources_available</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2729" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2729" bodyend="2734"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1af45d05a2d4bdbb492c85ee84159243aa" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>static int find_crypto_index_from_tag</definition>
        <argsstring>(const SalSrtpCryptoAlgo crypto[], unsigned char tag)</argsstring>
        <name>find_crypto_index_from_tag</name>
        <param>
          <type>const SalSrtpCryptoAlgo</type>
          <declname>crypto</declname>
          <array>[]</array>
        </param>
        <param>
          <type>unsigned char</type>
          <declname>tag</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2736" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2736" bodyend="2744"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1ad843fa17f017abd93b4b9111b977a370" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void configure_rtp_session_for_rtcp_fb</definition>
        <argsstring>(LinphoneCall *call, const SalStreamDescription *stream)</argsstring>
        <name>configure_rtp_session_for_rtcp_fb</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>const SalStreamDescription *</type>
          <declname>stream</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2746" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2746" bodyend="2765"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a7fcc30c189871511e6cbdc62af40442c" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void configure_rtp_session_for_rtcp_xr</definition>
        <argsstring>(LinphoneCore *lc, LinphoneCall *call, SalStreamType type)</argsstring>
        <name>configure_rtp_session_for_rtcp_xr</name>
        <param>
          <type><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref> *</type>
          <declname>lc</declname>
        </param>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>SalStreamType</type>
          <declname>type</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2767" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2767" bodyend="2802"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1ad90b4822c9d247b1842c22ccb24bbf4d" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void start_dtls</definition>
        <argsstring>(MSMediaStreamSessions *sessions, const SalStreamDescription *sd, const SalStreamDescription *remote)</argsstring>
        <name>start_dtls</name>
        <param>
          <type>MSMediaStreamSessions *</type>
          <declname>sessions</declname>
        </param>
        <param>
          <type>const SalStreamDescription *</type>
          <declname>sd</declname>
        </param>
        <param>
          <type>const SalStreamDescription *</type>
          <declname>remote</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2803" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2803" bodyend="2816"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a953e5cfa3abe93b9f7d96bb997a44bad" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void start_dtls_on_all_streams</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>start_dtls_on_all_streams</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2817" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2817" bodyend="2840"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a139e8fb30508cae7a7fbc8cd20d98527" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void set_dtls_fingerprint</definition>
        <argsstring>(MSMediaStreamSessions *sessions, const SalStreamDescription *sd, const SalStreamDescription *remote)</argsstring>
        <name>set_dtls_fingerprint</name>
        <param>
          <type>MSMediaStreamSessions *</type>
          <declname>sessions</declname>
        </param>
        <param>
          <type>const SalStreamDescription *</type>
          <declname>sd</declname>
        </param>
        <param>
          <type>const SalStreamDescription *</type>
          <declname>remote</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2842" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2842" bodyend="2853"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1ac8925d1907def6df3ba2a4c90cdaf6c2" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void set_dtls_fingerprint_on_all_streams</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>set_dtls_fingerprint_on_all_streams</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2855" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2855" bodyend="2879"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a19b1a2a0681c8c202d7462e24e1881a3" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>RtpSession *</type>
        <definition>static RtpSession* create_audio_rtp_io_session</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>create_audio_rtp_io_session</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2881" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2881" bodyend="2907"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a5649cc25631e3148ab13c9923bb4075a" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void linphone_call_start_audio_stream</definition>
        <argsstring>(LinphoneCall *call, LinphoneCallState next_state, bool_t use_arc)</argsstring>
        <name>linphone_call_start_audio_stream</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type><ref refid="group__call__control_1ga37dad1a4f935d9cc26ec1f9d2b23691a" kindref="member">LinphoneCallState</ref></type>
          <declname>next_state</declname>
        </param>
        <param>
          <type>bool_t</type>
          <declname>use_arc</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="2909" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="2909" bodyend="3067"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1ac39da1d5438aaae5c002a4395d39544f" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void linphone_call_start_video_stream</definition>
        <argsstring>(LinphoneCall *call, LinphoneCallState next_state)</argsstring>
        <name>linphone_call_start_video_stream</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type><ref refid="group__call__control_1ga37dad1a4f935d9cc26ec1f9d2b23691a" kindref="member">LinphoneCallState</ref></type>
          <declname>next_state</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3099" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3099" bodyend="3238"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a577e49752e06bf850ecb4f6aeb9e7808" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void linphone_call_start_text_stream</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_start_text_stream</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3240" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3240" bodyend="3276"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a76713bb5704718b3bbae9875d09d478b" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void setZrtpCryptoTypesParameters</definition>
        <argsstring>(MSZrtpParams *params, LinphoneCore *lc)</argsstring>
        <name>setZrtpCryptoTypesParameters</name>
        <param>
          <type>MSZrtpParams *</type>
          <declname>params</declname>
        </param>
        <param>
          <type><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref> *</type>
          <declname>lc</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3278" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3278" bodyend="3331"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a11aa7f6671f4513789aef7c5f801bea1" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_start_media_streams</definition>
        <argsstring>(LinphoneCall *call, LinphoneCallState next_state)</argsstring>
        <name>linphone_call_start_media_streams</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type><ref refid="group__call__control_1ga37dad1a4f935d9cc26ec1f9d2b23691a" kindref="member">LinphoneCallState</ref></type>
          <declname>next_state</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3333" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3333" bodyend="3419"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1abb2f0937a56a23140bbac11b912ebae3" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_stop_media_streams_for_ice_gathering</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_stop_media_streams_for_ice_gathering</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3421" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3421" bodyend="3428"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a4c22adc781e6a5b82d15b2559af246e4" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>bool_t</type>
        <definition>static bool_t update_stream_crypto_params</definition>
        <argsstring>(LinphoneCall *call, const SalStreamDescription *local_st_desc, SalStreamDescription *old_stream, SalStreamDescription *new_stream, MediaStream *ms)</argsstring>
        <name>update_stream_crypto_params</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>const SalStreamDescription *</type>
          <declname>local_st_desc</declname>
        </param>
        <param>
          <type>SalStreamDescription *</type>
          <declname>old_stream</declname>
        </param>
        <param>
          <type>SalStreamDescription *</type>
          <declname>new_stream</declname>
        </param>
        <param>
          <type>MediaStream *</type>
          <declname>ms</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3430" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3430" bodyend="3443"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a34e23ab4550481af7672b8c1c280b7e2" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_update_crypto_parameters</definition>
        <argsstring>(LinphoneCall *call, SalMediaDescription *old_md, SalMediaDescription *new_md)</argsstring>
        <name>linphone_call_update_crypto_parameters</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>SalMediaDescription *</type>
          <declname>old_md</declname>
        </param>
        <param>
          <type>SalMediaDescription *</type>
          <declname>new_md</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3445" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3445" bodyend="3474"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1af43a36236c66bd53ca0afe84db027641" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_update_remote_session_id_and_ver</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_update_remote_session_id_and_ver</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3476" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3476" bodyend="3482"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1afbeff074e05f381308233c7a7780eccb" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_delete_ice_session</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_delete_ice_session</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3484" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3484" bodyend="3495"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a3042e4b273600d1a200b726a7658bc61" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_delete_upnp_session</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_delete_upnp_session</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3498" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3498" bodyend="3505"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a013cafed3ff6af136a7d2f0f9133cb28" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void linphone_call_log_fill_stats</definition>
        <argsstring>(LinphoneCallLog *log, MediaStream *st)</argsstring>
        <name>linphone_call_log_fill_stats</name>
        <param>
          <type><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
          <declname>log</declname>
        </param>
        <param>
          <type>MediaStream *</type>
          <declname>st</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3508" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3508" bodyend="3515"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a5a4fdde5753b6065568b7776592bbd93" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void update_rtp_stats</definition>
        <argsstring>(LinphoneCall *call, int stream_index)</argsstring>
        <name>update_rtp_stats</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>int</type>
          <declname>stream_index</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3517" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3517" bodyend="3526"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1ae7a99ef3d1884e720f041bb35ef294a7" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void linphone_call_stop_audio_stream</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_stop_audio_stream</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3528" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3528" bodyend="3557"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a6484c5dfd8c139574e99aa81047b25e9" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void linphone_call_stop_video_stream</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_stop_video_stream</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3559" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3559" bodyend="3576"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1afb7f4e1478f6ecb106f717fa6d9e3d33" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void unset_rtp_profile</definition>
        <argsstring>(LinphoneCall *call, int i)</argsstring>
        <name>unset_rtp_profile</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>int</type>
          <declname>i</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3578" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3578" bodyend="3581"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a5b011e5a35979d3284c68d29dd4020dc" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void linphone_call_stop_text_stream</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_stop_text_stream</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3583" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3583" bodyend="3598"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1ab982d2f4d00199e8bfe84d6062aec327" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_stop_media_streams</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_stop_media_streams</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3600" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3600" bodyend="3638"/>
      </memberdef>
      <memberdef kind="function" id="group__media__parameters_1ga12a525f4175bf236ac55de08117bf746" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_enable_echo_cancellation</definition>
        <argsstring>(LinphoneCall *call, bool_t enable)</argsstring>
        <name>linphone_call_enable_echo_cancellation</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>bool_t</type>
          <declname>val</declname>
          <defname>enable</defname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Enables or disable echo cancellation for this call <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>call</parametername>
</parameternamelist>
<parameterdescription>
<para></para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>val</parametername>
</parameternamelist>
<parameterdescription>
<para></para></parameterdescription>
</parameteritem>
</parameterlist>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3642" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3642" bodyend="3647"/>
      </memberdef>
      <memberdef kind="function" id="group__media__parameters_1ga376db6955f192b0c9d72d1ca40acfcce" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>bool_t</type>
        <definition>bool_t linphone_call_echo_cancellation_enabled</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_echo_cancellation_enabled</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>lc</declname>
          <defname>call</defname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Returns TRUE if echo cancellation is enabled. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3648" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3648" bodyend="3656"/>
      </memberdef>
      <memberdef kind="function" id="group__media__parameters_1gaa5e8e576eaf802f040a3b18c1ffe5c32" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_enable_echo_limiter</definition>
        <argsstring>(LinphoneCall *call, bool_t val)</argsstring>
        <name>linphone_call_enable_echo_limiter</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>bool_t</type>
          <declname>val</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Enables or disable echo limiter for this call <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>call</parametername>
</parameternamelist>
<parameterdescription>
<para></para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>val</parametername>
</parameternamelist>
<parameterdescription>
<para></para></parameterdescription>
</parameteritem>
</parameterlist>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3658" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3658" bodyend="3670"/>
      </memberdef>
      <memberdef kind="function" id="group__media__parameters_1ga5b19034e2ce3fed2be1a172b73e1c00e" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>bool_t</type>
        <definition>bool_t linphone_call_echo_limiter_enabled</definition>
        <argsstring>(const LinphoneCall *call)</argsstring>
        <name>linphone_call_echo_limiter_enabled</name>
        <param>
          <type>const <ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Returns TRUE if echo limiter is enabled. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3672" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3672" bodyend="3678"/>
      </memberdef>
      <memberdef kind="function" id="group__call__misc_1ga7a0ca45e0ff2bf7eaca09e795bba3486" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>float</type>
        <definition>float linphone_call_get_play_volume</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_get_play_volume</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Returns the measured sound volume played locally (received from remote). It is expressed in dbm0. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3689" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3689" bodyend="3698"/>
      </memberdef>
      <memberdef kind="function" id="group__call__misc_1gac4f217936eea56196afc126974a92451" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>float</type>
        <definition>float linphone_call_get_record_volume</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_get_record_volume</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Returns the measured sound volume recorded locally (sent to remote). It is expressed in dbm0. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3704" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3704" bodyend="3713"/>
      </memberdef>
      <memberdef kind="function" id="group__call__misc_1ga7331e4c738ec41d0eecde98fcd4491c9" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>float</type>
        <definition>float linphone_call_get_speaker_volume_gain</definition>
        <argsstring>(const LinphoneCall *call)</argsstring>
        <name>linphone_call_get_speaker_volume_gain</name>
        <param>
          <type>const <ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Get speaker volume gain. If the sound backend supports it, the returned gain is equal to the gain set with the system mixer.</para><para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>call</parametername>
</parameternamelist>
<parameterdescription>
<para>The call. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>Percenatge of the max supported volume gain. Valid values are in [ 0.0 : 1.0 ]. In case of failure, a negative value is returned </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3715" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3715" bodyend="3721"/>
      </memberdef>
      <memberdef kind="function" id="group__call__misc_1gaa89248d3121edc343324d298297db354" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_set_speaker_volume_gain</definition>
        <argsstring>(LinphoneCall *call, float volume)</argsstring>
        <name>linphone_call_set_speaker_volume_gain</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>float</type>
          <declname>volume</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Set speaker volume gain. If the sound backend supports it, the new gain will synchronized with the system mixer.</para><para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>call</parametername>
</parameternamelist>
<parameterdescription>
<para>The call. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>volume</parametername>
</parameternamelist>
<parameterdescription>
<para>Percentage of the max supported gain. Valid values are in [ 0.0 : 1.0 ]. </para></parameterdescription>
</parameteritem>
</parameterlist>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3723" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3723" bodyend="3726"/>
      </memberdef>
      <memberdef kind="function" id="group__call__misc_1ga3256a32cca5d521ccf85204eef665f85" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>float</type>
        <definition>float linphone_call_get_microphone_volume_gain</definition>
        <argsstring>(const LinphoneCall *call)</argsstring>
        <name>linphone_call_get_microphone_volume_gain</name>
        <param>
          <type>const <ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Get microphone volume gain. If the sound backend supports it, the returned gain is equal to the gain set with the system mixer.</para><para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>call</parametername>
</parameternamelist>
<parameterdescription>
<para>The call. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>double Percenatge of the max supported volume gain. Valid values are in [ 0.0 : 1.0 ]. In case of failure, a negative value is returned </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3728" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3728" bodyend="3734"/>
      </memberdef>
      <memberdef kind="function" id="group__call__misc_1ga7a0fa668915898492c82558c7f8c176f" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_set_microphone_volume_gain</definition>
        <argsstring>(LinphoneCall *call, float volume)</argsstring>
        <name>linphone_call_set_microphone_volume_gain</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>float</type>
          <declname>volume</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Set microphone volume gain. If the sound backend supports it, the new gain will synchronized with the system mixer.</para><para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>call</parametername>
</parameternamelist>
<parameterdescription>
<para>The call. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>volume</parametername>
</parameternamelist>
<parameterdescription>
<para>Percentage of the max supported gain. Valid values are in [ 0.0 : 1.0 ]. </para></parameterdescription>
</parameteritem>
</parameterlist>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3736" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3736" bodyend="3739"/>
      </memberdef>
      <memberdef kind="function" id="group__call__misc_1ga62c7d3d08531b0cc634b797e273a0a73" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>float</type>
        <definition>float linphone_call_get_current_quality</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_get_current_quality</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Obtain real-time quality rating of the call</para><para>Based on local RTP statistics and RTCP feedback, a quality rating is computed and updated during all the duration of the call. This function returns its value at the time of the function call. It is expected that the rating is updated at least every 5 seconds or so. The rating is a floating point number comprised between 0 and 5.</para><para>4-5 = good quality <linebreak/>
 3-4 = average quality <linebreak/>
 2-3 = poor quality <linebreak/>
 1-2 = very poor quality <linebreak/>
 0-1 = can&apos;t be worse, mostly unusable <linebreak/>
</para><para><simplesect kind="return"><para>The function returns -1 if no quality measurement is available, for example if no active audio stream exist. Otherwise it returns the quality rating. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3758" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3758" bodyend="3773"/>
      </memberdef>
      <memberdef kind="function" id="group__call__misc_1gae3aaa85596484c871b57cdefafd7fd9e" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>float</type>
        <definition>float linphone_call_get_average_quality</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_get_average_quality</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Returns call quality averaged over all the duration of the call.</para><para>See <ref refid="group__call__misc_1ga62c7d3d08531b0cc634b797e273a0a73" kindref="member">linphone_call_get_current_quality()</ref> for more details about quality measurement. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3780" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3780" bodyend="3785"/>
      </memberdef>
      <memberdef kind="function" id="group__call__misc_1ga43c82908bcc83bdc6d2db4aa8c844092" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void update_local_stats</definition>
        <argsstring>(LinphoneCallStats *stats, MediaStream *stream)</argsstring>
        <name>update_local_stats</name>
        <param>
          <type><ref refid="group__call__misc_1ga4d22764ac0e68a8d77670761429b2ee7" kindref="member">LinphoneCallStats</ref> *</type>
          <declname>stats</declname>
        </param>
        <param>
          <type>MediaStream *</type>
          <declname>stream</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3787" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3787" bodyend="3794"/>
      </memberdef>
      <memberdef kind="function" id="group__call__misc_1gaa1203b7ecb6b85a05af700152c1fdf14" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>const <ref refid="group__call__misc_1ga4d22764ac0e68a8d77670761429b2ee7" kindref="member">LinphoneCallStats</ref> *</type>
        <definition>const LinphoneCallStats* linphone_call_get_audio_stats</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_get_audio_stats</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Access last known statistics for audio stream, for a given call. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3799" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3799" bodyend="3805"/>
      </memberdef>
      <memberdef kind="function" id="group__call__misc_1gae4f745821a59615910c73cf47300c234" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>const <ref refid="group__call__misc_1ga4d22764ac0e68a8d77670761429b2ee7" kindref="member">LinphoneCallStats</ref> *</type>
        <definition>const LinphoneCallStats* linphone_call_get_video_stats</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_get_video_stats</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Access last known statistics for video stream, for a given call. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3810" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3810" bodyend="3816"/>
      </memberdef>
      <memberdef kind="function" id="group__call__misc_1ga7f8b76f0b4f65fd63842e43cba1aaf60" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>const <ref refid="group__call__misc_1ga4d22764ac0e68a8d77670761429b2ee7" kindref="member">LinphoneCallStats</ref> *</type>
        <definition>const LinphoneCallStats* linphone_call_get_text_stats</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_get_text_stats</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Access last known statistics for video stream, for a given call. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3821" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3821" bodyend="3827"/>
      </memberdef>
      <memberdef kind="function" id="group__call__misc_1ga8dc760cd9137d527faa7f073be5e4a83" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>bool_t</type>
        <definition>static bool_t ice_in_progress</definition>
        <argsstring>(LinphoneCallStats *stats)</argsstring>
        <name>ice_in_progress</name>
        <param>
          <type><ref refid="group__call__misc_1ga4d22764ac0e68a8d77670761429b2ee7" kindref="member">LinphoneCallStats</ref> *</type>
          <declname>stats</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3829" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3829" bodyend="3831"/>
      </memberdef>
      <memberdef kind="function" id="group__call__misc_1gac64a301e64dcf00e5487dbb1739d5aaf" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>bool_t</type>
        <definition>bool_t linphone_call_media_in_progress</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_media_in_progress</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Indicates whether an operation is in progress at the media side. It can a bad idea to initiate signaling operations (adding video, pausing the call, removing video, changing video parameters) while the media is busy in establishing the connection (typically ICE connectivity checks). It can result in failures generating loss of time in future operations in the call. Applications are invited to check this function after each call state change to decide whether certain operations are permitted or not. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>call</parametername>
</parameternamelist>
<parameterdescription>
<para>the call </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>TRUE if media is busy in establishing the connection, FALSE otherwise. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3842" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3842" bodyend="3848"/>
      </memberdef>
      <memberdef kind="function" id="group__call__misc_1ga4f67c9815b880887550873c592174b97" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>float</type>
        <definition>float linphone_call_stats_get_sender_loss_rate</definition>
        <argsstring>(const LinphoneCallStats *stats)</argsstring>
        <name>linphone_call_stats_get_sender_loss_rate</name>
        <param>
          <type>const <ref refid="group__call__misc_1ga4d22764ac0e68a8d77670761429b2ee7" kindref="member">LinphoneCallStats</ref> *</type>
          <declname>stats</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Get the local loss rate since last report <simplesect kind="return"><para>The sender loss rate </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3854" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3854" bodyend="3869"/>
      </memberdef>
      <memberdef kind="function" id="group__call__misc_1ga09496e326d7e82e4b15dbc427d384aa0" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>float</type>
        <definition>float linphone_call_stats_get_receiver_loss_rate</definition>
        <argsstring>(const LinphoneCallStats *stats)</argsstring>
        <name>linphone_call_stats_get_receiver_loss_rate</name>
        <param>
          <type>const <ref refid="group__call__misc_1ga4d22764ac0e68a8d77670761429b2ee7" kindref="member">LinphoneCallStats</ref> *</type>
          <declname>stats</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Gets the remote reported loss rate since last report <simplesect kind="return"><para>The receiver loss rate </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3875" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3875" bodyend="3890"/>
      </memberdef>
      <memberdef kind="function" id="group__call__misc_1ga15c9b2c5e5e5d13656c67f60acbf3389" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>float</type>
        <definition>float linphone_call_stats_get_sender_interarrival_jitter</definition>
        <argsstring>(const LinphoneCallStats *stats, LinphoneCall *call)</argsstring>
        <name>linphone_call_stats_get_sender_interarrival_jitter</name>
        <param>
          <type>const <ref refid="group__call__misc_1ga4d22764ac0e68a8d77670761429b2ee7" kindref="member">LinphoneCallStats</ref> *</type>
          <declname>stats</declname>
        </param>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Gets the local interarrival jitter <simplesect kind="return"><para>The interarrival jitter at last emitted sender report </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3896" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3896" bodyend="3922"/>
      </memberdef>
      <memberdef kind="function" id="group__call__misc_1ga886b7917491da4828cfa5ca75c1828eb" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>float</type>
        <definition>float linphone_call_stats_get_receiver_interarrival_jitter</definition>
        <argsstring>(const LinphoneCallStats *stats, LinphoneCall *call)</argsstring>
        <name>linphone_call_stats_get_receiver_interarrival_jitter</name>
        <param>
          <type>const <ref refid="group__call__misc_1ga4d22764ac0e68a8d77670761429b2ee7" kindref="member">LinphoneCallStats</ref> *</type>
          <declname>stats</declname>
        </param>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Gets the remote reported interarrival jitter <simplesect kind="return"><para>The interarrival jitter at last received receiver report </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3928" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3928" bodyend="3954"/>
      </memberdef>
      <memberdef kind="function" id="group__call__misc_1gac2963c9c900811198a1a999ac64794a9" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>rtp_stats_t</type>
        <definition>rtp_stats_t linphone_call_stats_get_rtp_stats</definition>
        <argsstring>(const LinphoneCallStats *stats)</argsstring>
        <name>linphone_call_stats_get_rtp_stats</name>
        <param>
          <type>const <ref refid="group__call__misc_1ga4d22764ac0e68a8d77670761429b2ee7" kindref="member">LinphoneCallStats</ref> *</type>
          <declname>stats</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3956" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3956" bodyend="3965"/>
      </memberdef>
      <memberdef kind="function" id="group__call__misc_1gae40d01c01f5124d3a123e83769f4eb7a" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>uint64_t</type>
        <definition>uint64_t linphone_call_stats_get_late_packets_cumulative_number</definition>
        <argsstring>(const LinphoneCallStats *stats, LinphoneCall *call)</argsstring>
        <name>linphone_call_stats_get_late_packets_cumulative_number</name>
        <param>
          <type>const <ref refid="group__call__misc_1ga4d22764ac0e68a8d77670761429b2ee7" kindref="member">LinphoneCallStats</ref> *</type>
          <declname>stats</declname>
        </param>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Gets the cumulative number of late packets <simplesect kind="return"><para>The cumulative number of late packets </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3971" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3971" bodyend="3973"/>
      </memberdef>
      <memberdef kind="function" id="group__call__misc_1gae8435a45f96caefc4284575ead6ec636" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>float</type>
        <definition>float linphone_call_stats_get_download_bandwidth</definition>
        <argsstring>(const LinphoneCallStats *stats)</argsstring>
        <name>linphone_call_stats_get_download_bandwidth</name>
        <param>
          <type>const <ref refid="group__call__misc_1ga4d22764ac0e68a8d77670761429b2ee7" kindref="member">LinphoneCallStats</ref> *</type>
          <declname>stats</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Get the bandwidth measurement of the received stream, expressed in kbit/s, including IP/UDP/RTP headers. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">stats</parametername>
</parameternamelist>
<parameterdescription>
<para>LinphoneCallStats object </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>The bandwidth measurement of the received stream in kbit/s. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3980" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3980" bodyend="3982"/>
      </memberdef>
      <memberdef kind="function" id="group__call__misc_1ga75d75cf70afffebed65b9bca234120db" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>float</type>
        <definition>float linphone_call_stats_get_upload_bandwidth</definition>
        <argsstring>(const LinphoneCallStats *stats)</argsstring>
        <name>linphone_call_stats_get_upload_bandwidth</name>
        <param>
          <type>const <ref refid="group__call__misc_1ga4d22764ac0e68a8d77670761429b2ee7" kindref="member">LinphoneCallStats</ref> *</type>
          <declname>stats</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Get the bandwidth measurement of the sent stream, expressed in kbit/s, including IP/UDP/RTP headers. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">stats</parametername>
</parameternamelist>
<parameterdescription>
<para>LinphoneCallStats object </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>The bandwidth measurement of the sent stream in kbit/s. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3989" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3989" bodyend="3991"/>
      </memberdef>
      <memberdef kind="function" id="group__call__misc_1gab00ca0a997c7f740948d474062fc663c" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__initializing_1gaf4faffc512588eda7db03fab8b03adfb" kindref="member">LinphoneIceState</ref></type>
        <definition>LinphoneIceState linphone_call_stats_get_ice_state</definition>
        <argsstring>(const LinphoneCallStats *stats)</argsstring>
        <name>linphone_call_stats_get_ice_state</name>
        <param>
          <type>const <ref refid="group__call__misc_1ga4d22764ac0e68a8d77670761429b2ee7" kindref="member">LinphoneCallStats</ref> *</type>
          <declname>stats</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Get the state of ICE processing. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">stats</parametername>
</parameternamelist>
<parameterdescription>
<para>LinphoneCallStats object </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>The state of ICE processing. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="3998" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="3998" bodyend="4000"/>
      </memberdef>
      <memberdef kind="function" id="group__call__misc_1gab475f621ff3a8a2e2d6faee0ca608f79" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__initializing_1ga2c19554a0988f7600aec5c3a7588d61a" kindref="member">LinphoneUpnpState</ref></type>
        <definition>LinphoneUpnpState linphone_call_stats_get_upnp_state</definition>
        <argsstring>(const LinphoneCallStats *stats)</argsstring>
        <name>linphone_call_stats_get_upnp_state</name>
        <param>
          <type>const <ref refid="group__call__misc_1ga4d22764ac0e68a8d77670761429b2ee7" kindref="member">LinphoneCallStats</ref> *</type>
          <declname>stats</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Get the state of uPnP processing. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">stats</parametername>
</parameternamelist>
<parameterdescription>
<para>LinphoneCallStats object </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>The state of uPnP processing. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4007" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4007" bodyend="4009"/>
      </memberdef>
      <memberdef kind="function" id="group__call__misc_1gaa92c7b4c3443ff4ae29f7b57f57cfd35" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_start_recording</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_start_recording</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Start call recording. The output file where audio is recorded must be previously specified with <ref refid="group__call__control_1ga10fff1a05dc9c63249ba59dc7240d803" kindref="member">linphone_call_params_set_record_file()</ref>. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4015" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4015" bodyend="4024"/>
      </memberdef>
      <memberdef kind="function" id="group__call__misc_1ga2ef01b6aa5dc8ee76a77e5ef399a7907" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_stop_recording</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_stop_recording</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Stop call recording. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4029" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4029" bodyend="4034"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a5b1dfd08dbe4aaff2ed52ddc63506b82" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void report_bandwidth</definition>
        <argsstring>(LinphoneCall *call, MediaStream *as, MediaStream *vs)</argsstring>
        <name>report_bandwidth</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>MediaStream *</type>
          <declname>as</declname>
        </param>
        <param>
          <type>MediaStream *</type>
          <declname>vs</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
<para>&lt; Every seconds LinphoneCallStats object has been updated</para><para>&lt; Every seconds LinphoneCallStats object has been updated </para>        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4040" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4040" bodyend="4078"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a0a9a6d8f669ab0298ba869c58f6999be" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void linphone_call_lost</definition>
        <argsstring>(LinphoneCall *call, LinphoneReason reason)</argsstring>
        <name>linphone_call_lost</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type><ref refid="group__misc_1gabe82a1a1ffc3d6b4e0b51a03028513b7" kindref="member">LinphoneReason</ref></type>
          <declname>reason</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4080" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4080" bodyend="4100"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a3885b30ba014902a2e96faf65b1544d7" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void change_ice_media_destinations</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>change_ice_media_destinations</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4102" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4102" bodyend="4135"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a40046e771ac2f3e3e2545419c9837648" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void handle_ice_events</definition>
        <argsstring>(LinphoneCall *call, OrtpEvent *ev)</argsstring>
        <name>handle_ice_events</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>OrtpEvent *</type>
          <declname>ev</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4137" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4137" bodyend="4226"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1abd236ac4e03ba9d901f0ea9ecb20711c" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_stats_fill</definition>
        <argsstring>(LinphoneCallStats *stats, MediaStream *ms, OrtpEvent *ev)</argsstring>
        <name>linphone_call_stats_fill</name>
        <param>
          <type><ref refid="group__call__misc_1ga4d22764ac0e68a8d77670761429b2ee7" kindref="member">LinphoneCallStats</ref> *</type>
          <declname>stats</declname>
        </param>
        <param>
          <type>MediaStream *</type>
          <declname>ms</declname>
        </param>
        <param>
          <type>OrtpEvent *</type>
          <declname>ev</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
<para>&lt; received_rtcp field of LinphoneCallStats object has been updated</para><para>&lt; sent_rtcp field of LinphoneCallStats object has been updated </para>        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4230" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4230" bodyend="4251"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a9ccd96e670aa25dcebd8a70aea5751c9" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_notify_stats_updated</definition>
        <argsstring>(LinphoneCall *call, int stream_index)</argsstring>
        <name>linphone_call_notify_stats_updated</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>int</type>
          <declname>stream_index</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
<para>&lt; received_rtcp field of LinphoneCallStats object has been updated</para><para>&lt; sent_rtcp field of LinphoneCallStats object has been updated </para>        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4264" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4264" bodyend="4279"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a6fd544da8a501c5cd518825f84859c2d" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_background_tasks</definition>
        <argsstring>(LinphoneCall *call, bool_t one_second_elapsed)</argsstring>
        <name>linphone_call_background_tasks</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>bool_t</type>
          <declname>one_second_elapsed</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4343" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4343" bodyend="4385"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1aa14aeb31a65e254c4841e397008b9a55" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_log_completed</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_log_completed</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4387" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4387" bodyend="4424"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a6ae9867ee9e759654148aa65bdc45d99" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__call__control_1ga37dad1a4f935d9cc26ec1f9d2b23691a" kindref="member">LinphoneCallState</ref></type>
        <definition>LinphoneCallState linphone_call_get_transfer_state</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_get_transfer_state</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Returns the current transfer state, if a transfer has been initiated from this call. <simplesect kind="see"><para><ref refid="group__call__control_1ga12be1e8ad7e6c8e8c3811d060aadd914" kindref="member">linphone_core_transfer_call()</ref> , <ref refid="group__call__control_1ga704f9a08e7b820d02c3e27358e77067e" kindref="member">linphone_core_transfer_call_to_another()</ref> </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4430" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4430" bodyend="4432"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1abeabe4a54d9f17e7822c04e4a2f8820b" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_set_transfer_state</definition>
        <argsstring>(LinphoneCall *call, LinphoneCallState state)</argsstring>
        <name>linphone_call_set_transfer_state</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type><ref refid="group__call__control_1ga37dad1a4f935d9cc26ec1f9d2b23691a" kindref="member">LinphoneCallState</ref></type>
          <declname>state</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4434" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4434" bodyend="4443"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1gaf7a3307b98e95c0441c3d70890099e4a" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>bool_t</type>
        <definition>bool_t linphone_call_is_in_conference</definition>
        <argsstring>(const LinphoneCall *call)</argsstring>
        <name>linphone_call_is_in_conference</name>
        <param>
          <type>const <ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Return TRUE if this call is currently part of a conference <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>call</parametername>
</parameternamelist>
<parameterdescription>
<para><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>TRUE if part of a conference.</para></simplesect>
<xrefsect id="deprecated_1_deprecated000035"><xreftitle>Deprecated</xreftitle><xrefdescription></xrefdescription></xrefsect></para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4445" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4445" bodyend="4447"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a8a263459d37ab14422ac2080279a0435" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_zoom_video</definition>
        <argsstring>(LinphoneCall *call, float zoom_factor, float *cx, float *cy)</argsstring>
        <name>linphone_call_zoom_video</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>float</type>
          <declname>zoom_factor</declname>
        </param>
        <param>
          <type>float *</type>
          <declname>cx</declname>
        </param>
        <param>
          <type>float *</type>
          <declname>cy</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Perform a zoom of the video displayed during a call. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>call</parametername>
</parameternamelist>
<parameterdescription>
<para>the call. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>zoom_factor</parametername>
</parameternamelist>
<parameterdescription>
<para>a floating point number describing the zoom factor. A value 1.0 corresponds to no zoom applied. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>cx</parametername>
</parameternamelist>
<parameterdescription>
<para>a floating point number pointing the horizontal center of the zoom to be applied. This value should be between 0.0 and 1.0. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>cy</parametername>
</parameternamelist>
<parameterdescription>
<para>a floating point number pointing the vertical center of the zoom to be applied. This value should be between 0.0 and 1.0.</para></parameterdescription>
</parameteritem>
</parameterlist>
cx and cy are updated in return in case their coordinates were too excentrated for the requested zoom factor. The zoom ensures that all the screen is fullfilled with the video. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4458" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4458" bodyend="4482"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1acdc70786b8fe048d24402594f14fd2b2" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref> *</type>
        <definition>static LinphoneAddress* get_fixed_contact</definition>
        <argsstring>(LinphoneCore *lc, LinphoneCall *call, LinphoneProxyConfig *dest_proxy)</argsstring>
        <name>get_fixed_contact</name>
        <param>
          <type><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref> *</type>
          <declname>lc</declname>
        </param>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type><ref refid="group__proxies_1ga1879a0d59e068457b688138da97f2d0b" kindref="member">LinphoneProxyConfig</ref> *</type>
          <declname>dest_proxy</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4484" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4484" bodyend="4517"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a16645a3459ba07e539cb1bfe3d4ab9d8" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_set_contact_op</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_set_contact_op</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4519" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4519" bodyend="4535"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1aaf1f1134bafa200eb6cb1333eacbc28d" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__call__control_1gae1497db82144ec61a4303c7e84d1603a" kindref="member">LinphonePlayer</ref> *</type>
        <definition>LinphonePlayer* linphone_call_get_player</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_get_player</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4537" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4537" bodyend="4541"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a7dcd24f82e9d6346327b41e909314530" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_set_new_params</definition>
        <argsstring>(LinphoneCall *call, const LinphoneCallParams *params)</argsstring>
        <name>linphone_call_set_new_params</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>const <ref refid="group__call__control_1gaa91f7e76e8f038ae9acdf42d1bc80a22" kindref="member">LinphoneCallParams</ref> *</type>
          <declname>params</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4543" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4543" bodyend="4548"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1ace6a40ce20fa536edc9235e2afd5c8f5" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>static int send_dtmf_handler</definition>
        <argsstring>(void *data, unsigned int revents)</argsstring>
        <name>send_dtmf_handler</name>
        <param>
          <type>void *</type>
          <declname>data</declname>
        </param>
        <param>
          <type>unsigned int</type>
          <declname>revents</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4550" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4550" bodyend="4581"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a4dc0c48a36cecfc78be08c375c4b1f11" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int linphone_call_send_dtmf</definition>
        <argsstring>(LinphoneCall *call, char dtmf)</argsstring>
        <name>linphone_call_send_dtmf</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>lc</declname>
          <defname>call</defname>
        </param>
        <param>
          <type>char</type>
          <declname>dtmf</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Send the specified dtmf.</para><para>The dtmf is automatically played to the user. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>call</parametername>
</parameternamelist>
<parameterdescription>
<para>The LinphoneCall object </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>dtmf</parametername>
</parameternamelist>
<parameterdescription>
<para>The dtmf name specified as a char, such as &apos;0&apos;, &apos;#&apos; etc... </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>0 if successful, -1 on error. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4582" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4582" bodyend="4591"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1ac2edd914c24c17d264e388b7046c7f6e" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int linphone_call_send_dtmfs</definition>
        <argsstring>(LinphoneCall *call, char *dtmfs)</argsstring>
        <name>linphone_call_send_dtmfs</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>char *</type>
          <declname>dtmfs</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Send a list of dtmf.</para><para>The dtmfs are automatically sent to remote, separated by some needed customizable delay. Sending is canceled if the call state changes to something not LinphoneCallStreamsRunning. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>call</parametername>
</parameternamelist>
<parameterdescription>
<para>The LinphoneCall object </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>dtmfs</parametername>
</parameternamelist>
<parameterdescription>
<para>A dtmf sequence such as &apos;123#123123&apos; </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>-2 if there is already a DTMF sequence, -1 if call is not ready, 0 otherwise. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4593" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4593" bodyend="4608"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1aefc59b7d23fa47ca7449f5f84e94a9d7" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_cancel_dtmfs</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_cancel_dtmfs</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Stop current DTMF sequence sending.</para><para>Please note that some DTMF could be already sent, depending on when this function call is delayed from #linphone_call_send_dtmfs. This function will be automatically called if call state change to anything but LinphoneCallStreamsRunning.</para><para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>call</parametername>
</parameternamelist>
<parameterdescription>
<para>The LinphoneCall object </para></parameterdescription>
</parameteritem>
</parameterlist>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4610" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4610" bodyend="4621"/>
      </memberdef>
      <memberdef kind="function" id="group__media__parameters_1ga68c6d3279a1182562ca7852cced547a9" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void *</type>
        <definition>void* linphone_call_get_native_video_window_id</definition>
        <argsstring>(const LinphoneCall *call)</argsstring>
        <name>linphone_call_get_native_video_window_id</name>
        <param>
          <type>const <ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Get the native window handle of the video window, casted as an unsigned long. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4623" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4623" bodyend="4635"/>
      </memberdef>
      <memberdef kind="function" id="group__media__parameters_1ga64f3a1382be5366f476d806c18293a6d" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_set_native_video_window_id</definition>
        <argsstring>(LinphoneCall *call, void *id)</argsstring>
        <name>linphone_call_set_native_video_window_id</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>void *</type>
          <declname>id</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Set the native video window id where the video is to be displayed. For MacOS, Linux, Windows: if not set or 0 a window will be automatically created, unless the special id -1 is given. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4637" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4637" bodyend="4644"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1acc6bbb4179d53cdcc1c8b2529eeabbd6" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>MSWebCam *</type>
        <definition>MSWebCam* linphone_call_get_video_device</definition>
        <argsstring>(const LinphoneCall *call)</argsstring>
        <name>linphone_call_get_video_device</name>
        <param>
          <type>const <ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4646" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4646" bodyend="4653"/>
      </memberdef>
      <memberdef kind="function" id="group__call__control_1gae1f3643e3be0f499f2c60bd363cdc56e" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_set_audio_route</definition>
        <argsstring>(LinphoneCall *call, LinphoneAudioRoute route)</argsstring>
        <name>linphone_call_set_audio_route</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type><ref refid="group__call__control_1gaf4fc5f57d28e7c0189e687746f58ead1" kindref="member">LinphoneAudioRoute</ref></type>
          <declname>route</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Change the playback output device (currently only used for blackberry) <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>call</parametername>
</parameternamelist>
<parameterdescription>
<para></para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>route</parametername>
</parameternamelist>
<parameterdescription>
<para>the wanted audio route (earpiece, speaker, ...) </para></parameterdescription>
</parameteritem>
</parameterlist>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4656" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4656" bodyend="4660"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1aee196fd489607102f0cadf4d44823fd0" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__chatroom_1ga37902f3fc715b7f6451c241d0efd0299" kindref="member">LinphoneChatRoom</ref> *</type>
        <definition>LinphoneChatRoom* linphone_call_get_chat_room</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_get_chat_room</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Create a new chat room for messaging from a call if not already existing, else return existing one. No reference is given to the caller: the chat room will be deleted when the call is ended. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>call</parametername>
</parameternamelist>
<parameterdescription>
<para><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> object </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para><ref refid="group__chatroom_1ga37902f3fc715b7f6451c241d0efd0299" kindref="member">LinphoneChatRoom</ref> where messaging can take place. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4662" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4662" bodyend="4669"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1aed6336c031d02f6b4ca5cf3373367214" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int linphone_call_get_stream_count</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_get_stream_count</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Returns the number of stream for the given call. Currently there is only two (Audio, Video), but later there will be more. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>call</parametername>
</parameternamelist>
<parameterdescription>
<para></para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>2 </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4671" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4671" bodyend="4684"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a59ed650dc7575be26820e95ed1d536b3" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>MSFormatType</type>
        <definition>MSFormatType linphone_call_get_stream_type</definition>
        <argsstring>(LinphoneCall *call, int stream_index)</argsstring>
        <name>linphone_call_get_stream_type</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>int</type>
          <declname>stream_index</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Returns the type of stream for the given stream index. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>call</parametername>
</parameternamelist>
<parameterdescription>
<para></para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>stream_index</parametername>
</parameternamelist>
<parameterdescription>
<para></para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>the type (MSAudio, MSVideo, MSText) of the stream of given index. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4686" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4686" bodyend="4694"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a6c5df7bb2487bfb72cd8309eafcc4dc7" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>RtpTransport *</type>
        <definition>RtpTransport* linphone_call_get_meta_rtp_transport</definition>
        <argsstring>(LinphoneCall *call, int stream_index)</argsstring>
        <name>linphone_call_get_meta_rtp_transport</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>int</type>
          <declname>stream_index</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Returns the meta rtp transport for the given stream index. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>call</parametername>
</parameternamelist>
<parameterdescription>
<para></para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>stream_index</parametername>
</parameternamelist>
<parameterdescription>
<para></para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>a pointer to the meta rtp transport if it exists, NULL otherwise </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4696" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4696" bodyend="4706"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a3638fffbd838fbbfd5e47c7b43a879bf" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>RtpTransport *</type>
        <definition>RtpTransport* linphone_call_get_meta_rtcp_transport</definition>
        <argsstring>(LinphoneCall *call, int stream_index)</argsstring>
        <name>linphone_call_get_meta_rtcp_transport</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <param>
          <type>int</type>
          <declname>stream_index</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Returns the meta rtcp transport for the given stream index. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>call</parametername>
</parameternamelist>
<parameterdescription>
<para></para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>stream_index</parametername>
</parameternamelist>
<parameterdescription>
<para></para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>a pointer to the meta rtcp transport if it exists, NULL otherwise </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4708" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4708" bodyend="4718"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a68cc28baeeb9e3c05003825019ee28eb" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_set_broken</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_set_broken</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4720" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4720" bodyend="4742"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a163ea6886da3c85e7870c279790318fe" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_repair_if_broken</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_repair_if_broken</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4744" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4744" bodyend="4770"/>
      </memberdef>
      <memberdef kind="function" id="linphonecall_8c_1a12adae1992ca0772bece3eb24712b9ac" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_refresh_sockets</definition>
        <argsstring>(LinphoneCall *call)</argsstring>
        <name>linphone_call_refresh_sockets</name>
        <param>
          <type><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref> *</type>
          <declname>call</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" line="4772" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c" bodystart="4772" bodyend="4780"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="normal"></highlight></codeline>
<codeline lineno="2"><highlight class="normal"></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="3"><highlight class="comment">linphone</highlight></codeline>
<codeline lineno="4"><highlight class="comment">Copyright<sp/>(C)<sp/>2010<sp/><sp/>Belledonne<sp/>Communications<sp/>SARL</highlight></codeline>
<codeline lineno="5"><highlight class="comment"><sp/>(simon.morlat@linphone.org)</highlight></codeline>
<codeline lineno="6"><highlight class="comment"></highlight></codeline>
<codeline lineno="7"><highlight class="comment">This<sp/>program<sp/>is<sp/>free<sp/>software;<sp/>you<sp/>can<sp/>redistribute<sp/>it<sp/>and/or</highlight></codeline>
<codeline lineno="8"><highlight class="comment">modify<sp/>it<sp/>under<sp/>the<sp/>terms<sp/>of<sp/>the<sp/>GNU<sp/>General<sp/>Public<sp/>License</highlight></codeline>
<codeline lineno="9"><highlight class="comment">as<sp/>published<sp/>by<sp/>the<sp/>Free<sp/>Software<sp/>Foundation;<sp/>either<sp/>version<sp/>2</highlight></codeline>
<codeline lineno="10"><highlight class="comment">of<sp/>the<sp/>License,<sp/>or<sp/>(at<sp/>your<sp/>option)<sp/>any<sp/>later<sp/>version.</highlight></codeline>
<codeline lineno="11"><highlight class="comment"></highlight></codeline>
<codeline lineno="12"><highlight class="comment">This<sp/>program<sp/>is<sp/>distributed<sp/>in<sp/>the<sp/>hope<sp/>that<sp/>it<sp/>will<sp/>be<sp/>useful,</highlight></codeline>
<codeline lineno="13"><highlight class="comment">but<sp/>WITHOUT<sp/>ANY<sp/>WARRANTY;<sp/>without<sp/>even<sp/>the<sp/>implied<sp/>warranty<sp/>of</highlight></codeline>
<codeline lineno="14"><highlight class="comment">MERCHANTABILITY<sp/>or<sp/>FITNESS<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE.<sp/><sp/>See<sp/>the</highlight></codeline>
<codeline lineno="15"><highlight class="comment">GNU<sp/>General<sp/>Public<sp/>License<sp/>for<sp/>more<sp/>details.</highlight></codeline>
<codeline lineno="16"><highlight class="comment"></highlight></codeline>
<codeline lineno="17"><highlight class="comment">You<sp/>should<sp/>have<sp/>received<sp/>a<sp/>copy<sp/>of<sp/>the<sp/>GNU<sp/>General<sp/>Public<sp/>License</highlight></codeline>
<codeline lineno="18"><highlight class="comment">along<sp/>with<sp/>this<sp/>program;<sp/>if<sp/>not,<sp/>write<sp/>to<sp/>the<sp/>Free<sp/>Software</highlight></codeline>
<codeline lineno="19"><highlight class="comment">Foundation,<sp/>Inc.,<sp/>59<sp/>Temple<sp/>Place<sp/>-<sp/>Suite<sp/>330,<sp/>Boston,<sp/>MA<sp/><sp/>02111-1307,<sp/>USA.</highlight></codeline>
<codeline lineno="20"><highlight class="comment">*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="21"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>_WIN32</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="22"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;time.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="23"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="24"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;linphonecore.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="25"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;sipsetup.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="26"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;lpconfig.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="27"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;private.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="28"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;ortp/event.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="29"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;ortp/b64.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="30"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;math.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><highlight class="normal"></highlight></codeline>
<codeline lineno="32"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;mediastreamer2/mediastream.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="33"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;mediastreamer2/msvolume.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="34"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;mediastreamer2/msequalizer.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="35"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;mediastreamer2/msfileplayer.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="36"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;mediastreamer2/msjpegwriter.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="37"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;mediastreamer2/mseventqueue.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;mediastreamer2/mssndcard.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="39"><highlight class="normal"></highlight></codeline>
<codeline lineno="40"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*EC_STATE_STORE<sp/>=<sp/></highlight><highlight class="stringliteral">&quot;.linphone.ecstate&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="41"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>EC_STATE_MAX_LEN<sp/>1048576<sp/>//<sp/>1Mo</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="42"><highlight class="normal"></highlight></codeline>
<codeline lineno="43"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_stats_uninit(<ref refid="struct__LinphoneCallStats" kindref="compound">LinphoneCallStats</ref><sp/>*stats);</highlight></codeline>
<codeline lineno="44"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_get_local_ip(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref><sp/>*remote_addr);</highlight></codeline>
<codeline lineno="45"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>_linphone_call_set_next_video_frame_decoded_trigger(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call);</highlight></codeline>
<codeline lineno="46"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_handle_stream_events(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>stream_index);</highlight></codeline>
<codeline lineno="47"><highlight class="normal"></highlight></codeline>
<codeline lineno="48"><highlight class="normal"></highlight></codeline>
<codeline lineno="49"><highlight class="normal">MSWebCam<sp/>*get_nowebcam_device(){</highlight></codeline>
<codeline lineno="50"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>VIDEO_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="51"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>ms_web_cam_manager_get_cam(ms_web_cam_manager_get(),</highlight><highlight class="stringliteral">&quot;StaticImage:<sp/>Static<sp/>picture&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="52"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>NULL;</highlight></codeline>
<codeline lineno="54"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="55"><highlight class="normal">}</highlight></codeline>
<codeline lineno="56"><highlight class="normal"></highlight></codeline>
<codeline lineno="57"><highlight class="normal"></highlight></codeline>
<codeline lineno="58"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>bool_t<sp/>generate_b64_crypto_key(</highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>key_length,<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>key_out,<sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>key_out_size)<sp/>{</highlight></codeline>
<codeline lineno="59"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>b64_size;</highlight></codeline>
<codeline lineno="60"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>uint8_t*<sp/>tmp<sp/>=<sp/>(uint8_t*)<sp/>ms_malloc0(key_length);</highlight></codeline>
<codeline lineno="61"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sal_get_random_bytes(tmp,<sp/>key_length)==NULL)<sp/>{</highlight></codeline>
<codeline lineno="62"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_error(</highlight><highlight class="stringliteral">&quot;Failed<sp/>to<sp/>generate<sp/>random<sp/>key&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="63"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(tmp);</highlight></codeline>
<codeline lineno="64"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>FALSE;</highlight></codeline>
<codeline lineno="65"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="66"><highlight class="normal"></highlight></codeline>
<codeline lineno="67"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>b64_size<sp/>=<sp/>b64_encode((</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*)tmp,<sp/>key_length,<sp/>NULL,<sp/>0);</highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(b64_size<sp/>==<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_error(</highlight><highlight class="stringliteral">&quot;Failed<sp/>to<sp/>get<sp/>b64<sp/>result<sp/>size&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(tmp);</highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>FALSE;</highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(b64_size&gt;=key_out_size){</highlight></codeline>
<codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_error(</highlight><highlight class="stringliteral">&quot;Insufficient<sp/>room<sp/>for<sp/>writing<sp/>base64<sp/>SRTP<sp/>key&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(tmp);</highlight></codeline>
<codeline lineno="76"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>FALSE;</highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>b64_size=b64_encode((</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*)tmp,<sp/>key_length,<sp/>key_out,<sp/>key_out_size);</highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(b64_size<sp/>==<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_error(</highlight><highlight class="stringliteral">&quot;Failed<sp/>to<sp/>b64<sp/>encode<sp/>key&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(tmp);</highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>FALSE;</highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>key_out[b64_size]<sp/>=<sp/></highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(tmp);</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>TRUE;</highlight></codeline>
<codeline lineno="87"><highlight class="normal">}</highlight></codeline>
<codeline lineno="88"><highlight class="normal"></highlight></codeline>
<codeline lineno="89"><highlight class="normal"><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*<ref refid="group__call__control_1gab4362397b265b81d5c2ea9b5a2999231" kindref="member">linphone_call_get_core</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="90"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>call-&gt;core;</highlight></codeline>
<codeline lineno="91"><highlight class="normal">}</highlight></codeline>
<codeline lineno="92"><highlight class="normal"></highlight></codeline>
<codeline lineno="93"><highlight class="normal"></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>linphone_call_get_authentication_token(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="94"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>call-&gt;auth_token;</highlight></codeline>
<codeline lineno="95"><highlight class="normal">}</highlight></codeline>
<codeline lineno="96"><highlight class="normal"></highlight></codeline>
<codeline lineno="105"><highlight class="normal">bool_t<sp/><ref refid="group__call__control_1gaed1e0517d15f86ad4a57f102fc78caf3" kindref="member">linphone_call_get_authentication_token_verified</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="106"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>call-&gt;auth_token_verified;</highlight></codeline>
<codeline lineno="107"><highlight class="normal">}</highlight></codeline>
<codeline lineno="108"><highlight class="normal"></highlight></codeline>
<codeline lineno="109"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>bool_t<sp/>at_least_one_stream_started(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="110"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(call-&gt;audiostream<sp/>&amp;&amp;<sp/>media_stream_get_state((MediaStream<sp/>*)call-&gt;audiostream)<sp/>==<sp/>MSStreamStarted<sp/>)</highlight></codeline>
<codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>||<sp/>(call-&gt;videostream<sp/>&amp;&amp;<sp/>media_stream_get_state((MediaStream<sp/>*)call-&gt;videostream)<sp/>==<sp/>MSStreamStarted)</highlight></codeline>
<codeline lineno="112"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>||<sp/>(call-&gt;textstream<sp/>&amp;&amp;<sp/>media_stream_get_state((MediaStream<sp/>*)call-&gt;textstream)<sp/>==<sp/>MSStreamStarted);</highlight></codeline>
<codeline lineno="113"><highlight class="normal">}</highlight></codeline>
<codeline lineno="114"><highlight class="normal"></highlight></codeline>
<codeline lineno="115"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>bool_t<sp/>linphone_call_all_streams_encrypted(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="116"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>number_of_encrypted_stream<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="117"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>number_of_active_stream<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="118"><highlight class="normal"></highlight></codeline>
<codeline lineno="119"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;audiostream<sp/>&amp;&amp;<sp/>media_stream_get_state((MediaStream<sp/>*)call-&gt;audiostream)<sp/>==<sp/>MSStreamStarted)<sp/>{</highlight></codeline>
<codeline lineno="120"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>number_of_active_stream++;</highlight></codeline>
<codeline lineno="121"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(media_stream_secured((MediaStream<sp/>*)call-&gt;audiostream))</highlight></codeline>
<codeline lineno="122"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>number_of_encrypted_stream++;</highlight></codeline>
<codeline lineno="123"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="124"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;videostream<sp/>&amp;&amp;<sp/>media_stream_get_state((MediaStream<sp/>*)call-&gt;videostream)<sp/>==<sp/>MSStreamStarted)<sp/>{</highlight></codeline>
<codeline lineno="125"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>number_of_active_stream++;</highlight></codeline>
<codeline lineno="126"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(media_stream_secured((MediaStream<sp/>*)call-&gt;videostream))</highlight></codeline>
<codeline lineno="127"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>number_of_encrypted_stream++;</highlight></codeline>
<codeline lineno="128"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="129"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;textstream<sp/>&amp;&amp;<sp/>media_stream_get_state((MediaStream<sp/>*)call-&gt;textstream)<sp/>==<sp/>MSStreamStarted)<sp/>{</highlight></codeline>
<codeline lineno="130"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>number_of_active_stream++;</highlight></codeline>
<codeline lineno="131"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(media_stream_secured((MediaStream<sp/>*)call-&gt;textstream))</highlight></codeline>
<codeline lineno="132"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>number_of_encrypted_stream++;</highlight></codeline>
<codeline lineno="133"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="134"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>number_of_active_stream&gt;0<sp/>&amp;&amp;<sp/>number_of_active_stream==number_of_encrypted_stream;</highlight></codeline>
<codeline lineno="135"><highlight class="normal">}</highlight></codeline>
<codeline lineno="136"><highlight class="normal"></highlight></codeline>
<codeline lineno="137"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>bool_t<sp/>linphone_call_all_streams_avpf_enabled(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="138"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nb_active_streams<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="139"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nb_avpf_enabled_streams<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="140"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call)<sp/>{</highlight></codeline>
<codeline lineno="141"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;audiostream<sp/>&amp;&amp;<sp/>media_stream_get_state((MediaStream<sp/>*)call-&gt;audiostream)<sp/>==<sp/>MSStreamStarted)<sp/>{</highlight></codeline>
<codeline lineno="142"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nb_active_streams++;</highlight></codeline>
<codeline lineno="143"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(media_stream_avpf_enabled((MediaStream<sp/>*)call-&gt;audiostream))</highlight></codeline>
<codeline lineno="144"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nb_avpf_enabled_streams++;</highlight></codeline>
<codeline lineno="145"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="146"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;videostream<sp/>&amp;&amp;<sp/>media_stream_get_state((MediaStream<sp/>*)call-&gt;videostream)<sp/>==<sp/>MSStreamStarted)<sp/>{</highlight></codeline>
<codeline lineno="147"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nb_active_streams++;</highlight></codeline>
<codeline lineno="148"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(media_stream_avpf_enabled((MediaStream<sp/>*)call-&gt;videostream))</highlight></codeline>
<codeline lineno="149"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nb_avpf_enabled_streams++;</highlight></codeline>
<codeline lineno="150"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="151"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="152"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>((nb_active_streams<sp/>&gt;<sp/>0)<sp/>&amp;&amp;<sp/>(nb_active_streams<sp/>==<sp/>nb_avpf_enabled_streams));</highlight></codeline>
<codeline lineno="153"><highlight class="normal">}</highlight></codeline>
<codeline lineno="154"><highlight class="normal"></highlight></codeline>
<codeline lineno="155"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>uint16_t<sp/>linphone_call_get_avpf_rr_interval(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="156"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>uint16_t<sp/>rr_interval<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="157"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>uint16_t<sp/>stream_rr_interval;</highlight></codeline>
<codeline lineno="158"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call)<sp/>{</highlight></codeline>
<codeline lineno="159"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;audiostream<sp/>&amp;&amp;<sp/>media_stream_get_state((MediaStream<sp/>*)call-&gt;audiostream)<sp/>==<sp/>MSStreamStarted)<sp/>{</highlight></codeline>
<codeline lineno="160"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stream_rr_interval<sp/>=<sp/>media_stream_get_avpf_rr_interval((MediaStream<sp/>*)call-&gt;audiostream);</highlight></codeline>
<codeline lineno="161"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stream_rr_interval<sp/>&gt;<sp/>rr_interval)<sp/>rr_interval<sp/>=<sp/>stream_rr_interval;</highlight></codeline>
<codeline lineno="162"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="163"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;videostream<sp/>&amp;&amp;<sp/>media_stream_get_state((MediaStream<sp/>*)call-&gt;videostream)<sp/>==<sp/>MSStreamStarted)<sp/>{</highlight></codeline>
<codeline lineno="164"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stream_rr_interval<sp/>=<sp/>media_stream_get_avpf_rr_interval((MediaStream<sp/>*)call-&gt;videostream);</highlight></codeline>
<codeline lineno="165"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stream_rr_interval<sp/>&gt;<sp/>rr_interval)<sp/>rr_interval<sp/>=<sp/>stream_rr_interval;</highlight></codeline>
<codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="167"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="168"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rr_interval<sp/>=<sp/>5000;</highlight></codeline>
<codeline lineno="169"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="170"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>rr_interval;</highlight></codeline>
<codeline lineno="171"><highlight class="normal">}</highlight></codeline>
<codeline lineno="172"><highlight class="normal"></highlight></codeline>
<codeline lineno="173"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>propagate_encryption_changed(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="174"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!linphone_call_all_streams_encrypted(call))<sp/>{</highlight></codeline>
<codeline lineno="175"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Some<sp/>streams<sp/>are<sp/>not<sp/>encrypted&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="176"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;media_encryption=<ref refid="group__media__parameters_1ggac01228dce297dfe24304be6a1d2cfa0baa30caf910eb4b60f6f5e02156f5bf451" kindref="member">LinphoneMediaEncryptionNone</ref>;</highlight></codeline>
<codeline lineno="177"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_notify_call_encryption_changed(call-&gt;core,<sp/>call,<sp/>FALSE,<sp/>call-&gt;auth_token);</highlight></codeline>
<codeline lineno="178"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="179"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;auth_token)<sp/>{</highlight><highlight class="comment">/*<sp/>ZRTP<sp/>only<sp/>is<sp/>using<sp/>auth_token<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="180"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;media_encryption=<ref refid="group__media__parameters_1ggac01228dce297dfe24304be6a1d2cfa0ba45e6b6334e661aa1680c48901789495b" kindref="member">LinphoneMediaEncryptionZRTP</ref>;</highlight></codeline>
<codeline lineno="181"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{<sp/></highlight><highlight class="comment">/*<sp/>otherwise<sp/>it<sp/>must<sp/>be<sp/>DTLS<sp/>as<sp/>SDES<sp/>doesn&apos;t<sp/>go<sp/>through<sp/>this<sp/>function<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;media_encryption=<ref refid="group__media__parameters_1ggac01228dce297dfe24304be6a1d2cfa0ba62124fc2fc42d6f7f821fd5f6550c776" kindref="member">LinphoneMediaEncryptionDTLS</ref>;</highlight></codeline>
<codeline lineno="183"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="184"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;All<sp/>streams<sp/>are<sp/>encrypted<sp/>key<sp/>exchanged<sp/>using<sp/>%s&quot;</highlight><highlight class="normal">,<sp/>call-&gt;current_params-&gt;media_encryption==<ref refid="group__media__parameters_1ggac01228dce297dfe24304be6a1d2cfa0ba45e6b6334e661aa1680c48901789495b" kindref="member">LinphoneMediaEncryptionZRTP</ref>?</highlight><highlight class="stringliteral">&quot;ZRTP&quot;</highlight><highlight class="normal">:call-&gt;current_params-&gt;media_encryption==<ref refid="group__media__parameters_1ggac01228dce297dfe24304be6a1d2cfa0ba62124fc2fc42d6f7f821fd5f6550c776" kindref="member">LinphoneMediaEncryptionDTLS</ref>?</highlight><highlight class="stringliteral">&quot;DTLS&quot;</highlight><highlight class="normal">:</highlight><highlight class="stringliteral">&quot;Unknown<sp/>mechanism&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="185"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_notify_call_encryption_changed(call-&gt;core,<sp/>call,<sp/>TRUE,<sp/>call-&gt;auth_token);</highlight></codeline>
<codeline lineno="186"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="187"><highlight class="normal">}</highlight></codeline>
<codeline lineno="188"><highlight class="normal"></highlight></codeline>
<codeline lineno="189"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_audiostream_encryption_changed(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*data,<sp/>bool_t<sp/>encrypted)<sp/>{</highlight></codeline>
<codeline lineno="190"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>status[255]={0};</highlight></codeline>
<codeline lineno="191"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call;</highlight></codeline>
<codeline lineno="192"><highlight class="normal"></highlight></codeline>
<codeline lineno="193"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call<sp/>=<sp/>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*)data;</highlight></codeline>
<codeline lineno="194"><highlight class="normal"></highlight></codeline>
<codeline lineno="195"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(encrypted)<sp/>{</highlight></codeline>
<codeline lineno="196"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;params-&gt;media_encryption==<ref refid="group__media__parameters_1ggac01228dce297dfe24304be6a1d2cfa0ba45e6b6334e661aa1680c48901789495b" kindref="member">LinphoneMediaEncryptionZRTP</ref>)<sp/>{<sp/></highlight><highlight class="comment">/*<sp/>if<sp/>encryption<sp/>is<sp/>DTLS,<sp/>no<sp/>status<sp/>to<sp/>be<sp/>displayed<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="197"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>snprintf(status,</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(status)-1,_(</highlight><highlight class="stringliteral">&quot;Authentication<sp/>token<sp/>is<sp/>%s&quot;</highlight><highlight class="normal">),call-&gt;auth_token);</highlight></codeline>
<codeline lineno="198"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_notify_display_status(call-&gt;core,<sp/>status);</highlight></codeline>
<codeline lineno="199"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="200"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="201"><highlight class="normal"></highlight></codeline>
<codeline lineno="202"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>propagate_encryption_changed(call);</highlight></codeline>
<codeline lineno="203"><highlight class="normal"></highlight></codeline>
<codeline lineno="204"><highlight class="normal"></highlight></codeline>
<codeline lineno="205"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>VIDEO_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="206"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Enable<sp/>video<sp/>encryption</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="207"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="208"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gaa91f7e76e8f038ae9acdf42d1bc80a22" kindref="member">LinphoneCallParams</ref><sp/>*params=<ref refid="group__call__control_1ga768bbd4e2869556bc23830a7b1e4eb5c" kindref="member">linphone_call_get_current_params</ref>(call);</highlight></codeline>
<codeline lineno="209"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(params-&gt;has_video)<sp/>{</highlight></codeline>
<codeline lineno="210"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSZrtpParams<sp/>params;</highlight></codeline>
<codeline lineno="211"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Trying<sp/>to<sp/>enable<sp/>encryption<sp/>on<sp/>video<sp/>stream&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="212"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>params.zid_file=NULL;<sp/></highlight><highlight class="comment">//unused</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="213"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_enable_zrtp(call-&gt;videostream,call-&gt;audiostream,&amp;params);</highlight></codeline>
<codeline lineno="214"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="215"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="216"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="217"><highlight class="normal">}</highlight></codeline>
<codeline lineno="218"><highlight class="normal"></highlight></codeline>
<codeline lineno="219"><highlight class="normal"></highlight></codeline>
<codeline lineno="220"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_audiostream_auth_token_ready(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*data,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>auth_token,<sp/>bool_t<sp/>verified)<sp/>{</highlight></codeline>
<codeline lineno="221"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call=(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*)data;</highlight></codeline>
<codeline lineno="222"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;auth_token<sp/>!=<sp/>NULL)</highlight></codeline>
<codeline lineno="223"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(call-&gt;auth_token);</highlight></codeline>
<codeline lineno="224"><highlight class="normal"></highlight></codeline>
<codeline lineno="225"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;auth_token=ms_strdup(auth_token);</highlight></codeline>
<codeline lineno="226"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;auth_token_verified=verified;</highlight></codeline>
<codeline lineno="227"><highlight class="normal"></highlight></codeline>
<codeline lineno="228"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Authentication<sp/>token<sp/>is<sp/>%s<sp/>(%s)&quot;</highlight><highlight class="normal">,<sp/>auth_token,<sp/>verified?</highlight><highlight class="stringliteral">&quot;verified&quot;</highlight><highlight class="normal">:</highlight><highlight class="stringliteral">&quot;unverified&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="229"><highlight class="normal">}</highlight></codeline>
<codeline lineno="230"><highlight class="normal"></highlight></codeline>
<codeline lineno="238"><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ga3ce1e87718e88df21bca4a19b6e80967" kindref="member">linphone_call_set_authentication_token_verified</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/>bool_t<sp/>verified){</highlight></codeline>
<codeline lineno="239"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;audiostream==NULL){</highlight></codeline>
<codeline lineno="240"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_error(</highlight><highlight class="stringliteral">&quot;linphone_call_set_authentication_token_verified():<sp/>No<sp/>audio<sp/>stream&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="241"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="242"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;audiostream-&gt;ms.sessions.zrtp_context==NULL){</highlight></codeline>
<codeline lineno="243"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_error(</highlight><highlight class="stringliteral">&quot;linphone_call_set_authentication_token_verified():<sp/>No<sp/>zrtp<sp/>context.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="244"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="245"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!call-&gt;auth_token_verified<sp/>&amp;&amp;<sp/>verified){</highlight></codeline>
<codeline lineno="246"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_zrtp_sas_verified(call-&gt;audiostream-&gt;ms.sessions.zrtp_context);</highlight></codeline>
<codeline lineno="247"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;auth_token_verified<sp/>&amp;&amp;<sp/>!verified){</highlight></codeline>
<codeline lineno="248"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_zrtp_sas_reset_verified(call-&gt;audiostream-&gt;ms.sessions.zrtp_context);</highlight></codeline>
<codeline lineno="249"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="250"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;auth_token_verified=verified;</highlight></codeline>
<codeline lineno="251"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>propagate_encryption_changed(call);</highlight></codeline>
<codeline lineno="252"><highlight class="normal">}</highlight></codeline>
<codeline lineno="253"><highlight class="normal"></highlight></codeline>
<codeline lineno="254"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>get_max_codec_sample_rate(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MSList<sp/>*codecs){</highlight></codeline>
<codeline lineno="255"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>max_sample_rate=0;</highlight></codeline>
<codeline lineno="256"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MSList<sp/>*it;</highlight></codeline>
<codeline lineno="257"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(it=codecs;it!=NULL;it=it-&gt;next){</highlight></codeline>
<codeline lineno="258"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>PayloadType<sp/>*pt=(PayloadType*)it-&gt;data;</highlight></codeline>
<codeline lineno="259"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>sample_rate;</highlight></codeline>
<codeline lineno="260"><highlight class="normal"></highlight></codeline>
<codeline lineno="261"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(<sp/>strcasecmp(</highlight><highlight class="stringliteral">&quot;G722&quot;</highlight><highlight class="normal">,pt-&gt;mime_type)<sp/>==<sp/>0<sp/>){</highlight></codeline>
<codeline lineno="262"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>G722<sp/>spec<sp/>says<sp/>8000<sp/>but<sp/>the<sp/>codec<sp/>actually<sp/>requires<sp/>16000<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="263"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sample_rate<sp/>=<sp/>16000;</highlight></codeline>
<codeline lineno="264"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>sample_rate=pt-&gt;clock_rate;</highlight></codeline>
<codeline lineno="265"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sample_rate&gt;max_sample_rate)<sp/>max_sample_rate=sample_rate;</highlight></codeline>
<codeline lineno="266"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="267"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>max_sample_rate;</highlight></codeline>
<codeline lineno="268"><highlight class="normal">}</highlight></codeline>
<codeline lineno="269"><highlight class="normal"></highlight></codeline>
<codeline lineno="270"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>find_payload_type_number(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MSList<sp/>*assigned,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>PayloadType<sp/>*pt){</highlight></codeline>
<codeline lineno="271"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MSList<sp/>*elem;</highlight></codeline>
<codeline lineno="272"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>PayloadType<sp/>*candidate=NULL;</highlight></codeline>
<codeline lineno="273"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(elem=assigned;elem!=NULL;elem=elem-&gt;next){</highlight></codeline>
<codeline lineno="274"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>PayloadType<sp/>*it=(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>PayloadType*)elem-&gt;data;</highlight></codeline>
<codeline lineno="275"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>((strcasecmp(pt-&gt;mime_type,<sp/>payload_type_get_mime(it))<sp/>==<sp/>0)</highlight></codeline>
<codeline lineno="276"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>&amp;&amp;<sp/>(it-&gt;clock_rate==pt-&gt;clock_rate)</highlight></codeline>
<codeline lineno="277"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>&amp;&amp;<sp/>(it-&gt;channels==pt-&gt;channels<sp/>||<sp/>pt-&gt;channels&lt;=0))<sp/>{</highlight></codeline>
<codeline lineno="278"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>candidate=it;</highlight></codeline>
<codeline lineno="279"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((it-&gt;recv_fmtp!=NULL<sp/>&amp;&amp;<sp/>pt-&gt;recv_fmtp!=NULL<sp/>&amp;&amp;<sp/>strcasecmp(it-&gt;recv_fmtp,<sp/>pt-&gt;recv_fmtp)==0)</highlight></codeline>
<codeline lineno="280"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>||<sp/>(it-&gt;recv_fmtp==NULL<sp/>&amp;&amp;<sp/>pt-&gt;recv_fmtp==NULL)){</highlight></codeline>
<codeline lineno="281"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight><highlight class="comment">/*exact<sp/>match*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="282"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="283"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="284"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="285"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>candidate<sp/>?<sp/>payload_type_get_number(candidate)<sp/>:<sp/>-1;</highlight></codeline>
<codeline lineno="286"><highlight class="normal">}</highlight></codeline>
<codeline lineno="287"><highlight class="normal"></highlight></codeline>
<codeline lineno="288"><highlight class="normal">bool_t<sp/>is_payload_type_number_available(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MSList<sp/>*l,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>number,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>PayloadType<sp/>*ignore){</highlight></codeline>
<codeline lineno="289"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MSList<sp/>*elem;</highlight></codeline>
<codeline lineno="290"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(elem=l;<sp/>elem!=NULL;<sp/>elem=elem-&gt;next){</highlight></codeline>
<codeline lineno="291"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>PayloadType<sp/>*pt=(PayloadType*)elem-&gt;data;</highlight></codeline>
<codeline lineno="292"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>(pt!=ignore<sp/>&amp;&amp;<sp/>payload_type_get_number(pt)==number)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>FALSE;</highlight></codeline>
<codeline lineno="293"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="294"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>TRUE;</highlight></codeline>
<codeline lineno="295"><highlight class="normal">}</highlight></codeline>
<codeline lineno="296"><highlight class="normal"></highlight></codeline>
<codeline lineno="297"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_core_assign_payload_type_numbers(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc,<sp/>MSList<sp/>*codecs){</highlight></codeline>
<codeline lineno="298"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSList<sp/>*elem;</highlight></codeline>
<codeline lineno="299"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>dyn_number=lc-&gt;codecs_conf.dyn_pt;</highlight></codeline>
<codeline lineno="300"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(elem=codecs;<sp/>elem!=NULL;<sp/>elem=elem-&gt;next){</highlight></codeline>
<codeline lineno="301"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>PayloadType<sp/>*pt=(PayloadType*)elem-&gt;data;</highlight></codeline>
<codeline lineno="302"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>number=payload_type_get_number(pt);</highlight></codeline>
<codeline lineno="303"><highlight class="normal"></highlight></codeline>
<codeline lineno="304"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*check<sp/>if<sp/>number<sp/>is<sp/>duplicated:<sp/>it<sp/>could<sp/>be<sp/>the<sp/>case<sp/>if<sp/>the<sp/>remote<sp/>forced<sp/>us<sp/>to<sp/>use<sp/>a<sp/>mapping<sp/>with<sp/>a<sp/>previous<sp/>offer*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="305"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(number!=-1<sp/>&amp;&amp;<sp/>!(pt-&gt;flags<sp/>&amp;<sp/>PAYLOAD_TYPE_FROZEN_NUMBER)){</highlight></codeline>
<codeline lineno="306"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!is_payload_type_number_available(codecs,<sp/>number,<sp/>pt)){</highlight></codeline>
<codeline lineno="307"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Reassigning<sp/>payload<sp/>type<sp/>%i<sp/>%s/%i<sp/>because<sp/>already<sp/>offered.&quot;</highlight><highlight class="normal">,<sp/>number,<sp/>pt-&gt;mime_type,<sp/>pt-&gt;clock_rate);</highlight></codeline>
<codeline lineno="308"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>number=-1;<sp/></highlight><highlight class="comment">/*need<sp/>to<sp/>be<sp/>re-assigned*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="309"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="310"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="311"><highlight class="normal"></highlight></codeline>
<codeline lineno="312"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(number==-1){</highlight></codeline>
<codeline lineno="313"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal">(dyn_number&lt;127){</highlight></codeline>
<codeline lineno="314"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(is_payload_type_number_available(codecs,<sp/>dyn_number,<sp/>NULL)){</highlight></codeline>
<codeline lineno="315"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>payload_type_set_number(pt,<sp/>dyn_number);</highlight></codeline>
<codeline lineno="316"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dyn_number++;</highlight></codeline>
<codeline lineno="317"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="318"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="319"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dyn_number++;</highlight></codeline>
<codeline lineno="320"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="321"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dyn_number==127){</highlight></codeline>
<codeline lineno="322"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_error(</highlight><highlight class="stringliteral">&quot;Too<sp/>many<sp/>payload<sp/>types<sp/>configured<sp/>!<sp/>codec<sp/>%s/%i<sp/>is<sp/>disabled.&quot;</highlight><highlight class="normal">,<sp/>pt-&gt;mime_type,<sp/>pt-&gt;clock_rate);</highlight></codeline>
<codeline lineno="323"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>payload_type_set_enable(pt,<sp/>FALSE);</highlight></codeline>
<codeline lineno="324"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="325"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="326"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="327"><highlight class="normal">}</highlight></codeline>
<codeline lineno="328"><highlight class="normal"></highlight></codeline>
<codeline lineno="329"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>bool_t<sp/>has_telephone_event_at_rate(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MSList<sp/>*tev,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rate){</highlight></codeline>
<codeline lineno="330"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MSList<sp/>*it;</highlight></codeline>
<codeline lineno="331"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(it=tev;it!=NULL;it=it-&gt;next){</highlight></codeline>
<codeline lineno="332"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>PayloadType<sp/>*pt=(PayloadType*)it-&gt;data;</highlight></codeline>
<codeline lineno="333"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>(pt-&gt;clock_rate==rate)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>TRUE;</highlight></codeline>
<codeline lineno="334"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="335"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>FALSE;</highlight></codeline>
<codeline lineno="336"><highlight class="normal">}</highlight></codeline>
<codeline lineno="337"><highlight class="normal"></highlight></codeline>
<codeline lineno="338"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>MSList<sp/>*<sp/>create_telephone_events(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MSList<sp/>*codecs){</highlight></codeline>
<codeline lineno="339"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MSList<sp/>*it;</highlight></codeline>
<codeline lineno="340"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSList<sp/>*ret=NULL;</highlight></codeline>
<codeline lineno="341"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(it=codecs;it!=NULL;it=it-&gt;next){</highlight></codeline>
<codeline lineno="342"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>PayloadType<sp/>*pt=(PayloadType*)it-&gt;data;</highlight></codeline>
<codeline lineno="343"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>(!has_telephone_event_at_rate(ret,pt-&gt;clock_rate)){</highlight></codeline>
<codeline lineno="344"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>PayloadType<sp/>*tev=payload_type_clone(&amp;payload_type_telephone_event);</highlight></codeline>
<codeline lineno="345"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tev-&gt;clock_rate=pt-&gt;clock_rate;</highlight></codeline>
<codeline lineno="346"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*let<sp/>it<sp/>choose<sp/>the<sp/>number<sp/>dynamically<sp/>as<sp/>for<sp/>normal<sp/>codecs*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="347"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>payload_type_set_number(tev,<sp/>-1);</highlight></codeline>
<codeline lineno="348"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ret==NULL){</highlight></codeline>
<codeline lineno="349"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*But<sp/>for<sp/>first<sp/>telephone-event,<sp/>prefer<sp/>the<sp/>number<sp/>that<sp/>was<sp/>configured<sp/>in<sp/>the<sp/>core*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="350"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(is_payload_type_number_available(codecs,<sp/>lc-&gt;codecs_conf.telephone_event_pt,<sp/>NULL)){</highlight></codeline>
<codeline lineno="351"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>payload_type_set_number(tev,<sp/>lc-&gt;codecs_conf.telephone_event_pt);</highlight></codeline>
<codeline lineno="352"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="353"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="354"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ret=ms_list_append(ret,tev);</highlight></codeline>
<codeline lineno="355"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="356"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="357"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>ret;</highlight></codeline>
<codeline lineno="358"><highlight class="normal">}</highlight></codeline>
<codeline lineno="359"><highlight class="normal"></highlight></codeline>
<codeline lineno="360"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>MSList<sp/>*create_special_payload_types(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MSList<sp/>*codecs){</highlight></codeline>
<codeline lineno="361"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSList<sp/>*ret=create_telephone_events(lc,<sp/>codecs);</highlight></codeline>
<codeline lineno="362"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(linphone_core_generic_confort_noise_enabled(lc)){</highlight></codeline>
<codeline lineno="363"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>PayloadType<sp/>*cn=payload_type_clone(&amp;payload_type_cn);</highlight></codeline>
<codeline lineno="364"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>payload_type_set_number(cn,<sp/>13);</highlight></codeline>
<codeline lineno="365"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ret=ms_list_append(ret,<sp/>cn);</highlight></codeline>
<codeline lineno="366"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="367"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>ret;</highlight></codeline>
<codeline lineno="368"><highlight class="normal">}</highlight></codeline>
<codeline lineno="369"><highlight class="normal"></highlight></codeline>
<codeline lineno="370"><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">_CodecConstraints{</highlight></codeline>
<codeline lineno="371"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>bandwidth_limit;</highlight></codeline>
<codeline lineno="372"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>max_codecs;</highlight></codeline>
<codeline lineno="373"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSList<sp/>*previously_used;</highlight></codeline>
<codeline lineno="374"><highlight class="normal">}CodecConstraints;</highlight></codeline>
<codeline lineno="375"><highlight class="normal"></highlight></codeline>
<codeline lineno="376"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>MSList<sp/>*make_codec_list(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc,<sp/>CodecConstraints<sp/>*<sp/>hints,<sp/>SalStreamType<sp/>stype,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MSList<sp/>*codecs){</highlight></codeline>
<codeline lineno="377"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSList<sp/>*l=NULL;</highlight></codeline>
<codeline lineno="378"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MSList<sp/>*it;</highlight></codeline>
<codeline lineno="379"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nb<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="380"><highlight class="normal"></highlight></codeline>
<codeline lineno="381"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(it=codecs;it!=NULL;it=it-&gt;next){</highlight></codeline>
<codeline lineno="382"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>PayloadType<sp/>*pt=(PayloadType*)it-&gt;data;</highlight></codeline>
<codeline lineno="383"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>num;</highlight></codeline>
<codeline lineno="384"><highlight class="normal"></highlight></codeline>
<codeline lineno="385"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>(!payload_type_enabled(pt))<sp/>{</highlight></codeline>
<codeline lineno="386"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">continue</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="387"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="388"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(hints-&gt;bandwidth_limit&gt;0<sp/>&amp;&amp;<sp/>!linphone_core_is_payload_type_usable_for_bandwidth(lc,pt,hints-&gt;bandwidth_limit)){</highlight></codeline>
<codeline lineno="389"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Codec<sp/>%s/%i<sp/>eliminated<sp/>because<sp/>of<sp/>audio<sp/>bandwidth<sp/>constraint<sp/>of<sp/>%i<sp/>kbit/s&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="390"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pt-&gt;mime_type,pt-&gt;clock_rate,hints-&gt;bandwidth_limit);</highlight></codeline>
<codeline lineno="391"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">continue</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="392"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="393"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!linphone_core_check_payload_type_usability(lc,pt)){</highlight></codeline>
<codeline lineno="394"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">continue</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="395"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="396"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pt=payload_type_clone(pt);</highlight></codeline>
<codeline lineno="397"><highlight class="normal"></highlight></codeline>
<codeline lineno="398"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*look<sp/>for<sp/>a<sp/>previously<sp/>assigned<sp/>number<sp/>for<sp/>this<sp/>codec*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="399"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>num=find_payload_type_number(hints-&gt;previously_used,<sp/>pt);</highlight></codeline>
<codeline lineno="400"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(num!=-1){</highlight></codeline>
<codeline lineno="401"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>payload_type_set_number(pt,num);</highlight></codeline>
<codeline lineno="402"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>payload_type_set_flag(pt,<sp/>PAYLOAD_TYPE_FROZEN_NUMBER);</highlight></codeline>
<codeline lineno="403"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="404"><highlight class="normal"></highlight></codeline>
<codeline lineno="405"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>l=ms_list_append(l,<sp/>pt);</highlight></codeline>
<codeline lineno="406"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nb++;</highlight></codeline>
<codeline lineno="407"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((hints-&gt;max_codecs<sp/>&gt;<sp/>0)<sp/>&amp;&amp;<sp/>(nb<sp/>&gt;=<sp/>hints-&gt;max_codecs))<sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="408"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="409"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stype==SalAudio){</highlight></codeline>
<codeline lineno="410"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSList<sp/>*specials=create_special_payload_types(lc,l);</highlight></codeline>
<codeline lineno="411"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>l=ms_list_concat(l,specials);</highlight></codeline>
<codeline lineno="412"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="413"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_assign_payload_type_numbers(lc,<sp/>l);</highlight></codeline>
<codeline lineno="414"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>l;</highlight></codeline>
<codeline lineno="415"><highlight class="normal">}</highlight></codeline>
<codeline lineno="416"><highlight class="normal"></highlight></codeline>
<codeline lineno="417"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>update_media_description_from_stun(SalMediaDescription<sp/>*md,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>StunCandidate<sp/>*ac,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>StunCandidate<sp/>*vc,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>StunCandidate<sp/>*tc){</highlight></codeline>
<codeline lineno="418"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="419"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>SAL_MEDIA_DESCRIPTION_MAX_STREAMS;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="420"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!sal_stream_description_active(&amp;md-&gt;streams[i]))<sp/></highlight><highlight class="keywordflow">continue</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="421"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((md-&gt;streams[i].type<sp/>==<sp/>SalAudio)<sp/>&amp;&amp;<sp/>(ac-&gt;port<sp/>!=<sp/>0))<sp/>{</highlight></codeline>
<codeline lineno="422"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strcpy(md-&gt;streams[i].rtp_addr,ac-&gt;addr);</highlight></codeline>
<codeline lineno="423"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[i].rtp_port=ac-&gt;port;</highlight></codeline>
<codeline lineno="424"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((ac-&gt;addr[0]!=</highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal"><sp/>&amp;&amp;<sp/>vc-&gt;addr[0]!=</highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal"><sp/>&amp;&amp;<sp/>strcmp(ac-&gt;addr,vc-&gt;addr)==0)<sp/>||<sp/>sal_media_description_get_nb_active_streams(md)==1){</highlight></codeline>
<codeline lineno="425"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strcpy(md-&gt;addr,ac-&gt;addr);</highlight></codeline>
<codeline lineno="426"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="427"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((md-&gt;streams[i].type<sp/>==<sp/>SalVideo)<sp/>&amp;&amp;<sp/>(vc-&gt;port<sp/>!=<sp/>0))<sp/>{</highlight></codeline>
<codeline lineno="428"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strcpy(md-&gt;streams[i].rtp_addr,vc-&gt;addr);</highlight></codeline>
<codeline lineno="429"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[i].rtp_port=vc-&gt;port;</highlight></codeline>
<codeline lineno="430"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((md-&gt;streams[i].type<sp/>==<sp/>SalText)<sp/>&amp;&amp;<sp/>(tc-&gt;port<sp/>!=<sp/>0))<sp/>{</highlight></codeline>
<codeline lineno="431"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strcpy(md-&gt;streams[i].rtp_addr,tc-&gt;addr);</highlight></codeline>
<codeline lineno="432"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[i].rtp_port=tc-&gt;port;</highlight></codeline>
<codeline lineno="433"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="434"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="435"><highlight class="normal">}</highlight></codeline>
<codeline lineno="436"><highlight class="normal"></highlight></codeline>
<codeline lineno="437"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>setup_encryption_key(SalSrtpCryptoAlgo<sp/>*crypto,<sp/>MSCryptoSuite<sp/>suite,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>tag){</highlight></codeline>
<codeline lineno="438"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>keylen=0;</highlight></codeline>
<codeline lineno="439"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>crypto-&gt;tag=tag;</highlight></codeline>
<codeline lineno="440"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>crypto-&gt;algo=suite;</highlight></codeline>
<codeline lineno="441"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal">(suite){</highlight></codeline>
<codeline lineno="442"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>MS_AES_128_SHA1_80:</highlight></codeline>
<codeline lineno="443"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>MS_AES_128_SHA1_32:</highlight></codeline>
<codeline lineno="444"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>MS_AES_128_NO_AUTH:</highlight></codeline>
<codeline lineno="445"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>MS_NO_CIPHER_SHA1_80:<sp/></highlight><highlight class="comment">/*not<sp/>sure<sp/>for<sp/>this<sp/>one*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="446"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>keylen=30;</highlight></codeline>
<codeline lineno="447"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="448"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>MS_AES_256_SHA1_80:</highlight></codeline>
<codeline lineno="449"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>MS_AES_256_SHA1_32:</highlight></codeline>
<codeline lineno="450"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>keylen=46;</highlight></codeline>
<codeline lineno="451"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="452"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>MS_CRYPTO_SUITE_INVALID:</highlight></codeline>
<codeline lineno="453"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="454"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="455"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(keylen==0<sp/>||<sp/>!generate_b64_crypto_key(keylen,<sp/>crypto-&gt;master_key,<sp/>SAL_SRTP_KEY_SIZE)){</highlight></codeline>
<codeline lineno="456"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_error(</highlight><highlight class="stringliteral">&quot;Could<sp/>not<sp/>generate<sp/>SRTP<sp/>key.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="457"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>crypto-&gt;algo<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="458"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1;</highlight></codeline>
<codeline lineno="459"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="460"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="461"><highlight class="normal">}</highlight></codeline>
<codeline lineno="462"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>setup_dtls_keys(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/>SalMediaDescription<sp/>*md){</highlight></codeline>
<codeline lineno="463"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="464"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(i=0;<sp/>i&lt;SAL_MEDIA_DESCRIPTION_MAX_STREAMS;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="465"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!sal_stream_description_active(&amp;md-&gt;streams[i]))<sp/></highlight><highlight class="keywordflow">continue</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="466"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>if<sp/>media<sp/>encryption<sp/>is<sp/>set<sp/>to<sp/>DTLS<sp/>check<sp/>presence<sp/>of<sp/>fingerprint<sp/>in<sp/>the<sp/>call<sp/>which<sp/>shall<sp/>have<sp/>been<sp/>set<sp/>at<sp/>stream<sp/>init<sp/>but<sp/>it<sp/>may<sp/>have<sp/>failed<sp/>when<sp/>retrieving<sp/>certificate<sp/>resulting<sp/>in<sp/>no<sp/>fingerprint<sp/>present<sp/>and<sp/>then<sp/>DTLS<sp/>not<sp/>usable<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="467"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sal_stream_description_has_dtls(&amp;md-&gt;streams[i])<sp/>==<sp/>TRUE)<sp/>{</highlight></codeline>
<codeline lineno="468"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strncpy(md-&gt;streams[i].dtls_fingerprint,<sp/>call-&gt;dtls_certificate_fingerprint,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(md-&gt;streams[i].dtls_fingerprint));<sp/></highlight><highlight class="comment">/*<sp/>get<sp/>the<sp/>self<sp/>fingerprint<sp/>from<sp/>call(it&apos;s<sp/>computed<sp/>at<sp/>stream<sp/>init)<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="469"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[i].dtls_role<sp/>=<sp/>SalDtlsRoleUnset;<sp/></highlight><highlight class="comment">/*<sp/>if<sp/>we<sp/>are<sp/>offering,<sp/>SDP<sp/>will<sp/>have<sp/>actpass<sp/>setup<sp/>attribute<sp/>when<sp/>role<sp/>is<sp/>unset,<sp/>if<sp/>we<sp/>are<sp/>responding<sp/>the<sp/>result<sp/>mediadescription<sp/>will<sp/>be<sp/>set<sp/>to<sp/>SalDtlsRoleIsClient<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="470"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="471"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[i].dtls_fingerprint[0]<sp/>=<sp/></highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="472"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[i].dtls_role<sp/>=<sp/>SalDtlsRoleInvalid;</highlight></codeline>
<codeline lineno="473"><highlight class="normal"></highlight></codeline>
<codeline lineno="474"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="475"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="476"><highlight class="normal"></highlight></codeline>
<codeline lineno="477"><highlight class="normal">}</highlight></codeline>
<codeline lineno="478"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>setup_encryption_keys(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/>SalMediaDescription<sp/>*md){</highlight></codeline>
<codeline lineno="479"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc=call-&gt;core;</highlight></codeline>
<codeline lineno="480"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i,j;</highlight></codeline>
<codeline lineno="481"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalMediaDescription<sp/>*old_md=call-&gt;localdesc;</highlight></codeline>
<codeline lineno="482"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>keep_srtp_keys=<ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,</highlight><highlight class="stringliteral">&quot;sip&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;keep_srtp_keys&quot;</highlight><highlight class="normal">,1);</highlight></codeline>
<codeline lineno="483"><highlight class="normal"></highlight></codeline>
<codeline lineno="484"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(i=0;<sp/>i&lt;SAL_MEDIA_DESCRIPTION_MAX_STREAMS;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="485"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!sal_stream_description_active(&amp;md-&gt;streams[i]))<sp/></highlight><highlight class="keywordflow">continue</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="486"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sal_stream_description_has_srtp(&amp;md-&gt;streams[i])<sp/>==<sp/>TRUE)<sp/>{</highlight></codeline>
<codeline lineno="487"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(keep_srtp_keys<sp/>&amp;&amp;<sp/>old_md<sp/>&amp;&amp;<sp/>(sal_stream_description_active(&amp;old_md-&gt;streams[i])<sp/>==<sp/>TRUE)<sp/>&amp;&amp;<sp/>(sal_stream_description_has_srtp(&amp;old_md-&gt;streams[i])<sp/>==<sp/>TRUE))<sp/>{</highlight></codeline>
<codeline lineno="488"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>j;</highlight></codeline>
<codeline lineno="489"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Keeping<sp/>same<sp/>crypto<sp/>keys.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="490"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(j=0;j&lt;SAL_CRYPTO_ALGO_MAX;++j){</highlight></codeline>
<codeline lineno="491"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>memcpy(&amp;md-&gt;streams[i].crypto[j],&amp;old_md-&gt;streams[i].crypto[j],</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(SalSrtpCryptoAlgo));</highlight></codeline>
<codeline lineno="492"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="493"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="494"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MSCryptoSuite<sp/>*suites=linphone_core_get_srtp_crypto_suites(lc);</highlight></codeline>
<codeline lineno="495"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(j=0;suites!=NULL<sp/>&amp;&amp;<sp/>suites[j]!=MS_CRYPTO_SUITE_INVALID<sp/>&amp;&amp;<sp/>j&lt;SAL_CRYPTO_ALGO_MAX;++j){</highlight></codeline>
<codeline lineno="496"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>setup_encryption_key(&amp;md-&gt;streams[i].crypto[j],suites[j],j+1);</highlight></codeline>
<codeline lineno="497"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="498"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="499"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="500"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="501"><highlight class="normal">}</highlight></codeline>
<codeline lineno="502"><highlight class="normal"></highlight></codeline>
<codeline lineno="503"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>setup_rtcp_fb(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/>SalMediaDescription<sp/>*md)<sp/>{</highlight></codeline>
<codeline lineno="504"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSList<sp/>*pt_it;</highlight></codeline>
<codeline lineno="505"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>PayloadType<sp/>*pt;</highlight></codeline>
<codeline lineno="506"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>PayloadTypeAvpfParams<sp/>avpf_params;</highlight></codeline>
<codeline lineno="507"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc<sp/>=<sp/>call-&gt;core;</highlight></codeline>
<codeline lineno="508"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="509"><highlight class="normal"></highlight></codeline>
<codeline lineno="510"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>SAL_MEDIA_DESCRIPTION_MAX_STREAMS;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="511"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!sal_stream_description_active(&amp;md-&gt;streams[i]))<sp/></highlight><highlight class="keywordflow">continue</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="512"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[i].rtcp_fb.generic_nack_enabled<sp/>=<sp/><ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;rtp&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;rtcp_fb_generic_nack_enabled&quot;</highlight><highlight class="normal">,<sp/>0);</highlight></codeline>
<codeline lineno="513"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[i].rtcp_fb.tmmbr_enabled<sp/>=<sp/><ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;rtp&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;rtcp_fb_tmmbr_enabled&quot;</highlight><highlight class="normal">,<sp/>0);</highlight></codeline>
<codeline lineno="514"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(pt_it<sp/>=<sp/>md-&gt;streams[i].payloads;<sp/>pt_it<sp/>!=<sp/>NULL;<sp/>pt_it<sp/>=<sp/>pt_it-&gt;next)<sp/>{</highlight></codeline>
<codeline lineno="515"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pt<sp/>=<sp/>(PayloadType<sp/>*)pt_it-&gt;data;</highlight></codeline>
<codeline lineno="516"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>(call-&gt;params-&gt;avpf_enabled<sp/>==<sp/>TRUE)<sp/>{</highlight></codeline>
<codeline lineno="517"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>payload_type_set_flag(pt,<sp/>PAYLOAD_TYPE_RTCP_FEEDBACK_ENABLED);</highlight></codeline>
<codeline lineno="518"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>avpf_params<sp/>=<sp/>payload_type_get_avpf_params(pt);</highlight></codeline>
<codeline lineno="519"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>avpf_params.trr_interval<sp/>=<sp/>call-&gt;params-&gt;avpf_rr_interval;</highlight></codeline>
<codeline lineno="520"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="521"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>payload_type_unset_flag(pt,<sp/>PAYLOAD_TYPE_RTCP_FEEDBACK_ENABLED);</highlight></codeline>
<codeline lineno="522"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>memset(&amp;avpf_params,<sp/>0,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(avpf_params));</highlight></codeline>
<codeline lineno="523"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="524"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>payload_type_set_avpf_params(pt,<sp/>avpf_params);</highlight></codeline>
<codeline lineno="525"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="526"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="527"><highlight class="normal">}</highlight></codeline>
<codeline lineno="528"><highlight class="normal"></highlight></codeline>
<codeline lineno="529"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>setup_rtcp_xr(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/>SalMediaDescription<sp/>*md)<sp/>{</highlight></codeline>
<codeline lineno="530"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc<sp/>=<sp/>call-&gt;core;</highlight></codeline>
<codeline lineno="531"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="532"><highlight class="normal"></highlight></codeline>
<codeline lineno="533"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;rtcp_xr.enabled<sp/>=<sp/><ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;rtp&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;rtcp_xr_enabled&quot;</highlight><highlight class="normal">,<sp/>1);</highlight></codeline>
<codeline lineno="534"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(md-&gt;rtcp_xr.enabled<sp/>==<sp/>TRUE)<sp/>{</highlight></codeline>
<codeline lineno="535"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*rcvr_rtt_mode<sp/>=<sp/><ref refid="group__misc_1ga9657ebf1d68b43184a796c9bdc68c29a" kindref="member">lp_config_get_string</ref>(lc-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;rtp&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;rtcp_xr_rcvr_rtt_mode&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;all&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="536"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(strcasecmp(rcvr_rtt_mode,<sp/></highlight><highlight class="stringliteral">&quot;all&quot;</highlight><highlight class="normal">)<sp/>==<sp/>0)<sp/>md-&gt;rtcp_xr.rcvr_rtt_mode<sp/>=<sp/>OrtpRtcpXrRcvrRttAll;</highlight></codeline>
<codeline lineno="537"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(strcasecmp(rcvr_rtt_mode,<sp/></highlight><highlight class="stringliteral">&quot;sender&quot;</highlight><highlight class="normal">)<sp/>==<sp/>0)<sp/>md-&gt;rtcp_xr.rcvr_rtt_mode<sp/>=<sp/>OrtpRtcpXrRcvrRttSender;</highlight></codeline>
<codeline lineno="538"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>md-&gt;rtcp_xr.rcvr_rtt_mode<sp/>=<sp/>OrtpRtcpXrRcvrRttNone;</highlight></codeline>
<codeline lineno="539"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(md-&gt;rtcp_xr.rcvr_rtt_mode<sp/>!=<sp/>OrtpRtcpXrRcvrRttNone)<sp/>{</highlight></codeline>
<codeline lineno="540"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;rtcp_xr.rcvr_rtt_max_size<sp/>=<sp/><ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;rtp&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;rtcp_xr_rcvr_rtt_max_size&quot;</highlight><highlight class="normal">,<sp/>10000);</highlight></codeline>
<codeline lineno="541"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="542"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;rtcp_xr.stat_summary_enabled<sp/>=<sp/><ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;rtp&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;rtcp_xr_stat_summary_enabled&quot;</highlight><highlight class="normal">,<sp/>1);</highlight></codeline>
<codeline lineno="543"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(md-&gt;rtcp_xr.stat_summary_enabled<sp/>==<sp/>TRUE)<sp/>{</highlight></codeline>
<codeline lineno="544"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;rtcp_xr.stat_summary_flags<sp/>=<sp/>OrtpRtcpXrStatSummaryLoss<sp/>|<sp/>OrtpRtcpXrStatSummaryDup<sp/>|<sp/>OrtpRtcpXrStatSummaryJitt<sp/>|<sp/>OrtpRtcpXrStatSummaryTTL;</highlight></codeline>
<codeline lineno="545"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="546"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;rtcp_xr.voip_metrics_enabled<sp/>=<sp/><ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;rtp&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;rtcp_xr_voip_metrics_enabled&quot;</highlight><highlight class="normal">,<sp/>1);</highlight></codeline>
<codeline lineno="547"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="548"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>SAL_MEDIA_DESCRIPTION_MAX_STREAMS;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="549"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!sal_stream_description_active(&amp;md-&gt;streams[i]))<sp/></highlight><highlight class="keywordflow">continue</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="550"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>memcpy(&amp;md-&gt;streams[i].rtcp_xr,<sp/>&amp;md-&gt;rtcp_xr,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(md-&gt;streams[i].rtcp_xr));</highlight></codeline>
<codeline lineno="551"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="552"><highlight class="normal">}</highlight></codeline>
<codeline lineno="553"><highlight class="normal"></highlight></codeline>
<codeline lineno="554"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_increment_local_media_description(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="555"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalMediaDescription<sp/>*md=call-&gt;localdesc;</highlight></codeline>
<codeline lineno="556"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;session_ver++;</highlight></codeline>
<codeline lineno="557"><highlight class="normal">}</highlight></codeline>
<codeline lineno="558"><highlight class="normal"></highlight></codeline>
<codeline lineno="559"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_update_local_media_description_from_ice_or_upnp(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="560"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;ice_session<sp/>!=<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="561"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>_update_local_media_description_from_ice(call-&gt;localdesc,<sp/>call-&gt;ice_session);</highlight></codeline>
<codeline lineno="562"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_update_ice_state_in_call_stats(call);</highlight></codeline>
<codeline lineno="563"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="564"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>BUILD_UPNP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="565"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(call-&gt;upnp_session<sp/>!=<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="566"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_update_local_media_description_from_upnp(call-&gt;localdesc,<sp/>call-&gt;upnp_session);</highlight></codeline>
<codeline lineno="567"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_update_upnp_state_in_call_stats(call);</highlight></codeline>
<codeline lineno="568"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="569"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/><sp/>//BUILD_UPNP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="570"><highlight class="normal">}</highlight></codeline>
<codeline lineno="571"><highlight class="normal"></highlight></codeline>
<codeline lineno="572"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>transfer_already_assigned_payload_types(SalMediaDescription<sp/>*old,<sp/>SalMediaDescription<sp/>*md){</highlight></codeline>
<codeline lineno="573"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="574"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(i=0;i&lt;SAL_MEDIA_DESCRIPTION_MAX_STREAMS;++i){</highlight></codeline>
<codeline lineno="575"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[i].already_assigned_payloads=old-&gt;streams[i].already_assigned_payloads;</highlight></codeline>
<codeline lineno="576"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>old-&gt;streams[i].already_assigned_payloads=NULL;</highlight></codeline>
<codeline lineno="577"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="578"><highlight class="normal">}</highlight></codeline>
<codeline lineno="579"><highlight class="normal"></highlight></codeline>
<codeline lineno="580"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*linphone_call_get_bind_ip_for_stream(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>stream_index){</highlight></codeline>
<codeline lineno="581"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*bind_ip<sp/>=<sp/><ref refid="group__misc_1ga9657ebf1d68b43184a796c9bdc68c29a" kindref="member">lp_config_get_string</ref>(call-&gt;core-&gt;config,</highlight><highlight class="stringliteral">&quot;rtp&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;bind_address&quot;</highlight><highlight class="normal">,call-&gt;af==AF_INET6<sp/>?<sp/></highlight><highlight class="stringliteral">&quot;::0&quot;</highlight><highlight class="normal"><sp/>:<sp/></highlight><highlight class="stringliteral">&quot;0.0.0.0&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="582"><highlight class="normal"></highlight></codeline>
<codeline lineno="583"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stream_index&lt;2<sp/>&amp;&amp;<sp/>call-&gt;media_ports[stream_index].multicast_ip[0]!=</highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal">){</highlight></codeline>
<codeline lineno="584"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;dir==<ref refid="group__call__logs_1ggaa3077de7d4214529094998ce441f61e1a4856091c25d200b11669efdbc6abb4ed" kindref="member">LinphoneCallOutgoing</ref>){</highlight></codeline>
<codeline lineno="585"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*as<sp/>multicast<sp/>sender,<sp/>we<sp/>must<sp/>decide<sp/>a<sp/>local<sp/>interface<sp/>to<sp/>use<sp/>to<sp/>send<sp/>multicast,<sp/>and<sp/>bind<sp/>to<sp/>it*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="586"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bind_ip=call-&gt;media_localip;</highlight></codeline>
<codeline lineno="587"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="588"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="589"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>bind_ip;</highlight></codeline>
<codeline lineno="590"><highlight class="normal">}</highlight></codeline>
<codeline lineno="591"><highlight class="normal"></highlight></codeline>
<codeline lineno="592"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*linphone_call_get_public_ip_for_stream(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>stream_index){</highlight></codeline>
<codeline lineno="593"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*public_ip=call-&gt;media_localip;</highlight></codeline>
<codeline lineno="594"><highlight class="normal"></highlight></codeline>
<codeline lineno="595"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stream_index&lt;2<sp/>&amp;&amp;<sp/>call-&gt;media_ports[stream_index].multicast_ip[0]!=</highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="596"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>public_ip=call-&gt;media_ports[stream_index].multicast_ip;</highlight></codeline>
<codeline lineno="597"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>public_ip;</highlight></codeline>
<codeline lineno="598"><highlight class="normal">}</highlight></codeline>
<codeline lineno="599"><highlight class="normal"></highlight></codeline>
<codeline lineno="600"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_update_biggest_desc(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/>SalMediaDescription<sp/>*md){</highlight></codeline>
<codeline lineno="601"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;biggestdesc==NULL<sp/>||<sp/>md-&gt;nb_streams&gt;call-&gt;biggestdesc-&gt;nb_streams){</highlight></codeline>
<codeline lineno="602"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*we<sp/>have<sp/>been<sp/>offered<sp/>and<sp/>now<sp/>are<sp/>ready<sp/>to<sp/>proceed,<sp/>or<sp/>we<sp/>added<sp/>a<sp/>new<sp/>stream*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="603"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*store<sp/>the<sp/>media<sp/>description<sp/>to<sp/>remember<sp/>the<sp/>mapping<sp/>of<sp/>calls*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="604"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;biggestdesc){</highlight></codeline>
<codeline lineno="605"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sal_media_description_unref(call-&gt;biggestdesc);</highlight></codeline>
<codeline lineno="606"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;biggestdesc=NULL;</highlight></codeline>
<codeline lineno="607"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="608"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;biggestdesc=sal_media_description_ref(md);</highlight></codeline>
<codeline lineno="609"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="610"><highlight class="normal">}</highlight></codeline>
<codeline lineno="611"><highlight class="normal"></highlight></codeline>
<codeline lineno="612"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>force_streams_dir_according_to_state(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/>SalMediaDescription<sp/>*md){</highlight></codeline>
<codeline lineno="613"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="614"><highlight class="normal"></highlight></codeline>
<codeline lineno="615"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(call-&gt;state){</highlight></codeline>
<codeline lineno="616"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaaaa35a1564a5ce1bcc4719ab523edec98" kindref="member">LinphoneCallPausing</ref>:</highlight></codeline>
<codeline lineno="617"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa59c57a8b9a7a0086a79c85028bb4cefc" kindref="member">LinphoneCallPaused</ref>:</highlight></codeline>
<codeline lineno="618"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="619"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="620"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="621"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="622"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="623"><highlight class="normal"></highlight></codeline>
<codeline lineno="624"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i=0;<sp/>i&lt;SAL_MEDIA_DESCRIPTION_MAX_STREAMS;<sp/>++i){</highlight></codeline>
<codeline lineno="625"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalStreamDescription<sp/>*sd<sp/>=<sp/>&amp;md-&gt;streams[i];</highlight></codeline>
<codeline lineno="626"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sd-&gt;dir<sp/>!=<sp/>SalStreamInactive)<sp/>{</highlight></codeline>
<codeline lineno="627"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sd-&gt;dir<sp/>=<sp/>SalStreamSendOnly;</highlight></codeline>
<codeline lineno="628"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sd-&gt;type<sp/>==<sp/>SalVideo){</highlight></codeline>
<codeline lineno="629"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(call-&gt;core-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;sip&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;inactive_video_on_pause&quot;</highlight><highlight class="normal">,<sp/>0))<sp/>{</highlight></codeline>
<codeline lineno="630"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sd-&gt;dir<sp/>=<sp/>SalStreamInactive;</highlight></codeline>
<codeline lineno="631"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="632"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="633"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="634"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="635"><highlight class="normal">}</highlight></codeline>
<codeline lineno="636"><highlight class="normal"></highlight></codeline>
<codeline lineno="637"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_make_local_media_description(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="638"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSList<sp/>*l;</highlight></codeline>
<codeline lineno="639"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalMediaDescription<sp/>*old_md=call-&gt;localdesc;</highlight></codeline>
<codeline lineno="640"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="641"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>max_index<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="642"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalMediaDescription<sp/>*md=sal_media_description_new();</highlight></codeline>
<codeline lineno="643"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref><sp/>*addr;</highlight></codeline>
<codeline lineno="644"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*subject;</highlight></codeline>
<codeline lineno="645"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>CodecConstraints<sp/>codec_hints={0};</highlight></codeline>
<codeline lineno="646"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1gaa91f7e76e8f038ae9acdf42d1bc80a22" kindref="member">LinphoneCallParams</ref><sp/>*params<sp/>=<sp/>call-&gt;params;</highlight></codeline>
<codeline lineno="647"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc<sp/>=<sp/>call-&gt;core;</highlight></codeline>
<codeline lineno="648"><highlight class="normal"></highlight></codeline>
<codeline lineno="649"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*multicast<sp/>is<sp/>only<sp/>set<sp/>in<sp/>case<sp/>of<sp/>outgoing<sp/>call*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="650"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;dir<sp/>==<sp/><ref refid="group__call__logs_1ggaa3077de7d4214529094998ce441f61e1a4856091c25d200b11669efdbc6abb4ed" kindref="member">LinphoneCallOutgoing</ref><sp/>&amp;&amp;<sp/><ref refid="group__media__parameters_1ga074d17f14a6b4d086a1ec2cbd8e563a6" kindref="member">linphone_call_params_audio_multicast_enabled</ref>(params))<sp/>{</highlight></codeline>
<codeline lineno="651"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_audio_stream_index].ttl=<ref refid="group__media__parameters_1gaa331b622a5290cc709979110f983da68" kindref="member">linphone_core_get_audio_multicast_ttl</ref>(lc);</highlight></codeline>
<codeline lineno="652"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_audio_stream_index].multicast_role<sp/>=<sp/>SalMulticastSender;</highlight></codeline>
<codeline lineno="653"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="654"><highlight class="normal"></highlight></codeline>
<codeline lineno="655"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;dir<sp/>==<sp/><ref refid="group__call__logs_1ggaa3077de7d4214529094998ce441f61e1a4856091c25d200b11669efdbc6abb4ed" kindref="member">LinphoneCallOutgoing</ref><sp/>&amp;&amp;<sp/><ref refid="group__media__parameters_1ga26410bc18a88fe6a323e6cf5f62050da" kindref="member">linphone_call_params_video_multicast_enabled</ref>(params))<sp/>{</highlight></codeline>
<codeline lineno="656"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_video_stream_index].ttl=<ref refid="group__media__parameters_1gad10b03962bf26864cd4c30d475dd07a7" kindref="member">linphone_core_get_video_multicast_ttl</ref>(lc);</highlight></codeline>
<codeline lineno="657"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_video_stream_index].multicast_role<sp/>=<sp/>SalMulticastSender;</highlight></codeline>
<codeline lineno="658"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="659"><highlight class="normal"></highlight></codeline>
<codeline lineno="660"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>subject=<ref refid="group__call__control_1ga617297088fcae5ca83369ab7abc93e7f" kindref="member">linphone_call_params_get_session_name</ref>(params);</highlight></codeline>
<codeline lineno="661"><highlight class="normal"></highlight></codeline>
<codeline lineno="662"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_adapt_to_network(lc,call-&gt;ping_time,params);</highlight></codeline>
<codeline lineno="663"><highlight class="normal"></highlight></codeline>
<codeline lineno="664"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;dest_proxy)<sp/>{</highlight></codeline>
<codeline lineno="665"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>addr=<ref refid="group__linphone__address_1ga7b33626eea53bbd5cea9e5c4c58826df" kindref="member">linphone_address_clone</ref>(<ref refid="group__proxies_1gaf11990682f68c340e914b2962cf088b1" kindref="member">linphone_proxy_config_get_identity_address</ref>(call-&gt;dest_proxy));</highlight></codeline>
<codeline lineno="666"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="667"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>addr=<ref refid="group__linphone__address_1ga301c9884c0bc8b1050fe790d424e0b49" kindref="member">linphone_address_new</ref>(<ref refid="group__proxies_1ga33972bf5275874d28cf0eb59f1d34d18" kindref="member">linphone_core_get_identity</ref>(lc));</highlight></codeline>
<codeline lineno="668"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="669"><highlight class="normal"></highlight></codeline>
<codeline lineno="670"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;session_id=(old_md<sp/>?<sp/>old_md-&gt;session_id<sp/>:<sp/>(rand()<sp/>&amp;<sp/>0xfff));</highlight></codeline>
<codeline lineno="671"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;session_ver=(old_md<sp/>?<sp/>(old_md-&gt;session_ver+1)<sp/>:<sp/>(rand()<sp/>&amp;<sp/>0xfff));</highlight></codeline>
<codeline lineno="672"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;nb_streams=(call-&gt;biggestdesc<sp/>?<sp/>call-&gt;biggestdesc-&gt;nb_streams<sp/>:<sp/>1);</highlight></codeline>
<codeline lineno="673"><highlight class="normal"></highlight></codeline>
<codeline lineno="674"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*re-check<sp/>local<sp/>ip<sp/>address<sp/>each<sp/>time<sp/>we<sp/>make<sp/>a<sp/>new<sp/>offer,<sp/>because<sp/>it<sp/>may<sp/>change<sp/>in<sp/>case<sp/>of<sp/>network<sp/>reconnection*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="675"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_get_local_ip(call,<sp/>call-&gt;dir<sp/>==<sp/><ref refid="group__call__logs_1ggaa3077de7d4214529094998ce441f61e1a4856091c25d200b11669efdbc6abb4ed" kindref="member">LinphoneCallOutgoing</ref><sp/>?<sp/><sp/>call-&gt;log-&gt;to<sp/>:<sp/>call-&gt;log-&gt;from);</highlight></codeline>
<codeline lineno="676"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strncpy(md-&gt;addr,call-&gt;media_localip,</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(md-&gt;addr));</highlight></codeline>
<codeline lineno="677"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__linphone__address_1ga4fa5a4927c1d2f3a6b7c6824e35a87bf" kindref="member">linphone_address_get_username</ref>(addr))<sp/></highlight><highlight class="comment">/*might<sp/>be<sp/>null<sp/>in<sp/>case<sp/>of<sp/>identity<sp/>without<sp/>userinfo*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="678"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strncpy(md-&gt;username,<ref refid="group__linphone__address_1ga4fa5a4927c1d2f3a6b7c6824e35a87bf" kindref="member">linphone_address_get_username</ref>(addr),</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(md-&gt;username));</highlight></codeline>
<codeline lineno="679"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(subject)<sp/>strncpy(md-&gt;name,subject,</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(md-&gt;name));</highlight></codeline>
<codeline lineno="680"><highlight class="normal"></highlight></codeline>
<codeline lineno="681"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(params-&gt;down_bw)</highlight></codeline>
<codeline lineno="682"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;bandwidth=params-&gt;down_bw;</highlight></codeline>
<codeline lineno="683"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>md-&gt;bandwidth=<ref refid="group__media__parameters_1ga111cddb72d1f515862d10c51e441904b" kindref="member">linphone_core_get_download_bandwidth</ref>(lc);</highlight></codeline>
<codeline lineno="684"><highlight class="normal"></highlight></codeline>
<codeline lineno="685"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(params-&gt;custom_sdp_attributes)</highlight></codeline>
<codeline lineno="686"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;custom_sdp_attributes<sp/>=<sp/>sal_custom_sdp_attribute_clone(params-&gt;custom_sdp_attributes);</highlight></codeline>
<codeline lineno="687"><highlight class="normal"></highlight></codeline>
<codeline lineno="688"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*set<sp/>audio<sp/>capabilities<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="689"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(params-&gt;has_audio)<sp/>{</highlight></codeline>
<codeline lineno="690"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strncpy(md-&gt;streams[call-&gt;main_audio_stream_index].rtp_addr,linphone_call_get_public_ip_for_stream(call,call-&gt;main_audio_stream_index),</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(md-&gt;streams[call-&gt;main_audio_stream_index].rtp_addr));</highlight></codeline>
<codeline lineno="691"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strncpy(md-&gt;streams[call-&gt;main_audio_stream_index].rtcp_addr,linphone_call_get_public_ip_for_stream(call,call-&gt;main_audio_stream_index),</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(md-&gt;streams[call-&gt;main_audio_stream_index].rtcp_addr));</highlight></codeline>
<codeline lineno="692"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strncpy(md-&gt;streams[call-&gt;main_audio_stream_index].name,</highlight><highlight class="stringliteral">&quot;Audio&quot;</highlight><highlight class="normal">,</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(md-&gt;streams[call-&gt;main_audio_stream_index].name)-1);</highlight></codeline>
<codeline lineno="693"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_audio_stream_index].rtp_port=call-&gt;media_ports[call-&gt;main_audio_stream_index].rtp_port;</highlight></codeline>
<codeline lineno="694"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_audio_stream_index].rtcp_port=call-&gt;media_ports[call-&gt;main_audio_stream_index].rtcp_port;</highlight></codeline>
<codeline lineno="695"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_audio_stream_index].proto=get_proto_from_call_params(params);</highlight></codeline>
<codeline lineno="696"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_audio_stream_index].dir=get_audio_dir_from_call_params(params);</highlight></codeline>
<codeline lineno="697"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_audio_stream_index].type=SalAudio;</highlight></codeline>
<codeline lineno="698"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(params-&gt;down_ptime)</highlight></codeline>
<codeline lineno="699"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_audio_stream_index].ptime=params-&gt;down_ptime;</highlight></codeline>
<codeline lineno="700"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="701"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_audio_stream_index].ptime=<ref refid="group__media__parameters_1ga21168e2a82d80c67b6808ba7d11d8c4f" kindref="member">linphone_core_get_download_ptime</ref>(lc);</highlight></codeline>
<codeline lineno="702"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>codec_hints.bandwidth_limit=params-&gt;audio_bw;</highlight></codeline>
<codeline lineno="703"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>codec_hints.max_codecs=-1;</highlight></codeline>
<codeline lineno="704"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>codec_hints.previously_used=old_md<sp/>?<sp/>old_md-&gt;streams[call-&gt;main_audio_stream_index].already_assigned_payloads<sp/>:<sp/>NULL;</highlight></codeline>
<codeline lineno="705"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>l=make_codec_list(lc,<sp/>&amp;codec_hints,<sp/>SalAudio,<sp/>lc-&gt;codecs_conf.audio_codecs);</highlight></codeline>
<codeline lineno="706"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_audio_stream_index].max_rate=get_max_codec_sample_rate(l);</highlight></codeline>
<codeline lineno="707"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_audio_stream_index].payloads=l;</highlight></codeline>
<codeline lineno="708"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;audiostream<sp/>&amp;&amp;<sp/>call-&gt;audiostream-&gt;ms.sessions.rtp_session)<sp/>{</highlight></codeline>
<codeline lineno="709"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>me<sp/>=<sp/><ref refid="group__linphone__address_1gae14a9f3157cc4421e5e5195c9ece2038" kindref="member">linphone_address_as_string_uri_only</ref>(call-&gt;me);</highlight></codeline>
<codeline lineno="710"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_audio_stream_index].rtp_ssrc=rtp_session_get_send_ssrc(call-&gt;audiostream-&gt;ms.sessions.rtp_session);</highlight></codeline>
<codeline lineno="711"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strncpy(md-&gt;streams[call-&gt;main_audio_stream_index].rtcp_cname,me,</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(md-&gt;streams[call-&gt;main_audio_stream_index].rtcp_cname));</highlight></codeline>
<codeline lineno="712"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(me);</highlight></codeline>
<codeline lineno="713"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="714"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="715"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;Cannot<sp/>get<sp/>audio<sp/>local<sp/>ssrc<sp/>for<sp/>call<sp/>[%p]&quot;</highlight><highlight class="normal">,call);</highlight></codeline>
<codeline lineno="716"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;main_audio_stream_index<sp/>&gt;<sp/>max_index)</highlight></codeline>
<codeline lineno="717"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>max_index<sp/>=<sp/>call-&gt;main_audio_stream_index;</highlight></codeline>
<codeline lineno="718"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="719"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Don&apos;t<sp/>put<sp/>audio<sp/>stream<sp/>on<sp/>local<sp/>offer<sp/>for<sp/>call<sp/>[%p]&quot;</highlight><highlight class="normal">,call);</highlight></codeline>
<codeline lineno="720"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_audio_stream_index].dir<sp/>=<sp/>SalStreamInactive;</highlight></codeline>
<codeline lineno="721"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="722"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(params-&gt;custom_sdp_media_attributes[LinphoneStreamTypeAudio])</highlight></codeline>
<codeline lineno="723"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_audio_stream_index].custom_sdp_attributes<sp/>=<sp/>sal_custom_sdp_attribute_clone(params-&gt;custom_sdp_media_attributes[LinphoneStreamTypeAudio]);</highlight></codeline>
<codeline lineno="724"><highlight class="normal"></highlight></codeline>
<codeline lineno="725"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_video_stream_index].proto=md-&gt;streams[call-&gt;main_audio_stream_index].proto;</highlight></codeline>
<codeline lineno="726"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_video_stream_index].dir=get_video_dir_from_call_params(params);</highlight></codeline>
<codeline lineno="727"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_video_stream_index].type=SalVideo;</highlight></codeline>
<codeline lineno="728"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strncpy(md-&gt;streams[call-&gt;main_video_stream_index].name,</highlight><highlight class="stringliteral">&quot;Video&quot;</highlight><highlight class="normal">,</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(md-&gt;streams[call-&gt;main_video_stream_index].name)-1);</highlight></codeline>
<codeline lineno="729"><highlight class="normal"></highlight></codeline>
<codeline lineno="730"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(params-&gt;has_video){</highlight></codeline>
<codeline lineno="731"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strncpy(md-&gt;streams[call-&gt;main_video_stream_index].rtp_addr,linphone_call_get_public_ip_for_stream(call,call-&gt;main_video_stream_index),</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(md-&gt;streams[call-&gt;main_video_stream_index].rtp_addr));</highlight></codeline>
<codeline lineno="732"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strncpy(md-&gt;streams[call-&gt;main_video_stream_index].rtcp_addr,linphone_call_get_public_ip_for_stream(call,call-&gt;main_video_stream_index),</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(md-&gt;streams[call-&gt;main_video_stream_index].rtcp_addr));</highlight></codeline>
<codeline lineno="733"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_video_stream_index].rtp_port=call-&gt;media_ports[call-&gt;main_video_stream_index].rtp_port;</highlight></codeline>
<codeline lineno="734"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_video_stream_index].rtcp_port=call-&gt;media_ports[call-&gt;main_video_stream_index].rtcp_port;</highlight></codeline>
<codeline lineno="735"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>codec_hints.bandwidth_limit=0;</highlight></codeline>
<codeline lineno="736"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>codec_hints.max_codecs=-1;</highlight></codeline>
<codeline lineno="737"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>codec_hints.previously_used=old_md<sp/>?<sp/>old_md-&gt;streams[call-&gt;main_video_stream_index].already_assigned_payloads<sp/>:<sp/>NULL;</highlight></codeline>
<codeline lineno="738"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>l=make_codec_list(lc,<sp/>&amp;codec_hints,<sp/>SalVideo,<sp/>lc-&gt;codecs_conf.video_codecs);</highlight></codeline>
<codeline lineno="739"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_video_stream_index].payloads=l;</highlight></codeline>
<codeline lineno="740"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;videostream<sp/>&amp;&amp;<sp/>call-&gt;videostream-&gt;ms.sessions.rtp_session)<sp/>{</highlight></codeline>
<codeline lineno="741"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>me<sp/>=<sp/><ref refid="group__linphone__address_1gae14a9f3157cc4421e5e5195c9ece2038" kindref="member">linphone_address_as_string_uri_only</ref>(call-&gt;me);</highlight></codeline>
<codeline lineno="742"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_video_stream_index].rtp_ssrc=rtp_session_get_send_ssrc(call-&gt;videostream-&gt;ms.sessions.rtp_session);</highlight></codeline>
<codeline lineno="743"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strncpy(md-&gt;streams[call-&gt;main_video_stream_index].rtcp_cname,me,</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(md-&gt;streams[call-&gt;main_video_stream_index].rtcp_cname));</highlight></codeline>
<codeline lineno="744"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(me);</highlight></codeline>
<codeline lineno="745"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="746"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="747"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;Cannot<sp/>get<sp/>video<sp/>local<sp/>ssrc<sp/>for<sp/>call<sp/>[%p]&quot;</highlight><highlight class="normal">,call);</highlight></codeline>
<codeline lineno="748"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;main_video_stream_index<sp/>&gt;<sp/>max_index)</highlight></codeline>
<codeline lineno="749"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>max_index<sp/>=<sp/>call-&gt;main_video_stream_index;</highlight></codeline>
<codeline lineno="750"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="751"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Don&apos;t<sp/>put<sp/>video<sp/>stream<sp/>on<sp/>local<sp/>offer<sp/>for<sp/>call<sp/>[%p]&quot;</highlight><highlight class="normal">,call);</highlight></codeline>
<codeline lineno="752"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_video_stream_index].dir<sp/>=<sp/>SalStreamInactive;</highlight></codeline>
<codeline lineno="753"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="754"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(params-&gt;custom_sdp_media_attributes[LinphoneStreamTypeVideo])</highlight></codeline>
<codeline lineno="755"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_video_stream_index].custom_sdp_attributes<sp/>=<sp/>sal_custom_sdp_attribute_clone(params-&gt;custom_sdp_media_attributes[LinphoneStreamTypeVideo]);</highlight></codeline>
<codeline lineno="756"><highlight class="normal"></highlight></codeline>
<codeline lineno="757"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_text_stream_index].proto=md-&gt;streams[call-&gt;main_audio_stream_index].proto;</highlight></codeline>
<codeline lineno="758"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_text_stream_index].dir=SalStreamSendRecv;</highlight></codeline>
<codeline lineno="759"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_text_stream_index].type=SalText;</highlight></codeline>
<codeline lineno="760"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strncpy(md-&gt;streams[call-&gt;main_text_stream_index].name,</highlight><highlight class="stringliteral">&quot;Text&quot;</highlight><highlight class="normal">,</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(md-&gt;streams[call-&gt;main_text_stream_index].name)-1);</highlight></codeline>
<codeline lineno="761"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(params-&gt;realtimetext_enabled)<sp/>{</highlight></codeline>
<codeline lineno="762"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strncpy(md-&gt;streams[call-&gt;main_text_stream_index].rtp_addr,linphone_call_get_public_ip_for_stream(call,call-&gt;main_text_stream_index),</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(md-&gt;streams[call-&gt;main_text_stream_index].rtp_addr));</highlight></codeline>
<codeline lineno="763"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strncpy(md-&gt;streams[call-&gt;main_text_stream_index].rtcp_addr,linphone_call_get_public_ip_for_stream(call,call-&gt;main_text_stream_index),</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(md-&gt;streams[call-&gt;main_text_stream_index].rtcp_addr));</highlight></codeline>
<codeline lineno="764"><highlight class="normal"></highlight></codeline>
<codeline lineno="765"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_text_stream_index].rtp_port=call-&gt;media_ports[call-&gt;main_text_stream_index].rtp_port;</highlight></codeline>
<codeline lineno="766"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_text_stream_index].rtcp_port=call-&gt;media_ports[call-&gt;main_text_stream_index].rtcp_port;</highlight></codeline>
<codeline lineno="767"><highlight class="normal"></highlight></codeline>
<codeline lineno="768"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>codec_hints.bandwidth_limit=0;</highlight></codeline>
<codeline lineno="769"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>codec_hints.max_codecs=-1;</highlight></codeline>
<codeline lineno="770"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>codec_hints.previously_used=old_md<sp/>?<sp/>old_md-&gt;streams[call-&gt;main_text_stream_index].already_assigned_payloads<sp/>:<sp/>NULL;</highlight></codeline>
<codeline lineno="771"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>l=make_codec_list(lc,<sp/>&amp;codec_hints,<sp/>SalText,<sp/>lc-&gt;codecs_conf.text_codecs);</highlight></codeline>
<codeline lineno="772"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_text_stream_index].payloads=l;</highlight></codeline>
<codeline lineno="773"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;textstream<sp/>&amp;&amp;<sp/>call-&gt;textstream-&gt;ms.sessions.rtp_session)<sp/>{</highlight></codeline>
<codeline lineno="774"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>me<sp/>=<sp/><ref refid="group__linphone__address_1gae14a9f3157cc4421e5e5195c9ece2038" kindref="member">linphone_address_as_string_uri_only</ref>(call-&gt;me);</highlight></codeline>
<codeline lineno="775"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_text_stream_index].rtp_ssrc=rtp_session_get_send_ssrc(call-&gt;textstream-&gt;ms.sessions.rtp_session);</highlight></codeline>
<codeline lineno="776"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strncpy(md-&gt;streams[call-&gt;main_text_stream_index].rtcp_cname,me,</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(md-&gt;streams[call-&gt;main_text_stream_index].rtcp_cname));</highlight></codeline>
<codeline lineno="777"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(me);</highlight></codeline>
<codeline lineno="778"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="779"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="780"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;Cannot<sp/>get<sp/>text<sp/>local<sp/>ssrc<sp/>for<sp/>call<sp/>[%p]&quot;</highlight><highlight class="normal">,call);</highlight></codeline>
<codeline lineno="781"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;main_text_stream_index<sp/>&gt;<sp/>max_index)</highlight></codeline>
<codeline lineno="782"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>max_index<sp/>=<sp/>call-&gt;main_text_stream_index;</highlight></codeline>
<codeline lineno="783"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="784"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Don&apos;t<sp/>put<sp/>text<sp/>stream<sp/>on<sp/>local<sp/>offer<sp/>for<sp/>call<sp/>[%p]&quot;</highlight><highlight class="normal">,call);</highlight></codeline>
<codeline lineno="785"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_text_stream_index].dir<sp/>=<sp/>SalStreamInactive;</highlight></codeline>
<codeline lineno="786"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="787"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(params-&gt;custom_sdp_media_attributes[LinphoneStreamTypeText])</highlight></codeline>
<codeline lineno="788"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[call-&gt;main_text_stream_index].custom_sdp_attributes<sp/>=<sp/>sal_custom_sdp_attribute_clone(params-&gt;custom_sdp_media_attributes[LinphoneStreamTypeText]);</highlight></codeline>
<codeline lineno="789"><highlight class="normal"></highlight></codeline>
<codeline lineno="790"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;nb_streams<sp/>=<sp/>MAX(md-&gt;nb_streams,max_index+1);</highlight></codeline>
<codeline lineno="791"><highlight class="normal"></highlight></codeline>
<codeline lineno="792"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Deactivate<sp/>unused<sp/>streams.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="793"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>md-&gt;nb_streams;<sp/>i<sp/>&lt;<sp/>SAL_MEDIA_DESCRIPTION_MAX_STREAMS;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="794"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(md-&gt;streams[i].rtp_port<sp/>==<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="795"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[i].dir<sp/>=<sp/>SalStreamInactive;</highlight></codeline>
<codeline lineno="796"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;biggestdesc<sp/>&amp;&amp;<sp/>i<sp/>&lt;<sp/>call-&gt;biggestdesc-&gt;nb_streams)<sp/>{</highlight></codeline>
<codeline lineno="797"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[i].proto<sp/>=<sp/>call-&gt;biggestdesc-&gt;streams[i].proto;</highlight></codeline>
<codeline lineno="798"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[i].type<sp/>=<sp/>call-&gt;biggestdesc-&gt;streams[i].type;</highlight></codeline>
<codeline lineno="799"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="800"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="801"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="802"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>setup_encryption_keys(call,md);</highlight></codeline>
<codeline lineno="803"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>setup_dtls_keys(call,md);</highlight></codeline>
<codeline lineno="804"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>setup_rtcp_fb(call,<sp/>md);</highlight></codeline>
<codeline lineno="805"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>setup_rtcp_xr(call,<sp/>md);</highlight></codeline>
<codeline lineno="806"><highlight class="normal"></highlight></codeline>
<codeline lineno="807"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>update_media_description_from_stun(md,<sp/>&amp;call-&gt;ac,<sp/>&amp;call-&gt;vc,<sp/>&amp;call-&gt;tc);</highlight></codeline>
<codeline lineno="808"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;localdesc=md;</highlight></codeline>
<codeline lineno="809"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_update_local_media_description_from_ice_or_upnp(call);</highlight></codeline>
<codeline lineno="810"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__linphone__address_1ga5777f2976c71a48cf2b3f03c61818f13" kindref="member">linphone_address_destroy</ref>(addr);</highlight></codeline>
<codeline lineno="811"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(old_md){</highlight></codeline>
<codeline lineno="812"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>transfer_already_assigned_payload_types(old_md,md);</highlight></codeline>
<codeline lineno="813"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;localdesc_changed=sal_media_description_equals(md,old_md);</highlight></codeline>
<codeline lineno="814"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sal_media_description_unref(old_md);</highlight></codeline>
<codeline lineno="815"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="816"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>force_streams_dir_according_to_state(call,<sp/>md);</highlight></codeline>
<codeline lineno="817"><highlight class="normal">}</highlight></codeline>
<codeline lineno="818"><highlight class="normal"></highlight></codeline>
<codeline lineno="819"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>find_port_offset(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>stream_index,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>base_port){</highlight></codeline>
<codeline lineno="820"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>offset;</highlight></codeline>
<codeline lineno="821"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSList<sp/>*elem;</highlight></codeline>
<codeline lineno="822"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>tried_port;</highlight></codeline>
<codeline lineno="823"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>existing_port;</highlight></codeline>
<codeline lineno="824"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>already_used=FALSE;</highlight></codeline>
<codeline lineno="825"><highlight class="normal"></highlight></codeline>
<codeline lineno="826"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(offset=0;offset&lt;100;offset+=2){</highlight></codeline>
<codeline lineno="827"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tried_port=base_port+offset;</highlight></codeline>
<codeline lineno="828"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>already_used=FALSE;</highlight></codeline>
<codeline lineno="829"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(elem=lc-&gt;calls;elem!=NULL;elem=elem-&gt;next){</highlight></codeline>
<codeline lineno="830"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call=(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref>*)elem-&gt;data;</highlight></codeline>
<codeline lineno="831"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>existing_port=call-&gt;media_ports[stream_index].rtp_port;</highlight></codeline>
<codeline lineno="832"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>(existing_port==tried_port)<sp/>{</highlight></codeline>
<codeline lineno="833"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>already_used=TRUE;</highlight></codeline>
<codeline lineno="834"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="835"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="836"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="837"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!already_used)<sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="838"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="839"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(offset==100){</highlight></codeline>
<codeline lineno="840"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_error(</highlight><highlight class="stringliteral">&quot;Could<sp/>not<sp/>find<sp/>any<sp/>free<sp/>port<sp/>!&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="841"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1;</highlight></codeline>
<codeline lineno="842"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="843"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>offset;</highlight></codeline>
<codeline lineno="844"><highlight class="normal">}</highlight></codeline>
<codeline lineno="845"><highlight class="normal"></highlight></codeline>
<codeline lineno="846"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>select_random_port(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>stream_index,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>min_port,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>max_port)<sp/>{</highlight></codeline>
<codeline lineno="847"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSList<sp/>*elem;</highlight></codeline>
<codeline lineno="848"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nb_tries;</highlight></codeline>
<codeline lineno="849"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>tried_port<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="850"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>existing_port<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="851"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>already_used<sp/>=<sp/>FALSE;</highlight></codeline>
<codeline lineno="852"><highlight class="normal"></highlight></codeline>
<codeline lineno="853"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tried_port<sp/>=<sp/>(ortp_random()<sp/>%<sp/>(max_port<sp/>-<sp/>min_port)<sp/>+<sp/>min_port)<sp/>&amp;<sp/>~0x1;</highlight></codeline>
<codeline lineno="854"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tried_port<sp/>&lt;<sp/>min_port)<sp/>tried_port<sp/>=<sp/>min_port<sp/>+<sp/>2;</highlight></codeline>
<codeline lineno="855"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(nb_tries<sp/>=<sp/>0;<sp/>nb_tries<sp/>&lt;<sp/>100;<sp/>nb_tries++)<sp/>{</highlight></codeline>
<codeline lineno="856"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(elem<sp/>=<sp/>lc-&gt;calls;<sp/>elem<sp/>!=<sp/>NULL;<sp/>elem<sp/>=<sp/>elem-&gt;next)<sp/>{</highlight></codeline>
<codeline lineno="857"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call<sp/>=<sp/>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*)elem-&gt;data;</highlight></codeline>
<codeline lineno="858"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>existing_port=call-&gt;media_ports[stream_index].rtp_port;</highlight></codeline>
<codeline lineno="859"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>(existing_port<sp/>==<sp/>tried_port)<sp/>{</highlight></codeline>
<codeline lineno="860"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>already_used<sp/>=<sp/>TRUE;</highlight></codeline>
<codeline lineno="861"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="862"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="863"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="864"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!already_used)<sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="865"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="866"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(nb_tries<sp/>==<sp/>100)<sp/>{</highlight></codeline>
<codeline lineno="867"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_error(</highlight><highlight class="stringliteral">&quot;Could<sp/>not<sp/>find<sp/>any<sp/>free<sp/>port!&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="868"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1;</highlight></codeline>
<codeline lineno="869"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="870"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>tried_port;</highlight></codeline>
<codeline lineno="871"><highlight class="normal">}</highlight></codeline>
<codeline lineno="872"><highlight class="normal"></highlight></codeline>
<codeline lineno="873"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>port_config_set_random(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>stream_index){</highlight></codeline>
<codeline lineno="874"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;media_ports[stream_index].rtp_port=-1;</highlight></codeline>
<codeline lineno="875"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;media_ports[stream_index].rtcp_port=-1;</highlight></codeline>
<codeline lineno="876"><highlight class="normal">}</highlight></codeline>
<codeline lineno="877"><highlight class="normal"></highlight></codeline>
<codeline lineno="878"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>port_config_set(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>stream_index,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>min_port,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>max_port){</highlight></codeline>
<codeline lineno="879"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>port_offset;</highlight></codeline>
<codeline lineno="880"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(min_port&gt;0<sp/>&amp;&amp;<sp/>max_port&gt;0){</highlight></codeline>
<codeline lineno="881"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(min_port<sp/>==<sp/>max_port)<sp/>{</highlight></codeline>
<codeline lineno="882"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Used<sp/>fixed<sp/>RTP<sp/>audio<sp/>port.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="883"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>port_offset=find_port_offset(call-&gt;core,<sp/>stream_index,<sp/>min_port);</highlight></codeline>
<codeline lineno="884"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(port_offset==-1)<sp/>{</highlight></codeline>
<codeline lineno="885"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>port_config_set_random(call,<sp/>stream_index);</highlight></codeline>
<codeline lineno="886"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="887"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="888"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;media_ports[stream_index].rtp_port=min_port+port_offset;</highlight></codeline>
<codeline lineno="889"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="890"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Select<sp/>random<sp/>RTP<sp/>audio<sp/>port<sp/>in<sp/>the<sp/>specified<sp/>range.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="891"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;media_ports[stream_index].rtp_port<sp/>=<sp/>select_random_port(call-&gt;core,<sp/>stream_index,<sp/>min_port,<sp/>max_port);</highlight></codeline>
<codeline lineno="892"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="893"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;media_ports[stream_index].rtcp_port=call-&gt;media_ports[stream_index].rtp_port+1;</highlight></codeline>
<codeline lineno="894"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>port_config_set_random(call,stream_index);</highlight></codeline>
<codeline lineno="895"><highlight class="normal">}</highlight></codeline>
<codeline lineno="896"><highlight class="normal"></highlight></codeline>
<codeline lineno="897"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_init_common(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref><sp/>*from,<sp/><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref><sp/>*to){</highlight></codeline>
<codeline lineno="898"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>min_port,<sp/>max_port;</highlight></codeline>
<codeline lineno="899"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;New<sp/>LinphoneCall<sp/>[%p]<sp/>initialized<sp/>(LinphoneCore<sp/>version:<sp/>%s)&quot;</highlight><highlight class="normal">,call,<ref refid="group__misc_1ga553b61ad32d7455ce69102025d383f90" kindref="member">linphone_core_get_version</ref>());</highlight></codeline>
<codeline lineno="900"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;main_audio_stream_index<sp/>=<sp/>LINPHONE_CALL_STATS_AUDIO;</highlight></codeline>
<codeline lineno="901"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;main_video_stream_index<sp/>=<sp/>LINPHONE_CALL_STATS_VIDEO;</highlight></codeline>
<codeline lineno="902"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;main_text_stream_index<sp/>=<sp/>LINPHONE_CALL_STATS_TEXT;</highlight></codeline>
<codeline lineno="903"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;state=<ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa0148699614584db8dbbd7f2af177af39" kindref="member">LinphoneCallIdle</ref>;</highlight></codeline>
<codeline lineno="904"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;transfer_state<sp/>=<sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa0148699614584db8dbbd7f2af177af39" kindref="member">LinphoneCallIdle</ref>;</highlight></codeline>
<codeline lineno="905"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;log=linphone_call_log_new(call-&gt;dir,<sp/>from,<sp/>to);</highlight></codeline>
<codeline lineno="906"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;camera_enabled=TRUE;</highlight></codeline>
<codeline lineno="907"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params<sp/>=<sp/>linphone_call_params_new();</highlight></codeline>
<codeline lineno="908"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;media_encryption=<ref refid="group__media__parameters_1ggac01228dce297dfe24304be6a1d2cfa0baa30caf910eb4b60f6f5e02156f5bf451" kindref="member">LinphoneMediaEncryptionNone</ref>;</highlight></codeline>
<codeline lineno="909"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;dtls_certificate_fingerprint<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="910"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;dir<sp/>==<sp/><ref refid="group__call__logs_1ggaa3077de7d4214529094998ce441f61e1aa4030176bbddea10e361ce320946e202" kindref="member">LinphoneCallIncoming</ref>)</highlight></codeline>
<codeline lineno="911"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;me=to;</highlight></codeline>
<codeline lineno="912"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="913"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;me=from;</highlight></codeline>
<codeline lineno="914"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__linphone__address_1ga5441e1566c08892abf8ca1f1d7cfbe6d" kindref="member">linphone_address_ref</ref>(call-&gt;me);</highlight></codeline>
<codeline lineno="915"><highlight class="normal"></highlight></codeline>
<codeline lineno="916"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__network__parameters_1ga1c90a61621a177ef26319ffbee2e3b6b" kindref="member">linphone_core_get_audio_port_range</ref>(call-&gt;core,<sp/>&amp;min_port,<sp/>&amp;max_port);</highlight></codeline>
<codeline lineno="917"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>port_config_set(call,call-&gt;main_audio_stream_index,min_port,max_port);</highlight></codeline>
<codeline lineno="918"><highlight class="normal"></highlight></codeline>
<codeline lineno="919"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__network__parameters_1ga6d802f4c671e6a4c3b39798246c23aa1" kindref="member">linphone_core_get_video_port_range</ref>(call-&gt;core,<sp/>&amp;min_port,<sp/>&amp;max_port);</highlight></codeline>
<codeline lineno="920"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>port_config_set(call,call-&gt;main_video_stream_index,min_port,max_port);</highlight></codeline>
<codeline lineno="921"><highlight class="normal"></highlight></codeline>
<codeline lineno="922"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__network__parameters_1ga4bec9283f4f7020fdc3525b19c4fb5ff" kindref="member">linphone_core_get_text_port_range</ref>(call-&gt;core,<sp/>&amp;min_port,<sp/>&amp;max_port);</highlight></codeline>
<codeline lineno="923"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>port_config_set(call,call-&gt;main_text_stream_index,min_port,max_port);</highlight></codeline>
<codeline lineno="924"><highlight class="normal"></highlight></codeline>
<codeline lineno="925"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_init_stats(&amp;call-&gt;stats[LINPHONE_CALL_STATS_AUDIO],<sp/>LINPHONE_CALL_STATS_AUDIO);</highlight></codeline>
<codeline lineno="926"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_init_stats(&amp;call-&gt;stats[LINPHONE_CALL_STATS_VIDEO],<sp/>LINPHONE_CALL_STATS_VIDEO);</highlight></codeline>
<codeline lineno="927"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_init_stats(&amp;call-&gt;stats[LINPHONE_CALL_STATS_TEXT],<sp/>LINPHONE_CALL_STATS_TEXT);</highlight></codeline>
<codeline lineno="928"><highlight class="normal">}</highlight></codeline>
<codeline lineno="929"><highlight class="normal"></highlight></codeline>
<codeline lineno="930"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_init_stats(<ref refid="struct__LinphoneCallStats" kindref="compound">LinphoneCallStats</ref><sp/>*stats,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>type)<sp/>{</highlight></codeline>
<codeline lineno="931"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stats-&gt;<ref refid="struct__LinphoneCallStats_1af5fbd8dd6f793147e526b105c29d0ee5" kindref="member">type</ref><sp/>=<sp/>type;</highlight></codeline>
<codeline lineno="932"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stats-&gt;<ref refid="struct__LinphoneCallStats_1ae348f8e725ff57e8b43e1e48a7b9ad15" kindref="member">received_rtcp</ref><sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="933"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stats-&gt;<ref refid="struct__LinphoneCallStats_1a6c4670ac143ef768db848ea7828b0f59" kindref="member">sent_rtcp</ref><sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="934"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stats-&gt;<ref refid="struct__LinphoneCallStats_1a9986d647f13d56c2d752ae5f78f28428" kindref="member">ice_state</ref><sp/>=<sp/><ref refid="group__initializing_1gga60b6529245618e6ec7b19670fe7bc71da0d7fd71eae1589116f0c62fb2501f126" kindref="member">LinphoneIceStateNotActivated</ref>;</highlight></codeline>
<codeline lineno="935"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>BUILD_UPNP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="936"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stats-&gt;<ref refid="struct__LinphoneCallStats_1a6f78c4d4bb974ecd0a12acab3891fcec" kindref="member">upnp_state</ref><sp/>=<sp/><ref refid="group__initializing_1gga3d626fbc6cee8294fef83d197fa27490ac0c60c390f5cd5a27a538aea39def28b" kindref="member">LinphoneUpnpStateIdle</ref>;</highlight></codeline>
<codeline lineno="937"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="938"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stats-&gt;<ref refid="struct__LinphoneCallStats_1a6f78c4d4bb974ecd0a12acab3891fcec" kindref="member">upnp_state</ref><sp/>=<sp/><ref refid="group__initializing_1gga3d626fbc6cee8294fef83d197fa27490a25fee6e8fd79a2368aa46daf77a6bff9" kindref="member">LinphoneUpnpStateNotAvailable</ref>;</highlight></codeline>
<codeline lineno="939"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/>//BUILD_UPNP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="940"><highlight class="normal">}</highlight></codeline>
<codeline lineno="941"><highlight class="normal"></highlight></codeline>
<codeline lineno="942"><highlight class="normal"></highlight></codeline>
<codeline lineno="943"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>discover_mtu(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*remote){</highlight></codeline>
<codeline lineno="944"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>mtu;</highlight></codeline>
<codeline lineno="945"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lc-&gt;net_conf.mtu==0<sp/>){</highlight></codeline>
<codeline lineno="946"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*attempt<sp/>to<sp/>discover<sp/>mtu*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="947"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mtu=ms_discover_mtu(remote);</highlight></codeline>
<codeline lineno="948"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(mtu&gt;0){</highlight></codeline>
<codeline lineno="949"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_set_mtu(mtu);</highlight></codeline>
<codeline lineno="950"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Discovered<sp/>mtu<sp/>is<sp/>%i,<sp/>RTP<sp/>payload<sp/>max<sp/>size<sp/>is<sp/>%i&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="951"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mtu,<sp/>ms_get_payload_max_size());</highlight></codeline>
<codeline lineno="952"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="953"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="954"><highlight class="normal">}</highlight></codeline>
<codeline lineno="955"><highlight class="normal"></highlight></codeline>
<codeline lineno="956"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_create_op(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="957"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;op)<sp/>sal_op_release(call-&gt;op);</highlight></codeline>
<codeline lineno="958"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;op=sal_op_new(call-&gt;core-&gt;sal);</highlight></codeline>
<codeline lineno="959"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sal_op_set_user_pointer(call-&gt;op,call);</highlight></codeline>
<codeline lineno="960"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;params-&gt;referer)</highlight></codeline>
<codeline lineno="961"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sal_call_set_referer(call-&gt;op,call-&gt;params-&gt;referer-&gt;op);</highlight></codeline>
<codeline lineno="962"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_configure_op(call-&gt;core,call-&gt;op,call-&gt;log-&gt;to,call-&gt;params-&gt;custom_headers,FALSE);</highlight></codeline>
<codeline lineno="963"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;params-&gt;privacy<sp/>!=<sp/><ref refid="group__call__control_1gga99bd271365a2a47d5e804abec3de8aeba90eb4ddfe04dd831034d9435e9c11658" kindref="member">LinphonePrivacyDefault</ref>)</highlight></codeline>
<codeline lineno="964"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sal_op_set_privacy(call-&gt;op,(SalPrivacyMask)call-&gt;params-&gt;privacy);</highlight></codeline>
<codeline lineno="965"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*else<sp/>privacy<sp/>might<sp/>be<sp/>set<sp/>by<sp/>proxy<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="966"><highlight class="normal">}</highlight></codeline>
<codeline lineno="967"><highlight class="normal"></highlight></codeline>
<codeline lineno="968"><highlight class="normal"></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="969"><highlight class="comment"><sp/>*<sp/>Choose<sp/>IP<sp/>version<sp/>we<sp/>are<sp/>going<sp/>to<sp/>use<sp/>for<sp/>RTP<sp/>socket.</highlight></codeline>
<codeline lineno="970"><highlight class="comment"><sp/>*<sp/>The<sp/>algorithm<sp/>is<sp/>as<sp/>follows:</highlight></codeline>
<codeline lineno="971"><highlight class="comment"><sp/>*<sp/>-<sp/>if<sp/>ipv6<sp/>is<sp/>disabled<sp/>at<sp/>the<sp/>core<sp/>level,<sp/>it<sp/>is<sp/>always<sp/>AF_INET</highlight></codeline>
<codeline lineno="972"><highlight class="comment"><sp/>*<sp/>-<sp/>Otherwise,<sp/>if<sp/>the<sp/>destination<sp/>address<sp/>for<sp/>the<sp/>call<sp/>is<sp/>an<sp/>IPv6<sp/>address,<sp/>use<sp/>IPv6.</highlight></codeline>
<codeline lineno="973"><highlight class="comment"><sp/>*<sp/>-<sp/>Otherwise,<sp/>if<sp/>the<sp/>call<sp/>is<sp/>done<sp/>through<sp/>a<sp/>known<sp/>proxy<sp/>config,<sp/>then<sp/>use<sp/>the<sp/>information<sp/>obtained<sp/>during<sp/>REGISTER</highlight></codeline>
<codeline lineno="974"><highlight class="comment"><sp/>*<sp/>to<sp/>know<sp/>if<sp/>IPv6<sp/>is<sp/>supported<sp/>by<sp/>the<sp/>server.</highlight></codeline>
<codeline lineno="975"><highlight class="comment">**/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="976"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_outgoing_select_ip_version(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref><sp/>*to,<sp/><ref refid="group__proxies_1ga1879a0d59e068457b688138da97f2d0b" kindref="member">LinphoneProxyConfig</ref><sp/>*cfg){</highlight></codeline>
<codeline lineno="977"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__network__parameters_1ga91804b8cf92f310c0d4cc8a4259ba917" kindref="member">linphone_core_ipv6_enabled</ref>(call-&gt;core)){</highlight></codeline>
<codeline lineno="978"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;af=AF_INET;</highlight></codeline>
<codeline lineno="979"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sal_address_is_ipv6((SalAddress*)to)){</highlight></codeline>
<codeline lineno="980"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;af=AF_INET6;</highlight></codeline>
<codeline lineno="981"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(cfg<sp/>&amp;&amp;<sp/>cfg-&gt;op){</highlight></codeline>
<codeline lineno="982"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;af=sal_op_is_ipv6(cfg-&gt;op)<sp/>?<sp/>AF_INET6<sp/>:<sp/>AF_INET;</highlight></codeline>
<codeline lineno="983"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="984"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>call-&gt;af=AF_INET;</highlight></codeline>
<codeline lineno="985"><highlight class="normal">}</highlight></codeline>
<codeline lineno="986"><highlight class="normal"></highlight></codeline>
<codeline lineno="990"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_get_local_ip(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref><sp/>*remote_addr){</highlight></codeline>
<codeline lineno="991"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*ip;</highlight></codeline>
<codeline lineno="992"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>af<sp/>=<sp/>call-&gt;af;</highlight></codeline>
<codeline lineno="993"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*dest<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="994"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;dest_proxy<sp/>==<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="995"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">addrinfo<sp/>hints;</highlight></codeline>
<codeline lineno="996"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">addrinfo<sp/>*res<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="997"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>err;</highlight></codeline>
<codeline lineno="998"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*domain<sp/>=<sp/><ref refid="group__linphone__address_1ga95a356f26c67ed4ee88db878b617c65f" kindref="member">linphone_address_get_domain</ref>(remote_addr);</highlight></codeline>
<codeline lineno="999"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>memset(&amp;hints,<sp/>0,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(hints));</highlight></codeline>
<codeline lineno="1000"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>hints.ai_family<sp/>=<sp/>AF_UNSPEC;</highlight></codeline>
<codeline lineno="1001"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>hints.ai_socktype<sp/>=<sp/>SOCK_DGRAM;</highlight></codeline>
<codeline lineno="1002"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>hints.ai_flags<sp/>=<sp/>AI_NUMERICHOST;</highlight></codeline>
<codeline lineno="1003"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>err<sp/>=<sp/>getaddrinfo(domain,<sp/>NULL,<sp/>&amp;hints,<sp/>&amp;res);</highlight></codeline>
<codeline lineno="1004"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(err<sp/>==<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="1005"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dest<sp/>=<sp/>domain;</highlight></codeline>
<codeline lineno="1006"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1007"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(res<sp/>!=<sp/>NULL)<sp/>freeaddrinfo(res);</highlight></codeline>
<codeline lineno="1008"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1009"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__network__parameters_1ga9de28ff0fd0f8ff65ef82eba9592276c" kindref="member">linphone_core_get_firewall_policy</ref>(call-&gt;core)==<ref refid="group__network__parameters_1ggadad0a1c27596017d9d9b3c30ef47f5bea823554c78cb93f674464e332af988fe1" kindref="member">LinphonePolicyUseNatAddress</ref></highlight></codeline>
<codeline lineno="1010"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>&amp;&amp;<sp/>(ip=linphone_core_get_nat_address_resolved(call-&gt;core))!=NULL){</highlight></codeline>
<codeline lineno="1011"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strncpy(call-&gt;media_localip,ip,LINPHONE_IPADDR_SIZE);</highlight></codeline>
<codeline lineno="1012"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1013"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1014"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>BUILD_UPNP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1015"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;core-&gt;upnp<sp/>!=<sp/>NULL<sp/>&amp;&amp;<sp/><ref refid="group__network__parameters_1ga9de28ff0fd0f8ff65ef82eba9592276c" kindref="member">linphone_core_get_firewall_policy</ref>(call-&gt;core)==<ref refid="group__network__parameters_1ggadad0a1c27596017d9d9b3c30ef47f5beab254b7940dee8816026d50fb29ecaae8" kindref="member">LinphonePolicyUseUpnp</ref><sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="1016"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_upnp_context_get_state(call-&gt;core-&gt;upnp)<sp/>==<sp/><ref refid="group__initializing_1gga3d626fbc6cee8294fef83d197fa27490a69b1709a2087dcf1089d1204ed25a09a" kindref="member">LinphoneUpnpStateOk</ref>)<sp/>{</highlight></codeline>
<codeline lineno="1017"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ip<sp/>=<sp/>linphone_upnp_context_get_external_ipaddress(call-&gt;core-&gt;upnp);</highlight></codeline>
<codeline lineno="1018"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strncpy(call-&gt;media_localip,ip,LINPHONE_IPADDR_SIZE);</highlight></codeline>
<codeline lineno="1019"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1020"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1021"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/>//BUILD_UPNP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1022"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*first<sp/>nominal<sp/>use<sp/>case*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1023"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_get_local_ip(call-&gt;core,<sp/>af,<sp/>dest,<sp/>call-&gt;media_localip);</highlight></codeline>
<codeline lineno="1024"><highlight class="normal"></highlight></codeline>
<codeline lineno="1025"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*next,<sp/>sometime,<sp/>override<sp/>from<sp/>config*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1026"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((ip=<ref refid="group__misc_1ga9657ebf1d68b43184a796c9bdc68c29a" kindref="member">lp_config_get_string</ref>(call-&gt;core-&gt;config,</highlight><highlight class="stringliteral">&quot;rtp&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;bind_address&quot;</highlight><highlight class="normal">,NULL)))</highlight></codeline>
<codeline lineno="1027"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strncpy(call-&gt;media_localip,ip,LINPHONE_IPADDR_SIZE);</highlight></codeline>
<codeline lineno="1028"><highlight class="normal"></highlight></codeline>
<codeline lineno="1029"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1030"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1031"><highlight class="normal"></highlight></codeline>
<codeline lineno="1032"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_destroy(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*obj);</highlight></codeline>
<codeline lineno="1033"><highlight class="normal"></highlight></codeline>
<codeline lineno="1034"><highlight class="normal">BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref>);</highlight></codeline>
<codeline lineno="1035"><highlight class="normal"></highlight></codeline>
<codeline lineno="1036"><highlight class="normal">BELLE_SIP_INSTANCIATE_VPTR(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref>,<sp/>belle_sip_object_t,</highlight></codeline>
<codeline lineno="1037"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(belle_sip_object_destroy_t)linphone_call_destroy,</highlight></codeline>
<codeline lineno="1038"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>NULL,<sp/></highlight><highlight class="comment">//<sp/>clone</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1039"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>NULL,<sp/></highlight><highlight class="comment">//<sp/>marshal</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1040"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>FALSE</highlight></codeline>
<codeline lineno="1041"><highlight class="normal">);</highlight></codeline>
<codeline lineno="1042"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_fill_media_multicast_addr(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="1043"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__media__parameters_1ga074d17f14a6b4d086a1ec2cbd8e563a6" kindref="member">linphone_call_params_audio_multicast_enabled</ref>(call-&gt;params)){</highlight></codeline>
<codeline lineno="1044"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strncpy(call-&gt;media_ports[call-&gt;main_audio_stream_index].multicast_ip,</highlight></codeline>
<codeline lineno="1045"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__media__parameters_1ga0595f6b89f01f462e8a9c4537a27c320" kindref="member">linphone_core_get_audio_multicast_addr</ref>(call-&gt;core),<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(call-&gt;media_ports[call-&gt;main_audio_stream_index].multicast_ip));</highlight></codeline>
<codeline lineno="1046"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1047"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;media_ports[call-&gt;main_audio_stream_index].multicast_ip[0]=</highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1048"><highlight class="normal"></highlight></codeline>
<codeline lineno="1049"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__media__parameters_1ga26410bc18a88fe6a323e6cf5f62050da" kindref="member">linphone_call_params_video_multicast_enabled</ref>(call-&gt;params)){</highlight></codeline>
<codeline lineno="1050"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strncpy(call-&gt;media_ports[call-&gt;main_video_stream_index].multicast_ip,</highlight></codeline>
<codeline lineno="1051"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__media__parameters_1gaf3edab80f222a53c636cb3da27182712" kindref="member">linphone_core_get_video_multicast_addr</ref>(call-&gt;core),<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(call-&gt;media_ports[call-&gt;main_video_stream_index].multicast_ip));</highlight></codeline>
<codeline lineno="1052"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1053"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;media_ports[call-&gt;main_video_stream_index].multicast_ip[0]=</highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1054"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1055"><highlight class="normal"></highlight></codeline>
<codeline lineno="1056"><highlight class="normal"><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*<sp/>linphone_call_new_outgoing(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>_LinphoneCore<sp/>*lc,<sp/><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref><sp/>*from,<sp/><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref><sp/>*to,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gaa91f7e76e8f038ae9acdf42d1bc80a22" kindref="member">LinphoneCallParams</ref><sp/>*params,<sp/><ref refid="group__proxies_1ga1879a0d59e068457b688138da97f2d0b" kindref="member">LinphoneProxyConfig</ref><sp/>*cfg){</highlight></codeline>
<codeline lineno="1057"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call<sp/>=<sp/>belle_sip_object_new(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref>);</highlight></codeline>
<codeline lineno="1058"><highlight class="normal"></highlight></codeline>
<codeline lineno="1059"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;dir=<ref refid="group__call__logs_1ggaa3077de7d4214529094998ce441f61e1a4856091c25d200b11669efdbc6abb4ed" kindref="member">LinphoneCallOutgoing</ref>;</highlight></codeline>
<codeline lineno="1060"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;core=lc;</highlight></codeline>
<codeline lineno="1061"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_outgoing_select_ip_version(call,to,cfg);</highlight></codeline>
<codeline lineno="1062"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_get_local_ip(call,<sp/>to);</highlight></codeline>
<codeline lineno="1063"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;params<sp/>=<sp/><ref refid="group__call__control_1gaaff626b40ba1834c7912aef9fc441544" kindref="member">linphone_call_params_copy</ref>(params);</highlight></codeline>
<codeline lineno="1064"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_init_common(call,<sp/>from,<sp/>to);</highlight></codeline>
<codeline lineno="1065"><highlight class="normal"></highlight></codeline>
<codeline lineno="1066"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_fill_media_multicast_addr(call);</highlight></codeline>
<codeline lineno="1067"><highlight class="normal"></highlight></codeline>
<codeline lineno="1068"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__network__parameters_1ga9de28ff0fd0f8ff65ef82eba9592276c" kindref="member">linphone_core_get_firewall_policy</ref>(call-&gt;core)<sp/>==<sp/><ref refid="group__network__parameters_1ggadad0a1c27596017d9d9b3c30ef47f5beaeadfb66b915acd91af98e4d5cd47b17b" kindref="member">LinphonePolicyUseIce</ref>)<sp/>{</highlight></codeline>
<codeline lineno="1069"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;ice_session<sp/>=<sp/>ice_session_new();</highlight></codeline>
<codeline lineno="1070"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*for<sp/>backward<sp/>compatibility<sp/>purposes,<sp/>shall<sp/>be<sp/>enabled<sp/>by<sp/>default<sp/>in<sp/>futur*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1071"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ice_session_enable_message_integrity_check(call-&gt;ice_session,<ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,</highlight><highlight class="stringliteral">&quot;net&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;ice_session_enable_message_integrity_check&quot;</highlight><highlight class="normal">,0));</highlight></codeline>
<codeline lineno="1072"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ice_session_set_role(call-&gt;ice_session,<sp/>IR_Controlling);</highlight></codeline>
<codeline lineno="1073"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1074"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__network__parameters_1ga9de28ff0fd0f8ff65ef82eba9592276c" kindref="member">linphone_core_get_firewall_policy</ref>(call-&gt;core)<sp/>==<sp/><ref refid="group__network__parameters_1ggadad0a1c27596017d9d9b3c30ef47f5bea38001ab78a3d1071e153e49c741b2d9d" kindref="member">LinphonePolicyUseStun</ref>)<sp/>{</highlight></codeline>
<codeline lineno="1075"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;ping_time=linphone_core_run_stun_tests(call-&gt;core,call);</highlight></codeline>
<codeline lineno="1076"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1077"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>BUILD_UPNP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1078"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__network__parameters_1ga9de28ff0fd0f8ff65ef82eba9592276c" kindref="member">linphone_core_get_firewall_policy</ref>(call-&gt;core)<sp/>==<sp/><ref refid="group__network__parameters_1ggadad0a1c27596017d9d9b3c30ef47f5beab254b7940dee8816026d50fb29ecaae8" kindref="member">LinphonePolicyUseUpnp</ref>)<sp/>{</highlight></codeline>
<codeline lineno="1079"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(!lc-&gt;rtp_conf.disable_upnp)<sp/>{</highlight></codeline>
<codeline lineno="1080"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;upnp_session<sp/>=<sp/>linphone_upnp_session_new(call);</highlight></codeline>
<codeline lineno="1081"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1082"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1083"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/>//BUILD_UPNP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1084"><highlight class="normal"></highlight></codeline>
<codeline lineno="1085"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>discover_mtu(lc,<ref refid="group__linphone__address_1ga95a356f26c67ed4ee88db878b617c65f" kindref="member">linphone_address_get_domain</ref><sp/>(to));</highlight></codeline>
<codeline lineno="1086"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(params-&gt;referer){</highlight></codeline>
<codeline lineno="1087"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;referer=<ref refid="group__call__control_1ga67f07db984bd9534117257723142d794" kindref="member">linphone_call_ref</ref>(params-&gt;referer);</highlight></codeline>
<codeline lineno="1088"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1089"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;dest_proxy=cfg;</highlight></codeline>
<codeline lineno="1090"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_create_op(call);</highlight></codeline>
<codeline lineno="1091"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>call;</highlight></codeline>
<codeline lineno="1092"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1093"><highlight class="normal"></highlight></codeline>
<codeline lineno="1094"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_incoming_select_ip_version(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="1095"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__network__parameters_1ga91804b8cf92f310c0d4cc8a4259ba917" kindref="member">linphone_core_ipv6_enabled</ref>(call-&gt;core)){</highlight></codeline>
<codeline lineno="1096"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;af=sal_op_is_ipv6(call-&gt;op)<sp/>?<sp/>AF_INET6<sp/>:<sp/>AF_INET;</highlight></codeline>
<codeline lineno="1097"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>call-&gt;af=AF_INET;</highlight></codeline>
<codeline lineno="1098"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1099"><highlight class="normal"></highlight></codeline>
<codeline lineno="1103"><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_set_compatible_incoming_call_parameters(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/>SalMediaDescription<sp/>*md)<sp/>{</highlight></codeline>
<codeline lineno="1104"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Handle<sp/>AVPF,<sp/>SRTP<sp/>and<sp/>DTLS.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1105"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;params-&gt;avpf_enabled<sp/>=<sp/>sal_media_description_has_avpf(md);</highlight></codeline>
<codeline lineno="1106"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;params-&gt;avpf_enabled<sp/>==<sp/>TRUE)<sp/>{</highlight></codeline>
<codeline lineno="1107"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;dest_proxy<sp/>!=<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="1108"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;params-&gt;avpf_rr_interval<sp/>=<sp/><ref refid="group__proxies_1gaafe4fa6cdcddaac450ad9a999109f642" kindref="member">linphone_proxy_config_get_avpf_rr_interval</ref>(call-&gt;dest_proxy)<sp/>*<sp/>1000;</highlight></codeline>
<codeline lineno="1109"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="1110"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;params-&gt;avpf_rr_interval<sp/>=<sp/><ref refid="group__media__parameters_1gafb3ac52a7e92847e4280a32a363e5281" kindref="member">linphone_core_get_avpf_rr_interval</ref>(call-&gt;core)*1000;</highlight></codeline>
<codeline lineno="1111"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1112"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1113"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((sal_media_description_has_dtls(md)<sp/>==<sp/>TRUE)<sp/>&amp;&amp;<sp/>(media_stream_dtls_supported()<sp/>==<sp/>TRUE))<sp/>{</highlight></codeline>
<codeline lineno="1114"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;params-&gt;media_encryption<sp/>=<sp/><ref refid="group__media__parameters_1ggac01228dce297dfe24304be6a1d2cfa0ba62124fc2fc42d6f7f821fd5f6550c776" kindref="member">LinphoneMediaEncryptionDTLS</ref>;</highlight></codeline>
<codeline lineno="1115"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((sal_media_description_has_srtp(md)<sp/>==<sp/>TRUE)<sp/>&amp;&amp;<sp/>(ms_srtp_supported()<sp/>==<sp/>TRUE))<sp/>{</highlight></codeline>
<codeline lineno="1116"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;params-&gt;media_encryption<sp/>=<sp/><ref refid="group__media__parameters_1ggac01228dce297dfe24304be6a1d2cfa0baa4bbefa58306fc1c23e2525a44a5ab88" kindref="member">LinphoneMediaEncryptionSRTP</ref>;</highlight></codeline>
<codeline lineno="1117"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;params-&gt;media_encryption<sp/>!=<sp/><ref refid="group__media__parameters_1ggac01228dce297dfe24304be6a1d2cfa0ba45e6b6334e661aa1680c48901789495b" kindref="member">LinphoneMediaEncryptionZRTP</ref>){</highlight></codeline>
<codeline lineno="1118"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;params-&gt;media_encryption<sp/>=<sp/><ref refid="group__media__parameters_1ggac01228dce297dfe24304be6a1d2cfa0baa30caf910eb4b60f6f5e02156f5bf451" kindref="member">LinphoneMediaEncryptionNone</ref>;</highlight></codeline>
<codeline lineno="1119"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1120"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_fix_call_parameters(call,<sp/>md);</highlight></codeline>
<codeline lineno="1121"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1122"><highlight class="normal"></highlight></codeline>
<codeline lineno="1123"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_compute_streams_indexes(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>SalMediaDescription<sp/>*md)<sp/>{</highlight></codeline>
<codeline lineno="1124"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i,<sp/>j;</highlight></codeline>
<codeline lineno="1125"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>audio_found<sp/>=<sp/>FALSE,<sp/>video_found<sp/>=<sp/>FALSE,<sp/>text_found<sp/>=<sp/>FALSE;</highlight></codeline>
<codeline lineno="1126"><highlight class="normal"></highlight></codeline>
<codeline lineno="1127"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>md-&gt;nb_streams;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="1128"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(md-&gt;streams[i].type<sp/>==<sp/>SalAudio)<sp/>{</highlight></codeline>
<codeline lineno="1129"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!audio_found)<sp/>{</highlight></codeline>
<codeline lineno="1130"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;main_audio_stream_index<sp/>=<sp/>i;</highlight></codeline>
<codeline lineno="1131"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_found<sp/>=<sp/>TRUE;</highlight></codeline>
<codeline lineno="1132"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;audio<sp/>stream<sp/>index<sp/>found:<sp/>%i,<sp/>updating<sp/>main<sp/>audio<sp/>stream<sp/>index&quot;</highlight><highlight class="normal">,<sp/>i);</highlight></codeline>
<codeline lineno="1133"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="1134"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;audio<sp/>stream<sp/>index<sp/>found:<sp/>%i,<sp/>but<sp/>main<sp/>audio<sp/>stream<sp/>already<sp/>set<sp/>to<sp/>%i&quot;</highlight><highlight class="normal">,<sp/>i,<sp/>call-&gt;main_audio_stream_index);</highlight></codeline>
<codeline lineno="1135"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1136"><highlight class="normal"></highlight></codeline>
<codeline lineno="1137"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Check<sp/>that<sp/>the<sp/>default<sp/>value<sp/>of<sp/>a<sp/>another<sp/>stream<sp/>doesn&apos;t<sp/>match<sp/>the<sp/>new<sp/>one</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1138"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(i<sp/>==<sp/>call-&gt;main_video_stream_index)<sp/>{</highlight></codeline>
<codeline lineno="1139"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(j<sp/>=<sp/>0;<sp/>j<sp/>&lt;<sp/>SAL_MEDIA_DESCRIPTION_MAX_STREAMS;<sp/>j++)<sp/>{</highlight></codeline>
<codeline lineno="1140"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sal_stream_description_active(&amp;md-&gt;streams[j]))<sp/></highlight><highlight class="keywordflow">continue</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1141"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(j<sp/>!=<sp/>call-&gt;main_video_stream_index<sp/>&amp;&amp;<sp/>j<sp/>!=<sp/>call-&gt;main_text_stream_index)<sp/>{</highlight></codeline>
<codeline lineno="1142"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;%i<sp/>was<sp/>used<sp/>for<sp/>video<sp/>stream<sp/>;<sp/>now<sp/>using<sp/>%i&quot;</highlight><highlight class="normal">,<sp/>i,<sp/>j);</highlight></codeline>
<codeline lineno="1143"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;main_video_stream_index<sp/>=<sp/>j;</highlight></codeline>
<codeline lineno="1144"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1145"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1146"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1147"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1148"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(i<sp/>==<sp/>call-&gt;main_text_stream_index)<sp/>{</highlight></codeline>
<codeline lineno="1149"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(j<sp/>=<sp/>0;<sp/>j<sp/>&lt;<sp/>SAL_MEDIA_DESCRIPTION_MAX_STREAMS;<sp/>j++)<sp/>{</highlight></codeline>
<codeline lineno="1150"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sal_stream_description_active(&amp;md-&gt;streams[j]))<sp/></highlight><highlight class="keywordflow">continue</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1151"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(j<sp/>!=<sp/>call-&gt;main_video_stream_index<sp/>&amp;&amp;<sp/>j<sp/>!=<sp/>call-&gt;main_text_stream_index)<sp/>{</highlight></codeline>
<codeline lineno="1152"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;%i<sp/>was<sp/>used<sp/>for<sp/>text<sp/>stream<sp/>;<sp/>now<sp/>using<sp/>%i&quot;</highlight><highlight class="normal">,<sp/>i,<sp/>j);</highlight></codeline>
<codeline lineno="1153"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;main_text_stream_index<sp/>=<sp/>j;</highlight></codeline>
<codeline lineno="1154"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1155"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1156"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1157"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1158"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(md-&gt;streams[i].type<sp/>==<sp/>SalVideo)<sp/>{</highlight></codeline>
<codeline lineno="1159"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!video_found)<sp/>{</highlight></codeline>
<codeline lineno="1160"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;main_video_stream_index<sp/>=<sp/>i;</highlight></codeline>
<codeline lineno="1161"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_found<sp/>=<sp/>TRUE;</highlight></codeline>
<codeline lineno="1162"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;video<sp/>stream<sp/>index<sp/>found:<sp/>%i,<sp/>updating<sp/>main<sp/>video<sp/>stream<sp/>index&quot;</highlight><highlight class="normal">,<sp/>i);</highlight></codeline>
<codeline lineno="1163"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="1164"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;video<sp/>stream<sp/>index<sp/>found:<sp/>%i,<sp/>but<sp/>main<sp/>video<sp/>stream<sp/>already<sp/>set<sp/>to<sp/>%i&quot;</highlight><highlight class="normal">,<sp/>i,<sp/>call-&gt;main_video_stream_index);</highlight></codeline>
<codeline lineno="1165"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1166"><highlight class="normal"></highlight></codeline>
<codeline lineno="1167"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Check<sp/>that<sp/>the<sp/>default<sp/>value<sp/>of<sp/>a<sp/>another<sp/>stream<sp/>doesn&apos;t<sp/>match<sp/>the<sp/>new<sp/>one</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1168"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(i<sp/>==<sp/>call-&gt;main_audio_stream_index)<sp/>{</highlight></codeline>
<codeline lineno="1169"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(j<sp/>=<sp/>0;<sp/>j<sp/>&lt;<sp/>SAL_MEDIA_DESCRIPTION_MAX_STREAMS;<sp/>j++)<sp/>{</highlight></codeline>
<codeline lineno="1170"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sal_stream_description_active(&amp;md-&gt;streams[j]))<sp/></highlight><highlight class="keywordflow">continue</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1171"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(j<sp/>!=<sp/>call-&gt;main_audio_stream_index<sp/>&amp;&amp;<sp/>j<sp/>!=<sp/>call-&gt;main_text_stream_index)<sp/>{</highlight></codeline>
<codeline lineno="1172"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;%i<sp/>was<sp/>used<sp/>for<sp/>audio<sp/>stream<sp/>;<sp/>now<sp/>using<sp/>%i&quot;</highlight><highlight class="normal">,<sp/>i,<sp/>j);</highlight></codeline>
<codeline lineno="1173"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;main_audio_stream_index<sp/>=<sp/>j;</highlight></codeline>
<codeline lineno="1174"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1175"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1176"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1177"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1178"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(i<sp/>==<sp/>call-&gt;main_text_stream_index)<sp/>{</highlight></codeline>
<codeline lineno="1179"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(j<sp/>=<sp/>0;<sp/>j<sp/>&lt;<sp/>SAL_MEDIA_DESCRIPTION_MAX_STREAMS;<sp/>j++)<sp/>{</highlight></codeline>
<codeline lineno="1180"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sal_stream_description_active(&amp;md-&gt;streams[j]))<sp/></highlight><highlight class="keywordflow">continue</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1181"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(j<sp/>!=<sp/>call-&gt;main_audio_stream_index<sp/>&amp;&amp;<sp/>j<sp/>!=<sp/>call-&gt;main_text_stream_index)<sp/>{</highlight></codeline>
<codeline lineno="1182"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;%i<sp/>was<sp/>used<sp/>for<sp/>text<sp/>stream<sp/>;<sp/>now<sp/>using<sp/>%i&quot;</highlight><highlight class="normal">,<sp/>i,<sp/>j);</highlight></codeline>
<codeline lineno="1183"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;main_text_stream_index<sp/>=<sp/>j;</highlight></codeline>
<codeline lineno="1184"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1185"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1186"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1187"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1188"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(md-&gt;streams[i].type<sp/>==<sp/>SalText)<sp/>{</highlight></codeline>
<codeline lineno="1189"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!text_found)<sp/>{</highlight></codeline>
<codeline lineno="1190"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;main_text_stream_index<sp/>=<sp/>i;</highlight></codeline>
<codeline lineno="1191"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>text_found<sp/>=<sp/>TRUE;</highlight></codeline>
<codeline lineno="1192"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;text<sp/>stream<sp/>index<sp/>found:<sp/>%i,<sp/>updating<sp/>main<sp/>text<sp/>stream<sp/>index&quot;</highlight><highlight class="normal">,<sp/>i);</highlight></codeline>
<codeline lineno="1193"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="1194"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;text<sp/>stream<sp/>index<sp/>found:<sp/>%i,<sp/>but<sp/>main<sp/>text<sp/>stream<sp/>already<sp/>set<sp/>to<sp/>%i&quot;</highlight><highlight class="normal">,<sp/>i,<sp/>call-&gt;main_text_stream_index);</highlight></codeline>
<codeline lineno="1195"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1196"><highlight class="normal"></highlight></codeline>
<codeline lineno="1197"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Check<sp/>that<sp/>the<sp/>default<sp/>value<sp/>of<sp/>a<sp/>another<sp/>stream<sp/>doesn&apos;t<sp/>match<sp/>the<sp/>new<sp/>one</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1198"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(i<sp/>==<sp/>call-&gt;main_audio_stream_index)<sp/>{</highlight></codeline>
<codeline lineno="1199"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(j<sp/>=<sp/>0;<sp/>j<sp/>&lt;<sp/>SAL_MEDIA_DESCRIPTION_MAX_STREAMS;<sp/>j++)<sp/>{</highlight></codeline>
<codeline lineno="1200"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sal_stream_description_active(&amp;md-&gt;streams[j]))<sp/></highlight><highlight class="keywordflow">continue</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1201"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(j<sp/>!=<sp/>call-&gt;main_video_stream_index<sp/>&amp;&amp;<sp/>j<sp/>!=<sp/>call-&gt;main_audio_stream_index)<sp/>{</highlight></codeline>
<codeline lineno="1202"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;%i<sp/>was<sp/>used<sp/>for<sp/>audio<sp/>stream<sp/>;<sp/>now<sp/>using<sp/>%i&quot;</highlight><highlight class="normal">,<sp/>i,<sp/>j);</highlight></codeline>
<codeline lineno="1203"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;main_audio_stream_index<sp/>=<sp/>j;</highlight></codeline>
<codeline lineno="1204"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1205"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1206"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1207"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1208"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(i<sp/>==<sp/>call-&gt;main_video_stream_index)<sp/>{</highlight></codeline>
<codeline lineno="1209"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(j<sp/>=<sp/>0;<sp/>j<sp/>&lt;<sp/>SAL_MEDIA_DESCRIPTION_MAX_STREAMS;<sp/>j++)<sp/>{</highlight></codeline>
<codeline lineno="1210"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sal_stream_description_active(&amp;md-&gt;streams[j]))<sp/></highlight><highlight class="keywordflow">continue</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1211"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(j<sp/>!=<sp/>call-&gt;main_video_stream_index<sp/>&amp;&amp;<sp/>j<sp/>!=<sp/>call-&gt;main_audio_stream_index)<sp/>{</highlight></codeline>
<codeline lineno="1212"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;%i<sp/>was<sp/>used<sp/>for<sp/>video<sp/>stream<sp/>;<sp/>now<sp/>using<sp/>%i&quot;</highlight><highlight class="normal">,<sp/>i,<sp/>j);</highlight></codeline>
<codeline lineno="1213"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;main_video_stream_index<sp/>=<sp/>j;</highlight></codeline>
<codeline lineno="1214"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1215"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1216"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1217"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1218"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1219"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1220"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1221"><highlight class="normal"></highlight></codeline>
<codeline lineno="1222"><highlight class="normal"><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*<sp/>linphone_call_new_incoming(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc,<sp/><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref><sp/>*from,<sp/><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref><sp/>*to,<sp/>SalOp<sp/>*op){</highlight></codeline>
<codeline lineno="1223"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call<sp/>=<sp/>belle_sip_object_new(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref>);</highlight></codeline>
<codeline lineno="1224"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalMediaDescription<sp/>*md;</highlight></codeline>
<codeline lineno="1225"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__network__parameters_1ga833aa818e8216f35ef12f86767806129" kindref="member">LinphoneFirewallPolicy</ref><sp/>fpol;</highlight></codeline>
<codeline lineno="1226"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="1227"><highlight class="normal"></highlight></codeline>
<codeline lineno="1228"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;dir=<ref refid="group__call__logs_1ggaa3077de7d4214529094998ce441f61e1aa4030176bbddea10e361ce320946e202" kindref="member">LinphoneCallIncoming</ref>;</highlight></codeline>
<codeline lineno="1229"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sal_op_set_user_pointer(op,call);</highlight></codeline>
<codeline lineno="1230"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;op=op;</highlight></codeline>
<codeline lineno="1231"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;core=lc;</highlight></codeline>
<codeline lineno="1232"><highlight class="normal"></highlight></codeline>
<codeline lineno="1233"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_incoming_select_ip_version(call);</highlight></codeline>
<codeline lineno="1234"><highlight class="normal"></highlight></codeline>
<codeline lineno="1235"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sal_op_cnx_ip_to_0000_if_sendonly_enable(op,<ref refid="group__misc_1ga588638bfdd889e404a796e8e076f5577" kindref="member">lp_config_get_default_int</ref>(lc-&gt;config,</highlight><highlight class="stringliteral">&quot;sip&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;cnx_ip_to_0000_if_sendonly_enabled&quot;</highlight><highlight class="normal">,0));</highlight></codeline>
<codeline lineno="1236"><highlight class="normal"></highlight></codeline>
<codeline lineno="1237"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md<sp/>=<sp/>sal_call_get_remote_media_description(op);</highlight></codeline>
<codeline lineno="1238"><highlight class="normal"></highlight></codeline>
<codeline lineno="1239"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lc-&gt;sip_conf.ping_with_options){</highlight></codeline>
<codeline lineno="1240"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>BUILD_UPNP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1241"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lc-&gt;upnp<sp/>!=<sp/>NULL<sp/>&amp;&amp;<sp/><ref refid="group__network__parameters_1ga9de28ff0fd0f8ff65ef82eba9592276c" kindref="member">linphone_core_get_firewall_policy</ref>(lc)==<ref refid="group__network__parameters_1ggadad0a1c27596017d9d9b3c30ef47f5beab254b7940dee8816026d50fb29ecaae8" kindref="member">LinphonePolicyUseUpnp</ref><sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="1242"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_upnp_context_get_state(lc-&gt;upnp)<sp/>==<sp/><ref refid="group__initializing_1gga3d626fbc6cee8294fef83d197fa27490a69b1709a2087dcf1089d1204ed25a09a" kindref="member">LinphoneUpnpStateOk</ref>)<sp/>{</highlight></codeline>
<codeline lineno="1243"><highlight class="normal"></highlight><highlight class="preprocessor">#else<sp/>//BUILD_UPNP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1244"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="1245"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/>//BUILD_UPNP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1246"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*the<sp/>following<sp/>sends<sp/>an<sp/>option<sp/>request<sp/>back<sp/>to<sp/>the<sp/>caller<sp/>so<sp/>that</highlight></codeline>
<codeline lineno="1247"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>we<sp/>get<sp/>a<sp/>chance<sp/>to<sp/>discover<sp/>our<sp/>nat&apos;d<sp/>address<sp/>before<sp/>answering.*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1248"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;ping_op=sal_op_new(lc-&gt;sal);</highlight></codeline>
<codeline lineno="1249"><highlight class="normal"></highlight></codeline>
<codeline lineno="1250"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_configure_op(lc,<sp/>call-&gt;ping_op,<sp/>from,<sp/>NULL,<sp/>FALSE);</highlight></codeline>
<codeline lineno="1251"><highlight class="normal"></highlight></codeline>
<codeline lineno="1252"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sal_op_set_route(call-&gt;ping_op,sal_op_get_network_origin(op));</highlight></codeline>
<codeline lineno="1253"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sal_op_set_user_pointer(call-&gt;ping_op,call);</highlight></codeline>
<codeline lineno="1254"><highlight class="normal"></highlight></codeline>
<codeline lineno="1255"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sal_ping(call-&gt;ping_op,sal_op_get_from(call-&gt;ping_op),<sp/>sal_op_get_to(call-&gt;ping_op));</highlight></codeline>
<codeline lineno="1256"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1257"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1258"><highlight class="normal"></highlight></codeline>
<codeline lineno="1259"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__linphone__address_1gacd575aa16b3458037ff71794812048d3" kindref="member">linphone_address_clean</ref>(from);</highlight></codeline>
<codeline lineno="1260"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_get_local_ip(call,<sp/>from);</highlight></codeline>
<codeline lineno="1261"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;params<sp/>=<sp/>linphone_call_params_new();</highlight></codeline>
<codeline lineno="1262"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_init_common(call,<sp/>from,<sp/>to);</highlight></codeline>
<codeline lineno="1263"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;log-&gt;call_id=ms_strdup(sal_op_get_call_id(op));<sp/></highlight><highlight class="comment">/*must<sp/>be<sp/>known<sp/>at<sp/>that<sp/>time*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1264"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;dest_proxy<sp/>=<sp/>linphone_core_lookup_known_proxy(call-&gt;core,<sp/>to);</highlight></codeline>
<codeline lineno="1265"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_init_default_params(lc,<sp/>call-&gt;params);</highlight></codeline>
<codeline lineno="1266"><highlight class="normal"></highlight></codeline>
<codeline lineno="1267"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="1268"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>Initialize<sp/>call<sp/>parameters<sp/>according<sp/>to<sp/>incoming<sp/>call<sp/>parameters.<sp/>This<sp/>is<sp/>to<sp/>avoid<sp/>to<sp/>ask<sp/>later<sp/>(during<sp/>reINVITEs)<sp/>for<sp/>features<sp/>that<sp/>the<sp/>remote</highlight></codeline>
<codeline lineno="1269"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>end<sp/>apparently<sp/>does<sp/>not<sp/>support.<sp/>This<sp/>features<sp/>are:<sp/>privacy,<sp/>video</highlight></codeline>
<codeline lineno="1270"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1271"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*set<sp/>privacy*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1272"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;privacy=(LinphonePrivacyMask)sal_op_get_privacy(call-&gt;op);</highlight></codeline>
<codeline lineno="1273"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*set<sp/>video<sp/>support<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1274"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;params-&gt;has_video<sp/>=<sp/><ref refid="group__media__parameters_1gac1113e7a9207bf1525f2d57f352391a7" kindref="member">linphone_core_video_enabled</ref>(lc)<sp/>&amp;&amp;<sp/>lc-&gt;video_policy.automatically_accept;</highlight></codeline>
<codeline lineno="1275"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(md)<sp/>{</highlight></codeline>
<codeline lineno="1276"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>It<sp/>is<sp/>licit<sp/>to<sp/>receive<sp/>an<sp/>INVITE<sp/>without<sp/>SDP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1277"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>In<sp/>this<sp/>case<sp/>WE<sp/>chose<sp/>the<sp/>media<sp/>parameters<sp/>according<sp/>to<sp/>policy.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1278"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_set_compatible_incoming_call_parameters(call,<sp/>md);</highlight></codeline>
<codeline lineno="1279"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>set<sp/>multicast<sp/>role<sp/>&amp;<sp/>address<sp/>if<sp/>any*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1280"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!sal_call_is_offerer(op)){</highlight></codeline>
<codeline lineno="1281"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>SAL_MEDIA_DESCRIPTION_MAX_STREAMS;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="1282"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(md-&gt;streams[i].dir<sp/>==<sp/>SalStreamInactive)<sp/>{</highlight></codeline>
<codeline lineno="1283"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">continue</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1284"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1285"><highlight class="normal"></highlight></codeline>
<codeline lineno="1286"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(md-&gt;streams[i].rtp_addr[0]!=</highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal"><sp/>&amp;&amp;<sp/>ms_is_multicast(md-&gt;streams[i].rtp_addr)){</highlight></codeline>
<codeline lineno="1287"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md-&gt;streams[i].multicast_role<sp/>=<sp/>SalMulticastReceiver;</highlight></codeline>
<codeline lineno="1288"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strncpy(call-&gt;media_ports[i].multicast_ip,md-&gt;streams[i].rtp_addr,</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(call-&gt;media_ports[i].multicast_ip));</highlight></codeline>
<codeline lineno="1289"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1290"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1291"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1292"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1293"><highlight class="normal"></highlight></codeline>
<codeline lineno="1294"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fpol=<ref refid="group__network__parameters_1ga9de28ff0fd0f8ff65ef82eba9592276c" kindref="member">linphone_core_get_firewall_policy</ref>(call-&gt;core);</highlight></codeline>
<codeline lineno="1295"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*create<sp/>the<sp/>ice<sp/>session<sp/>now<sp/>if<sp/>ICE<sp/>is<sp/>required*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1296"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(fpol==<ref refid="group__network__parameters_1ggadad0a1c27596017d9d9b3c30ef47f5beaeadfb66b915acd91af98e4d5cd47b17b" kindref="member">LinphonePolicyUseIce</ref>){</highlight></codeline>
<codeline lineno="1297"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(md){</highlight></codeline>
<codeline lineno="1298"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;ice_session<sp/>=<sp/>ice_session_new();</highlight></codeline>
<codeline lineno="1299"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*for<sp/>backward<sp/>compatibility<sp/>purposes,<sp/>shall<sp/>be<sp/>enabled<sp/>by<sp/>default<sp/>in<sp/>futur*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1300"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ice_session_enable_message_integrity_check(call-&gt;ice_session,<ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,</highlight><highlight class="stringliteral">&quot;net&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;ice_session_enable_message_integrity_check&quot;</highlight><highlight class="normal">,0));</highlight></codeline>
<codeline lineno="1301"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ice_session_set_role(call-&gt;ice_session,<sp/>IR_Controlled);</highlight></codeline>
<codeline lineno="1302"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="1303"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fpol=<ref refid="group__network__parameters_1ggadad0a1c27596017d9d9b3c30ef47f5bea8ecc1e10491dd4a2bcb3d07e88086bae" kindref="member">LinphonePolicyNoFirewall</ref>;</highlight></codeline>
<codeline lineno="1304"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;ICE<sp/>not<sp/>supported<sp/>for<sp/>incoming<sp/>INVITE<sp/>without<sp/>SDP.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="1305"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1306"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1307"><highlight class="normal"></highlight></codeline>
<codeline lineno="1308"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*reserve<sp/>the<sp/>sockets<sp/>immediately*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1309"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_init_media_streams(call);</highlight></codeline>
<codeline lineno="1310"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(fpol)<sp/>{</highlight></codeline>
<codeline lineno="1311"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__network__parameters_1ggadad0a1c27596017d9d9b3c30ef47f5beaeadfb66b915acd91af98e4d5cd47b17b" kindref="member">LinphonePolicyUseIce</ref>:</highlight></codeline>
<codeline lineno="1312"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_prepare_ice(call,TRUE);</highlight></codeline>
<codeline lineno="1313"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1314"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__network__parameters_1ggadad0a1c27596017d9d9b3c30ef47f5bea38001ab78a3d1071e153e49c741b2d9d" kindref="member">LinphonePolicyUseStun</ref>:</highlight></codeline>
<codeline lineno="1315"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;ping_time=linphone_core_run_stun_tests(call-&gt;core,call);</highlight></codeline>
<codeline lineno="1316"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>No<sp/>break<sp/>to<sp/>also<sp/>destroy<sp/>ice<sp/>session<sp/>in<sp/>this<sp/>case.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1317"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1318"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__network__parameters_1ggadad0a1c27596017d9d9b3c30ef47f5beab254b7940dee8816026d50fb29ecaae8" kindref="member">LinphonePolicyUseUpnp</ref>:</highlight></codeline>
<codeline lineno="1319"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>BUILD_UPNP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1320"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(!lc-&gt;rtp_conf.disable_upnp)<sp/>{</highlight></codeline>
<codeline lineno="1321"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;upnp_session<sp/>=<sp/>linphone_upnp_session_new(call);</highlight></codeline>
<codeline lineno="1322"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;upnp_session<sp/>!=<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="1323"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(linphone_core_update_upnp_from_remote_media_description(call,<sp/>sal_call_get_remote_media_description(op))&lt;0)<sp/>{</highlight></codeline>
<codeline lineno="1324"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>uPnP<sp/>port<sp/>mappings<sp/>failed,<sp/>proceed<sp/>with<sp/>the<sp/>call<sp/>anyway.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1325"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_delete_upnp_session(call);</highlight></codeline>
<codeline lineno="1326"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1327"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1328"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1329"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/>//BUILD_UPNP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1330"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1331"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="1332"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1333"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1334"><highlight class="normal"></highlight></codeline>
<codeline lineno="1335"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>discover_mtu(lc,<ref refid="group__linphone__address_1ga95a356f26c67ed4ee88db878b617c65f" kindref="member">linphone_address_get_domain</ref>(from));</highlight></codeline>
<codeline lineno="1336"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>call;</highlight></codeline>
<codeline lineno="1337"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1338"><highlight class="normal"></highlight></codeline>
<codeline lineno="1339"><highlight class="normal"></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="1340"><highlight class="comment"><sp/>*<sp/>Frees<sp/>the<sp/>media<sp/>resources<sp/>of<sp/>the<sp/>call.</highlight></codeline>
<codeline lineno="1341"><highlight class="comment"><sp/>*<sp/>This<sp/>has<sp/>to<sp/>be<sp/>done<sp/>at<sp/>the<sp/>earliest,<sp/>unlike<sp/>signaling<sp/>resources<sp/>that<sp/>sometimes<sp/>need<sp/>to<sp/>be<sp/>kept<sp/>a<sp/>bit<sp/>more<sp/>longer.</highlight></codeline>
<codeline lineno="1342"><highlight class="comment"><sp/>*<sp/>It<sp/>is<sp/>called<sp/>by<sp/>linphone_call_set_terminated()<sp/>(for<sp/>termination<sp/>of<sp/>calls<sp/>signaled<sp/>to<sp/>the<sp/>application),<sp/>or<sp/>directly<sp/>by<sp/>the<sp/>destructor<sp/>of<sp/>LinphoneCall</highlight></codeline>
<codeline lineno="1343"><highlight class="comment"><sp/>*<sp/>(_linphone_call_destroy)<sp/>if<sp/>the<sp/>call<sp/>was<sp/>never<sp/>notified<sp/>to<sp/>the<sp/>application.</highlight></codeline>
<codeline lineno="1344"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1345"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_free_media_resources(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="1346"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_stop_media_streams(call);</highlight></codeline>
<codeline lineno="1347"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_media_stream_sessions_uninit(&amp;call-&gt;sessions[call-&gt;main_audio_stream_index]);</highlight></codeline>
<codeline lineno="1348"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_media_stream_sessions_uninit(&amp;call-&gt;sessions[call-&gt;main_video_stream_index]);</highlight></codeline>
<codeline lineno="1349"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;params-&gt;realtimetext_enabled)<sp/>ms_media_stream_sessions_uninit(&amp;call-&gt;sessions[call-&gt;main_text_stream_index]);</highlight></codeline>
<codeline lineno="1350"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_delete_upnp_session(call);</highlight></codeline>
<codeline lineno="1351"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_delete_ice_session(call);</highlight></codeline>
<codeline lineno="1352"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_stats_uninit(&amp;call-&gt;stats[LINPHONE_CALL_STATS_AUDIO]);</highlight></codeline>
<codeline lineno="1353"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_stats_uninit(&amp;call-&gt;stats[LINPHONE_CALL_STATS_VIDEO]);</highlight></codeline>
<codeline lineno="1354"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_stats_uninit(&amp;call-&gt;stats[LINPHONE_CALL_STATS_TEXT]);</highlight></codeline>
<codeline lineno="1355"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1356"><highlight class="normal"></highlight></codeline>
<codeline lineno="1357"><highlight class="normal"></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="1358"><highlight class="comment"><sp/>*<sp/>Called<sp/>internally<sp/>when<sp/>reaching<sp/>the<sp/>Released<sp/>state,<sp/>to<sp/>perform<sp/>cleanups<sp/>to<sp/>break<sp/>circular<sp/>references.</highlight></codeline>
<codeline lineno="1359"><highlight class="comment">**/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1360"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_set_released(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="1361"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;op!=NULL)<sp/>{</highlight></codeline>
<codeline lineno="1362"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*transfer<sp/>the<sp/>last<sp/>error<sp/>so<sp/>that<sp/>it<sp/>can<sp/>be<sp/>obtained<sp/>even<sp/>in<sp/>Released<sp/>state*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1363"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;non_op_error.reason==SalReasonNone){</highlight></codeline>
<codeline lineno="1364"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>SalErrorInfo<sp/>*ei=sal_op_get_error_info(call-&gt;op);</highlight></codeline>
<codeline lineno="1365"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sal_error_info_set(&amp;call-&gt;non_op_error,ei-&gt;reason,ei-&gt;protocol_code,ei-&gt;status_string,ei-&gt;warnings);</highlight></codeline>
<codeline lineno="1366"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1367"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>so<sp/>that<sp/>we<sp/>cannot<sp/>have<sp/>anymore<sp/>upcalls<sp/>for<sp/>SAL</highlight></codeline>
<codeline lineno="1368"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>concerning<sp/>this<sp/>call*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1369"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sal_op_release(call-&gt;op);</highlight></codeline>
<codeline lineno="1370"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;op=NULL;</highlight></codeline>
<codeline lineno="1371"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1372"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*it<sp/>is<sp/>necessary<sp/>to<sp/>reset<sp/>pointers<sp/>to<sp/>other<sp/>call<sp/>to<sp/>prevent<sp/>circular<sp/>references<sp/>that<sp/>would<sp/>result<sp/>in<sp/>memory<sp/>never<sp/>freed.*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1373"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;referer){</highlight></codeline>
<codeline lineno="1374"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1gae69d2d9891695c07fca0637ef7fd7df6" kindref="member">linphone_call_unref</ref>(call-&gt;referer);</highlight></codeline>
<codeline lineno="1375"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;referer=NULL;</highlight></codeline>
<codeline lineno="1376"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1377"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;transfer_target){</highlight></codeline>
<codeline lineno="1378"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1gae69d2d9891695c07fca0637ef7fd7df6" kindref="member">linphone_call_unref</ref>(call-&gt;transfer_target);</highlight></codeline>
<codeline lineno="1379"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;transfer_target=NULL;</highlight></codeline>
<codeline lineno="1380"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1381"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;chat_room){</highlight></codeline>
<codeline lineno="1382"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__chatroom_1gaf4bb2db36c843ebd85a3e705698c962a" kindref="member">linphone_chat_room_unref</ref>(call-&gt;chat_room);</highlight></codeline>
<codeline lineno="1383"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;chat_room<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="1384"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1385"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1gae69d2d9891695c07fca0637ef7fd7df6" kindref="member">linphone_call_unref</ref>(call);</highlight></codeline>
<codeline lineno="1386"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1387"><highlight class="normal"></highlight></codeline>
<codeline lineno="1388"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>this<sp/>function<sp/>is<sp/>called<sp/>internally<sp/>to<sp/>get<sp/>rid<sp/>of<sp/>a<sp/>call<sp/>that<sp/>was<sp/>notified<sp/>to<sp/>the<sp/>application,<sp/>because<sp/>it<sp/>reached<sp/>the<sp/>end<sp/>or<sp/>error<sp/>state.</highlight></codeline>
<codeline lineno="1389"><highlight class="comment"><sp/>It<sp/>performs<sp/>the<sp/>following<sp/>tasks:</highlight></codeline>
<codeline lineno="1390"><highlight class="comment"><sp/>-<sp/>remove<sp/>the<sp/>call<sp/>from<sp/>the<sp/>internal<sp/>list<sp/>of<sp/>calls</highlight></codeline>
<codeline lineno="1391"><highlight class="comment"><sp/>-<sp/>update<sp/>the<sp/>call<sp/>logs<sp/>accordingly</highlight></codeline>
<codeline lineno="1392"><highlight class="comment">*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1393"><highlight class="normal"></highlight></codeline>
<codeline lineno="1394"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_set_terminated(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="1395"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc=call-&gt;core;</highlight></codeline>
<codeline lineno="1396"><highlight class="normal"></highlight></codeline>
<codeline lineno="1397"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_free_media_resources(call);</highlight></codeline>
<codeline lineno="1398"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_log_completed(call);</highlight></codeline>
<codeline lineno="1399"><highlight class="normal"></highlight></codeline>
<codeline lineno="1400"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call<sp/>==<sp/>lc-&gt;current_call){</highlight></codeline>
<codeline lineno="1401"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Resetting<sp/>the<sp/>current<sp/>call&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="1402"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lc-&gt;current_call=NULL;</highlight></codeline>
<codeline lineno="1403"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1404"><highlight class="normal"></highlight></codeline>
<codeline lineno="1405"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(linphone_core_del_call(lc,call)<sp/>!=<sp/>0){</highlight></codeline>
<codeline lineno="1406"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_error(</highlight><highlight class="stringliteral">&quot;Could<sp/>not<sp/>remove<sp/>the<sp/>call<sp/>from<sp/>the<sp/>list<sp/>!!!&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="1407"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1408"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_conference_check_uninit(lc);</highlight></codeline>
<codeline lineno="1409"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;ringing_beep){</highlight></codeline>
<codeline lineno="1410"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__media__parameters_1ga5d9cfc960f9779c98866250a665f3d6d" kindref="member">linphone_core_stop_dtmf</ref>(lc);</highlight></codeline>
<codeline lineno="1411"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;ringing_beep=FALSE;</highlight></codeline>
<codeline lineno="1412"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1413"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;chat_room){</highlight></codeline>
<codeline lineno="1414"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;chat_room-&gt;call<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="1415"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1416"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1417"><highlight class="normal"></highlight></codeline>
<codeline lineno="1418"><highlight class="normal"></highlight><highlight class="comment">/*function<sp/>to<sp/>be<sp/>called<sp/>at<sp/>each<sp/>incoming<sp/>reINVITE,<sp/>in<sp/>order<sp/>to<sp/>adjust<sp/>various<sp/>local<sp/>parameters<sp/>to<sp/>what<sp/>is<sp/>being<sp/>offered<sp/>by<sp/>remote:</highlight></codeline>
<codeline lineno="1419"><highlight class="comment"><sp/>*<sp/>-<sp/>the<sp/>video<sp/>enablement<sp/>parameter<sp/>according<sp/>to<sp/>what<sp/>is<sp/>offered<sp/>and<sp/>our<sp/>local<sp/>policy.</highlight></codeline>
<codeline lineno="1420"><highlight class="comment"><sp/>*<sp/>Fixing<sp/>the<sp/>call-&gt;params<sp/>to<sp/>proper<sp/>values<sp/>avoid<sp/>request<sp/>video<sp/>by<sp/>accident<sp/>during<sp/>internal<sp/>call<sp/>updates,<sp/>pauses<sp/>and<sp/>resumes</highlight></codeline>
<codeline lineno="1421"><highlight class="comment"><sp/>*<sp/>-<sp/>the<sp/>stream<sp/>indexes.</highlight></codeline>
<codeline lineno="1422"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1423"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_fix_call_parameters(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/>SalMediaDescription<sp/>*rmd){</highlight></codeline>
<codeline lineno="1424"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gaa91f7e76e8f038ae9acdf42d1bc80a22" kindref="member">LinphoneCallParams</ref>*<sp/>rcp;</highlight></codeline>
<codeline lineno="1425"><highlight class="normal"></highlight></codeline>
<codeline lineno="1426"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rmd)<sp/>{</highlight></codeline>
<codeline lineno="1427"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_compute_streams_indexes(call,<sp/>rmd);</highlight></codeline>
<codeline lineno="1428"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_update_biggest_desc(call,<sp/>rmd);</highlight></codeline>
<codeline lineno="1429"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1430"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rcp<sp/>=<sp/><ref refid="group__call__control_1ga65b4ca2f01d684019f6ae5621eb430f6" kindref="member">linphone_call_get_remote_params</ref>(call);</highlight></codeline>
<codeline lineno="1431"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rcp){</highlight></codeline>
<codeline lineno="1432"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;params-&gt;has_audio<sp/>&amp;&amp;<sp/>!rcp-&gt;has_audio){</highlight></codeline>
<codeline lineno="1433"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Call<sp/>[%p]:<sp/>disabling<sp/>audio<sp/>in<sp/>our<sp/>call<sp/>params<sp/>because<sp/>the<sp/>remote<sp/>doesn&apos;t<sp/>want<sp/>it.&quot;</highlight><highlight class="normal">,<sp/>call);</highlight></codeline>
<codeline lineno="1434"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;params-&gt;has_audio<sp/>=<sp/>FALSE;</highlight></codeline>
<codeline lineno="1435"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1436"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;params-&gt;has_video<sp/>&amp;&amp;<sp/>!rcp-&gt;has_video){</highlight></codeline>
<codeline lineno="1437"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Call<sp/>[%p]:<sp/>disabling<sp/>video<sp/>in<sp/>our<sp/>call<sp/>params<sp/>because<sp/>the<sp/>remote<sp/>doesn&apos;t<sp/>want<sp/>it.&quot;</highlight><highlight class="normal">,<sp/>call);</highlight></codeline>
<codeline lineno="1438"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;params-&gt;has_video<sp/>=<sp/>FALSE;</highlight></codeline>
<codeline lineno="1439"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1440"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="1441"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rcp-&gt;has_video<sp/>&amp;&amp;<sp/>call-&gt;core-&gt;video_policy.automatically_accept<sp/>&amp;&amp;<sp/><ref refid="group__media__parameters_1gac1113e7a9207bf1525f2d57f352391a7" kindref="member">linphone_core_video_enabled</ref>(call-&gt;core)<sp/>&amp;&amp;<sp/>!call-&gt;params-&gt;has_video){</highlight></codeline>
<codeline lineno="1442"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Call<sp/>[%p]:<sp/>re-enabling<sp/>video<sp/>in<sp/>our<sp/>call<sp/>params<sp/>because<sp/>the<sp/>remote<sp/>wants<sp/>it<sp/>and<sp/>the<sp/>policy<sp/>allows<sp/>to<sp/>automatically<sp/>accept.&quot;</highlight><highlight class="normal">,<sp/>call);</highlight></codeline>
<codeline lineno="1443"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1ga195ed008fbb19ded55070bb149e72ec5" kindref="member">linphone_call_params_enable_video</ref>(call-&gt;params,<sp/>TRUE);</highlight></codeline>
<codeline lineno="1444"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1445"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="1446"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rcp-&gt;realtimetext_enabled<sp/>&amp;&amp;<sp/>!call-&gt;params-&gt;realtimetext_enabled)<sp/>{</highlight></codeline>
<codeline lineno="1447"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;params-&gt;realtimetext_enabled<sp/>=<sp/>TRUE;</highlight></codeline>
<codeline lineno="1448"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1449"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1450"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1451"><highlight class="normal"></highlight></codeline>
<codeline lineno="1452"><highlight class="normal"></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*linphone_call_state_to_string(<ref refid="group__call__control_1ga37dad1a4f935d9cc26ec1f9d2b23691a" kindref="member">LinphoneCallState</ref><sp/>cs){</highlight></codeline>
<codeline lineno="1453"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(cs){</highlight></codeline>
<codeline lineno="1454"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa0148699614584db8dbbd7f2af177af39" kindref="member">LinphoneCallIdle</ref>:</highlight></codeline>
<codeline lineno="1455"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;LinphoneCallIdle&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1456"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa0998d4c2bce14ae88b0ae84fbef5c33a" kindref="member">LinphoneCallIncomingReceived</ref>:</highlight></codeline>
<codeline lineno="1457"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;LinphoneCallIncomingReceived&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1458"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaae99727dfb0a8e30ef04ff96ce3bf7e36" kindref="member">LinphoneCallOutgoingInit</ref>:</highlight></codeline>
<codeline lineno="1459"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;LinphoneCallOutgoingInit&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1460"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa4f6c8b38f68a9bdfdd6d59cc904f924c" kindref="member">LinphoneCallOutgoingProgress</ref>:</highlight></codeline>
<codeline lineno="1461"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;LinphoneCallOutgoingProgress&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1462"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa229cfe72a8dfee15bdae9f2125b43c67" kindref="member">LinphoneCallOutgoingRinging</ref>:</highlight></codeline>
<codeline lineno="1463"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;LinphoneCallOutgoingRinging&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1464"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa7a8cd38252c1a9d8c0ecbdec1aef899d" kindref="member">LinphoneCallOutgoingEarlyMedia</ref>:</highlight></codeline>
<codeline lineno="1465"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;LinphoneCallOutgoingEarlyMedia&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1466"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa1a32cc3919ca3658eed7deebadbe13b9" kindref="member">LinphoneCallConnected</ref>:</highlight></codeline>
<codeline lineno="1467"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;LinphoneCallConnected&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1468"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaacebe90cc045331e513d069872f9c84d3" kindref="member">LinphoneCallStreamsRunning</ref>:</highlight></codeline>
<codeline lineno="1469"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;LinphoneCallStreamsRunning&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1470"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaaaa35a1564a5ce1bcc4719ab523edec98" kindref="member">LinphoneCallPausing</ref>:</highlight></codeline>
<codeline lineno="1471"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;LinphoneCallPausing&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1472"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa59c57a8b9a7a0086a79c85028bb4cefc" kindref="member">LinphoneCallPaused</ref>:</highlight></codeline>
<codeline lineno="1473"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;LinphoneCallPaused&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1474"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaad3afb2410b6a08ea7eeb3739fe862453" kindref="member">LinphoneCallResuming</ref>:</highlight></codeline>
<codeline lineno="1475"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;LinphoneCallResuming&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1476"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa8b98118762b6f2093f5492da6991fbd8" kindref="member">LinphoneCallRefered</ref>:</highlight></codeline>
<codeline lineno="1477"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;LinphoneCallRefered&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1478"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa1214ea33f3ff7fd8aa0ce8922dda5170" kindref="member">LinphoneCallError</ref>:</highlight></codeline>
<codeline lineno="1479"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;LinphoneCallError&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1480"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaafbeebb1285a2aab5d34e99d2e695e5be" kindref="member">LinphoneCallEnd</ref>:</highlight></codeline>
<codeline lineno="1481"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;LinphoneCallEnd&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1482"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaaacf737ce5572c4e0e9f28993dcbadf00" kindref="member">LinphoneCallPausedByRemote</ref>:</highlight></codeline>
<codeline lineno="1483"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;LinphoneCallPausedByRemote&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1484"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaad51ee049c7dee729776ef5bc76ddb2c2" kindref="member">LinphoneCallUpdatedByRemote</ref>:</highlight></codeline>
<codeline lineno="1485"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;LinphoneCallUpdatedByRemote&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1486"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaab8684757f565989d4212026f755762ed" kindref="member">LinphoneCallIncomingEarlyMedia</ref>:</highlight></codeline>
<codeline lineno="1487"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;LinphoneCallIncomingEarlyMedia&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1488"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa29a21291bee6ab53a5595c1d3aaf8bde" kindref="member">LinphoneCallUpdating</ref>:</highlight></codeline>
<codeline lineno="1489"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;LinphoneCallUpdating&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1490"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaac4a81296a6835482e65d51174eb16de4" kindref="member">LinphoneCallReleased</ref>:</highlight></codeline>
<codeline lineno="1491"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;LinphoneCallReleased&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1492"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>LinphoneCallEarlyUpdatedByRemote:</highlight></codeline>
<codeline lineno="1493"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;LinphoneCallEarlyUpdatedByRemote&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1494"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>LinphoneCallEarlyUpdating:</highlight></codeline>
<codeline lineno="1495"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;LinphoneCallEarlyUpdating&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1496"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1497"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;undefined<sp/>state&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1498"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1499"><highlight class="normal"></highlight></codeline>
<codeline lineno="1500"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_set_state(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/><ref refid="group__call__control_1ga37dad1a4f935d9cc26ec1f9d2b23691a" kindref="member">LinphoneCallState</ref><sp/>cstate,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*message){</highlight></codeline>
<codeline lineno="1501"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc=call-&gt;core;</highlight></codeline>
<codeline lineno="1502"><highlight class="normal"></highlight></codeline>
<codeline lineno="1503"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;state!=cstate){</highlight></codeline>
<codeline lineno="1504"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;prevstate=call-&gt;state;</highlight></codeline>
<codeline lineno="1505"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;state==<ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaafbeebb1285a2aab5d34e99d2e695e5be" kindref="member">LinphoneCallEnd</ref><sp/>||<sp/>call-&gt;state==<ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa1214ea33f3ff7fd8aa0ce8922dda5170" kindref="member">LinphoneCallError</ref>){</highlight></codeline>
<codeline lineno="1506"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(cstate!=<ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaac4a81296a6835482e65d51174eb16de4" kindref="member">LinphoneCallReleased</ref>){</highlight></codeline>
<codeline lineno="1507"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_fatal(</highlight><highlight class="stringliteral">&quot;Spurious<sp/>call<sp/>state<sp/>change<sp/>from<sp/>%s<sp/>to<sp/>%s,<sp/>ignored.&quot;</highlight><highlight class="normal"><sp/><sp/><sp/>,linphone_call_state_to_string(call-&gt;state)</highlight></codeline>
<codeline lineno="1508"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>,linphone_call_state_to_string(cstate));</highlight></codeline>
<codeline lineno="1509"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1510"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1511"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1512"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Call<sp/>%p:<sp/>moving<sp/>from<sp/>state<sp/>%s<sp/>to<sp/>%s&quot;</highlight><highlight class="normal">,call</highlight></codeline>
<codeline lineno="1513"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>,linphone_call_state_to_string(call-&gt;state)</highlight></codeline>
<codeline lineno="1514"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>,linphone_call_state_to_string(cstate));</highlight></codeline>
<codeline lineno="1515"><highlight class="normal"></highlight></codeline>
<codeline lineno="1516"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(cstate!=<ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa8b98118762b6f2093f5492da6991fbd8" kindref="member">LinphoneCallRefered</ref>){</highlight></codeline>
<codeline lineno="1517"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*LinphoneCallRefered<sp/>is<sp/>rather<sp/>an<sp/>event,<sp/>not<sp/>a<sp/>state.</highlight></codeline>
<codeline lineno="1518"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Indeed<sp/>it<sp/>does<sp/>not<sp/>change<sp/>the<sp/>state<sp/>of<sp/>the<sp/>call<sp/>(still<sp/>paused<sp/>or<sp/>running)*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1519"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;state=cstate;</highlight></codeline>
<codeline lineno="1520"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1521"><highlight class="normal"></highlight></codeline>
<codeline lineno="1522"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(cstate)<sp/>{</highlight></codeline>
<codeline lineno="1523"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaae99727dfb0a8e30ef04ff96ce3bf7e36" kindref="member">LinphoneCallOutgoingInit</ref>:</highlight></codeline>
<codeline lineno="1524"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa0998d4c2bce14ae88b0ae84fbef5c33a" kindref="member">LinphoneCallIncomingReceived</ref>:</highlight></codeline>
<codeline lineno="1525"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>ANDROID</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1526"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Call<sp/>[%p]<sp/>acquires<sp/>both<sp/>wifi<sp/>and<sp/>multicast<sp/>lock&quot;</highlight><highlight class="normal">,call);</highlight></codeline>
<codeline lineno="1527"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_wifi_lock_acquire(call-&gt;core);</highlight></codeline>
<codeline lineno="1528"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_multicast_lock_acquire(call-&gt;core);<sp/></highlight><highlight class="comment">/*does<sp/>no<sp/>affect<sp/>battery<sp/>more<sp/>than<sp/>regular<sp/>rtp<sp/>traffic*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1529"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1530"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1531"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaafbeebb1285a2aab5d34e99d2e695e5be" kindref="member">LinphoneCallEnd</ref>:</highlight></codeline>
<codeline lineno="1532"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa1214ea33f3ff7fd8aa0ce8922dda5170" kindref="member">LinphoneCallError</ref>:</highlight></codeline>
<codeline lineno="1533"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal">(<ref refid="group__misc_1ga3297420b41659c4bd1ffb64a1e6b7d64" kindref="member">linphone_error_info_get_reason</ref>(<ref refid="group__call__control_1gaf92313f94a06da10723d7d0e4b4506ad" kindref="member">linphone_call_get_error_info</ref>(call)))<sp/>{</highlight></codeline>
<codeline lineno="1534"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__misc_1ggaf7346e9b3a064155f3d5d3811d684fb2a442fce67ace6491eee2f4a94177f34c6" kindref="member">LinphoneReasonDeclined</ref>:</highlight></codeline>
<codeline lineno="1535"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;log-&gt;status=<ref refid="group__call__logs_1gga0896daf3cb167a43e357c3955ab33f3fad6711031d964a7d56f10c07ac239a102" kindref="member">LinphoneCallDeclined</ref>;</highlight></codeline>
<codeline lineno="1536"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1537"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__misc_1ggaf7346e9b3a064155f3d5d3811d684fb2a528a41c31768cff46c03b6a5e2fcb073" kindref="member">LinphoneReasonNotAnswered</ref>:</highlight></codeline>
<codeline lineno="1538"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;log-&gt;status=<ref refid="group__call__logs_1gga0896daf3cb167a43e357c3955ab33f3fad26e9035dad755590a5a724c7ba69656" kindref="member">LinphoneCallMissed</ref>;</highlight></codeline>
<codeline lineno="1539"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1540"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="1541"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1542"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1543"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_set_terminated(call);</highlight></codeline>
<codeline lineno="1544"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1545"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa1a32cc3919ca3658eed7deebadbe13b9" kindref="member">LinphoneCallConnected</ref>:</highlight></codeline>
<codeline lineno="1546"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;log-&gt;status=<ref refid="group__call__logs_1gga0896daf3cb167a43e357c3955ab33f3fa998fe35d090ed76fb89b23b3a8dfb0ff" kindref="member">LinphoneCallSuccess</ref>;</highlight></codeline>
<codeline lineno="1547"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;log-&gt;connected_date_time<sp/>=<sp/>ms_time(NULL);</highlight></codeline>
<codeline lineno="1548"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1549"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaac4a81296a6835482e65d51174eb16de4" kindref="member">LinphoneCallReleased</ref>:</highlight></codeline>
<codeline lineno="1550"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>ANDROID</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1551"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Call<sp/>[%p]<sp/>releases<sp/>wifi/multicast<sp/>lock&quot;</highlight><highlight class="normal">,call);</highlight></codeline>
<codeline lineno="1552"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_wifi_lock_release(call-&gt;core);</highlight></codeline>
<codeline lineno="1553"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_multicast_lock_release(call-&gt;core);</highlight></codeline>
<codeline lineno="1554"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1555"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1556"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaacebe90cc045331e513d069872f9c84d3" kindref="member">LinphoneCallStreamsRunning</ref>:</highlight></codeline>
<codeline lineno="1557"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;prevstate<sp/>==<sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa29a21291bee6ab53a5595c1d3aaf8bde" kindref="member">LinphoneCallUpdating</ref><sp/>||<sp/>call-&gt;prevstate<sp/>==<sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaad51ee049c7dee729776ef5bc76ddb2c2" kindref="member">LinphoneCallUpdatedByRemote</ref>)<sp/>{</highlight></codeline>
<codeline lineno="1558"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__misc_1gabe82a1a1ffc3d6b4e0b51a03028513b7" kindref="member">LinphoneReason</ref><sp/>reason<sp/>=<sp/><ref refid="group__call__control_1ga312c73999c94f7e59f307423d40d16b2" kindref="member">linphone_call_get_reason</ref>(call);</highlight></codeline>
<codeline lineno="1559"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*msg;</highlight></codeline>
<codeline lineno="1560"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(reason<sp/>!=<sp/>LinphoneReasonNone)<sp/>{</highlight></codeline>
<codeline lineno="1561"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>msg<sp/>=<sp/>ms_strdup_printf(_(</highlight><highlight class="stringliteral">&quot;Call<sp/>parameters<sp/>could<sp/>not<sp/>be<sp/>modified:<sp/>%s.&quot;</highlight><highlight class="normal">),<sp/><ref refid="group__misc_1ga55b055097d13c171e08ead648869cdc1" kindref="member">linphone_reason_to_string</ref>(reason));</highlight></codeline>
<codeline lineno="1562"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="1563"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>msg<sp/>=<sp/>ms_strdup(_(</highlight><highlight class="stringliteral">&quot;Call<sp/>parameters<sp/>were<sp/>successfully<sp/>modified.&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="1564"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1565"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_notify_display_status(lc,<sp/>msg);</highlight></codeline>
<codeline lineno="1566"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(msg);</highlight></codeline>
<codeline lineno="1567"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1568"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1569"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="1570"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1571"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1572"><highlight class="normal"></highlight></codeline>
<codeline lineno="1573"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(cstate!=<ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaacebe90cc045331e513d069872f9c84d3" kindref="member">LinphoneCallStreamsRunning</ref>)<sp/>{</highlight></codeline>
<codeline lineno="1574"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;dtmfs_timer!=NULL){</highlight></codeline>
<codeline lineno="1575"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*cancelling<sp/>DTMF<sp/>sequence,<sp/>if<sp/>any*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1576"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_cancel_dtmfs(call);</highlight></codeline>
<codeline lineno="1577"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1578"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1579"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!message)<sp/>{</highlight></codeline>
<codeline lineno="1580"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_error(</highlight><highlight class="stringliteral">&quot;%s():<sp/>You<sp/>must<sp/>fill<sp/>a<sp/>reason<sp/>when<sp/>changing<sp/>call<sp/>state<sp/>(from<sp/>%s<sp/>o<sp/>%s).&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1581"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>,<sp/>__FUNCTION__</highlight></codeline>
<codeline lineno="1582"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>,<sp/>linphone_call_state_to_string(call-&gt;prevstate)</highlight></codeline>
<codeline lineno="1583"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>,<sp/>linphone_call_state_to_string(call-&gt;state));</highlight></codeline>
<codeline lineno="1584"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1585"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_notify_call_state_changed(lc,call,cstate,message?message:</highlight><highlight class="stringliteral">&quot;&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="1586"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_reporting_call_state_updated(call);</highlight></codeline>
<codeline lineno="1587"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(cstate==<ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaac4a81296a6835482e65d51174eb16de4" kindref="member">LinphoneCallReleased</ref>)<sp/>{</highlight><highlight class="comment">/*shall<sp/>be<sp/>performed<sp/>after<sp/><sp/>app<sp/>notification*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1588"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_set_released(call);</highlight></codeline>
<codeline lineno="1589"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1590"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1591"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1592"><highlight class="normal"></highlight></codeline>
<codeline lineno="1593"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_destroy(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*obj){</highlight></codeline>
<codeline lineno="1594"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Call<sp/>[%p]<sp/>freed.&quot;</highlight><highlight class="normal">,obj);</highlight></codeline>
<codeline lineno="1595"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(obj-&gt;audiostream<sp/>||<sp/>obj-&gt;videostream){</highlight></codeline>
<codeline lineno="1596"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_free_media_resources(obj);</highlight></codeline>
<codeline lineno="1597"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1598"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(obj-&gt;op!=NULL)<sp/>{</highlight></codeline>
<codeline lineno="1599"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sal_op_release(obj-&gt;op);</highlight></codeline>
<codeline lineno="1600"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>obj-&gt;op=NULL;</highlight></codeline>
<codeline lineno="1601"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1602"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(obj-&gt;biggestdesc!=NULL){</highlight></codeline>
<codeline lineno="1603"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sal_media_description_unref(obj-&gt;biggestdesc);</highlight></codeline>
<codeline lineno="1604"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>obj-&gt;biggestdesc=NULL;</highlight></codeline>
<codeline lineno="1605"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1606"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(obj-&gt;resultdesc!=NULL)<sp/>{</highlight></codeline>
<codeline lineno="1607"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sal_media_description_unref(obj-&gt;resultdesc);</highlight></codeline>
<codeline lineno="1608"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>obj-&gt;resultdesc=NULL;</highlight></codeline>
<codeline lineno="1609"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1610"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(obj-&gt;localdesc!=NULL)<sp/>{</highlight></codeline>
<codeline lineno="1611"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sal_media_description_unref(obj-&gt;localdesc);</highlight></codeline>
<codeline lineno="1612"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>obj-&gt;localdesc=NULL;</highlight></codeline>
<codeline lineno="1613"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1614"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(obj-&gt;ping_op)<sp/>{</highlight></codeline>
<codeline lineno="1615"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sal_op_release(obj-&gt;ping_op);</highlight></codeline>
<codeline lineno="1616"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>obj-&gt;ping_op=NULL;</highlight></codeline>
<codeline lineno="1617"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1618"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(obj-&gt;refer_to){</highlight></codeline>
<codeline lineno="1619"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(obj-&gt;refer_to);</highlight></codeline>
<codeline lineno="1620"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>obj-&gt;refer_to=NULL;</highlight></codeline>
<codeline lineno="1621"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1622"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(obj-&gt;referer){</highlight></codeline>
<codeline lineno="1623"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1gae69d2d9891695c07fca0637ef7fd7df6" kindref="member">linphone_call_unref</ref>(obj-&gt;referer);</highlight></codeline>
<codeline lineno="1624"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>obj-&gt;referer=NULL;</highlight></codeline>
<codeline lineno="1625"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1626"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(obj-&gt;transfer_target){</highlight></codeline>
<codeline lineno="1627"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1gae69d2d9891695c07fca0637ef7fd7df6" kindref="member">linphone_call_unref</ref>(obj-&gt;transfer_target);</highlight></codeline>
<codeline lineno="1628"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>obj-&gt;transfer_target=NULL;</highlight></codeline>
<codeline lineno="1629"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1630"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(obj-&gt;log)<sp/>{</highlight></codeline>
<codeline lineno="1631"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__logs_1ga802bbd28cc29824d80a70ad33e5b8ea6" kindref="member">linphone_call_log_unref</ref>(obj-&gt;log);</highlight></codeline>
<codeline lineno="1632"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>obj-&gt;log=NULL;</highlight></codeline>
<codeline lineno="1633"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1634"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(obj-&gt;auth_token)<sp/>{</highlight></codeline>
<codeline lineno="1635"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(obj-&gt;auth_token);</highlight></codeline>
<codeline lineno="1636"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>obj-&gt;auth_token=NULL;</highlight></codeline>
<codeline lineno="1637"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1638"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(obj-&gt;dtls_certificate_fingerprint)<sp/>{</highlight></codeline>
<codeline lineno="1639"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(obj-&gt;dtls_certificate_fingerprint);</highlight></codeline>
<codeline lineno="1640"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>obj-&gt;dtls_certificate_fingerprint=NULL;</highlight></codeline>
<codeline lineno="1641"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1642"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(obj-&gt;dtmfs_timer)<sp/>{</highlight></codeline>
<codeline lineno="1643"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_cancel_dtmfs(obj);</highlight></codeline>
<codeline lineno="1644"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1645"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(obj-&gt;params){</highlight></codeline>
<codeline lineno="1646"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1ga341015ca73484947fca50896432106d2" kindref="member">linphone_call_params_unref</ref>(obj-&gt;params);</highlight></codeline>
<codeline lineno="1647"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>obj-&gt;params=NULL;</highlight></codeline>
<codeline lineno="1648"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1649"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(obj-&gt;current_params){</highlight></codeline>
<codeline lineno="1650"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1ga341015ca73484947fca50896432106d2" kindref="member">linphone_call_params_unref</ref>(obj-&gt;current_params);</highlight></codeline>
<codeline lineno="1651"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>obj-&gt;current_params=NULL;</highlight></codeline>
<codeline lineno="1652"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1653"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(obj-&gt;remote_params<sp/>!=<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="1654"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1ga341015ca73484947fca50896432106d2" kindref="member">linphone_call_params_unref</ref>(obj-&gt;remote_params);</highlight></codeline>
<codeline lineno="1655"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>obj-&gt;remote_params=NULL;</highlight></codeline>
<codeline lineno="1656"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1657"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(obj-&gt;me)<sp/>{</highlight></codeline>
<codeline lineno="1658"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__linphone__address_1gae7ed90ea85c09c793e994367e6a5422e" kindref="member">linphone_address_unref</ref>(obj-&gt;me);</highlight></codeline>
<codeline lineno="1659"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>obj-&gt;me<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="1660"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1661"><highlight class="normal"></highlight></codeline>
<codeline lineno="1662"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sal_error_info_reset(&amp;obj-&gt;non_op_error);</highlight></codeline>
<codeline lineno="1663"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1664"><highlight class="normal"></highlight></codeline>
<codeline lineno="1670"><highlight class="normal"><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*<sp/><ref refid="group__call__control_1ga67f07db984bd9534117257723142d794" kindref="member">linphone_call_ref</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*obj){</highlight></codeline>
<codeline lineno="1671"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>belle_sip_object_ref(obj);</highlight></codeline>
<codeline lineno="1672"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>obj;</highlight></codeline>
<codeline lineno="1673"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1674"><highlight class="normal"></highlight></codeline>
<codeline lineno="1675"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gae69d2d9891695c07fca0637ef7fd7df6" kindref="member">linphone_call_unref</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*obj){</highlight></codeline>
<codeline lineno="1676"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>belle_sip_object_unref(obj);</highlight></codeline>
<codeline lineno="1677"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1678"><highlight class="normal"></highlight></codeline>
<codeline lineno="1679"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>linphone_call_get_n_active_streams(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="1680"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalMediaDescription<sp/>*md=NULL;</highlight></codeline>
<codeline lineno="1681"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;op)</highlight></codeline>
<codeline lineno="1682"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md<sp/>=<sp/>sal_call_get_remote_media_description(call-&gt;op);</highlight></codeline>
<codeline lineno="1683"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!md)</highlight></codeline>
<codeline lineno="1684"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="1685"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>sal_media_description_nb_active_streams_of_type(md,<sp/>SalAudio)<sp/>+<sp/>sal_media_description_nb_active_streams_of_type(md,<sp/>SalVideo)<sp/>+<sp/>sal_media_description_nb_active_streams_of_type(md,<sp/>SalText);</highlight></codeline>
<codeline lineno="1686"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1687"><highlight class="normal"></highlight></codeline>
<codeline lineno="1691"><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gaa91f7e76e8f038ae9acdf42d1bc80a22" kindref="member">LinphoneCallParams</ref><sp/>*<sp/><ref refid="group__call__control_1ga768bbd4e2869556bc23830a7b1e4eb5c" kindref="member">linphone_call_get_current_params</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="1692"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalMediaDescription<sp/>*md=call-&gt;resultdesc;</highlight></codeline>
<codeline lineno="1693"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>all_streams_encrypted<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="1694"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>VIDEO_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1695"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>VideoStream<sp/>*vstream;</highlight></codeline>
<codeline lineno="1696"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1697"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MS_VIDEO_SIZE_ASSIGN(call-&gt;current_params-&gt;sent_vsize,<sp/>UNKNOWN);</highlight></codeline>
<codeline lineno="1698"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MS_VIDEO_SIZE_ASSIGN(call-&gt;current_params-&gt;recv_vsize,<sp/>UNKNOWN);</highlight></codeline>
<codeline lineno="1699"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>VIDEO_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1700"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vstream<sp/>=<sp/>call-&gt;videostream;</highlight></codeline>
<codeline lineno="1701"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(vstream<sp/>!=<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="1702"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;sent_vsize<sp/>=<sp/>video_stream_get_sent_video_size(vstream);</highlight></codeline>
<codeline lineno="1703"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;recv_vsize<sp/>=<sp/>video_stream_get_received_video_size(vstream);</highlight></codeline>
<codeline lineno="1704"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;sent_fps<sp/>=<sp/>video_stream_get_sent_framerate(vstream);</highlight></codeline>
<codeline lineno="1705"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;received_fps<sp/>=<sp/>video_stream_get_received_framerate(vstream);</highlight></codeline>
<codeline lineno="1706"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1707"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1708"><highlight class="normal"></highlight></codeline>
<codeline lineno="1709"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>REVISITED</highlight></codeline>
<codeline lineno="1710"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>Previous<sp/>code<sp/>was<sp/>buggy.</highlight></codeline>
<codeline lineno="1711"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>Relying<sp/>on<sp/>the<sp/>mediastream&apos;s<sp/>state<sp/>(added<sp/>by<sp/>jehan:<sp/>only)<sp/>to<sp/>know<sp/>the<sp/>current<sp/>encryption<sp/>is<sp/>unreliable.</highlight></codeline>
<codeline lineno="1712"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>For<sp/>(added<sp/>by<sp/>jehan:<sp/>both<sp/>DTLS<sp/>and)<sp/>ZRTP<sp/>it<sp/>is<sp/>though<sp/>necessary.</highlight></codeline>
<codeline lineno="1713"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>But<sp/>for<sp/>all<sp/>others<sp/>the<sp/>current_params-&gt;media_encryption<sp/>state<sp/>should<sp/>reflect<sp/>(added<sp/>by<sp/>jehan:<sp/>both)<sp/>what<sp/>is<sp/>agreed<sp/>by<sp/>the<sp/>offer/answer</highlight></codeline>
<codeline lineno="1714"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>mechanism<sp/><sp/>(added<sp/>by<sp/>jehan:<sp/>and<sp/>encryption<sp/>status<sp/>from<sp/>media<sp/>which<sp/>is<sp/>much<sp/>stronger<sp/>than<sp/>only<sp/>result<sp/>of<sp/>offer/answer<sp/>)</highlight></codeline>
<codeline lineno="1715"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>Typically<sp/>there<sp/>can<sp/>be<sp/>inactive<sp/>streams<sp/>for<sp/>which<sp/>the<sp/>media<sp/>layer<sp/>has<sp/>no<sp/>idea<sp/>of<sp/>whether<sp/>they<sp/>are<sp/>encrypted<sp/>or<sp/>not.</highlight></codeline>
<codeline lineno="1716"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1717"><highlight class="normal"></highlight></codeline>
<codeline lineno="1718"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(call-&gt;params-&gt;media_encryption)<sp/>{</highlight></codeline>
<codeline lineno="1719"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__media__parameters_1ggac01228dce297dfe24304be6a1d2cfa0ba45e6b6334e661aa1680c48901789495b" kindref="member">LinphoneMediaEncryptionZRTP</ref>:</highlight></codeline>
<codeline lineno="1720"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(at_least_one_stream_started(call)){</highlight></codeline>
<codeline lineno="1721"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((all_streams_encrypted<sp/>=<sp/>linphone_call_all_streams_encrypted(call))<sp/>&amp;&amp;<sp/>linphone_call_get_authentication_token(call))<sp/>{</highlight></codeline>
<codeline lineno="1722"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;media_encryption=<ref refid="group__media__parameters_1ggac01228dce297dfe24304be6a1d2cfa0ba45e6b6334e661aa1680c48901789495b" kindref="member">LinphoneMediaEncryptionZRTP</ref>;</highlight></codeline>
<codeline lineno="1723"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="1724"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Encryption<sp/>was<sp/>requested<sp/>to<sp/>be<sp/>%s,<sp/>but<sp/>isn&apos;t<sp/>effective<sp/>(all_streams_encrypted=%i,<sp/>auth_token=%s)&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="1725"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__media__parameters_1gaafcbe94c69085b5a9931391548a26080" kindref="member">linphone_media_encryption_to_string</ref>(call-&gt;params-&gt;media_encryption),<sp/>all_streams_encrypted,<sp/>call-&gt;auth_token<sp/>==<sp/>NULL<sp/>?<sp/></highlight><highlight class="stringliteral">&quot;&quot;</highlight><highlight class="normal"><sp/>:<sp/>call-&gt;auth_token);</highlight></codeline>
<codeline lineno="1726"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;media_encryption=<ref refid="group__media__parameters_1ggac01228dce297dfe24304be6a1d2cfa0baa30caf910eb4b60f6f5e02156f5bf451" kindref="member">LinphoneMediaEncryptionNone</ref>;</highlight></codeline>
<codeline lineno="1727"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1728"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="comment">//else<sp/>don&apos;t<sp/>update<sp/>the<sp/>state<sp/>if<sp/>all<sp/>streams<sp/>are<sp/>shutdown.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1729"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1730"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__media__parameters_1ggac01228dce297dfe24304be6a1d2cfa0ba62124fc2fc42d6f7f821fd5f6550c776" kindref="member">LinphoneMediaEncryptionDTLS</ref>:</highlight></codeline>
<codeline lineno="1731"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__media__parameters_1ggac01228dce297dfe24304be6a1d2cfa0baa4bbefa58306fc1c23e2525a44a5ab88" kindref="member">LinphoneMediaEncryptionSRTP</ref>:</highlight></codeline>
<codeline lineno="1732"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(at_least_one_stream_started(call)){</highlight></codeline>
<codeline lineno="1733"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(linphone_call_get_n_active_streams(call)==0<sp/>||<sp/>(all_streams_encrypted<sp/>=<sp/>linphone_call_all_streams_encrypted(call)))<sp/>{</highlight></codeline>
<codeline lineno="1734"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;media_encryption<sp/>=<sp/>call-&gt;params-&gt;media_encryption;</highlight></codeline>
<codeline lineno="1735"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="1736"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Encryption<sp/>was<sp/>requested<sp/>to<sp/>be<sp/>%s,<sp/>but<sp/>isn&apos;t<sp/>effective<sp/>(all_streams_encrypted=%i)&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="1737"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__media__parameters_1gaafcbe94c69085b5a9931391548a26080" kindref="member">linphone_media_encryption_to_string</ref>(call-&gt;params-&gt;media_encryption),<sp/>all_streams_encrypted);</highlight></codeline>
<codeline lineno="1738"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;media_encryption=<ref refid="group__media__parameters_1ggac01228dce297dfe24304be6a1d2cfa0baa30caf910eb4b60f6f5e02156f5bf451" kindref="member">LinphoneMediaEncryptionNone</ref>;</highlight></codeline>
<codeline lineno="1739"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1740"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="comment">//else<sp/>don&apos;t<sp/>update<sp/>the<sp/>state<sp/>if<sp/>all<sp/>streams<sp/>are<sp/>shutdown.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1741"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1742"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__media__parameters_1ggac01228dce297dfe24304be6a1d2cfa0baa30caf910eb4b60f6f5e02156f5bf451" kindref="member">LinphoneMediaEncryptionNone</ref>:</highlight></codeline>
<codeline lineno="1743"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;media_encryption=<ref refid="group__media__parameters_1ggac01228dce297dfe24304be6a1d2cfa0baa30caf910eb4b60f6f5e02156f5bf451" kindref="member">LinphoneMediaEncryptionNone</ref>;</highlight></codeline>
<codeline lineno="1744"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="1745"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1746"><highlight class="normal"></highlight></codeline>
<codeline lineno="1747"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;avpf_enabled<sp/>=<sp/>linphone_call_all_streams_avpf_enabled(call);</highlight></codeline>
<codeline lineno="1748"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;current_params-&gt;avpf_enabled<sp/>==<sp/>TRUE)<sp/>{</highlight></codeline>
<codeline lineno="1749"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;avpf_rr_interval<sp/>=<sp/>linphone_call_get_avpf_rr_interval(call);</highlight></codeline>
<codeline lineno="1750"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="1751"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;avpf_rr_interval<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="1752"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1753"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(md){</highlight></codeline>
<codeline lineno="1754"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*rtp_addr;</highlight></codeline>
<codeline lineno="1755"><highlight class="normal"></highlight></codeline>
<codeline lineno="1756"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalStreamDescription<sp/>*sd=sal_media_description_find_best_stream(md,SalAudio);</highlight></codeline>
<codeline lineno="1757"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;audio_dir=sd<sp/>?<sp/>media_direction_from_sal_stream_dir(sd-&gt;dir)<sp/>:<sp/>LinphoneMediaDirectionInactive;</highlight></codeline>
<codeline lineno="1758"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;current_params-&gt;audio_dir<sp/>!=<sp/>LinphoneMediaDirectionInactive)<sp/>{</highlight></codeline>
<codeline lineno="1759"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_addr<sp/>=<sp/>sd-&gt;rtp_addr[0]!=</highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal"><sp/>?<sp/>sd-&gt;rtp_addr<sp/>:<sp/>call-&gt;resultdesc-&gt;addr;</highlight></codeline>
<codeline lineno="1760"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;audio_multicast_enabled<sp/>=<sp/>ms_is_multicast(rtp_addr);</highlight></codeline>
<codeline lineno="1761"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1762"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;audio_multicast_enabled<sp/>=<sp/>FALSE;</highlight></codeline>
<codeline lineno="1763"><highlight class="normal"></highlight></codeline>
<codeline lineno="1764"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sd=sal_media_description_find_best_stream(md,SalVideo);</highlight></codeline>
<codeline lineno="1765"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;video_dir=sd<sp/>?<sp/>media_direction_from_sal_stream_dir(sd-&gt;dir)<sp/>:<sp/>LinphoneMediaDirectionInactive;</highlight></codeline>
<codeline lineno="1766"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;current_params-&gt;video_dir<sp/>!=<sp/>LinphoneMediaDirectionInactive)<sp/>{</highlight></codeline>
<codeline lineno="1767"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_addr<sp/>=<sp/>sd-&gt;rtp_addr[0]!=</highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal"><sp/>?<sp/>sd-&gt;rtp_addr<sp/>:<sp/>call-&gt;resultdesc-&gt;addr;</highlight></codeline>
<codeline lineno="1768"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;video_multicast_enabled<sp/>=<sp/>ms_is_multicast(rtp_addr);</highlight></codeline>
<codeline lineno="1769"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1770"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;video_multicast_enabled<sp/>=<sp/>FALSE;</highlight></codeline>
<codeline lineno="1771"><highlight class="normal"></highlight></codeline>
<codeline lineno="1772"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sd=sal_media_description_find_best_stream(md,SalText);</highlight></codeline>
<codeline lineno="1773"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1774"><highlight class="normal"></highlight></codeline>
<codeline lineno="1775"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>call-&gt;current_params;</highlight></codeline>
<codeline lineno="1776"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1777"><highlight class="normal"></highlight></codeline>
<codeline lineno="1784"><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gaa91f7e76e8f038ae9acdf42d1bc80a22" kindref="member">LinphoneCallParams</ref><sp/>*<sp/><ref refid="group__call__control_1ga65b4ca2f01d684019f6ae5621eb430f6" kindref="member">linphone_call_get_remote_params</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="1785"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;op){</highlight></codeline>
<codeline lineno="1786"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1gaa91f7e76e8f038ae9acdf42d1bc80a22" kindref="member">LinphoneCallParams</ref><sp/>*cp;</highlight></codeline>
<codeline lineno="1787"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalMediaDescription<sp/>*md;</highlight></codeline>
<codeline lineno="1788"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>SalCustomHeader<sp/>*ch;</highlight></codeline>
<codeline lineno="1789"><highlight class="normal"></highlight></codeline>
<codeline lineno="1790"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>md=sal_call_get_remote_media_description(call-&gt;op);</highlight></codeline>
<codeline lineno="1791"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(md)<sp/>{</highlight></codeline>
<codeline lineno="1792"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalStreamDescription<sp/>*sd;</highlight></codeline>
<codeline lineno="1793"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="1794"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nb_audio_streams<sp/>=<sp/>sal_media_description_nb_active_streams_of_type(md,<sp/>SalAudio);</highlight></codeline>
<codeline lineno="1795"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nb_video_streams<sp/>=<sp/>sal_media_description_nb_active_streams_of_type(md,<sp/>SalVideo);</highlight></codeline>
<codeline lineno="1796"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nb_text_streams<sp/>=<sp/>sal_media_description_nb_active_streams_of_type(md,<sp/>SalText);</highlight></codeline>
<codeline lineno="1797"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;remote_params<sp/>!=<sp/>NULL)<sp/><ref refid="group__call__control_1ga341015ca73484947fca50896432106d2" kindref="member">linphone_call_params_unref</ref>(call-&gt;remote_params);</highlight></codeline>
<codeline lineno="1798"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cp<sp/>=<sp/>call-&gt;remote_params<sp/>=<sp/>linphone_call_params_new();</highlight></codeline>
<codeline lineno="1799"><highlight class="normal"></highlight></codeline>
<codeline lineno="1800"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>nb_video_streams;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="1801"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sd<sp/>=<sp/>sal_media_description_get_active_stream_of_type(md,<sp/>SalVideo,<sp/>i);</highlight></codeline>
<codeline lineno="1802"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sal_stream_description_active(sd)<sp/>==<sp/>TRUE)<sp/>cp-&gt;has_video<sp/>=<sp/>TRUE;</highlight></codeline>
<codeline lineno="1803"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sal_stream_description_has_srtp(sd)<sp/>==<sp/>TRUE)<sp/>cp-&gt;media_encryption<sp/>=<sp/><ref refid="group__media__parameters_1ggac01228dce297dfe24304be6a1d2cfa0baa4bbefa58306fc1c23e2525a44a5ab88" kindref="member">LinphoneMediaEncryptionSRTP</ref>;</highlight></codeline>
<codeline lineno="1804"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1805"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>nb_audio_streams;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="1806"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sd<sp/>=<sp/>sal_media_description_get_active_stream_of_type(md,<sp/>SalAudio,<sp/>i);</highlight></codeline>
<codeline lineno="1807"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sal_stream_description_has_srtp(sd)<sp/>==<sp/>TRUE)<sp/>cp-&gt;media_encryption<sp/>=<sp/><ref refid="group__media__parameters_1ggac01228dce297dfe24304be6a1d2cfa0baa4bbefa58306fc1c23e2525a44a5ab88" kindref="member">LinphoneMediaEncryptionSRTP</ref>;</highlight></codeline>
<codeline lineno="1808"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1809"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>nb_text_streams;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="1810"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sd<sp/>=<sp/>sal_media_description_get_active_stream_of_type(md,<sp/>SalText,<sp/>i);</highlight></codeline>
<codeline lineno="1811"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sal_stream_description_has_srtp(sd)<sp/>==<sp/>TRUE)<sp/>cp-&gt;media_encryption<sp/>=<sp/><ref refid="group__media__parameters_1ggac01228dce297dfe24304be6a1d2cfa0baa4bbefa58306fc1c23e2525a44a5ab88" kindref="member">LinphoneMediaEncryptionSRTP</ref>;</highlight></codeline>
<codeline lineno="1812"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cp-&gt;realtimetext_enabled<sp/>=<sp/>TRUE;</highlight></codeline>
<codeline lineno="1813"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1814"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!cp-&gt;has_video){</highlight></codeline>
<codeline lineno="1815"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(md-&gt;bandwidth&gt;0<sp/>&amp;&amp;<sp/>md-&gt;bandwidth&lt;=linphone_core_get_edge_bw(call-&gt;core)){</highlight></codeline>
<codeline lineno="1816"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cp-&gt;low_bandwidth=TRUE;</highlight></codeline>
<codeline lineno="1817"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1818"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1819"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(md-&gt;name[0]!=</highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal">)<sp/><ref refid="group__call__control_1gac17c4cd38ef3e357b5afdc2fca458c73" kindref="member">linphone_call_params_set_session_name</ref>(cp,md-&gt;name);</highlight></codeline>
<codeline lineno="1820"><highlight class="normal"></highlight></codeline>
<codeline lineno="1821"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_params_set_custom_sdp_attributes(call-&gt;remote_params,<sp/>md-&gt;custom_sdp_attributes);</highlight></codeline>
<codeline lineno="1822"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_params_set_custom_sdp_media_attributes(call-&gt;remote_params,<sp/>LinphoneStreamTypeAudio,<sp/>md-&gt;streams[call-&gt;main_audio_stream_index].custom_sdp_attributes);</highlight></codeline>
<codeline lineno="1823"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_params_set_custom_sdp_media_attributes(call-&gt;remote_params,<sp/>LinphoneStreamTypeVideo,<sp/>md-&gt;streams[call-&gt;main_video_stream_index].custom_sdp_attributes);</highlight></codeline>
<codeline lineno="1824"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_params_set_custom_sdp_media_attributes(call-&gt;remote_params,<sp/>LinphoneStreamTypeText,<sp/>md-&gt;streams[call-&gt;main_text_stream_index].custom_sdp_attributes);</highlight></codeline>
<codeline lineno="1825"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1826"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ch<sp/>=<sp/>sal_op_get_recv_custom_header(call-&gt;op);</highlight></codeline>
<codeline lineno="1827"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ch){</highlight></codeline>
<codeline lineno="1828"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*instanciate<sp/>a<sp/>remote_params<sp/>only<sp/>if<sp/>a<sp/>SIP<sp/>message<sp/>was<sp/>received<sp/>before<sp/>(custom<sp/>headers<sp/>indicates<sp/>this).*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1829"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;remote_params<sp/>==<sp/>NULL)<sp/>call-&gt;remote_params<sp/>=<sp/>linphone_call_params_new();</highlight></codeline>
<codeline lineno="1830"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_params_set_custom_headers(call-&gt;remote_params,<sp/>ch);</highlight></codeline>
<codeline lineno="1831"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1832"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>call-&gt;remote_params;</highlight></codeline>
<codeline lineno="1833"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1834"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>NULL;</highlight></codeline>
<codeline lineno="1835"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1836"><highlight class="normal"></highlight></codeline>
<codeline lineno="1841"><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref><sp/>*<sp/><ref refid="group__call__control_1ga7c43232df9cd89feb0c68b68c34e6ace" kindref="member">linphone_call_get_remote_address</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="1842"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>call-&gt;dir==<ref refid="group__call__logs_1ggaa3077de7d4214529094998ce441f61e1aa4030176bbddea10e361ce320946e202" kindref="member">LinphoneCallIncoming</ref><sp/>?<sp/>call-&gt;log-&gt;from<sp/>:<sp/>call-&gt;log-&gt;to;</highlight></codeline>
<codeline lineno="1843"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1844"><highlight class="normal"></highlight></codeline>
<codeline lineno="1850"><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*<ref refid="group__call__control_1ga89252821dcaee90338937c7adb28db09" kindref="member">linphone_call_get_remote_address_as_string</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="1851"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="group__linphone__address_1ga24c1a16f49f8b72f2bab65cc5d8a51af" kindref="member">linphone_address_as_string</ref>(<ref refid="group__call__control_1ga7c43232df9cd89feb0c68b68c34e6ace" kindref="member">linphone_call_get_remote_address</ref>(call));</highlight></codeline>
<codeline lineno="1852"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1853"><highlight class="normal"></highlight></codeline>
<codeline lineno="1857"><highlight class="normal"><ref refid="group__call__control_1ga37dad1a4f935d9cc26ec1f9d2b23691a" kindref="member">LinphoneCallState</ref><sp/><ref refid="group__call__control_1ga4e66e41e6557ea35a07f266918741ffc" kindref="member">linphone_call_get_state</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="1858"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>call-&gt;state;</highlight></codeline>
<codeline lineno="1859"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1860"><highlight class="normal"></highlight></codeline>
<codeline lineno="1864"><highlight class="normal"><ref refid="group__misc_1gabe82a1a1ffc3d6b4e0b51a03028513b7" kindref="member">LinphoneReason</ref><sp/><ref refid="group__call__control_1ga312c73999c94f7e59f307423d40d16b2" kindref="member">linphone_call_get_reason</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="1865"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="group__misc_1ga3297420b41659c4bd1ffb64a1e6b7d64" kindref="member">linphone_error_info_get_reason</ref>(<ref refid="group__call__control_1gaf92313f94a06da10723d7d0e4b4506ad" kindref="member">linphone_call_get_error_info</ref>(call));</highlight></codeline>
<codeline lineno="1866"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1867"><highlight class="normal"></highlight></codeline>
<codeline lineno="1871"><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__misc_1ga8f3b35ce44e1284465ac2859ffbb9db7" kindref="member">LinphoneErrorInfo</ref><sp/>*<ref refid="group__call__control_1gaf92313f94a06da10723d7d0e4b4506ad" kindref="member">linphone_call_get_error_info</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="1872"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;non_op_error.reason!=SalReasonNone){</highlight></codeline>
<codeline lineno="1873"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__misc_1ga8f3b35ce44e1284465ac2859ffbb9db7" kindref="member">LinphoneErrorInfo</ref>*)&amp;call-&gt;non_op_error;</highlight></codeline>
<codeline lineno="1874"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>linphone_error_info_from_sal_op(call-&gt;op);</highlight></codeline>
<codeline lineno="1875"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1876"><highlight class="normal"></highlight></codeline>
<codeline lineno="1883"><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*<ref refid="group__call__control_1gaea8186825ead90bcb321d91d97b48fe5" kindref="member">linphone_call_get_user_data</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)</highlight></codeline>
<codeline lineno="1884"><highlight class="normal">{</highlight></codeline>
<codeline lineno="1885"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>call-&gt;user_data;</highlight></codeline>
<codeline lineno="1886"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1887"><highlight class="normal"></highlight></codeline>
<codeline lineno="1895"><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gab4cc2d61a2c81bba6d4cbdfa836805ca" kindref="member">linphone_call_set_user_data</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*user_pointer)</highlight></codeline>
<codeline lineno="1896"><highlight class="normal">{</highlight></codeline>
<codeline lineno="1897"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;user_data<sp/>=<sp/>user_pointer;</highlight></codeline>
<codeline lineno="1898"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1899"><highlight class="normal"></highlight></codeline>
<codeline lineno="1903"><highlight class="normal"><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*<ref refid="group__call__control_1gab090be4c386d3131ecaea751ff76cd85" kindref="member">linphone_call_get_call_log</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="1904"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>call-&gt;log;</highlight></codeline>
<codeline lineno="1905"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1906"><highlight class="normal"></highlight></codeline>
<codeline lineno="1910"><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*<ref refid="group__call__control_1ga155679984062a8e08b5f0e447784e6a0" kindref="member">linphone_call_get_refer_to</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="1911"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>call-&gt;refer_to;</highlight></codeline>
<codeline lineno="1912"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1913"><highlight class="normal"></highlight></codeline>
<codeline lineno="1918"><highlight class="normal"><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*<ref refid="group__call__control_1ga6ee40f9d651f21306b64ed15bfd37f81" kindref="member">linphone_call_get_transferer_call</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="1919"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>call-&gt;referer;</highlight></codeline>
<codeline lineno="1920"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1921"><highlight class="normal"></highlight></codeline>
<codeline lineno="1925"><highlight class="normal"><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*<ref refid="group__call__control_1ga7084aa3aa5add54b991e0909080c586d" kindref="member">linphone_call_get_transfer_target_call</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="1926"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>call-&gt;transfer_target;</highlight></codeline>
<codeline lineno="1927"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1928"><highlight class="normal"></highlight></codeline>
<codeline lineno="1932"><highlight class="normal"><ref refid="group__call__logs_1ga779ac636d8b652c5130da18827c13e5a" kindref="member">LinphoneCallDir</ref><sp/><ref refid="group__call__control_1ga9ba9ecf7390779c1fea3438e8dfad3af" kindref="member">linphone_call_get_dir</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="1933"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>call-&gt;log-&gt;dir;</highlight></codeline>
<codeline lineno="1934"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1935"><highlight class="normal"></highlight></codeline>
<codeline lineno="1939"><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*<ref refid="group__call__control_1ga33969d008c7faf43c9a38348f559269e" kindref="member">linphone_call_get_remote_user_agent</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="1940"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;op){</highlight></codeline>
<codeline lineno="1941"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>sal_op_get_remote_ua<sp/>(call-&gt;op);</highlight></codeline>
<codeline lineno="1942"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1943"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>NULL;</highlight></codeline>
<codeline lineno="1944"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1945"><highlight class="normal"></highlight></codeline>
<codeline lineno="1949"><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*<ref refid="group__call__control_1ga6124b2e44ec3e79a0150fed322328880" kindref="member">linphone_call_get_remote_contact</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="1950"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gaa91f7e76e8f038ae9acdf42d1bc80a22" kindref="member">LinphoneCallParams</ref>*<sp/>lcp<sp/>=<sp/><ref refid="group__call__control_1ga65b4ca2f01d684019f6ae5621eb430f6" kindref="member">linphone_call_get_remote_params</ref>(call);</highlight></codeline>
<codeline lineno="1951"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(<sp/>lcp<sp/>){</highlight></codeline>
<codeline lineno="1952"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>we&apos;re<sp/>not<sp/>using<sp/>sal_op_get_remote_contact()<sp/>here<sp/>because<sp/>the<sp/>returned<sp/>value<sp/>is<sp/>stripped<sp/>from</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1953"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>params<sp/>that<sp/>we<sp/>need,<sp/>like<sp/>the<sp/>instanceid.<sp/>Getting<sp/>it<sp/>from<sp/>the<sp/>headers<sp/>will<sp/>make<sp/>sure<sp/>we</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1954"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>get<sp/>everything</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1955"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ga35ff99ed72925d1160706adf8ce89325" kindref="member">linphone_call_params_get_custom_header</ref>(lcp,<sp/></highlight><highlight class="stringliteral">&quot;Contact&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="1956"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1957"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>NULL;</highlight></codeline>
<codeline lineno="1958"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1959"><highlight class="normal"></highlight></codeline>
<codeline lineno="1960"><highlight class="normal"></highlight></codeline>
<codeline lineno="1969"><highlight class="normal">bool_t<sp/><ref refid="group__call__control_1ga43844da0d22ffe05c99476cae741fa50" kindref="member">linphone_call_has_transfer_pending</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="1970"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>call-&gt;refer_pending;</highlight></codeline>
<codeline lineno="1971"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1972"><highlight class="normal"></highlight></codeline>
<codeline lineno="1976"><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ga0ad1da7a56b11f5e0b2fe6f91d3d6bb5" kindref="member">linphone_call_get_duration</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="1977"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;log-&gt;connected_date_time==0)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="1978"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal">)(ms_time(NULL)<sp/>-<sp/>call-&gt;log-&gt;connected_date_time);</highlight></codeline>
<codeline lineno="1979"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1980"><highlight class="normal"></highlight></codeline>
<codeline lineno="1987"><highlight class="normal"><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*<ref refid="group__call__control_1ga9baae328206769b75aa8a3af9057d8a9" kindref="member">linphone_call_get_replaced_call</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="1988"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalOp<sp/>*op=sal_call_get_replaces(call-&gt;op);</highlight></codeline>
<codeline lineno="1989"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(op){</highlight></codeline>
<codeline lineno="1990"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref>*)sal_op_get_user_pointer(op);</highlight></codeline>
<codeline lineno="1991"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="1992"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>NULL;</highlight></codeline>
<codeline lineno="1993"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1994"><highlight class="normal"></highlight></codeline>
<codeline lineno="1998"><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gae51907817a70dd89d9f67aff13bf2eab" kindref="member">linphone_call_enable_camera</ref><sp/>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/>bool_t<sp/>enable){</highlight></codeline>
<codeline lineno="1999"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>VIDEO_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2000"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;camera_enabled=enable;</highlight></codeline>
<codeline lineno="2001"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((call-&gt;state==<ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaacebe90cc045331e513d069872f9c84d3" kindref="member">LinphoneCallStreamsRunning</ref><sp/>||<sp/>call-&gt;state==<ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa7a8cd38252c1a9d8c0ecbdec1aef899d" kindref="member">LinphoneCallOutgoingEarlyMedia</ref><sp/>||<sp/>call-&gt;state==<ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaab8684757f565989d4212026f755762ed" kindref="member">LinphoneCallIncomingEarlyMedia</ref>)</highlight></codeline>
<codeline lineno="2002"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>&amp;&amp;<sp/>call-&gt;videostream!=NULL<sp/>&amp;&amp;<sp/>video_stream_started(call-&gt;videostream)<sp/>){</highlight></codeline>
<codeline lineno="2003"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(video_stream_get_camera(call-&gt;videostream)<sp/>!=<sp/>linphone_call_get_video_device(call))<sp/>{</highlight></codeline>
<codeline lineno="2004"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*cur_cam,<sp/>*new_cam;</highlight></codeline>
<codeline lineno="2005"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cur_cam<sp/>=<sp/>video_stream_get_camera(call-&gt;videostream)<sp/>?<sp/>ms_web_cam_get_name(video_stream_get_camera(call-&gt;videostream))<sp/>:<sp/></highlight><highlight class="stringliteral">&quot;NULL&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="2006"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>new_cam<sp/>=<sp/>linphone_call_get_video_device(call)<sp/>?<sp/>ms_web_cam_get_name(linphone_call_get_video_device(call))<sp/>:<sp/></highlight><highlight class="stringliteral">&quot;NULL&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="2007"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Switching<sp/>video<sp/>cam<sp/>from<sp/>[%s]<sp/>to<sp/>[%s]<sp/>on<sp/>call<sp/>[%p]&quot;</highlight><highlight class="normal"><sp/>,<sp/>cur_cam,<sp/>new_cam,<sp/>call);</highlight></codeline>
<codeline lineno="2008"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_change_camera(call-&gt;videostream,<sp/>linphone_call_get_video_device(call));</highlight></codeline>
<codeline lineno="2009"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2010"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2011"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2012"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2013"><highlight class="normal"></highlight></codeline>
<codeline lineno="2017"><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ga7b713f067c9ca5a2f95bc0dd51c1787a" kindref="member">linphone_call_send_vfu_request</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="2018"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>VIDEO_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2019"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gaa91f7e76e8f038ae9acdf42d1bc80a22" kindref="member">LinphoneCallParams</ref><sp/>*current_params<sp/>=<sp/><ref refid="group__call__control_1ga768bbd4e2869556bc23830a7b1e4eb5c" kindref="member">linphone_call_get_current_params</ref>(call);</highlight></codeline>
<codeline lineno="2020"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(current_params-&gt;avpf_enabled<sp/>&amp;&amp;<sp/>call-&gt;videostream<sp/>&amp;&amp;<sp/>media_stream_get_state((</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MediaStream<sp/>*)call-&gt;videostream)<sp/>==<sp/>MSStreamStarted)<sp/>{</highlight></codeline>
<codeline lineno="2021"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Request<sp/>Full<sp/>Intra<sp/>Request<sp/>on<sp/>call<sp/>[%p]&quot;</highlight><highlight class="normal">,<sp/>call);</highlight></codeline>
<codeline lineno="2022"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_send_fir(call-&gt;videostream);</highlight></codeline>
<codeline lineno="2023"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;core-&gt;sip_conf.vfu_with_info)<sp/>{</highlight></codeline>
<codeline lineno="2024"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaacebe90cc045331e513d069872f9c84d3" kindref="member">LinphoneCallStreamsRunning</ref><sp/>==<sp/><ref refid="group__call__control_1ga4e66e41e6557ea35a07f266918741ffc" kindref="member">linphone_call_get_state</ref>(call))</highlight></codeline>
<codeline lineno="2025"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sal_call_send_vfu_request(call-&gt;op);</highlight></codeline>
<codeline lineno="2026"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="2027"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;vfu<sp/>request<sp/>using<sp/>sip<sp/>disabled<sp/>from<sp/>config<sp/>[sip,vfu_with_info]&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="2028"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2029"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2030"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2031"><highlight class="normal"></highlight></codeline>
<codeline lineno="2032"><highlight class="normal"></highlight></codeline>
<codeline lineno="2040"><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ga8a386f2d8bece0d3fe7d51a0de31741e" kindref="member">linphone_call_take_video_snapshot</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*file){</highlight></codeline>
<codeline lineno="2041"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>VIDEO_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2042"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;videostream!=NULL<sp/>&amp;&amp;<sp/>call-&gt;videostream-&gt;jpegwriter!=NULL){</highlight></codeline>
<codeline lineno="2043"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>ms_filter_call_method(call-&gt;videostream-&gt;jpegwriter,MS_JPEG_WRITER_TAKE_SNAPSHOT,(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*)file);</highlight></codeline>
<codeline lineno="2044"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2045"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;Cannot<sp/>take<sp/>snapshot:<sp/>no<sp/>currently<sp/>running<sp/>video<sp/>stream<sp/>on<sp/>this<sp/>call.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="2046"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2047"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1;</highlight></codeline>
<codeline lineno="2048"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2049"><highlight class="normal"></highlight></codeline>
<codeline lineno="2057"><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ga7ecd5d57995205cde4abb2e6f4c2ab3c" kindref="member">linphone_call_take_preview_snapshot</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*file){</highlight></codeline>
<codeline lineno="2058"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>VIDEO_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2059"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;videostream!=NULL<sp/>&amp;&amp;<sp/>call-&gt;videostream-&gt;local_jpegwriter!=NULL){</highlight></codeline>
<codeline lineno="2060"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>ms_filter_call_method(call-&gt;videostream-&gt;local_jpegwriter,MS_JPEG_WRITER_TAKE_SNAPSHOT,(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*)file);</highlight></codeline>
<codeline lineno="2061"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2062"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;Cannot<sp/>take<sp/>local<sp/>snapshot:<sp/>no<sp/>currently<sp/>running<sp/>video<sp/>stream<sp/>on<sp/>this<sp/>call.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="2063"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1;</highlight></codeline>
<codeline lineno="2064"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2065"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1;</highlight></codeline>
<codeline lineno="2066"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2067"><highlight class="normal"></highlight></codeline>
<codeline lineno="2071"><highlight class="normal">bool_t<sp/><ref refid="group__call__control_1ga6a5a1d9f49aee0666c137ce246bc85f6" kindref="member">linphone_call_camera_enabled</ref><sp/>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="2072"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>call-&gt;camera_enabled;</highlight></codeline>
<codeline lineno="2073"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2074"><highlight class="normal"></highlight></codeline>
<codeline lineno="2075"><highlight class="normal"></highlight></codeline>
<codeline lineno="2080"><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/><ref refid="group__call__control_1gad13ca78a01934619b2ec52e803ff837d" kindref="member">linphone_privacy_to_string</ref>(<ref refid="group__call__control_1ga909923983eb026ab20a137972ded25c6" kindref="member">LinphonePrivacy</ref><sp/>privacy)<sp/>{</highlight></codeline>
<codeline lineno="2081"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal">(privacy)<sp/>{</highlight></codeline>
<codeline lineno="2082"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gga99bd271365a2a47d5e804abec3de8aeba90eb4ddfe04dd831034d9435e9c11658" kindref="member">LinphonePrivacyDefault</ref>:<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;LinphonePrivacyDefault&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="2083"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gga99bd271365a2a47d5e804abec3de8aebaa6bcff1a4819f4427ca04a09cfe1e70e" kindref="member">LinphonePrivacyUser</ref>:<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;LinphonePrivacyUser&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="2084"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gga99bd271365a2a47d5e804abec3de8aebac90f360dee6af6d5e7adf562950dbd71" kindref="member">LinphonePrivacyHeader</ref>:<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;LinphonePrivacyHeader&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="2085"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gga99bd271365a2a47d5e804abec3de8aeba79c73809b6dec6641eb31db192f01083" kindref="member">LinphonePrivacySession</ref>:<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;LinphonePrivacySession&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="2086"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gga99bd271365a2a47d5e804abec3de8aeba57c206bc370202e2617ac8a26399d0a2" kindref="member">LinphonePrivacyId</ref>:<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;LinphonePrivacyId&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="2087"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gga99bd271365a2a47d5e804abec3de8aeba0067ed5bf03cbd75695da32bcaea3805" kindref="member">LinphonePrivacyNone</ref>:<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;LinphonePrivacyNone&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="2088"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gga99bd271365a2a47d5e804abec3de8aeba88080c02e204af4a071b5496c294f823" kindref="member">LinphonePrivacyCritical</ref>:<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;LinphonePrivacyCritical&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="2089"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;Unknown<sp/>privacy<sp/>mode&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="2090"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2091"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2092"><highlight class="normal"></highlight></codeline>
<codeline lineno="2093"><highlight class="normal"></highlight></codeline>
<codeline lineno="2099"><highlight class="preprocessor">#ifdef<sp/>TEST_EXT_RENDERER</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2100"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>rendercb(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*data,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MSPicture<sp/>*local,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MSPicture<sp/>*remote){</highlight></codeline>
<codeline lineno="2101"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;rendercb,<sp/>local<sp/>buffer=%p,<sp/>remote<sp/>buffer=%p&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="2102"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>local<sp/>?<sp/>local-&gt;planes[0]<sp/>:<sp/>NULL,<sp/>remote?<sp/>remote-&gt;planes[0]<sp/>:<sp/>NULL);</highlight></codeline>
<codeline lineno="2103"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2104"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2105"><highlight class="normal"></highlight></codeline>
<codeline lineno="2106"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>VIDEO_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2107"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>video_stream_event_cb(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*user_pointer,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MSFilter<sp/>*f,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>event_id,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*args){</highlight></codeline>
<codeline lineno="2108"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref>*<sp/>call<sp/>=<sp/>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref>*)<sp/>user_pointer;</highlight></codeline>
<codeline lineno="2109"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(event_id)<sp/>{</highlight></codeline>
<codeline lineno="2110"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>MS_VIDEO_DECODER_DECODING_ERRORS:</highlight></codeline>
<codeline lineno="2111"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;MS_VIDEO_DECODER_DECODING_ERRORS&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="2112"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;videostream<sp/>&amp;&amp;<sp/>(video_stream_is_decoding_error_to_be_reported(call-&gt;videostream,<sp/>5000)<sp/>==<sp/>TRUE))<sp/>{</highlight></codeline>
<codeline lineno="2113"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_decoding_error_reported(call-&gt;videostream);</highlight></codeline>
<codeline lineno="2114"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1ga7b713f067c9ca5a2f95bc0dd51c1787a" kindref="member">linphone_call_send_vfu_request</ref>(call);</highlight></codeline>
<codeline lineno="2115"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2116"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="2117"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>MS_VIDEO_DECODER_RECOVERED_FROM_ERRORS:</highlight></codeline>
<codeline lineno="2118"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;MS_VIDEO_DECODER_RECOVERED_FROM_ERRORS&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="2119"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;videostream)<sp/>{</highlight></codeline>
<codeline lineno="2120"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_decoding_error_recovered(call-&gt;videostream);</highlight></codeline>
<codeline lineno="2121"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2122"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="2123"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>MS_VIDEO_DECODER_FIRST_IMAGE_DECODED:</highlight></codeline>
<codeline lineno="2124"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;First<sp/>video<sp/>frame<sp/>decoded<sp/>successfully&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="2125"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;nextVideoFrameDecoded._func<sp/>!=<sp/>NULL){</highlight></codeline>
<codeline lineno="2126"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;nextVideoFrameDecoded._func(call,<sp/>call-&gt;nextVideoFrameDecoded._user_data);</highlight></codeline>
<codeline lineno="2127"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;nextVideoFrameDecoded._func<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="2128"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;nextVideoFrameDecoded._user_data<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="2129"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2130"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="2131"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>MS_VIDEO_DECODER_SEND_PLI:</highlight></codeline>
<codeline lineno="2132"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>MS_VIDEO_DECODER_SEND_SLI:</highlight></codeline>
<codeline lineno="2133"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>MS_VIDEO_DECODER_SEND_RPSI:</highlight></codeline>
<codeline lineno="2134"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Handled<sp/>internally<sp/>by<sp/>mediastreamer2.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2135"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="2136"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="2137"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;Unhandled<sp/>event<sp/>%i&quot;</highlight><highlight class="normal">,<sp/>event_id);</highlight></codeline>
<codeline lineno="2138"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="2139"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2140"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2141"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2142"><highlight class="normal"></highlight></codeline>
<codeline lineno="2143"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>_linphone_call_set_next_video_frame_decoded_trigger(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="2144"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>VIDEO_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2145"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;nextVideoFrameDecoded._func<sp/>&amp;&amp;<sp/>call-&gt;videostream<sp/>&amp;&amp;<sp/>call-&gt;videostream-&gt;ms.decoder)</highlight></codeline>
<codeline lineno="2146"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method_noarg(call-&gt;videostream-&gt;ms.decoder,<sp/>MS_VIDEO_DECODER_RESET_FIRST_IMAGE_NOTIFICATION);</highlight></codeline>
<codeline lineno="2147"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2148"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2149"><highlight class="normal"></highlight></codeline>
<codeline lineno="2150"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_set_next_video_frame_decoded_callback(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/>LinphoneCallCbFunc<sp/>cb,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*<sp/>user_data)<sp/>{</highlight></codeline>
<codeline lineno="2151"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;nextVideoFrameDecoded._func<sp/>=<sp/>cb;</highlight></codeline>
<codeline lineno="2152"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;nextVideoFrameDecoded._user_data<sp/>=<sp/>user_data;</highlight></codeline>
<codeline lineno="2153"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>_linphone_call_set_next_video_frame_decoded_trigger(call);</highlight></codeline>
<codeline lineno="2154"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2155"><highlight class="normal"></highlight></codeline>
<codeline lineno="2156"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>port_config_set_random_choosed(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>stream_index,<sp/>RtpSession<sp/>*session){</highlight></codeline>
<codeline lineno="2157"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;media_ports[stream_index].rtp_port=rtp_session_get_local_port(session);</highlight></codeline>
<codeline lineno="2158"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;media_ports[stream_index].rtcp_port=rtp_session_get_local_rtcp_port(session);</highlight></codeline>
<codeline lineno="2159"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2160"><highlight class="normal"></highlight></codeline>
<codeline lineno="2161"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>_linphone_call_prepare_ice_for_stream(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>stream_index,<sp/>bool_t<sp/>create_checklist){</highlight></codeline>
<codeline lineno="2162"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MediaStream<sp/>*ms<sp/>=<sp/>stream_index<sp/>==<sp/>call-&gt;main_audio_stream_index<sp/>?<sp/>(MediaStream*)call-&gt;audiostream<sp/>:<sp/>stream_index<sp/>==<sp/>call-&gt;main_video_stream_index<sp/>?<sp/>(MediaStream*)call-&gt;videostream<sp/>:<sp/>(MediaStream*)call-&gt;textstream;</highlight></codeline>
<codeline lineno="2163"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>((<ref refid="group__network__parameters_1ga9de28ff0fd0f8ff65ef82eba9592276c" kindref="member">linphone_core_get_firewall_policy</ref>(call-&gt;core)<sp/>==<sp/><ref refid="group__network__parameters_1ggadad0a1c27596017d9d9b3c30ef47f5beaeadfb66b915acd91af98e4d5cd47b17b" kindref="member">LinphonePolicyUseIce</ref>)<sp/>&amp;&amp;<sp/>(call-&gt;ice_session<sp/>!=<sp/>NULL)){</highlight></codeline>
<codeline lineno="2164"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IceCheckList<sp/>*cl;</highlight></codeline>
<codeline lineno="2165"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_set_pktinfo(ms-&gt;sessions.rtp_session,<sp/>TRUE);</highlight></codeline>
<codeline lineno="2166"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cl=ice_session_check_list(call-&gt;ice_session,<sp/>stream_index);</highlight></codeline>
<codeline lineno="2167"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(cl<sp/>==<sp/>NULL<sp/>&amp;&amp;<sp/>create_checklist)<sp/>{</highlight></codeline>
<codeline lineno="2168"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cl=ice_check_list_new();</highlight></codeline>
<codeline lineno="2169"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ice_session_add_check_list(call-&gt;ice_session,<sp/>cl,<sp/>stream_index);</highlight></codeline>
<codeline lineno="2170"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Created<sp/>new<sp/>ICE<sp/>check<sp/>list<sp/>for<sp/>stream<sp/>[%i]&quot;</highlight><highlight class="normal">,stream_index);</highlight></codeline>
<codeline lineno="2171"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2172"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(cl){</highlight></codeline>
<codeline lineno="2173"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms-&gt;ice_check_list<sp/>=<sp/>cl;</highlight></codeline>
<codeline lineno="2174"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ice_check_list_set_rtp_session(ms-&gt;ice_check_list,<sp/>ms-&gt;sessions.rtp_session);</highlight></codeline>
<codeline lineno="2175"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2176"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2177"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2178"><highlight class="normal"></highlight></codeline>
<codeline lineno="2179"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>linphone_call_prepare_ice(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/>bool_t<sp/>incoming_offer){</highlight></codeline>
<codeline lineno="2180"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalMediaDescription<sp/>*remote<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="2181"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>has_video=FALSE;</highlight></codeline>
<codeline lineno="2182"><highlight class="normal"></highlight></codeline>
<codeline lineno="2183"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((<ref refid="group__network__parameters_1ga9de28ff0fd0f8ff65ef82eba9592276c" kindref="member">linphone_core_get_firewall_policy</ref>(call-&gt;core)<sp/>==<sp/><ref refid="group__network__parameters_1ggadad0a1c27596017d9d9b3c30ef47f5beaeadfb66b915acd91af98e4d5cd47b17b" kindref="member">LinphonePolicyUseIce</ref>)<sp/>&amp;&amp;<sp/>(call-&gt;ice_session<sp/>!=<sp/>NULL)){</highlight></codeline>
<codeline lineno="2184"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(incoming_offer){</highlight></codeline>
<codeline lineno="2185"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>remote=sal_call_get_remote_media_description(call-&gt;op);</highlight></codeline>
<codeline lineno="2186"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>has_video=<ref refid="group__media__parameters_1gac1113e7a9207bf1525f2d57f352391a7" kindref="member">linphone_core_video_enabled</ref>(call-&gt;core)<sp/>&amp;&amp;<sp/>linphone_core_media_description_contains_video_stream(remote);</highlight></codeline>
<codeline lineno="2187"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>has_video=call-&gt;params-&gt;has_video;</highlight></codeline>
<codeline lineno="2188"><highlight class="normal"></highlight></codeline>
<codeline lineno="2189"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>_linphone_call_prepare_ice_for_stream(call,call-&gt;main_audio_stream_index,TRUE);</highlight></codeline>
<codeline lineno="2190"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(has_video)<sp/>_linphone_call_prepare_ice_for_stream(call,call-&gt;main_video_stream_index,TRUE);</highlight></codeline>
<codeline lineno="2191"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;params-&gt;realtimetext_enabled)<sp/>_linphone_call_prepare_ice_for_stream(call,call-&gt;main_text_stream_index,TRUE);</highlight></codeline>
<codeline lineno="2192"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*start<sp/>ICE<sp/>gathering*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2193"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(incoming_offer)</highlight></codeline>
<codeline lineno="2194"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_update_ice_from_remote_media_description(call,remote);<sp/></highlight><highlight class="comment">/*this<sp/>may<sp/>delete<sp/>the<sp/>ice<sp/>session*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2195"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;ice_session<sp/>&amp;&amp;<sp/>!ice_session_candidates_gathered(call-&gt;ice_session)){</highlight></codeline>
<codeline lineno="2196"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;audiostream-&gt;ms.state==MSStreamInitialized)</highlight></codeline>
<codeline lineno="2197"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_prepare_sound(call-&gt;audiostream,<sp/>NULL,<sp/>NULL);</highlight></codeline>
<codeline lineno="2198"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>VIDEO_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2199"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(has_video<sp/>&amp;&amp;<sp/>call-&gt;videostream<sp/>&amp;&amp;<sp/>call-&gt;videostream-&gt;ms.state==MSStreamInitialized)<sp/>{</highlight></codeline>
<codeline lineno="2200"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_prepare_video(call-&gt;videostream);</highlight></codeline>
<codeline lineno="2201"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2202"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2203"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(linphone_core_gather_ice_candidates(call-&gt;core,call)&lt;0)<sp/>{</highlight></codeline>
<codeline lineno="2204"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Ice<sp/>candidates<sp/>gathering<sp/>failed,<sp/>proceed<sp/>with<sp/>the<sp/>call<sp/>anyway.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2205"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_delete_ice_session(call);</highlight></codeline>
<codeline lineno="2206"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_stop_media_streams_for_ice_gathering(call);</highlight></codeline>
<codeline lineno="2207"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1;</highlight></codeline>
<codeline lineno="2208"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2209"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>1;</highlight><highlight class="comment">/*gathering<sp/>in<sp/>progress,<sp/>wait*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2210"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2211"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2212"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="2213"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2214"><highlight class="normal"></highlight></codeline>
<codeline lineno="2215"><highlight class="normal"></highlight><highlight class="comment">/*eventually<sp/>join<sp/>to<sp/>a<sp/>multicast<sp/>group<sp/>if<sp/>told<sp/>to<sp/>do<sp/>so*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2216"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_join_multicast_group(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>stream_index,<sp/>MediaStream<sp/>*ms){</highlight></codeline>
<codeline lineno="2217"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;media_ports[stream_index].multicast_ip[stream_index]!=</highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal">){</highlight></codeline>
<codeline lineno="2218"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>media_stream_join_multicast_group(ms,<sp/>call-&gt;media_ports[stream_index].multicast_ip);</highlight></codeline>
<codeline lineno="2219"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2220"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_error(</highlight><highlight class="stringliteral">&quot;Cannot<sp/>join<sp/>multicast<sp/>group<sp/>if<sp/>multicast<sp/>ip<sp/>is<sp/>not<sp/>set<sp/>for<sp/>call<sp/>[%p]&quot;</highlight><highlight class="normal">,call);</highlight></codeline>
<codeline lineno="2221"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2222"><highlight class="normal"></highlight></codeline>
<codeline lineno="2223"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>SalMulticastRole<sp/>linphone_call_get_multicast_role(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,SalStreamType<sp/>type)<sp/>{</highlight></codeline>
<codeline lineno="2224"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalMulticastRole<sp/>multicast_role=SalMulticastInactive;</highlight></codeline>
<codeline lineno="2225"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalMediaDescription<sp/>*remotedesc,<sp/>*localdesc;</highlight></codeline>
<codeline lineno="2226"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalStreamDescription<sp/>*stream_desc<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="2227"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!call-&gt;op)<sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>end;</highlight></codeline>
<codeline lineno="2228"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>remotedesc<sp/>=<sp/>sal_call_get_remote_media_description(call-&gt;op);</highlight></codeline>
<codeline lineno="2229"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>localdesc<sp/>=<sp/>call-&gt;localdesc;</highlight></codeline>
<codeline lineno="2230"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!localdesc<sp/>&amp;&amp;<sp/>!remotedesc<sp/>&amp;&amp;<sp/>call-&gt;dir<sp/>==<sp/><ref refid="group__call__logs_1ggaa3077de7d4214529094998ce441f61e1a4856091c25d200b11669efdbc6abb4ed" kindref="member">LinphoneCallOutgoing</ref>)<sp/>{</highlight></codeline>
<codeline lineno="2231"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*well<sp/>using<sp/>call<sp/>dir*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2232"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((type<sp/>==<sp/>SalAudio<sp/>&amp;&amp;<sp/><ref refid="group__media__parameters_1ga074d17f14a6b4d086a1ec2cbd8e563a6" kindref="member">linphone_call_params_audio_multicast_enabled</ref>(call-&gt;params))</highlight></codeline>
<codeline lineno="2233"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>||<sp/>(type<sp/>==<sp/>SalVideo<sp/>&amp;&amp;<sp/><ref refid="group__media__parameters_1ga26410bc18a88fe6a323e6cf5f62050da" kindref="member">linphone_call_params_video_multicast_enabled</ref>(call-&gt;params)))</highlight></codeline>
<codeline lineno="2234"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>multicast_role=SalMulticastSender;</highlight></codeline>
<codeline lineno="2235"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(localdesc<sp/>&amp;&amp;<sp/>(!remotedesc<sp/>||<sp/>sal_call_is_offerer(call-&gt;op)))<sp/>{</highlight></codeline>
<codeline lineno="2236"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stream_desc<sp/>=<sp/>sal_media_description_find_best_stream(localdesc,<sp/>type);</highlight></codeline>
<codeline lineno="2237"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!sal_call_is_offerer(call-&gt;op)<sp/>&amp;&amp;<sp/>remotedesc)</highlight></codeline>
<codeline lineno="2238"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stream_desc<sp/>=<sp/>sal_media_description_find_best_stream(remotedesc,<sp/>type);</highlight></codeline>
<codeline lineno="2239"><highlight class="normal"></highlight></codeline>
<codeline lineno="2240"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stream_desc)</highlight></codeline>
<codeline lineno="2241"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>multicast_role=stream_desc-&gt;multicast_role;</highlight></codeline>
<codeline lineno="2242"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2243"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Cannot<sp/>determine<sp/>multicast<sp/>role<sp/>for<sp/>stream<sp/>type<sp/>[%s]<sp/>on<sp/>call<sp/>[%p]&quot;</highlight><highlight class="normal">,sal_stream_type_to_string(type),call);</highlight></codeline>
<codeline lineno="2244"><highlight class="normal"></highlight></codeline>
<codeline lineno="2245"><highlight class="normal"></highlight></codeline>
<codeline lineno="2246"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>end:</highlight></codeline>
<codeline lineno="2247"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>multicast_role;</highlight></codeline>
<codeline lineno="2248"><highlight class="normal"></highlight></codeline>
<codeline lineno="2249"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2250"><highlight class="normal"></highlight></codeline>
<codeline lineno="2251"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>setup_dtls_params(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/>MediaStream*<sp/>stream)<sp/>{</highlight></codeline>
<codeline lineno="2252"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc=call-&gt;core;</highlight></codeline>
<codeline lineno="2253"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;params-&gt;media_encryption==<ref refid="group__media__parameters_1ggac01228dce297dfe24304be6a1d2cfa0ba62124fc2fc42d6f7f821fd5f6550c776" kindref="member">LinphoneMediaEncryptionDTLS</ref>)<sp/>{</highlight></codeline>
<codeline lineno="2254"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSDtlsSrtpParams<sp/>params;</highlight></codeline>
<codeline lineno="2255"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*certificate,<sp/>*key;</highlight></codeline>
<codeline lineno="2256"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>memset(&amp;params,0,</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(MSDtlsSrtpParams));</highlight></codeline>
<codeline lineno="2257"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>TODO<sp/>:<sp/>search<sp/>for<sp/>a<sp/>certificate<sp/>with<sp/>CNAME=sip<sp/>uri(retrieved<sp/>from<sp/>variable<sp/>me)<sp/>or<sp/>default<sp/>:<sp/>linphone-dtls-default-identity<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2258"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>This<sp/>will<sp/>parse<sp/>the<sp/>directory<sp/>to<sp/>find<sp/>a<sp/>matching<sp/>fingerprint<sp/>or<sp/>generate<sp/>it<sp/>if<sp/>not<sp/>found<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2259"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>returned<sp/>string<sp/>must<sp/>be<sp/>freed<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2260"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sal_certificates_chain_parse_directory(&amp;certificate,<sp/>&amp;key,<sp/>&amp;call-&gt;dtls_certificate_fingerprint,<sp/>lc-&gt;user_certificates_path,<sp/></highlight><highlight class="stringliteral">&quot;linphone-dtls-default-identity&quot;</highlight><highlight class="normal">,<sp/>SAL_CERTIFICATE_RAW_FORMAT_PEM,<sp/>TRUE,<sp/>TRUE);</highlight></codeline>
<codeline lineno="2261"><highlight class="normal"></highlight></codeline>
<codeline lineno="2262"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(key!=<sp/>NULL<sp/>&amp;&amp;<sp/>certificate!=NULL)<sp/>{</highlight></codeline>
<codeline lineno="2263"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>params.pem_certificate<sp/>=<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*)certificate;</highlight></codeline>
<codeline lineno="2264"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>params.pem_pkey<sp/>=<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*)key;</highlight></codeline>
<codeline lineno="2265"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>params.role<sp/>=<sp/>MSDtlsSrtpRoleUnset;<sp/></highlight><highlight class="comment">/*<sp/>default<sp/>is<sp/>unset,<sp/>then<sp/>check<sp/>if<sp/>we<sp/>have<sp/>a<sp/>result<sp/>SalMediaDescription<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2266"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>media_stream_enable_dtls(stream,&amp;params);</highlight></codeline>
<codeline lineno="2267"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(certificate);</highlight></codeline>
<codeline lineno="2268"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(key);</highlight></codeline>
<codeline lineno="2269"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="2270"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_error(</highlight><highlight class="stringliteral">&quot;Unable<sp/>to<sp/>retrieve<sp/>or<sp/>generate<sp/>DTLS<sp/>certificate<sp/>and<sp/>key<sp/>-<sp/>DTLS<sp/>disabled&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="2271"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>TODO<sp/>:<sp/>check<sp/>if<sp/>encryption<sp/>forced,<sp/>if<sp/>yes,<sp/>stop<sp/>call<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2272"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2273"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2274"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2275"><highlight class="normal"></highlight></codeline>
<codeline lineno="2276"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_init_audio_stream(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="2277"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc=call-&gt;core;</highlight></codeline>
<codeline lineno="2278"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>AudioStream<sp/>*audiostream;</highlight></codeline>
<codeline lineno="2279"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*location;</highlight></codeline>
<codeline lineno="2280"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>dscp;</highlight></codeline>
<codeline lineno="2281"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>rtcp_tool[128]={0};</highlight></codeline>
<codeline lineno="2282"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>cname;</highlight></codeline>
<codeline lineno="2283"><highlight class="normal"></highlight></codeline>
<codeline lineno="2284"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>snprintf(rtcp_tool,</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(rtcp_tool)-1,</highlight><highlight class="stringliteral">&quot;%s-%s&quot;</highlight><highlight class="normal">,linphone_core_get_user_agent_name(),linphone_core_get_user_agent_version());</highlight></codeline>
<codeline lineno="2285"><highlight class="normal"></highlight></codeline>
<codeline lineno="2286"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;audiostream<sp/>!=<sp/>NULL)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="2287"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;sessions[call-&gt;main_audio_stream_index].rtp_session==NULL){</highlight></codeline>
<codeline lineno="2288"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalMulticastRole<sp/>multicast_role<sp/>=<sp/>linphone_call_get_multicast_role(call,SalAudio);</highlight></codeline>
<codeline lineno="2289"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalMediaDescription<sp/>*remotedesc=NULL;</highlight></codeline>
<codeline lineno="2290"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalStreamDescription<sp/>*stream_desc<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="2291"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;op)<sp/>remotedesc<sp/>=<sp/>sal_call_get_remote_media_description(call-&gt;op);</highlight></codeline>
<codeline lineno="2292"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(remotedesc)</highlight></codeline>
<codeline lineno="2293"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stream_desc<sp/>=<sp/>sal_media_description_find_best_stream(remotedesc,<sp/>SalAudio);</highlight></codeline>
<codeline lineno="2294"><highlight class="normal"></highlight></codeline>
<codeline lineno="2295"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;audiostream=audiostream=audio_stream_new2(linphone_call_get_bind_ip_for_stream(call,call-&gt;main_audio_stream_index),</highlight></codeline>
<codeline lineno="2296"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>multicast_role<sp/>==<sp/><sp/>SalMulticastReceiver<sp/>?<sp/>stream_desc-&gt;rtp_port<sp/>:<sp/>call-&gt;media_ports[call-&gt;main_audio_stream_index].rtp_port,</highlight></codeline>
<codeline lineno="2297"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>multicast_role<sp/>==<sp/><sp/>SalMulticastReceiver<sp/>?<sp/>0<sp/></highlight><highlight class="comment">/*disabled<sp/>for<sp/>now*/</highlight><highlight class="normal"><sp/>:<sp/>call-&gt;media_ports[call-&gt;main_audio_stream_index].rtcp_port);</highlight></codeline>
<codeline lineno="2298"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(multicast_role<sp/>==<sp/>SalMulticastReceiver)</highlight></codeline>
<codeline lineno="2299"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_join_multicast_group(call,<sp/>call-&gt;main_audio_stream_index,<sp/>&amp;audiostream-&gt;ms);</highlight></codeline>
<codeline lineno="2300"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_enable_network_simulation(call-&gt;audiostream-&gt;ms.sessions.rtp_session,<sp/>&amp;lc-&gt;net_conf.netsim_params);</highlight></codeline>
<codeline lineno="2301"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cname<sp/>=<sp/><ref refid="group__linphone__address_1gae14a9f3157cc4421e5e5195c9ece2038" kindref="member">linphone_address_as_string_uri_only</ref>(call-&gt;me);</highlight></codeline>
<codeline lineno="2302"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_set_rtcp_information(call-&gt;audiostream,<sp/>cname,<sp/>rtcp_tool);</highlight></codeline>
<codeline lineno="2303"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(cname);</highlight></codeline>
<codeline lineno="2304"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_set_symmetric_rtp(audiostream-&gt;ms.sessions.rtp_session,linphone_core_symmetric_rtp_enabled(lc));</highlight></codeline>
<codeline lineno="2305"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>setup_dtls_params(call,<sp/>&amp;audiostream-&gt;ms);</highlight></codeline>
<codeline lineno="2306"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>media_stream_reclaim_sessions(&amp;audiostream-&gt;ms,<sp/>&amp;call-&gt;sessions[call-&gt;main_audio_stream_index]);</highlight></codeline>
<codeline lineno="2307"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="2308"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;audiostream=audio_stream_new_with_sessions(&amp;call-&gt;sessions[call-&gt;main_audio_stream_index]);</highlight></codeline>
<codeline lineno="2309"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2310"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audiostream=call-&gt;audiostream;</highlight></codeline>
<codeline lineno="2311"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;media_ports[call-&gt;main_audio_stream_index].rtp_port==-1){</highlight></codeline>
<codeline lineno="2312"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>port_config_set_random_choosed(call,call-&gt;main_audio_stream_index,audiostream-&gt;ms.sessions.rtp_session);</highlight></codeline>
<codeline lineno="2313"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2314"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dscp=<ref refid="group__network__parameters_1ga7daf9a795169bbff137eb7a5d28c2331" kindref="member">linphone_core_get_audio_dscp</ref>(lc);</highlight></codeline>
<codeline lineno="2315"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dscp!=-1)</highlight></codeline>
<codeline lineno="2316"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_set_dscp(audiostream,dscp);</highlight></codeline>
<codeline lineno="2317"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__media__parameters_1ga5375503097c7085b9654b62fb7deb5f8" kindref="member">linphone_core_echo_limiter_enabled</ref>(lc)){</highlight></codeline>
<codeline lineno="2318"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*type=<ref refid="group__misc_1ga9657ebf1d68b43184a796c9bdc68c29a" kindref="member">lp_config_get_string</ref>(lc-&gt;config,</highlight><highlight class="stringliteral">&quot;sound&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;el_type&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;mic&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="2319"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(strcasecmp(type,</highlight><highlight class="stringliteral">&quot;mic&quot;</highlight><highlight class="normal">)==0)</highlight></codeline>
<codeline lineno="2320"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_enable_echo_limiter(audiostream,ELControlMic);</highlight></codeline>
<codeline lineno="2321"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(strcasecmp(type,</highlight><highlight class="stringliteral">&quot;full&quot;</highlight><highlight class="normal">)==0)</highlight></codeline>
<codeline lineno="2322"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_enable_echo_limiter(audiostream,ELControlFull);</highlight></codeline>
<codeline lineno="2323"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2324"><highlight class="normal"></highlight></codeline>
<codeline lineno="2325"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>equalizer<sp/>location<sp/>in<sp/>the<sp/>graph:<sp/>&apos;mic&apos;<sp/>=<sp/>in<sp/>input<sp/>graph,<sp/>otherwise<sp/>in<sp/>output<sp/>graph.</highlight></codeline>
<codeline lineno="2326"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Any<sp/>other<sp/>value<sp/>than<sp/>mic<sp/>will<sp/>default<sp/>to<sp/>output<sp/>graph<sp/>for<sp/>compatibility<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2327"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>location<sp/>=<sp/><ref refid="group__misc_1ga9657ebf1d68b43184a796c9bdc68c29a" kindref="member">lp_config_get_string</ref>(lc-&gt;config,</highlight><highlight class="stringliteral">&quot;sound&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;eq_location&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;hp&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="2328"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audiostream-&gt;eq_loc<sp/>=<sp/>(strcasecmp(location,</highlight><highlight class="stringliteral">&quot;mic&quot;</highlight><highlight class="normal">)<sp/>==<sp/>0)<sp/>?<sp/>MSEqualizerMic<sp/>:<sp/>MSEqualizerHP;</highlight></codeline>
<codeline lineno="2329"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Equalizer<sp/>location:<sp/>%s&quot;</highlight><highlight class="normal">,<sp/>location);</highlight></codeline>
<codeline lineno="2330"><highlight class="normal"></highlight></codeline>
<codeline lineno="2331"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_enable_gain_control(audiostream,TRUE);</highlight></codeline>
<codeline lineno="2332"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__media__parameters_1gaa7e19725835efff9598aaadf23d4df71" kindref="member">linphone_core_echo_cancellation_enabled</ref>(lc)){</highlight></codeline>
<codeline lineno="2333"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>len,delay,framesize;</highlight></codeline>
<codeline lineno="2334"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>len=<ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,</highlight><highlight class="stringliteral">&quot;sound&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;ec_tail_len&quot;</highlight><highlight class="normal">,0);</highlight></codeline>
<codeline lineno="2335"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>delay=<ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,</highlight><highlight class="stringliteral">&quot;sound&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;ec_delay&quot;</highlight><highlight class="normal">,0);</highlight></codeline>
<codeline lineno="2336"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>framesize=<ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,</highlight><highlight class="stringliteral">&quot;sound&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;ec_framesize&quot;</highlight><highlight class="normal">,0);</highlight></codeline>
<codeline lineno="2337"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_set_echo_canceller_params(audiostream,len,delay,framesize);</highlight></codeline>
<codeline lineno="2338"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(audiostream-&gt;ec)<sp/>{</highlight></codeline>
<codeline lineno="2339"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*statestr=ms_malloc0(EC_STATE_MAX_LEN);</highlight></codeline>
<codeline lineno="2340"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lp_config_relative_file_exists(lc-&gt;config,<sp/>EC_STATE_STORE)</highlight></codeline>
<codeline lineno="2341"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>&amp;&amp;<sp/>lp_config_read_relative_file(lc-&gt;config,<sp/>EC_STATE_STORE,<sp/>statestr,<sp/>EC_STATE_MAX_LEN)<sp/>==<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="2342"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(audiostream-&gt;ec,<sp/>MS_ECHO_CANCELLER_SET_STATE_STRING,<sp/>statestr);</highlight></codeline>
<codeline lineno="2343"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2344"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(statestr);</highlight></codeline>
<codeline lineno="2345"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2346"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2347"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_enable_automatic_gain_control(audiostream,linphone_core_agc_enabled(lc));</highlight></codeline>
<codeline lineno="2348"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="2349"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>enabled=<ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,</highlight><highlight class="stringliteral">&quot;sound&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;noisegate&quot;</highlight><highlight class="normal">,0);</highlight></codeline>
<codeline lineno="2350"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_enable_noise_gate(audiostream,enabled);</highlight></codeline>
<codeline lineno="2351"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2352"><highlight class="normal"></highlight></codeline>
<codeline lineno="2353"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_set_features(audiostream,linphone_core_get_audio_features(lc));</highlight></codeline>
<codeline lineno="2354"><highlight class="normal"></highlight></codeline>
<codeline lineno="2355"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lc-&gt;rtptf){</highlight></codeline>
<codeline lineno="2356"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>RtpTransport<sp/>*meta_rtp;</highlight></codeline>
<codeline lineno="2357"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>RtpTransport<sp/>*meta_rtcp;</highlight></codeline>
<codeline lineno="2358"><highlight class="normal"></highlight></codeline>
<codeline lineno="2359"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_get_transports(audiostream-&gt;ms.sessions.rtp_session,&amp;meta_rtp,&amp;meta_rtcp);</highlight></codeline>
<codeline lineno="2360"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(meta_rtp_transport_get_endpoint(meta_rtp)<sp/>==<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="2361"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>meta_rtp_transport_set_endpoint(meta_rtp,lc-&gt;rtptf-&gt;audio_rtp_func(lc-&gt;rtptf-&gt;audio_rtp_func_data,<sp/>call-&gt;media_ports[call-&gt;main_audio_stream_index].rtp_port));</highlight></codeline>
<codeline lineno="2362"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2363"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(meta_rtp_transport_get_endpoint(meta_rtcp)<sp/>==<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="2364"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>meta_rtp_transport_set_endpoint(meta_rtcp,lc-&gt;rtptf-&gt;audio_rtcp_func(lc-&gt;rtptf-&gt;audio_rtcp_func_data,<sp/>call-&gt;media_ports[call-&gt;main_audio_stream_index].rtcp_port));</highlight></codeline>
<codeline lineno="2365"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2366"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2367"><highlight class="normal"></highlight></codeline>
<codeline lineno="2368"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;audiostream_app_evq<sp/>=<sp/>ortp_ev_queue_new();</highlight></codeline>
<codeline lineno="2369"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_register_event_queue(audiostream-&gt;ms.sessions.rtp_session,call-&gt;audiostream_app_evq);</highlight></codeline>
<codeline lineno="2370"><highlight class="normal"></highlight></codeline>
<codeline lineno="2371"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>_linphone_call_prepare_ice_for_stream(call,call-&gt;main_audio_stream_index,FALSE);</highlight></codeline>
<codeline lineno="2372"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2373"><highlight class="normal"></highlight></codeline>
<codeline lineno="2374"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_init_video_stream(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="2375"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>VIDEO_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2376"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc=call-&gt;core;</highlight></codeline>
<codeline lineno="2377"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>cname;</highlight></codeline>
<codeline lineno="2378"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>rtcp_tool[128];</highlight></codeline>
<codeline lineno="2379"><highlight class="normal"></highlight></codeline>
<codeline lineno="2380"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>snprintf(rtcp_tool,</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(rtcp_tool)-1,</highlight><highlight class="stringliteral">&quot;%s-%s&quot;</highlight><highlight class="normal">,linphone_core_get_user_agent_name(),linphone_core_get_user_agent_version());</highlight></codeline>
<codeline lineno="2381"><highlight class="normal"></highlight></codeline>
<codeline lineno="2382"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;videostream<sp/>==<sp/>NULL){</highlight></codeline>
<codeline lineno="2383"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>video_recv_buf_size=<ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,</highlight><highlight class="stringliteral">&quot;video&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;recv_buf_size&quot;</highlight><highlight class="normal">,0);</highlight></codeline>
<codeline lineno="2384"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>dscp=<ref refid="group__network__parameters_1ga5c54680dff98e57b779ac15153202011" kindref="member">linphone_core_get_video_dscp</ref>(lc);</highlight></codeline>
<codeline lineno="2385"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*display_filter=<ref refid="group__media__parameters_1gae6d7ef6182365d258fbfb489c33018df" kindref="member">linphone_core_get_video_display_filter</ref>(lc);</highlight></codeline>
<codeline lineno="2386"><highlight class="normal"></highlight></codeline>
<codeline lineno="2387"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;sessions[call-&gt;main_video_stream_index].rtp_session==NULL){</highlight></codeline>
<codeline lineno="2388"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalMulticastRole<sp/>multicast_role<sp/>=<sp/>linphone_call_get_multicast_role(call,SalVideo);</highlight></codeline>
<codeline lineno="2389"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalMediaDescription<sp/>*remotedesc=NULL;</highlight></codeline>
<codeline lineno="2390"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalStreamDescription<sp/>*stream_desc<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="2391"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;op)<sp/>remotedesc<sp/>=<sp/>sal_call_get_remote_media_description(call-&gt;op);</highlight></codeline>
<codeline lineno="2392"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(remotedesc)</highlight></codeline>
<codeline lineno="2393"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stream_desc<sp/>=<sp/>sal_media_description_find_best_stream(remotedesc,<sp/>SalVideo);</highlight></codeline>
<codeline lineno="2394"><highlight class="normal"></highlight></codeline>
<codeline lineno="2395"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;videostream=video_stream_new2(linphone_call_get_bind_ip_for_stream(call,call-&gt;main_video_stream_index),</highlight></codeline>
<codeline lineno="2396"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>multicast_role<sp/>==<sp/><sp/>SalMulticastReceiver<sp/>?<sp/>stream_desc-&gt;rtp_port<sp/>:<sp/>call-&gt;media_ports[call-&gt;main_video_stream_index].rtp_port,</highlight></codeline>
<codeline lineno="2397"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>multicast_role<sp/>==<sp/><sp/>SalMulticastReceiver<sp/>?<sp/><sp/>0<sp/></highlight><highlight class="comment">/*disabled<sp/>for<sp/>now*/</highlight><highlight class="normal"><sp/>:<sp/>call-&gt;media_ports[call-&gt;main_video_stream_index].rtcp_port);</highlight></codeline>
<codeline lineno="2398"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(multicast_role<sp/>==<sp/>SalMulticastReceiver)</highlight></codeline>
<codeline lineno="2399"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_join_multicast_group(call,<sp/>call-&gt;main_video_stream_index,<sp/>&amp;call-&gt;videostream-&gt;ms);</highlight></codeline>
<codeline lineno="2400"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_enable_network_simulation(call-&gt;videostream-&gt;ms.sessions.rtp_session,<sp/>&amp;lc-&gt;net_conf.netsim_params);</highlight></codeline>
<codeline lineno="2401"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cname<sp/>=<sp/><ref refid="group__linphone__address_1gae14a9f3157cc4421e5e5195c9ece2038" kindref="member">linphone_address_as_string_uri_only</ref>(call-&gt;me);</highlight></codeline>
<codeline lineno="2402"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_set_rtcp_information(call-&gt;videostream,<sp/>cname,<sp/>rtcp_tool);</highlight></codeline>
<codeline lineno="2403"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(cname);</highlight></codeline>
<codeline lineno="2404"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_set_symmetric_rtp(call-&gt;videostream-&gt;ms.sessions.rtp_session,linphone_core_symmetric_rtp_enabled(lc));</highlight></codeline>
<codeline lineno="2405"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>setup_dtls_params(call,<sp/>&amp;call-&gt;videostream-&gt;ms);</highlight></codeline>
<codeline lineno="2406"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>media_stream_reclaim_sessions(&amp;call-&gt;videostream-&gt;ms,<sp/>&amp;call-&gt;sessions[call-&gt;main_video_stream_index]);</highlight></codeline>
<codeline lineno="2407"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="2408"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;videostream=video_stream_new_with_sessions(&amp;call-&gt;sessions[call-&gt;main_video_stream_index]);</highlight></codeline>
<codeline lineno="2409"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2410"><highlight class="normal"></highlight></codeline>
<codeline lineno="2411"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;media_ports[call-&gt;main_video_stream_index].rtp_port==-1){</highlight></codeline>
<codeline lineno="2412"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>port_config_set_random_choosed(call,call-&gt;main_video_stream_index,call-&gt;videostream-&gt;ms.sessions.rtp_session);</highlight></codeline>
<codeline lineno="2413"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2414"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dscp!=-1)</highlight></codeline>
<codeline lineno="2415"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_set_dscp(call-&gt;videostream,dscp);</highlight></codeline>
<codeline lineno="2416"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_enable_display_filter_auto_rotate(call-&gt;videostream,<sp/><ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,</highlight><highlight class="stringliteral">&quot;video&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;display_filter_auto_rotate&quot;</highlight><highlight class="normal">,0));</highlight></codeline>
<codeline lineno="2417"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(video_recv_buf_size&gt;0)<sp/>rtp_session_set_recv_buf_size(call-&gt;videostream-&gt;ms.sessions.rtp_session,video_recv_buf_size);</highlight></codeline>
<codeline lineno="2418"><highlight class="normal"></highlight></codeline>
<codeline lineno="2419"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(display_filter<sp/>!=<sp/>NULL)</highlight></codeline>
<codeline lineno="2420"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_set_display_filter_name(call-&gt;videostream,display_filter);</highlight></codeline>
<codeline lineno="2421"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_set_event_callback(call-&gt;videostream,video_stream_event_cb,<sp/>call);</highlight></codeline>
<codeline lineno="2422"><highlight class="normal"></highlight></codeline>
<codeline lineno="2423"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lc-&gt;rtptf){</highlight></codeline>
<codeline lineno="2424"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>RtpTransport<sp/>*meta_rtp;</highlight></codeline>
<codeline lineno="2425"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>RtpTransport<sp/>*meta_rtcp;</highlight></codeline>
<codeline lineno="2426"><highlight class="normal"></highlight></codeline>
<codeline lineno="2427"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_get_transports(call-&gt;videostream-&gt;ms.sessions.rtp_session,&amp;meta_rtp,&amp;meta_rtcp);</highlight></codeline>
<codeline lineno="2428"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(meta_rtp_transport_get_endpoint(meta_rtp)<sp/>==<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="2429"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>meta_rtp_transport_set_endpoint(meta_rtp,lc-&gt;rtptf-&gt;video_rtp_func(lc-&gt;rtptf-&gt;video_rtp_func_data,<sp/>call-&gt;media_ports[call-&gt;main_video_stream_index].rtp_port));</highlight></codeline>
<codeline lineno="2430"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2431"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(meta_rtp_transport_get_endpoint(meta_rtcp)<sp/>==<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="2432"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>meta_rtp_transport_set_endpoint(meta_rtcp,lc-&gt;rtptf-&gt;video_rtcp_func(lc-&gt;rtptf-&gt;video_rtcp_func_data,<sp/>call-&gt;media_ports[call-&gt;main_video_stream_index].rtcp_port));</highlight></codeline>
<codeline lineno="2433"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2434"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2435"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;videostream_app_evq<sp/>=<sp/>ortp_ev_queue_new();</highlight></codeline>
<codeline lineno="2436"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_register_event_queue(call-&gt;videostream-&gt;ms.sessions.rtp_session,call-&gt;videostream_app_evq);</highlight></codeline>
<codeline lineno="2437"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>_linphone_call_prepare_ice_for_stream(call,call-&gt;main_video_stream_index,FALSE);</highlight></codeline>
<codeline lineno="2438"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>TEST_EXT_RENDERER</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2439"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_set_render_callback(call-&gt;videostream,rendercb,NULL);</highlight></codeline>
<codeline lineno="2440"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2441"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2442"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2443"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;videostream=NULL;</highlight></codeline>
<codeline lineno="2444"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2445"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2446"><highlight class="normal"></highlight></codeline>
<codeline lineno="2447"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_init_text_stream(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="2448"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>TextStream<sp/>*textstream;</highlight></codeline>
<codeline lineno="2449"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc=call-&gt;core;</highlight></codeline>
<codeline lineno="2450"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>cname;</highlight></codeline>
<codeline lineno="2451"><highlight class="normal"></highlight></codeline>
<codeline lineno="2452"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;textstream<sp/>!=<sp/>NULL<sp/>||<sp/>!call-&gt;params-&gt;realtimetext_enabled)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="2453"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;sessions[call-&gt;main_text_stream_index].rtp_session<sp/>==<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="2454"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalMulticastRole<sp/>multicast_role<sp/>=<sp/>linphone_call_get_multicast_role(call,<sp/>SalText);</highlight></codeline>
<codeline lineno="2455"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalMediaDescription<sp/>*remotedesc<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="2456"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalStreamDescription<sp/>*stream_desc<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="2457"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;op)<sp/>remotedesc<sp/>=<sp/>sal_call_get_remote_media_description(call-&gt;op);</highlight></codeline>
<codeline lineno="2458"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(remotedesc)<sp/>stream_desc<sp/>=<sp/>sal_media_description_find_best_stream(remotedesc,<sp/>SalText);</highlight></codeline>
<codeline lineno="2459"><highlight class="normal"></highlight></codeline>
<codeline lineno="2460"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;textstream<sp/>=<sp/>textstream<sp/>=<sp/>text_stream_new2(linphone_call_get_bind_ip_for_stream(call,call-&gt;main_text_stream_index),</highlight></codeline>
<codeline lineno="2461"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>multicast_role<sp/>==<sp/><sp/>SalMulticastReceiver<sp/>?<sp/>stream_desc-&gt;rtp_port<sp/>:<sp/>call-&gt;media_ports[call-&gt;main_text_stream_index].rtp_port,</highlight></codeline>
<codeline lineno="2462"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>multicast_role<sp/>==<sp/><sp/>SalMulticastReceiver<sp/>?<sp/>0<sp/></highlight><highlight class="comment">/*disabled<sp/>for<sp/>now*/</highlight><highlight class="normal"><sp/>:<sp/>call-&gt;media_ports[call-&gt;main_text_stream_index].rtcp_port);</highlight></codeline>
<codeline lineno="2463"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(multicast_role<sp/>==<sp/>SalMulticastReceiver)</highlight></codeline>
<codeline lineno="2464"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_join_multicast_group(call,<sp/>call-&gt;main_text_stream_index,<sp/>&amp;textstream-&gt;ms);</highlight></codeline>
<codeline lineno="2465"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_enable_network_simulation(call-&gt;textstream-&gt;ms.sessions.rtp_session,<sp/>&amp;lc-&gt;net_conf.netsim_params);</highlight></codeline>
<codeline lineno="2466"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cname<sp/>=<sp/><ref refid="group__linphone__address_1gae14a9f3157cc4421e5e5195c9ece2038" kindref="member">linphone_address_as_string_uri_only</ref>(call-&gt;me);</highlight></codeline>
<codeline lineno="2467"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(cname);</highlight></codeline>
<codeline lineno="2468"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_set_symmetric_rtp(textstream-&gt;ms.sessions.rtp_session,linphone_core_symmetric_rtp_enabled(lc));</highlight></codeline>
<codeline lineno="2469"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>setup_dtls_params(call,<sp/>&amp;textstream-&gt;ms);</highlight></codeline>
<codeline lineno="2470"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>media_stream_reclaim_sessions(&amp;textstream-&gt;ms,<sp/>&amp;call-&gt;sessions[call-&gt;main_text_stream_index]);</highlight></codeline>
<codeline lineno="2471"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="2472"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;textstream<sp/>=<sp/>text_stream_new_with_sessions(&amp;call-&gt;sessions[call-&gt;main_text_stream_index]);</highlight></codeline>
<codeline lineno="2473"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2474"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>textstream<sp/>=<sp/>call-&gt;textstream;</highlight></codeline>
<codeline lineno="2475"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;media_ports[call-&gt;main_text_stream_index].rtp_port<sp/>==<sp/>-1)<sp/>{</highlight></codeline>
<codeline lineno="2476"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>port_config_set_random_choosed(call,<sp/>call-&gt;main_text_stream_index,<sp/>textstream-&gt;ms.sessions.rtp_session);</highlight></codeline>
<codeline lineno="2477"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2478"><highlight class="normal"></highlight></codeline>
<codeline lineno="2479"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lc-&gt;rtptf){</highlight></codeline>
<codeline lineno="2480"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>RtpTransport<sp/>*meta_rtp;</highlight></codeline>
<codeline lineno="2481"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>RtpTransport<sp/>*meta_rtcp;</highlight></codeline>
<codeline lineno="2482"><highlight class="normal"></highlight></codeline>
<codeline lineno="2483"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_get_transports(textstream-&gt;ms.sessions.rtp_session,<sp/>&amp;meta_rtp,<sp/>&amp;meta_rtcp);</highlight></codeline>
<codeline lineno="2484"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(meta_rtp_transport_get_endpoint(meta_rtp)<sp/>==<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="2485"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>meta_rtp_transport_set_endpoint(meta_rtp,lc-&gt;rtptf-&gt;audio_rtp_func(lc-&gt;rtptf-&gt;audio_rtp_func_data,<sp/>call-&gt;media_ports[call-&gt;main_text_stream_index].rtp_port));</highlight></codeline>
<codeline lineno="2486"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2487"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(meta_rtp_transport_get_endpoint(meta_rtcp)<sp/>==<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="2488"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>meta_rtp_transport_set_endpoint(meta_rtcp,lc-&gt;rtptf-&gt;audio_rtcp_func(lc-&gt;rtptf-&gt;audio_rtcp_func_data,<sp/>call-&gt;media_ports[call-&gt;main_text_stream_index].rtcp_port));</highlight></codeline>
<codeline lineno="2489"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2490"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2491"><highlight class="normal"></highlight></codeline>
<codeline lineno="2492"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;textstream_app_evq<sp/>=<sp/>ortp_ev_queue_new();</highlight></codeline>
<codeline lineno="2493"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_register_event_queue(textstream-&gt;ms.sessions.rtp_session,<sp/>call-&gt;textstream_app_evq);</highlight></codeline>
<codeline lineno="2494"><highlight class="normal"></highlight></codeline>
<codeline lineno="2495"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>_linphone_call_prepare_ice_for_stream(call,<sp/>call-&gt;main_text_stream_index,<sp/>FALSE);</highlight></codeline>
<codeline lineno="2496"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2497"><highlight class="normal"></highlight></codeline>
<codeline lineno="2498"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_init_media_streams(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="2499"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_init_audio_stream(call);</highlight></codeline>
<codeline lineno="2500"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_init_video_stream(call);</highlight></codeline>
<codeline lineno="2501"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_init_text_stream(call);</highlight></codeline>
<codeline lineno="2502"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2503"><highlight class="normal"></highlight></codeline>
<codeline lineno="2504"><highlight class="normal"></highlight></codeline>
<codeline lineno="2505"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>dtmf_tab[16]={</highlight><highlight class="charliteral">&apos;0&apos;</highlight><highlight class="normal">,</highlight><highlight class="charliteral">&apos;1&apos;</highlight><highlight class="normal">,</highlight><highlight class="charliteral">&apos;2&apos;</highlight><highlight class="normal">,</highlight><highlight class="charliteral">&apos;3&apos;</highlight><highlight class="normal">,</highlight><highlight class="charliteral">&apos;4&apos;</highlight><highlight class="normal">,</highlight><highlight class="charliteral">&apos;5&apos;</highlight><highlight class="normal">,</highlight><highlight class="charliteral">&apos;6&apos;</highlight><highlight class="normal">,</highlight><highlight class="charliteral">&apos;7&apos;</highlight><highlight class="normal">,</highlight><highlight class="charliteral">&apos;8&apos;</highlight><highlight class="normal">,</highlight><highlight class="charliteral">&apos;9&apos;</highlight><highlight class="normal">,</highlight><highlight class="charliteral">&apos;*&apos;</highlight><highlight class="normal">,</highlight><highlight class="charliteral">&apos;#&apos;</highlight><highlight class="normal">,</highlight><highlight class="charliteral">&apos;A&apos;</highlight><highlight class="normal">,</highlight><highlight class="charliteral">&apos;B&apos;</highlight><highlight class="normal">,</highlight><highlight class="charliteral">&apos;C&apos;</highlight><highlight class="normal">,</highlight><highlight class="charliteral">&apos;D&apos;</highlight><highlight class="normal">};</highlight></codeline>
<codeline lineno="2506"><highlight class="normal"></highlight></codeline>
<codeline lineno="2507"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_core_dtmf_received(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>dtmf){</highlight></codeline>
<codeline lineno="2508"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dtmf&lt;0<sp/>||<sp/>dtmf&gt;15){</highlight></codeline>
<codeline lineno="2509"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;Bad<sp/>dtmf<sp/>value<sp/>%i&quot;</highlight><highlight class="normal">,dtmf);</highlight></codeline>
<codeline lineno="2510"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="2511"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2512"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_notify_dtmf_received(call-&gt;core,<sp/>call,<sp/>dtmf_tab[dtmf]);</highlight></codeline>
<codeline lineno="2513"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2514"><highlight class="normal"></highlight></codeline>
<codeline lineno="2515"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>parametrize_equalizer(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc,<sp/>AudioStream<sp/>*st){</highlight></codeline>
<codeline lineno="2516"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(st-&gt;equalizer){</highlight></codeline>
<codeline lineno="2517"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSFilter<sp/>*f=st-&gt;equalizer;</highlight></codeline>
<codeline lineno="2518"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>enabled=<ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,</highlight><highlight class="stringliteral">&quot;sound&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;eq_active&quot;</highlight><highlight class="normal">,0);</highlight></codeline>
<codeline lineno="2519"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*gains=<ref refid="group__misc_1ga9657ebf1d68b43184a796c9bdc68c29a" kindref="member">lp_config_get_string</ref>(lc-&gt;config,</highlight><highlight class="stringliteral">&quot;sound&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;eq_gains&quot;</highlight><highlight class="normal">,NULL);</highlight></codeline>
<codeline lineno="2520"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(f,MS_EQUALIZER_SET_ACTIVE,&amp;enabled);</highlight></codeline>
<codeline lineno="2521"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(enabled){</highlight></codeline>
<codeline lineno="2522"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(gains){</highlight></codeline>
<codeline lineno="2523"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">do</highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="2524"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>bytes;</highlight></codeline>
<codeline lineno="2525"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSEqualizerGain<sp/>g;</highlight></codeline>
<codeline lineno="2526"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sscanf(gains,</highlight><highlight class="stringliteral">&quot;%f:%f:%f<sp/>%n&quot;</highlight><highlight class="normal">,&amp;g.frequency,&amp;g.gain,&amp;g.width,&amp;bytes)==3){</highlight></codeline>
<codeline lineno="2527"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Read<sp/>equalizer<sp/>gains:<sp/>%f(~%f)<sp/>--&gt;<sp/>%f&quot;</highlight><highlight class="normal">,g.frequency,g.width,g.gain);</highlight></codeline>
<codeline lineno="2528"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(f,MS_EQUALIZER_SET_GAIN,&amp;g);</highlight></codeline>
<codeline lineno="2529"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>gains+=bytes;</highlight></codeline>
<codeline lineno="2530"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="2531"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">while</highlight><highlight class="normal">(1);</highlight></codeline>
<codeline lineno="2532"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2533"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2534"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2535"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2536"><highlight class="normal"></highlight></codeline>
<codeline lineno="2537"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>set_mic_gain_db(AudioStream<sp/>*st,<sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>gain){</highlight></codeline>
<codeline lineno="2538"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_set_mic_gain_db(st,<sp/>gain);</highlight></codeline>
<codeline lineno="2539"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2540"><highlight class="normal"></highlight></codeline>
<codeline lineno="2541"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>set_playback_gain_db(AudioStream<sp/>*st,<sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>gain){</highlight></codeline>
<codeline lineno="2542"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(st-&gt;volrecv){</highlight></codeline>
<codeline lineno="2543"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(st-&gt;volrecv,MS_VOLUME_SET_DB_GAIN,&amp;gain);</highlight></codeline>
<codeline lineno="2544"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;Could<sp/>not<sp/>apply<sp/>playback<sp/>gain:<sp/>gain<sp/>control<sp/>wasn&apos;t<sp/>activated.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="2545"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2546"><highlight class="normal"></highlight></codeline>
<codeline lineno="2547"><highlight class="normal"></highlight><highlight class="comment">/*This<sp/>function<sp/>is<sp/>not<sp/>static<sp/>because<sp/>used<sp/>internally<sp/>in<sp/>linphone-daemon<sp/>project*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2548"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>_post_configure_audio_stream(AudioStream<sp/>*st,<sp/><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc,<sp/>bool_t<sp/>muted){</highlight></codeline>
<codeline lineno="2549"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>mic_gain=lc-&gt;sound_conf.soft_mic_lev;</highlight></codeline>
<codeline lineno="2550"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>thres<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="2551"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>recv_gain;</highlight></codeline>
<codeline lineno="2552"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>ng_thres=<ref refid="group__misc_1gad548422b00d41c9726062869d04cd6e4" kindref="member">lp_config_get_float</ref>(lc-&gt;config,</highlight><highlight class="stringliteral">&quot;sound&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;ng_thres&quot;</highlight><highlight class="normal">,0.05f);</highlight></codeline>
<codeline lineno="2553"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>ng_floorgain=<ref refid="group__misc_1gad548422b00d41c9726062869d04cd6e4" kindref="member">lp_config_get_float</ref>(lc-&gt;config,</highlight><highlight class="stringliteral">&quot;sound&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;ng_floorgain&quot;</highlight><highlight class="normal">,0);</highlight></codeline>
<codeline lineno="2554"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>dc_removal=<ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,</highlight><highlight class="stringliteral">&quot;sound&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;dc_removal&quot;</highlight><highlight class="normal">,0);</highlight></codeline>
<codeline lineno="2555"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>speed;</highlight></codeline>
<codeline lineno="2556"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>force;</highlight></codeline>
<codeline lineno="2557"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>sustain;</highlight></codeline>
<codeline lineno="2558"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>transmit_thres;</highlight></codeline>
<codeline lineno="2559"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSFilter<sp/>*f=NULL;</highlight></codeline>
<codeline lineno="2560"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>floorgain;</highlight></codeline>
<codeline lineno="2561"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>spk_agc;</highlight></codeline>
<codeline lineno="2562"><highlight class="normal"></highlight></codeline>
<codeline lineno="2563"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!muted)</highlight></codeline>
<codeline lineno="2564"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>set_mic_gain_db(st,mic_gain);</highlight></codeline>
<codeline lineno="2565"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2566"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_set_mic_gain(st,0);</highlight></codeline>
<codeline lineno="2567"><highlight class="normal"></highlight></codeline>
<codeline lineno="2568"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>recv_gain<sp/>=<sp/>lc-&gt;sound_conf.soft_play_lev;</highlight></codeline>
<codeline lineno="2569"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(recv_gain<sp/>!=<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="2570"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>set_playback_gain_db(st,recv_gain);</highlight></codeline>
<codeline lineno="2571"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2572"><highlight class="normal"></highlight></codeline>
<codeline lineno="2573"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(st-&gt;volsend){</highlight></codeline>
<codeline lineno="2574"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(st-&gt;volsend,MS_VOLUME_REMOVE_DC,&amp;dc_removal);</highlight></codeline>
<codeline lineno="2575"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>speed=<ref refid="group__misc_1gad548422b00d41c9726062869d04cd6e4" kindref="member">lp_config_get_float</ref>(lc-&gt;config,</highlight><highlight class="stringliteral">&quot;sound&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;el_speed&quot;</highlight><highlight class="normal">,-1);</highlight></codeline>
<codeline lineno="2576"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>thres=<ref refid="group__misc_1gad548422b00d41c9726062869d04cd6e4" kindref="member">lp_config_get_float</ref>(lc-&gt;config,</highlight><highlight class="stringliteral">&quot;sound&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;el_thres&quot;</highlight><highlight class="normal">,-1);</highlight></codeline>
<codeline lineno="2577"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>force=<ref refid="group__misc_1gad548422b00d41c9726062869d04cd6e4" kindref="member">lp_config_get_float</ref>(lc-&gt;config,</highlight><highlight class="stringliteral">&quot;sound&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;el_force&quot;</highlight><highlight class="normal">,-1);</highlight></codeline>
<codeline lineno="2578"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sustain=<ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,</highlight><highlight class="stringliteral">&quot;sound&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;el_sustain&quot;</highlight><highlight class="normal">,-1);</highlight></codeline>
<codeline lineno="2579"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>transmit_thres=<ref refid="group__misc_1gad548422b00d41c9726062869d04cd6e4" kindref="member">lp_config_get_float</ref>(lc-&gt;config,</highlight><highlight class="stringliteral">&quot;sound&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;el_transmit_thres&quot;</highlight><highlight class="normal">,-1);</highlight></codeline>
<codeline lineno="2580"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>f=st-&gt;volsend;</highlight></codeline>
<codeline lineno="2581"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(speed==-1)<sp/>speed=0.03f;</highlight></codeline>
<codeline lineno="2582"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(force==-1)<sp/>force=25;</highlight></codeline>
<codeline lineno="2583"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(f,MS_VOLUME_SET_EA_SPEED,&amp;speed);</highlight></codeline>
<codeline lineno="2584"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(f,MS_VOLUME_SET_EA_FORCE,&amp;force);</highlight></codeline>
<codeline lineno="2585"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(thres!=-1)</highlight></codeline>
<codeline lineno="2586"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(f,MS_VOLUME_SET_EA_THRESHOLD,&amp;thres);</highlight></codeline>
<codeline lineno="2587"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sustain!=-1)</highlight></codeline>
<codeline lineno="2588"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(f,MS_VOLUME_SET_EA_SUSTAIN,&amp;sustain);</highlight></codeline>
<codeline lineno="2589"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(transmit_thres!=-1)</highlight></codeline>
<codeline lineno="2590"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(f,MS_VOLUME_SET_EA_TRANSMIT_THRESHOLD,&amp;transmit_thres);</highlight></codeline>
<codeline lineno="2591"><highlight class="normal"></highlight></codeline>
<codeline lineno="2592"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(st-&gt;volsend,MS_VOLUME_SET_NOISE_GATE_THRESHOLD,&amp;ng_thres);</highlight></codeline>
<codeline lineno="2593"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(st-&gt;volsend,MS_VOLUME_SET_NOISE_GATE_FLOORGAIN,&amp;ng_floorgain);</highlight></codeline>
<codeline lineno="2594"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2595"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(st-&gt;volrecv){</highlight></codeline>
<codeline lineno="2596"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>parameters<sp/>for<sp/>a<sp/>limited<sp/>noise-gate<sp/>effect,<sp/>using<sp/>echo<sp/>limiter<sp/>threshold<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2597"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>floorgain<sp/>=<sp/>(float)(1/pow(10,mic_gain/10));</highlight></codeline>
<codeline lineno="2598"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>spk_agc=<ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,</highlight><highlight class="stringliteral">&quot;sound&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;speaker_agc_enabled&quot;</highlight><highlight class="normal">,0);</highlight></codeline>
<codeline lineno="2599"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(st-&gt;volrecv,<sp/>MS_VOLUME_ENABLE_AGC,<sp/>&amp;spk_agc);</highlight></codeline>
<codeline lineno="2600"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(st-&gt;volrecv,MS_VOLUME_SET_NOISE_GATE_THRESHOLD,&amp;ng_thres);</highlight></codeline>
<codeline lineno="2601"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(st-&gt;volrecv,MS_VOLUME_SET_NOISE_GATE_FLOORGAIN,&amp;floorgain);</highlight></codeline>
<codeline lineno="2602"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2603"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>parametrize_equalizer(lc,st);</highlight></codeline>
<codeline lineno="2604"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2605"><highlight class="normal"></highlight></codeline>
<codeline lineno="2606"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>post_configure_audio_streams(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/>bool_t<sp/>muted){</highlight></codeline>
<codeline lineno="2607"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>AudioStream<sp/>*st=call-&gt;audiostream;</highlight></codeline>
<codeline lineno="2608"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc=call-&gt;core;</highlight></codeline>
<codeline lineno="2609"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>_post_configure_audio_stream(st,lc,muted);</highlight></codeline>
<codeline lineno="2610"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(linphone_core_dtmf_received_has_listener(lc)){</highlight></codeline>
<codeline lineno="2611"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_play_received_dtmfs(call-&gt;audiostream,FALSE);</highlight></codeline>
<codeline lineno="2612"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2613"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;record_active)</highlight></codeline>
<codeline lineno="2614"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__misc_1gaa92c7b4c3443ff4ae29f7b57f57cfd35" kindref="member">linphone_call_start_recording</ref>(call);</highlight></codeline>
<codeline lineno="2615"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2616"><highlight class="normal"></highlight></codeline>
<codeline lineno="2617"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>get_ideal_audio_bw(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>SalMediaDescription<sp/>*md,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>SalStreamDescription<sp/>*desc){</highlight></codeline>
<codeline lineno="2618"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>remote_bw=0;</highlight></codeline>
<codeline lineno="2619"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>upload_bw;</highlight></codeline>
<codeline lineno="2620"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>total_upload_bw=<ref refid="group__media__parameters_1ga4fe4a5b0770d9517ba9184434df4006d" kindref="member">linphone_core_get_upload_bandwidth</ref>(call-&gt;core);</highlight></codeline>
<codeline lineno="2621"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gaa91f7e76e8f038ae9acdf42d1bc80a22" kindref="member">LinphoneCallParams</ref><sp/>*params=call-&gt;params;</highlight></codeline>
<codeline lineno="2622"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>will_use_video=linphone_core_media_description_contains_video_stream(md);</highlight></codeline>
<codeline lineno="2623"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>forced=FALSE;</highlight></codeline>
<codeline lineno="2624"><highlight class="normal"></highlight></codeline>
<codeline lineno="2625"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(desc-&gt;bandwidth&gt;0)<sp/>remote_bw=desc-&gt;bandwidth;</highlight></codeline>
<codeline lineno="2626"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(md-&gt;bandwidth&gt;0)<sp/>{</highlight></codeline>
<codeline lineno="2627"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*case<sp/>where<sp/>b=AS<sp/>is<sp/>given<sp/>globally,<sp/>not<sp/>per<sp/>stream*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2628"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>remote_bw=md-&gt;bandwidth;</highlight></codeline>
<codeline lineno="2629"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2630"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(params-&gt;up_bw&gt;0){</highlight></codeline>
<codeline lineno="2631"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>forced=TRUE;</highlight></codeline>
<codeline lineno="2632"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>upload_bw=params-&gt;up_bw;</highlight></codeline>
<codeline lineno="2633"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>upload_bw=total_upload_bw;</highlight></codeline>
<codeline lineno="2634"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>upload_bw=get_min_bandwidth(upload_bw,remote_bw);</highlight></codeline>
<codeline lineno="2635"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!will_use_video<sp/>||<sp/>forced)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>upload_bw;</highlight></codeline>
<codeline lineno="2636"><highlight class="normal"></highlight></codeline>
<codeline lineno="2637"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(bandwidth_is_greater(upload_bw,512)){</highlight></codeline>
<codeline lineno="2638"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>upload_bw=100;</highlight></codeline>
<codeline lineno="2639"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(bandwidth_is_greater(upload_bw,256)){</highlight></codeline>
<codeline lineno="2640"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>upload_bw=64;</highlight></codeline>
<codeline lineno="2641"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(bandwidth_is_greater(upload_bw,128)){</highlight></codeline>
<codeline lineno="2642"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>upload_bw=40;</highlight></codeline>
<codeline lineno="2643"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(bandwidth_is_greater(upload_bw,0)){</highlight></codeline>
<codeline lineno="2644"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>upload_bw=24;</highlight></codeline>
<codeline lineno="2645"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2646"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>upload_bw;</highlight></codeline>
<codeline lineno="2647"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2648"><highlight class="normal"></highlight></codeline>
<codeline lineno="2649"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>get_video_bw(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>SalMediaDescription<sp/>*md,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>SalStreamDescription<sp/>*desc){</highlight></codeline>
<codeline lineno="2650"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>remote_bw=0;</highlight></codeline>
<codeline lineno="2651"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>bw;</highlight></codeline>
<codeline lineno="2652"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(desc-&gt;bandwidth&gt;0)<sp/>remote_bw=desc-&gt;bandwidth;</highlight></codeline>
<codeline lineno="2653"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(md-&gt;bandwidth&gt;0)<sp/>{</highlight></codeline>
<codeline lineno="2654"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*case<sp/>where<sp/>b=AS<sp/>is<sp/>given<sp/>globally,<sp/>not<sp/>per<sp/>stream*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2655"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>remote_bw=get_remaining_bandwidth_for_video(md-&gt;bandwidth,call-&gt;audio_bw);</highlight></codeline>
<codeline lineno="2656"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="2657"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>remote_bw<sp/>=<sp/><ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(call-&gt;core-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;net&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;default_max_bandwidth&quot;</highlight><highlight class="normal">,<sp/>1500);</highlight></codeline>
<codeline lineno="2658"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2659"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bw=get_min_bandwidth(get_remaining_bandwidth_for_video(<ref refid="group__media__parameters_1ga4fe4a5b0770d9517ba9184434df4006d" kindref="member">linphone_core_get_upload_bandwidth</ref>(call-&gt;core),call-&gt;audio_bw),remote_bw);</highlight></codeline>
<codeline lineno="2660"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>bw;</highlight></codeline>
<codeline lineno="2661"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2662"><highlight class="normal"></highlight></codeline>
<codeline lineno="2663"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>RtpProfile<sp/>*make_profile(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>SalMediaDescription<sp/>*md,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>SalStreamDescription<sp/>*desc,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*used_pt){</highlight></codeline>
<codeline lineno="2664"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>bw=0;</highlight></codeline>
<codeline lineno="2665"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MSList<sp/>*elem;</highlight></codeline>
<codeline lineno="2666"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>RtpProfile<sp/>*prof=rtp_profile_new(</highlight><highlight class="stringliteral">&quot;Call<sp/>profile&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="2667"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>first=TRUE;</highlight></codeline>
<codeline lineno="2668"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc=call-&gt;core;</highlight></codeline>
<codeline lineno="2669"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>up_ptime=0;</highlight></codeline>
<codeline lineno="2670"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gaa91f7e76e8f038ae9acdf42d1bc80a22" kindref="member">LinphoneCallParams</ref><sp/>*params=call-&gt;params;</highlight></codeline>
<codeline lineno="2671"><highlight class="normal"></highlight></codeline>
<codeline lineno="2672"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*used_pt=-1;</highlight></codeline>
<codeline lineno="2673"><highlight class="normal"></highlight></codeline>
<codeline lineno="2674"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(desc-&gt;type==SalAudio)</highlight></codeline>
<codeline lineno="2675"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bw=get_ideal_audio_bw(call,md,desc);</highlight></codeline>
<codeline lineno="2676"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(desc-&gt;type==SalVideo)</highlight></codeline>
<codeline lineno="2677"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bw=get_video_bw(call,md,desc);</highlight></codeline>
<codeline lineno="2678"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//else<sp/>if<sp/>(desc-&gt;type==<sp/>SalText)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2679"><highlight class="normal"></highlight></codeline>
<codeline lineno="2680"><highlight class="normal"></highlight></codeline>
<codeline lineno="2681"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(elem=desc-&gt;payloads;elem!=NULL;elem=elem-&gt;next){</highlight></codeline>
<codeline lineno="2682"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>PayloadType<sp/>*pt=(PayloadType*)elem-&gt;data;</highlight></codeline>
<codeline lineno="2683"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>number;</highlight></codeline>
<codeline lineno="2684"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>make<sp/>a<sp/>copy<sp/>of<sp/>the<sp/>payload<sp/>type,<sp/>so<sp/>that<sp/>we<sp/>left<sp/>the<sp/>ones<sp/>from<sp/>the<sp/>SalStreamDescription<sp/>unchanged.</highlight></codeline>
<codeline lineno="2685"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>If<sp/>the<sp/>SalStreamDescription<sp/>is<sp/>freed,<sp/>this<sp/>will<sp/>have<sp/>no<sp/>impact<sp/>on<sp/>the<sp/>running<sp/>streams*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2686"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pt=payload_type_clone(pt);</highlight></codeline>
<codeline lineno="2687"><highlight class="normal"></highlight></codeline>
<codeline lineno="2688"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((pt-&gt;flags<sp/>&amp;<sp/>PAYLOAD_TYPE_FLAG_CAN_SEND)<sp/>&amp;&amp;<sp/>first)<sp/>{</highlight></codeline>
<codeline lineno="2689"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*first<sp/>codec<sp/>in<sp/>list<sp/>is<sp/>the<sp/>selected<sp/>one*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2690"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(desc-&gt;type==SalAudio){</highlight></codeline>
<codeline lineno="2691"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*this<sp/>will<sp/>update<sp/>call-&gt;audio_bw*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2692"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_update_allocated_audio_bandwidth_in_call(call,pt,bw);</highlight></codeline>
<codeline lineno="2693"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bw=call-&gt;audio_bw;</highlight></codeline>
<codeline lineno="2694"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(params-&gt;up_ptime)</highlight></codeline>
<codeline lineno="2695"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>up_ptime=params-&gt;up_ptime;</highlight></codeline>
<codeline lineno="2696"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>up_ptime=<ref refid="group__media__parameters_1ga394a1c972ab8c731c8c986ce741537f7" kindref="member">linphone_core_get_upload_ptime</ref>(lc);</highlight></codeline>
<codeline lineno="2697"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2698"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*used_pt=payload_type_get_number(pt);</highlight></codeline>
<codeline lineno="2699"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>first=FALSE;</highlight></codeline>
<codeline lineno="2700"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2701"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(pt-&gt;flags<sp/>&amp;<sp/>PAYLOAD_TYPE_BITRATE_OVERRIDE){</highlight></codeline>
<codeline lineno="2702"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Payload<sp/>type<sp/>[%s/%i]<sp/>has<sp/>explicit<sp/>bitrate<sp/>[%i]<sp/>kbit/s&quot;</highlight><highlight class="normal">,<sp/>pt-&gt;mime_type,<sp/>pt-&gt;clock_rate,<sp/>pt-&gt;normal_bitrate/1000);</highlight></codeline>
<codeline lineno="2703"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pt-&gt;normal_bitrate=get_min_bandwidth(pt-&gt;normal_bitrate,bw*1000);</highlight></codeline>
<codeline lineno="2704"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>pt-&gt;normal_bitrate=bw*1000;</highlight></codeline>
<codeline lineno="2705"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(desc-&gt;ptime&gt;0){</highlight></codeline>
<codeline lineno="2706"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>up_ptime=desc-&gt;ptime;</highlight></codeline>
<codeline lineno="2707"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2708"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(up_ptime&gt;0){</highlight></codeline>
<codeline lineno="2709"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>tmp[40];</highlight></codeline>
<codeline lineno="2710"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>snprintf(tmp,</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(tmp),</highlight><highlight class="stringliteral">&quot;ptime=%i&quot;</highlight><highlight class="normal">,up_ptime);</highlight></codeline>
<codeline lineno="2711"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>payload_type_append_send_fmtp(pt,tmp);</highlight></codeline>
<codeline lineno="2712"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2713"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>number=payload_type_get_number(pt);</highlight></codeline>
<codeline lineno="2714"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rtp_profile_get_payload(prof,number)!=NULL){</highlight></codeline>
<codeline lineno="2715"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;A<sp/>payload<sp/>type<sp/>with<sp/>number<sp/>%i<sp/>already<sp/>exists<sp/>in<sp/>profile<sp/>!&quot;</highlight><highlight class="normal">,number);</highlight></codeline>
<codeline lineno="2716"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2717"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_profile_set_payload(prof,number,pt);</highlight></codeline>
<codeline lineno="2718"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2719"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>prof;</highlight></codeline>
<codeline lineno="2720"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2721"><highlight class="normal"></highlight></codeline>
<codeline lineno="2722"><highlight class="normal"></highlight></codeline>
<codeline lineno="2723"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>setup_ring_player(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc,<sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="2724"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>pause_time=3000;</highlight></codeline>
<codeline lineno="2725"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_play(call-&gt;audiostream,lc-&gt;sound_conf.ringback_tone);</highlight></codeline>
<codeline lineno="2726"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(call-&gt;audiostream-&gt;soundread,MS_FILE_PLAYER_LOOP,&amp;pause_time);</highlight></codeline>
<codeline lineno="2727"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2728"><highlight class="normal"></highlight></codeline>
<codeline lineno="2729"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>bool_t<sp/>linphone_call_sound_resources_available(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="2730"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc=call-&gt;core;</highlight></codeline>
<codeline lineno="2731"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*current=<ref refid="group__call__control_1gac268a222347024ad7adb4eaf1fd27241" kindref="member">linphone_core_get_current_call</ref>(lc);</highlight></codeline>
<codeline lineno="2732"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>!<ref refid="group__conferencing_1gadaabd5fedbf4e3f568a697b54657f48d" kindref="member">linphone_core_is_in_conference</ref>(lc)<sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="2733"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(current==NULL<sp/>||<sp/>current==call);</highlight></codeline>
<codeline lineno="2734"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2735"><highlight class="normal"></highlight></codeline>
<codeline lineno="2736"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>find_crypto_index_from_tag(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>SalSrtpCryptoAlgo<sp/>crypto[],</highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>tag)<sp/>{</highlight></codeline>
<codeline lineno="2737"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="2738"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(i=0;<sp/>i&lt;SAL_CRYPTO_ALGO_MAX;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="2739"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(crypto[i].tag<sp/>==<sp/>tag)<sp/>{</highlight></codeline>
<codeline lineno="2740"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="2741"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2742"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2743"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1;</highlight></codeline>
<codeline lineno="2744"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2745"><highlight class="normal"></highlight></codeline>
<codeline lineno="2746"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>configure_rtp_session_for_rtcp_fb(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>SalStreamDescription<sp/>*stream)<sp/>{</highlight></codeline>
<codeline lineno="2747"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>RtpSession<sp/>*session<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="2748"><highlight class="normal"></highlight></codeline>
<codeline lineno="2749"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stream-&gt;type<sp/>==<sp/>SalAudio)<sp/>{</highlight></codeline>
<codeline lineno="2750"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>session<sp/>=<sp/>call-&gt;audiostream-&gt;ms.sessions.rtp_session;</highlight></codeline>
<codeline lineno="2751"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stream-&gt;type<sp/>==<sp/>SalVideo)<sp/>{</highlight></codeline>
<codeline lineno="2752"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>session<sp/>=<sp/>call-&gt;videostream-&gt;ms.sessions.rtp_session;</highlight></codeline>
<codeline lineno="2753"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="2754"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Do<sp/>nothing<sp/>for<sp/>streams<sp/>that<sp/>are<sp/>not<sp/>audio<sp/>or<sp/>video</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2755"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="2756"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2757"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stream-&gt;rtcp_fb.generic_nack_enabled)</highlight></codeline>
<codeline lineno="2758"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_enable_avpf_feature(session,<sp/>ORTP_AVPF_FEATURE_GENERIC_NACK,<sp/>TRUE);</highlight></codeline>
<codeline lineno="2759"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2760"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_enable_avpf_feature(session,<sp/>ORTP_AVPF_FEATURE_GENERIC_NACK,<sp/>FALSE);</highlight></codeline>
<codeline lineno="2761"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stream-&gt;rtcp_fb.tmmbr_enabled)</highlight></codeline>
<codeline lineno="2762"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_enable_avpf_feature(session,<sp/>ORTP_AVPF_FEATURE_TMMBR,<sp/>TRUE);</highlight></codeline>
<codeline lineno="2763"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2764"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_enable_avpf_feature(session,<sp/>ORTP_AVPF_FEATURE_TMMBR,<sp/>FALSE);</highlight></codeline>
<codeline lineno="2765"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2766"><highlight class="normal"></highlight></codeline>
<codeline lineno="2767"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>configure_rtp_session_for_rtcp_xr(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc,<sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/>SalStreamType<sp/>type)<sp/>{</highlight></codeline>
<codeline lineno="2768"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>RtpSession<sp/>*session<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="2769"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>OrtpRtcpXrConfiguration<sp/>*localconfig;</highlight></codeline>
<codeline lineno="2770"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>OrtpRtcpXrConfiguration<sp/>*remoteconfig;</highlight></codeline>
<codeline lineno="2771"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>OrtpRtcpXrConfiguration<sp/>currentconfig;</highlight></codeline>
<codeline lineno="2772"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>SalStreamDescription<sp/>*localstream;</highlight></codeline>
<codeline lineno="2773"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>SalStreamDescription<sp/>*remotestream;</highlight></codeline>
<codeline lineno="2774"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalMediaDescription<sp/>*remotedesc<sp/>=<sp/>sal_call_get_remote_media_description(call-&gt;op);</highlight></codeline>
<codeline lineno="2775"><highlight class="normal"></highlight></codeline>
<codeline lineno="2776"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!remotedesc)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="2777"><highlight class="normal"></highlight></codeline>
<codeline lineno="2778"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>localstream<sp/>=<sp/>sal_media_description_find_best_stream(call-&gt;localdesc,<sp/>type);</highlight></codeline>
<codeline lineno="2779"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!localstream)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="2780"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>localconfig<sp/>=<sp/>&amp;localstream-&gt;rtcp_xr;</highlight></codeline>
<codeline lineno="2781"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>remotestream<sp/>=<sp/>sal_media_description_find_best_stream(remotedesc,<sp/>type);</highlight></codeline>
<codeline lineno="2782"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!remotestream)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="2783"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>remoteconfig<sp/>=<sp/>&amp;remotestream-&gt;rtcp_xr;</highlight></codeline>
<codeline lineno="2784"><highlight class="normal"></highlight></codeline>
<codeline lineno="2785"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(localstream-&gt;dir<sp/>==<sp/>SalStreamInactive)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="2786"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(localstream-&gt;dir<sp/>==<sp/>SalStreamRecvOnly)<sp/>{</highlight></codeline>
<codeline lineno="2787"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Use<sp/>local<sp/>config<sp/>for<sp/>unilateral<sp/>parameters<sp/>and<sp/>remote<sp/>config<sp/>for<sp/>collaborative<sp/>parameters.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2788"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>memcpy(&amp;currentconfig,<sp/>localconfig,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(currentconfig));</highlight></codeline>
<codeline lineno="2789"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>currentconfig.rcvr_rtt_mode<sp/>=<sp/>remoteconfig-&gt;rcvr_rtt_mode;</highlight></codeline>
<codeline lineno="2790"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>currentconfig.rcvr_rtt_max_size<sp/>=<sp/>remoteconfig-&gt;rcvr_rtt_max_size;</highlight></codeline>
<codeline lineno="2791"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="2792"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>memcpy(&amp;currentconfig,<sp/>remoteconfig,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(currentconfig));</highlight></codeline>
<codeline lineno="2793"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2794"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(type<sp/>==<sp/>SalAudio)<sp/>{</highlight></codeline>
<codeline lineno="2795"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>session<sp/>=<sp/>call-&gt;audiostream-&gt;ms.sessions.rtp_session;</highlight></codeline>
<codeline lineno="2796"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(type<sp/>==<sp/>SalVideo)<sp/>{</highlight></codeline>
<codeline lineno="2797"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>session<sp/>=<sp/>call-&gt;videostream-&gt;ms.sessions.rtp_session;</highlight></codeline>
<codeline lineno="2798"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(type<sp/>==<sp/>SalText)<sp/>{</highlight></codeline>
<codeline lineno="2799"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>session<sp/>=<sp/>call-&gt;textstream-&gt;ms.sessions.rtp_session;</highlight></codeline>
<codeline lineno="2800"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2801"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_configure_rtcp_xr(session,<sp/>&amp;currentconfig);</highlight></codeline>
<codeline lineno="2802"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2803"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>start_dtls(<sp/>MSMediaStreamSessions<sp/>*sessions,<sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>SalStreamDescription<sp/>*sd,</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>SalStreamDescription<sp/>*remote)<sp/>{</highlight></codeline>
<codeline lineno="2804"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sal_stream_description_has_dtls(sd)<sp/>==<sp/>TRUE)<sp/>{</highlight></codeline>
<codeline lineno="2805"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*DTLS*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2806"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalDtlsRole<sp/>salRole<sp/>=<sp/>sd-&gt;dtls_role;</highlight></codeline>
<codeline lineno="2807"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(salRole!=SalDtlsRoleInvalid)<sp/>{<sp/></highlight><highlight class="comment">/*<sp/>if<sp/>DTLS<sp/>is<sp/>available<sp/>at<sp/>both<sp/>end<sp/>points<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2808"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>give<sp/>the<sp/>peer<sp/>certificate<sp/>fingerprint<sp/>to<sp/>dtls<sp/>context<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2809"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_dtls_srtp_set_peer_fingerprint(sessions-&gt;dtls_context,<sp/>remote-&gt;dtls_fingerprint);</highlight></codeline>
<codeline lineno="2810"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_dtls_srtp_set_role(sessions-&gt;dtls_context,<sp/>(salRole<sp/>==<sp/>SalDtlsRoleIsClient)?MSDtlsSrtpRoleIsClient:MSDtlsSrtpRoleIsServer);<sp/></highlight><highlight class="comment">/*<sp/>set<sp/>the<sp/>role<sp/>to<sp/>client<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2811"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_dtls_srtp_start(sessions-&gt;dtls_context);<sp/><sp/></highlight><highlight class="comment">/*<sp/>then<sp/>start<sp/>the<sp/>engine,<sp/>it<sp/>will<sp/>send<sp/>the<sp/>DTLS<sp/>client<sp/>Hello<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2812"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="2813"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;unable<sp/>to<sp/>start<sp/>DTLS<sp/>engine<sp/>on<sp/>stream<sp/>session<sp/>[%p],<sp/>Dtls<sp/>role<sp/>in<sp/>resulting<sp/>media<sp/>description<sp/>is<sp/>invalid&quot;</highlight><highlight class="normal">,sessions);</highlight></codeline>
<codeline lineno="2814"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2815"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2816"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2817"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>start_dtls_on_all_streams(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="2818"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalMediaDescription<sp/>*remote_desc<sp/>=<sp/>sal_call_get_remote_media_description(call-&gt;op);</highlight></codeline>
<codeline lineno="2819"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalMediaDescription<sp/>*result_desc<sp/>=<sp/>sal_call_get_final_media_description(call-&gt;op);</highlight></codeline>
<codeline lineno="2820"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(<sp/>remote_desc<sp/>==<sp/>NULL<sp/>||<sp/>result_desc<sp/>==<sp/>NULL<sp/>){</highlight></codeline>
<codeline lineno="2821"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>this<sp/>can<sp/>happen<sp/>in<sp/>some<sp/>tricky<sp/>cases<sp/>(early-media<sp/>without<sp/>SDP<sp/>in<sp/>the<sp/>200).<sp/>In<sp/>that<sp/>case,<sp/>simply<sp/>skip<sp/>DTLS<sp/>code<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2822"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="2823"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2824"><highlight class="normal"></highlight></codeline>
<codeline lineno="2825"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;audiostream<sp/>&amp;&amp;<sp/>(media_stream_get_state((</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MediaStream<sp/>*)call-&gt;audiostream)<sp/>==<sp/>MSStreamStarted))</highlight><highlight class="comment">/*dtls<sp/>must<sp/>start<sp/>at<sp/>the<sp/>end<sp/>of<sp/>ice*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2826"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>start_dtls(&amp;call-&gt;audiostream-&gt;ms.sessions</highlight></codeline>
<codeline lineno="2827"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>,sal_media_description_find_best_stream(result_desc,SalAudio)</highlight></codeline>
<codeline lineno="2828"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>,sal_media_description_find_best_stream(remote_desc,SalAudio));</highlight></codeline>
<codeline lineno="2829"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>VIDEO_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2830"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;videostream<sp/>&amp;&amp;<sp/>(media_stream_get_state((</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MediaStream<sp/>*)call-&gt;videostream)<sp/>==<sp/>MSStreamStarted))</highlight><highlight class="comment">/*dtls<sp/>must<sp/>start<sp/>at<sp/>the<sp/>end<sp/>of<sp/>ice*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2831"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>start_dtls(&amp;call-&gt;videostream-&gt;ms.sessions</highlight></codeline>
<codeline lineno="2832"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>,sal_media_description_find_best_stream(result_desc,SalVideo)</highlight></codeline>
<codeline lineno="2833"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>,sal_media_description_find_best_stream(remote_desc,SalVideo));</highlight></codeline>
<codeline lineno="2834"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2835"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;textstream<sp/>&amp;&amp;<sp/>(media_stream_get_state((</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MediaStream<sp/>*)call-&gt;textstream)<sp/>==<sp/>MSStreamStarted))</highlight><highlight class="comment">/*dtls<sp/>must<sp/>start<sp/>at<sp/>the<sp/>end<sp/>of<sp/>ice*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2836"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>start_dtls(&amp;call-&gt;textstream-&gt;ms.sessions</highlight></codeline>
<codeline lineno="2837"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>,sal_media_description_find_best_stream(result_desc,SalText)</highlight></codeline>
<codeline lineno="2838"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>,sal_media_description_find_best_stream(remote_desc,SalText));</highlight></codeline>
<codeline lineno="2839"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="2840"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2841"><highlight class="normal"></highlight></codeline>
<codeline lineno="2842"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>set_dtls_fingerprint(<sp/>MSMediaStreamSessions<sp/>*sessions,<sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>SalStreamDescription<sp/>*sd,</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>SalStreamDescription<sp/>*remote)<sp/>{</highlight></codeline>
<codeline lineno="2843"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sal_stream_description_has_dtls(sd)<sp/>==<sp/>TRUE)<sp/>{</highlight></codeline>
<codeline lineno="2844"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*DTLS*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2845"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalDtlsRole<sp/>salRole<sp/>=<sp/>sd-&gt;dtls_role;</highlight></codeline>
<codeline lineno="2846"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(salRole!=SalDtlsRoleInvalid)<sp/>{<sp/></highlight><highlight class="comment">/*<sp/>if<sp/>DTLS<sp/>is<sp/>available<sp/>at<sp/>both<sp/>end<sp/>points<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2847"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>give<sp/>the<sp/>peer<sp/>certificate<sp/>fingerprint<sp/>to<sp/>dtls<sp/>context<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2848"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_dtls_srtp_set_peer_fingerprint(sessions-&gt;dtls_context,<sp/>remote-&gt;dtls_fingerprint);</highlight></codeline>
<codeline lineno="2849"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="2850"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;unable<sp/>to<sp/>start<sp/>DTLS<sp/>engine<sp/>on<sp/>stream<sp/>session<sp/>[%p],<sp/>Dtls<sp/>role<sp/>in<sp/>resulting<sp/>media<sp/>description<sp/>is<sp/>invalid&quot;</highlight><highlight class="normal">,sessions);</highlight></codeline>
<codeline lineno="2851"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2852"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2853"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2854"><highlight class="normal"></highlight></codeline>
<codeline lineno="2855"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>set_dtls_fingerprint_on_all_streams(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="2856"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalMediaDescription<sp/>*remote_desc<sp/>=<sp/>sal_call_get_remote_media_description(call-&gt;op);</highlight></codeline>
<codeline lineno="2857"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalMediaDescription<sp/>*result_desc<sp/>=<sp/>sal_call_get_final_media_description(call-&gt;op);</highlight></codeline>
<codeline lineno="2858"><highlight class="normal"></highlight></codeline>
<codeline lineno="2859"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(<sp/>remote_desc<sp/>==<sp/>NULL<sp/>||<sp/>result_desc<sp/>==<sp/>NULL<sp/>){</highlight></codeline>
<codeline lineno="2860"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>this<sp/>can<sp/>happen<sp/>in<sp/>some<sp/>tricky<sp/>cases<sp/>(early-media<sp/>without<sp/>SDP<sp/>in<sp/>the<sp/>200).<sp/>In<sp/>that<sp/>case,<sp/>simply<sp/>skip<sp/>DTLS<sp/>code<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2861"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="2862"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2863"><highlight class="normal"></highlight></codeline>
<codeline lineno="2864"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;audiostream<sp/>&amp;&amp;<sp/>(media_stream_get_state((</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MediaStream<sp/>*)call-&gt;audiostream)<sp/>==<sp/>MSStreamStarted))</highlight><highlight class="comment">/*dtls<sp/>must<sp/>start<sp/>at<sp/>the<sp/>end<sp/>of<sp/>ice*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2865"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>set_dtls_fingerprint(&amp;call-&gt;audiostream-&gt;ms.sessions</highlight></codeline>
<codeline lineno="2866"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>,sal_media_description_find_best_stream(result_desc,SalAudio)</highlight></codeline>
<codeline lineno="2867"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>,sal_media_description_find_best_stream(remote_desc,SalAudio));</highlight></codeline>
<codeline lineno="2868"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>VIDEO_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2869"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;videostream<sp/>&amp;&amp;<sp/>(media_stream_get_state((</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MediaStream<sp/>*)call-&gt;videostream)<sp/>==<sp/>MSStreamStarted))</highlight><highlight class="comment">/*dtls<sp/>must<sp/>start<sp/>at<sp/>the<sp/>end<sp/>of<sp/>ice*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2870"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>set_dtls_fingerprint(&amp;call-&gt;videostream-&gt;ms.sessions</highlight></codeline>
<codeline lineno="2871"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>,sal_media_description_find_best_stream(result_desc,SalVideo)</highlight></codeline>
<codeline lineno="2872"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>,sal_media_description_find_best_stream(remote_desc,SalVideo));</highlight></codeline>
<codeline lineno="2873"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2874"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;textstream<sp/>&amp;&amp;<sp/>(media_stream_get_state((</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MediaStream<sp/>*)call-&gt;textstream)<sp/>==<sp/>MSStreamStarted))</highlight><highlight class="comment">/*dtls<sp/>must<sp/>start<sp/>at<sp/>the<sp/>end<sp/>of<sp/>ice*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2875"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>set_dtls_fingerprint(&amp;call-&gt;textstream-&gt;ms.sessions</highlight></codeline>
<codeline lineno="2876"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>,sal_media_description_find_best_stream(result_desc,SalText)</highlight></codeline>
<codeline lineno="2877"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>,sal_media_description_find_best_stream(remote_desc,SalText));</highlight></codeline>
<codeline lineno="2878"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="2879"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2880"><highlight class="normal"></highlight></codeline>
<codeline lineno="2881"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>RtpSession<sp/>*<sp/>create_audio_rtp_io_session(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="2882"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>PayloadType<sp/>*pt;</highlight></codeline>
<codeline lineno="2883"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc<sp/>=<sp/>call-&gt;core;</highlight></codeline>
<codeline lineno="2884"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*local_ip<sp/>=<sp/><ref refid="group__misc_1ga9657ebf1d68b43184a796c9bdc68c29a" kindref="member">lp_config_get_string</ref>(lc-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;sound&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;rtp_local_addr&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;127.0.0.1&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="2885"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*remote_ip<sp/>=<sp/><ref refid="group__misc_1ga9657ebf1d68b43184a796c9bdc68c29a" kindref="member">lp_config_get_string</ref>(lc-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;sound&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;rtp_remote_addr&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;127.0.0.1&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="2886"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>local_port<sp/>=<sp/><ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;sound&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;rtp_local_port&quot;</highlight><highlight class="normal">,<sp/>17076);</highlight></codeline>
<codeline lineno="2887"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>remote_port<sp/>=<sp/><ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;sound&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;rtp_remote_port&quot;</highlight><highlight class="normal">,<sp/>17078);</highlight></codeline>
<codeline lineno="2888"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ptnum<sp/>=<sp/><ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;sound&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;rtp_ptnum&quot;</highlight><highlight class="normal">,<sp/>0);</highlight></codeline>
<codeline lineno="2889"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*rtpmap<sp/>=<sp/><ref refid="group__misc_1ga9657ebf1d68b43184a796c9bdc68c29a" kindref="member">lp_config_get_string</ref>(lc-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;sound&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;rtp_map&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;pcmu/8000/1&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="2890"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>symmetric<sp/>=<sp/><ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;sound&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;rtp_symmetric&quot;</highlight><highlight class="normal">,<sp/>0);</highlight></codeline>
<codeline lineno="2891"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>jittcomp<sp/>=<sp/><ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;sound&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;rtp_jittcomp&quot;</highlight><highlight class="normal">,<sp/>0);<sp/></highlight><highlight class="comment">/*<sp/>0<sp/>means<sp/>no<sp/>jitter<sp/>buffer*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2892"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>RtpSession<sp/>*rtp_session<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="2893"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pt<sp/>=<sp/>rtp_profile_get_payload_from_rtpmap(call-&gt;audio_profile,<sp/>rtpmap);</highlight></codeline>
<codeline lineno="2894"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(pt<sp/>!=<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="2895"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;rtp_io_audio_profile<sp/>=<sp/>rtp_profile_new(</highlight><highlight class="stringliteral">&quot;RTP<sp/>IO<sp/>audio<sp/>profile&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="2896"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_profile_set_payload(call-&gt;rtp_io_audio_profile,<sp/>ptnum,<sp/>payload_type_clone(pt));</highlight></codeline>
<codeline lineno="2897"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session<sp/>=<sp/>ms_create_duplex_rtp_session(local_ip,<sp/>local_port,<sp/>-1);</highlight></codeline>
<codeline lineno="2898"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_set_profile(rtp_session,<sp/>call-&gt;rtp_io_audio_profile);</highlight></codeline>
<codeline lineno="2899"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_set_remote_addr_and_port(rtp_session,<sp/>remote_ip,<sp/>remote_port,<sp/>-1);</highlight></codeline>
<codeline lineno="2900"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_enable_rtcp(rtp_session,<sp/>FALSE);</highlight></codeline>
<codeline lineno="2901"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_set_payload_type(rtp_session,<sp/>ptnum);</highlight></codeline>
<codeline lineno="2902"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_set_jitter_compensation(rtp_session,<sp/>jittcomp);</highlight></codeline>
<codeline lineno="2903"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_enable_jitter_buffer(rtp_session,<sp/>jittcomp&gt;0);</highlight></codeline>
<codeline lineno="2904"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_set_symmetric_rtp(rtp_session,<sp/>(bool_t)symmetric);</highlight></codeline>
<codeline lineno="2905"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2906"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>rtp_session;</highlight></codeline>
<codeline lineno="2907"><highlight class="normal">}</highlight></codeline>
<codeline lineno="2908"><highlight class="normal"></highlight></codeline>
<codeline lineno="2909"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_start_audio_stream(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/><ref refid="group__call__control_1ga37dad1a4f935d9cc26ec1f9d2b23691a" kindref="member">LinphoneCallState</ref><sp/>next_state,<sp/>bool_t<sp/>use_arc){</highlight></codeline>
<codeline lineno="2910"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc=call-&gt;core;</highlight></codeline>
<codeline lineno="2911"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>used_pt=-1;</highlight></codeline>
<codeline lineno="2912"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>rtcp_tool[128]={0};</highlight></codeline>
<codeline lineno="2913"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>SalStreamDescription<sp/>*stream;</highlight></codeline>
<codeline lineno="2914"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSSndCard<sp/>*playcard;</highlight></codeline>
<codeline lineno="2915"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSSndCard<sp/>*captcard;</highlight></codeline>
<codeline lineno="2916"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>use_ec;</highlight></codeline>
<codeline lineno="2917"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>mute;</highlight></codeline>
<codeline lineno="2918"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*playfile;</highlight></codeline>
<codeline lineno="2919"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*recfile;</highlight></codeline>
<codeline lineno="2920"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>SalStreamDescription<sp/>*local_st_desc;</highlight></codeline>
<codeline lineno="2921"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>crypto_idx;</highlight></codeline>
<codeline lineno="2922"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSMediaStreamIO<sp/>io<sp/>=<sp/>MS_MEDIA_STREAM_IO_INITIALIZER;</highlight></codeline>
<codeline lineno="2923"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>use_rtp_io<sp/>=<sp/><ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;sound&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;rtp_io&quot;</highlight><highlight class="normal">,<sp/>FALSE);</highlight></codeline>
<codeline lineno="2924"><highlight class="normal"></highlight></codeline>
<codeline lineno="2925"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>snprintf(rtcp_tool,</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(rtcp_tool)-1,</highlight><highlight class="stringliteral">&quot;%s-%s&quot;</highlight><highlight class="normal">,linphone_core_get_user_agent_name(),linphone_core_get_user_agent_version());</highlight></codeline>
<codeline lineno="2926"><highlight class="normal"></highlight></codeline>
<codeline lineno="2927"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stream<sp/>=<sp/>sal_media_description_find_best_stream(call-&gt;resultdesc,<sp/>SalAudio);</highlight></codeline>
<codeline lineno="2928"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stream<sp/>&amp;&amp;<sp/>stream-&gt;dir!=SalStreamInactive<sp/>&amp;&amp;<sp/>stream-&gt;rtp_port!=0){</highlight></codeline>
<codeline lineno="2929"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*rtp_addr=stream-&gt;rtp_addr[0]!=</highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal"><sp/>?<sp/>stream-&gt;rtp_addr<sp/>:<sp/>call-&gt;resultdesc-&gt;addr;</highlight></codeline>
<codeline lineno="2930"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>is_multicast=ms_is_multicast(rtp_addr);</highlight></codeline>
<codeline lineno="2931"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>playcard=lc-&gt;sound_conf.lsd_card<sp/>?</highlight></codeline>
<codeline lineno="2932"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lc-&gt;sound_conf.lsd_card<sp/>:<sp/>lc-&gt;sound_conf.play_sndcard;</highlight></codeline>
<codeline lineno="2933"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>captcard=lc-&gt;sound_conf.capt_sndcard;</highlight></codeline>
<codeline lineno="2934"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>playfile=lc-&gt;play_file;</highlight></codeline>
<codeline lineno="2935"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>recfile=lc-&gt;rec_file;</highlight></codeline>
<codeline lineno="2936"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;audio_profile=make_profile(call,call-&gt;resultdesc,stream,&amp;used_pt);</highlight></codeline>
<codeline lineno="2937"><highlight class="normal"></highlight></codeline>
<codeline lineno="2938"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(used_pt!=-1){</highlight></codeline>
<codeline lineno="2939"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>ok<sp/>=<sp/>TRUE;</highlight></codeline>
<codeline lineno="2940"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;audio_codec<sp/>=<sp/>rtp_profile_get_payload(call-&gt;audio_profile,<sp/>used_pt);</highlight></codeline>
<codeline lineno="2941"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(playcard==NULL)<sp/>{</highlight></codeline>
<codeline lineno="2942"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;No<sp/>card<sp/>defined<sp/>for<sp/>playback<sp/>!&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="2943"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2944"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(captcard==NULL)<sp/>{</highlight></codeline>
<codeline lineno="2945"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;No<sp/>card<sp/>defined<sp/>for<sp/>capture<sp/>!&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="2946"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2947"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*Don&apos;t<sp/>use<sp/>file<sp/>or<sp/>soundcard<sp/>capture<sp/>when<sp/>placed<sp/>in<sp/>recv-only<sp/>mode*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2948"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stream-&gt;rtp_port==0</highlight></codeline>
<codeline lineno="2949"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>||<sp/>stream-&gt;dir==SalStreamRecvOnly</highlight></codeline>
<codeline lineno="2950"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>||<sp/>(stream-&gt;multicast_role<sp/>==<sp/>SalMulticastReceiver<sp/>&amp;&amp;<sp/>is_multicast)){</highlight></codeline>
<codeline lineno="2951"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>captcard=NULL;</highlight></codeline>
<codeline lineno="2952"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>playfile=NULL;</highlight></codeline>
<codeline lineno="2953"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2954"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(next_state<sp/>==<sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa59c57a8b9a7a0086a79c85028bb4cefc" kindref="member">LinphoneCallPaused</ref>){</highlight></codeline>
<codeline lineno="2955"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*in<sp/>paused<sp/>state,<sp/>we<sp/>never<sp/>use<sp/>soundcard*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2956"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>playcard=NULL;</highlight></codeline>
<codeline lineno="2957"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>captcard=NULL;</highlight></codeline>
<codeline lineno="2958"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>recfile=NULL;</highlight></codeline>
<codeline lineno="2959"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*And<sp/>we<sp/>will<sp/>eventually<sp/>play<sp/>&quot;playfile&quot;<sp/>if<sp/>set<sp/>by<sp/>the<sp/>user*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2960"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2961"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;playing_ringbacktone){</highlight></codeline>
<codeline lineno="2962"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>captcard=NULL;</highlight></codeline>
<codeline lineno="2963"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>playfile=NULL;</highlight><highlight class="comment">/*<sp/>it<sp/>is<sp/>setup<sp/>later*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2964"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,</highlight><highlight class="stringliteral">&quot;sound&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;send_ringback_without_playback&quot;</highlight><highlight class="normal">,<sp/>0)<sp/>==<sp/>1){</highlight></codeline>
<codeline lineno="2965"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>playcard<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="2966"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>recfile<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="2967"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2968"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2969"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*if<sp/>playfile<sp/>are<sp/>supplied<sp/>don&apos;t<sp/>use<sp/>soundcards*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2970"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lc-&gt;use_files<sp/>||<sp/>use_rtp_io)<sp/>{</highlight></codeline>
<codeline lineno="2971"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>captcard=NULL;</highlight></codeline>
<codeline lineno="2972"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>playcard=NULL;</highlight></codeline>
<codeline lineno="2973"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2974"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;params-&gt;in_conference){</highlight></codeline>
<codeline lineno="2975"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>first<sp/>create<sp/>the<sp/>graph<sp/>without<sp/>soundcard<sp/>resources*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2976"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>captcard=playcard=NULL;</highlight></codeline>
<codeline lineno="2977"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2978"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!linphone_call_sound_resources_available(call)){</highlight></codeline>
<codeline lineno="2979"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Sound<sp/>resources<sp/>are<sp/>used<sp/>by<sp/>another<sp/>call,<sp/>not<sp/>using<sp/>soundcard.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="2980"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>captcard=playcard=NULL;</highlight></codeline>
<codeline lineno="2981"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2982"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>use_ec=captcard==NULL<sp/>?<sp/>FALSE<sp/>:<sp/><ref refid="group__media__parameters_1gaa7e19725835efff9598aaadf23d4df71" kindref="member">linphone_core_echo_cancellation_enabled</ref>(lc);</highlight></codeline>
<codeline lineno="2983"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_enable_echo_canceller(call-&gt;audiostream,<sp/>use_ec);</highlight></codeline>
<codeline lineno="2984"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(playcard<sp/>&amp;&amp;<sp/><sp/>stream-&gt;max_rate&gt;0)<sp/>ms_snd_card_set_preferred_sample_rate(playcard,<sp/>stream-&gt;max_rate);</highlight></codeline>
<codeline lineno="2985"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(captcard<sp/>&amp;&amp;<sp/><sp/>stream-&gt;max_rate&gt;0)<sp/>ms_snd_card_set_preferred_sample_rate(captcard,<sp/>stream-&gt;max_rate);</highlight></codeline>
<codeline lineno="2986"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_enable_adaptive_bitrate_control(call-&gt;audiostream,use_arc);</highlight></codeline>
<codeline lineno="2987"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>media_stream_set_adaptive_bitrate_algorithm(&amp;call-&gt;audiostream-&gt;ms,</highlight></codeline>
<codeline lineno="2988"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_qos_analyzer_algorithm_from_string(<ref refid="group__media__parameters_1ga91cd638302166dd018e8f51a66811b22" kindref="member">linphone_core_get_adaptive_rate_algorithm</ref>(lc)));</highlight></codeline>
<codeline lineno="2989"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_enable_adaptive_jittcomp(call-&gt;audiostream,<sp/><ref refid="group__media__parameters_1gae3a5b465477037cbafe1d92510be375f" kindref="member">linphone_core_audio_adaptive_jittcomp_enabled</ref>(lc));</highlight></codeline>
<codeline lineno="2990"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_set_jitter_compensation(call-&gt;audiostream-&gt;ms.sessions.rtp_session,<ref refid="group__media__parameters_1ga64acd21473b504e3cd1a91a913253119" kindref="member">linphone_core_get_audio_jittcomp</ref>(lc));</highlight></codeline>
<codeline lineno="2991"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!call-&gt;params-&gt;in_conference<sp/>&amp;&amp;<sp/>call-&gt;params-&gt;record_file){</highlight></codeline>
<codeline lineno="2992"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_mixed_record_open(call-&gt;audiostream,call-&gt;params-&gt;record_file);</highlight></codeline>
<codeline lineno="2993"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;record_file=ms_strdup(call-&gt;params-&gt;record_file);</highlight></codeline>
<codeline lineno="2994"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="2995"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>valid<sp/>local<sp/>tags<sp/>are<sp/>&gt;<sp/>0<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2996"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sal_stream_description_has_srtp(stream)<sp/>==<sp/>TRUE)<sp/>{</highlight></codeline>
<codeline lineno="2997"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>local_st_desc=sal_media_description_find_stream(call-&gt;localdesc,stream-&gt;proto,SalAudio);</highlight></codeline>
<codeline lineno="2998"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>crypto_idx<sp/>=<sp/>find_crypto_index_from_tag(local_st_desc-&gt;crypto,<sp/>stream-&gt;crypto_local_tag);</highlight></codeline>
<codeline lineno="2999"><highlight class="normal"></highlight></codeline>
<codeline lineno="3000"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(crypto_idx<sp/>&gt;=<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="3001"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_media_stream_sessions_set_srtp_recv_key_b64(&amp;call-&gt;audiostream-&gt;ms.sessions,<sp/>stream-&gt;crypto[0].algo,stream-&gt;crypto[0].master_key);</highlight></codeline>
<codeline lineno="3002"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_media_stream_sessions_set_srtp_send_key_b64(&amp;call-&gt;audiostream-&gt;ms.sessions,<sp/>stream-&gt;crypto[0].algo,local_st_desc-&gt;crypto[crypto_idx].master_key);</highlight></codeline>
<codeline lineno="3003"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="3004"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;Failed<sp/>to<sp/>find<sp/>local<sp/>crypto<sp/>algo<sp/>with<sp/>tag:<sp/>%d&quot;</highlight><highlight class="normal">,<sp/>stream-&gt;crypto_local_tag);</highlight></codeline>
<codeline lineno="3005"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3006"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3007"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>configure_rtp_session_for_rtcp_fb(call,<sp/>stream);</highlight></codeline>
<codeline lineno="3008"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>configure_rtp_session_for_rtcp_xr(lc,<sp/>call,<sp/>SalAudio);</highlight></codeline>
<codeline lineno="3009"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(is_multicast)</highlight></codeline>
<codeline lineno="3010"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_set_multicast_ttl(call-&gt;audiostream-&gt;ms.sessions.rtp_session,stream-&gt;ttl);</highlight></codeline>
<codeline lineno="3011"><highlight class="normal"></highlight></codeline>
<codeline lineno="3012"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(use_rtp_io)<sp/>{</highlight></codeline>
<codeline lineno="3013"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>io.input.type<sp/>=<sp/>io.output.type<sp/>=<sp/>MSResourceRtp;</highlight></codeline>
<codeline lineno="3014"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>io.input.session<sp/>=<sp/>io.output.session<sp/>=<sp/>create_audio_rtp_io_session(call);</highlight></codeline>
<codeline lineno="3015"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(io.input.session<sp/>==<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="3016"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ok<sp/>=<sp/>FALSE;</highlight></codeline>
<codeline lineno="3017"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3018"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="3019"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(playcard){</highlight></codeline>
<codeline lineno="3020"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>io.output.type<sp/>=<sp/>MSResourceSoundcard;</highlight></codeline>
<codeline lineno="3021"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>io.output.soundcard<sp/>=<sp/>playcard;</highlight></codeline>
<codeline lineno="3022"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="3023"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>io.output.type<sp/>=<sp/>MSResourceFile;</highlight></codeline>
<codeline lineno="3024"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>io.output.file<sp/>=<sp/>recfile;</highlight></codeline>
<codeline lineno="3025"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3026"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(captcard){</highlight></codeline>
<codeline lineno="3027"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>io.input.type<sp/>=<sp/>MSResourceSoundcard;</highlight></codeline>
<codeline lineno="3028"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>io.input.soundcard<sp/>=<sp/>captcard;</highlight></codeline>
<codeline lineno="3029"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="3030"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>io.input.type<sp/>=<sp/>MSResourceFile;</highlight></codeline>
<codeline lineno="3031"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>io.input.file<sp/>=<sp/>playfile;</highlight></codeline>
<codeline lineno="3032"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3033"><highlight class="normal"></highlight></codeline>
<codeline lineno="3034"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3035"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ok<sp/>==<sp/>TRUE)<sp/>{</highlight></codeline>
<codeline lineno="3036"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_start_from_io(call-&gt;audiostream,</highlight></codeline>
<codeline lineno="3037"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;audio_profile,</highlight></codeline>
<codeline lineno="3038"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_addr,</highlight></codeline>
<codeline lineno="3039"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stream-&gt;rtp_port,</highlight></codeline>
<codeline lineno="3040"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stream-&gt;rtcp_addr[0]!=</highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal"><sp/>?<sp/>stream-&gt;rtcp_addr<sp/>:<sp/>call-&gt;resultdesc-&gt;addr,</highlight></codeline>
<codeline lineno="3041"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(linphone_core_rtcp_enabled(lc)<sp/>&amp;&amp;<sp/>!is_multicast)<sp/>?<sp/>(stream-&gt;rtcp_port<sp/>?<sp/>stream-&gt;rtcp_port<sp/>:<sp/>stream-&gt;rtp_port+1)<sp/>:<sp/>0,</highlight></codeline>
<codeline lineno="3042"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>used_pt,</highlight></codeline>
<codeline lineno="3043"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>&amp;io</highlight></codeline>
<codeline lineno="3044"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>);</highlight></codeline>
<codeline lineno="3045"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>post_configure_audio_streams(call,<sp/>(call-&gt;all_muted<sp/>||<sp/>call-&gt;audio_muted)<sp/>&amp;&amp;<sp/>!call-&gt;playing_ringbacktone);</highlight></codeline>
<codeline lineno="3046"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3047"><highlight class="normal"></highlight></codeline>
<codeline lineno="3048"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_media_stream_sessions_set_encryption_mandatory(&amp;call-&gt;audiostream-&gt;ms.sessions,<ref refid="group__media__parameters_1ga47ac30cbcc93c9b7a0bcb28d6e9bc1a7" kindref="member">linphone_core_is_media_encryption_mandatory</ref>(call-&gt;core));</highlight></codeline>
<codeline lineno="3049"><highlight class="normal"></highlight></codeline>
<codeline lineno="3050"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(next_state<sp/>==<sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa59c57a8b9a7a0086a79c85028bb4cefc" kindref="member">LinphoneCallPaused</ref><sp/>&amp;&amp;<sp/>captcard<sp/>==<sp/>NULL<sp/>&amp;&amp;<sp/>playfile<sp/>!=<sp/>NULL){</highlight></codeline>
<codeline lineno="3051"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>pause_time=500;</highlight></codeline>
<codeline lineno="3052"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(call-&gt;audiostream-&gt;soundread,MS_FILE_PLAYER_LOOP,&amp;pause_time);</highlight></codeline>
<codeline lineno="3053"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3054"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;playing_ringbacktone){</highlight></codeline>
<codeline lineno="3055"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>setup_ring_player(lc,call);</highlight></codeline>
<codeline lineno="3056"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3057"><highlight class="normal"></highlight></codeline>
<codeline lineno="3058"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;params-&gt;in_conference){</highlight></codeline>
<codeline lineno="3059"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*transform<sp/>the<sp/>graph<sp/>to<sp/>connect<sp/>it<sp/>to<sp/>the<sp/>conference<sp/>filter<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3060"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mute<sp/>=<sp/>stream-&gt;dir==SalStreamRecvOnly;</highlight></codeline>
<codeline lineno="3061"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_add_to_conf(call,<sp/>mute);</highlight></codeline>
<codeline lineno="3062"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3063"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;in_conference=call-&gt;params-&gt;in_conference;</highlight></codeline>
<codeline lineno="3064"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;low_bandwidth=call-&gt;params-&gt;low_bandwidth;</highlight></codeline>
<codeline lineno="3065"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;No<sp/>audio<sp/>stream<sp/>accepted<sp/>?&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="3066"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3067"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3068"><highlight class="normal"></highlight></codeline>
<codeline lineno="3069"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>VIDEO_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3070"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>RtpSession<sp/>*<sp/>create_video_rtp_io_session(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="3071"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>PayloadType<sp/>*pt;</highlight></codeline>
<codeline lineno="3072"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc<sp/>=<sp/>call-&gt;core;</highlight></codeline>
<codeline lineno="3073"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*local_ip<sp/>=<sp/><ref refid="group__misc_1ga9657ebf1d68b43184a796c9bdc68c29a" kindref="member">lp_config_get_string</ref>(lc-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;video&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;rtp_local_addr&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;127.0.0.1&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="3074"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*remote_ip<sp/>=<sp/><ref refid="group__misc_1ga9657ebf1d68b43184a796c9bdc68c29a" kindref="member">lp_config_get_string</ref>(lc-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;video&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;rtp_remote_addr&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;127.0.0.1&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="3075"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>local_port<sp/>=<sp/><ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;video&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;rtp_local_port&quot;</highlight><highlight class="normal">,<sp/>19076);</highlight></codeline>
<codeline lineno="3076"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>remote_port<sp/>=<sp/><ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;video&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;rtp_remote_port&quot;</highlight><highlight class="normal">,<sp/>19078);</highlight></codeline>
<codeline lineno="3077"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ptnum<sp/>=<sp/><ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;video&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;rtp_ptnum&quot;</highlight><highlight class="normal">,<sp/>0);</highlight></codeline>
<codeline lineno="3078"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*rtpmap<sp/>=<sp/><ref refid="group__misc_1ga9657ebf1d68b43184a796c9bdc68c29a" kindref="member">lp_config_get_string</ref>(lc-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;video&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;rtp_map&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;vp8/90000/1&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="3079"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>symmetric<sp/>=<sp/><ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;video&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;rtp_symmetric&quot;</highlight><highlight class="normal">,<sp/>0);</highlight></codeline>
<codeline lineno="3080"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>jittcomp<sp/>=<sp/><ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;video&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;rtp_jittcomp&quot;</highlight><highlight class="normal">,<sp/>0);<sp/></highlight><highlight class="comment">/*<sp/>0<sp/>means<sp/>no<sp/>jitter<sp/>buffer*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3081"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>RtpSession<sp/>*rtp_session<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="3082"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pt<sp/>=<sp/>rtp_profile_get_payload_from_rtpmap(call-&gt;video_profile,<sp/>rtpmap);</highlight></codeline>
<codeline lineno="3083"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(pt<sp/>!=<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="3084"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;rtp_io_video_profile<sp/>=<sp/>rtp_profile_new(</highlight><highlight class="stringliteral">&quot;RTP<sp/>IO<sp/>video<sp/>profile&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="3085"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_profile_set_payload(call-&gt;rtp_io_video_profile,<sp/>ptnum,<sp/>payload_type_clone(pt));</highlight></codeline>
<codeline lineno="3086"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session<sp/>=<sp/>ms_create_duplex_rtp_session(local_ip,<sp/>local_port,<sp/>-1);</highlight></codeline>
<codeline lineno="3087"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_set_profile(rtp_session,<sp/>call-&gt;rtp_io_video_profile);</highlight></codeline>
<codeline lineno="3088"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_set_remote_addr_and_port(rtp_session,<sp/>remote_ip,<sp/>remote_port,<sp/>-1);</highlight></codeline>
<codeline lineno="3089"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_enable_rtcp(rtp_session,<sp/>FALSE);</highlight></codeline>
<codeline lineno="3090"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_set_payload_type(rtp_session,<sp/>ptnum);</highlight></codeline>
<codeline lineno="3091"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_set_symmetric_rtp(rtp_session,<sp/>(bool_t)symmetric);</highlight></codeline>
<codeline lineno="3092"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_set_jitter_compensation(rtp_session,<sp/>jittcomp);</highlight></codeline>
<codeline lineno="3093"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_enable_jitter_buffer(rtp_session,<sp/>jittcomp&gt;0);</highlight></codeline>
<codeline lineno="3094"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3095"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>rtp_session;</highlight></codeline>
<codeline lineno="3096"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3097"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3098"><highlight class="normal"></highlight></codeline>
<codeline lineno="3099"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_start_video_stream(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/><ref refid="group__call__control_1ga37dad1a4f935d9cc26ec1f9d2b23691a" kindref="member">LinphoneCallState</ref><sp/>next_state){</highlight></codeline>
<codeline lineno="3100"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>VIDEO_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3101"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc=call-&gt;core;</highlight></codeline>
<codeline lineno="3102"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>used_pt=-1;</highlight></codeline>
<codeline lineno="3103"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>SalStreamDescription<sp/>*vstream;</highlight></codeline>
<codeline lineno="3104"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSFilter*<sp/>source<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="3105"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>reused_preview<sp/>=<sp/>FALSE;</highlight></codeline>
<codeline lineno="3106"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>use_rtp_io<sp/>=<sp/><ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;video&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;rtp_io&quot;</highlight><highlight class="normal">,<sp/>FALSE);</highlight></codeline>
<codeline lineno="3107"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSMediaStreamIO<sp/>io<sp/>=<sp/>MS_MEDIA_STREAM_IO_INITIALIZER;</highlight></codeline>
<codeline lineno="3108"><highlight class="normal"></highlight></codeline>
<codeline lineno="3109"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>shutdown<sp/>preview<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3110"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lc-&gt;previewstream!=NULL)<sp/>{</highlight></codeline>
<codeline lineno="3111"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(<sp/>lc-&gt;video_conf.reuse_preview_source<sp/>==<sp/>FALSE)<sp/>video_preview_stop(lc-&gt;previewstream);</highlight></codeline>
<codeline lineno="3112"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>source<sp/>=<sp/>video_preview_stop_reuse_source(lc-&gt;previewstream);</highlight></codeline>
<codeline lineno="3113"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lc-&gt;previewstream=NULL;</highlight></codeline>
<codeline lineno="3114"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3115"><highlight class="normal"></highlight></codeline>
<codeline lineno="3116"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vstream<sp/>=<sp/>sal_media_description_find_best_stream(call-&gt;resultdesc,<sp/>SalVideo);</highlight></codeline>
<codeline lineno="3117"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(vstream!=NULL<sp/>&amp;&amp;<sp/>vstream-&gt;dir!=SalStreamInactive<sp/>&amp;&amp;<sp/>vstream-&gt;rtp_port!=0)<sp/>{</highlight></codeline>
<codeline lineno="3118"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*rtp_addr=vstream-&gt;rtp_addr[0]!=</highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal"><sp/>?<sp/>vstream-&gt;rtp_addr<sp/>:<sp/>call-&gt;resultdesc-&gt;addr;</highlight></codeline>
<codeline lineno="3119"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*rtcp_addr=vstream-&gt;rtcp_addr[0]!=</highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal"><sp/>?<sp/>vstream-&gt;rtcp_addr<sp/>:<sp/>call-&gt;resultdesc-&gt;addr;</highlight></codeline>
<codeline lineno="3120"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>SalStreamDescription<sp/>*local_st_desc=sal_media_description_find_stream(call-&gt;localdesc,vstream-&gt;proto,SalVideo);</highlight></codeline>
<codeline lineno="3121"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>is_multicast=ms_is_multicast(rtp_addr);</highlight></codeline>
<codeline lineno="3122"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;video_profile=make_profile(call,call-&gt;resultdesc,vstream,&amp;used_pt);</highlight></codeline>
<codeline lineno="3123"><highlight class="normal"></highlight></codeline>
<codeline lineno="3124"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(used_pt!=-1){</highlight></codeline>
<codeline lineno="3125"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MediaStreamDir<sp/>dir=<sp/>MediaStreamSendRecv;</highlight></codeline>
<codeline lineno="3126"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>is_inactive=FALSE;</highlight></codeline>
<codeline lineno="3127"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSWebCam<sp/>*cam;</highlight></codeline>
<codeline lineno="3128"><highlight class="normal"></highlight></codeline>
<codeline lineno="3129"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;video_codec<sp/>=<sp/>rtp_profile_get_payload(call-&gt;video_profile,<sp/>used_pt);</highlight></codeline>
<codeline lineno="3130"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;has_video=TRUE;</highlight></codeline>
<codeline lineno="3131"><highlight class="normal"></highlight></codeline>
<codeline lineno="3132"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_enable_adaptive_bitrate_control(call-&gt;videostream,</highlight></codeline>
<codeline lineno="3133"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__media__parameters_1ga7aa556ec95ec30680e2c80c68f2ac22e" kindref="member">linphone_core_adaptive_rate_control_enabled</ref>(lc));</highlight></codeline>
<codeline lineno="3134"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>media_stream_set_adaptive_bitrate_algorithm(&amp;call-&gt;videostream-&gt;ms,</highlight></codeline>
<codeline lineno="3135"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_qos_analyzer_algorithm_from_string(<ref refid="group__media__parameters_1ga91cd638302166dd018e8f51a66811b22" kindref="member">linphone_core_get_adaptive_rate_algorithm</ref>(lc)));</highlight></codeline>
<codeline lineno="3136"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_enable_adaptive_jittcomp(call-&gt;videostream,<sp/><ref refid="group__media__parameters_1ga9f5b13c8540ee8f7f040187947f5889e" kindref="member">linphone_core_video_adaptive_jittcomp_enabled</ref>(lc));</highlight></codeline>
<codeline lineno="3137"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_set_jitter_compensation(call-&gt;videostream-&gt;ms.sessions.rtp_session,<sp/><ref refid="group__media__parameters_1ga324acd967de53ceee413a00f8f6aa82f" kindref="member">linphone_core_get_video_jittcomp</ref>(lc));</highlight></codeline>
<codeline lineno="3138"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lc-&gt;video_conf.preview_vsize.width!=0)</highlight></codeline>
<codeline lineno="3139"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_set_preview_size(call-&gt;videostream,lc-&gt;video_conf.preview_vsize);</highlight></codeline>
<codeline lineno="3140"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_set_fps(call-&gt;videostream,<ref refid="group__media__parameters_1gaacfa8816136022b2de1358a8e642aa2b" kindref="member">linphone_core_get_preferred_framerate</ref>(lc));</highlight></codeline>
<codeline lineno="3141"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;video&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;nowebcam_uses_normal_fps&quot;</highlight><highlight class="normal">,<sp/>0))</highlight></codeline>
<codeline lineno="3142"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;videostream-&gt;staticimage_webcam_fps_optimization<sp/>=<sp/>FALSE;</highlight></codeline>
<codeline lineno="3143"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_set_sent_video_size(call-&gt;videostream,<ref refid="group__media__parameters_1gaf951d377684d8f8b3a96aa6704e71e5a" kindref="member">linphone_core_get_preferred_video_size</ref>(lc));</highlight></codeline>
<codeline lineno="3144"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_enable_self_view(call-&gt;videostream,lc-&gt;video_conf.selfview);</highlight></codeline>
<codeline lineno="3145"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;video_window_id<sp/>!=<sp/>NULL)</highlight></codeline>
<codeline lineno="3146"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_set_native_window_id(call-&gt;videostream,<sp/>call-&gt;video_window_id);</highlight></codeline>
<codeline lineno="3147"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lc-&gt;video_window_id<sp/>!=<sp/>NULL)</highlight></codeline>
<codeline lineno="3148"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_set_native_window_id(call-&gt;videostream,<sp/>lc-&gt;video_window_id);</highlight></codeline>
<codeline lineno="3149"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lc-&gt;preview_window_id<sp/>!=<sp/>NULL)</highlight></codeline>
<codeline lineno="3150"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_set_native_preview_window_id(call-&gt;videostream,<sp/>lc-&gt;preview_window_id);</highlight></codeline>
<codeline lineno="3151"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_use_preview_video_window<sp/>(call-&gt;videostream,lc-&gt;use_preview_window);</highlight></codeline>
<codeline lineno="3152"><highlight class="normal"></highlight></codeline>
<codeline lineno="3153"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(is_multicast){</highlight></codeline>
<codeline lineno="3154"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(vstream-&gt;multicast_role<sp/>==<sp/>SalMulticastReceiver)</highlight></codeline>
<codeline lineno="3155"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dir=MediaStreamRecvOnly;</highlight></codeline>
<codeline lineno="3156"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3157"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dir=MediaStreamSendOnly;</highlight></codeline>
<codeline lineno="3158"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(vstream-&gt;dir==SalStreamSendOnly<sp/>&amp;&amp;<sp/>lc-&gt;video_conf.capture<sp/>){</highlight></codeline>
<codeline lineno="3159"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dir=MediaStreamSendOnly;</highlight></codeline>
<codeline lineno="3160"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(vstream-&gt;dir==SalStreamRecvOnly<sp/>&amp;&amp;<sp/>lc-&gt;video_conf.display<sp/>){</highlight></codeline>
<codeline lineno="3161"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dir=MediaStreamRecvOnly;</highlight></codeline>
<codeline lineno="3162"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(vstream-&gt;dir==SalStreamSendRecv){</highlight></codeline>
<codeline lineno="3163"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lc-&gt;video_conf.display<sp/>&amp;&amp;<sp/>lc-&gt;video_conf.capture)</highlight></codeline>
<codeline lineno="3164"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dir=MediaStreamSendRecv;</highlight></codeline>
<codeline lineno="3165"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lc-&gt;video_conf.display)</highlight></codeline>
<codeline lineno="3166"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dir=MediaStreamRecvOnly;</highlight></codeline>
<codeline lineno="3167"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3168"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dir=MediaStreamSendOnly;</highlight></codeline>
<codeline lineno="3169"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="3170"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;video<sp/>stream<sp/>is<sp/>inactive.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="3171"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*either<sp/>inactive<sp/>or<sp/>incompatible<sp/>with<sp/>local<sp/>capabilities*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3172"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>is_inactive=TRUE;</highlight></codeline>
<codeline lineno="3173"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3174"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cam<sp/>=<sp/>linphone_call_get_video_device(call);</highlight></codeline>
<codeline lineno="3175"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!is_inactive){</highlight></codeline>
<codeline lineno="3176"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sal_stream_description_has_srtp(vstream)<sp/>==<sp/>TRUE)<sp/>{</highlight></codeline>
<codeline lineno="3177"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>crypto_idx<sp/>=<sp/>find_crypto_index_from_tag(local_st_desc-&gt;crypto,<sp/>vstream-&gt;crypto_local_tag);</highlight></codeline>
<codeline lineno="3178"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(crypto_idx<sp/>&gt;=<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="3179"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_media_stream_sessions_set_srtp_recv_key_b64(&amp;call-&gt;videostream-&gt;ms.sessions,<sp/>vstream-&gt;crypto[0].algo,vstream-&gt;crypto[0].master_key);</highlight></codeline>
<codeline lineno="3180"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_media_stream_sessions_set_srtp_send_key_b64(&amp;call-&gt;videostream-&gt;ms.sessions,<sp/>vstream-&gt;crypto[0].algo,local_st_desc-&gt;crypto[crypto_idx].master_key);</highlight></codeline>
<codeline lineno="3181"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3182"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3183"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>configure_rtp_session_for_rtcp_fb(call,<sp/>vstream);</highlight></codeline>
<codeline lineno="3184"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>configure_rtp_session_for_rtcp_xr(lc,<sp/>call,<sp/>SalVideo);</highlight></codeline>
<codeline lineno="3185"><highlight class="normal"></highlight></codeline>
<codeline lineno="3186"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;log-&gt;video_enabled<sp/>=<sp/>TRUE;</highlight></codeline>
<codeline lineno="3187"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_set_direction<sp/>(call-&gt;videostream,<sp/>dir);</highlight></codeline>
<codeline lineno="3188"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;%s<sp/>lc<sp/>rotation:%d\n&quot;</highlight><highlight class="normal">,<sp/>__FUNCTION__,<sp/>lc-&gt;device_rotation);</highlight></codeline>
<codeline lineno="3189"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_set_device_rotation(call-&gt;videostream,<sp/>lc-&gt;device_rotation);</highlight></codeline>
<codeline lineno="3190"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_set_freeze_on_error(call-&gt;videostream,<sp/><ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(lc-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;video&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;freeze_on_error&quot;</highlight><highlight class="normal">,<sp/>1));</highlight></codeline>
<codeline lineno="3191"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(is_multicast)</highlight></codeline>
<codeline lineno="3192"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_set_multicast_ttl(call-&gt;videostream-&gt;ms.sessions.rtp_session,vstream-&gt;ttl);</highlight></codeline>
<codeline lineno="3193"><highlight class="normal"></highlight></codeline>
<codeline lineno="3194"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_use_video_preset(call-&gt;videostream,<sp/><ref refid="group__misc_1ga9657ebf1d68b43184a796c9bdc68c29a" kindref="member">lp_config_get_string</ref>(lc-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;video&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;preset&quot;</highlight><highlight class="normal">,<sp/>NULL));</highlight></codeline>
<codeline lineno="3195"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lc-&gt;video_conf.reuse_preview_source<sp/>&amp;&amp;<sp/>source)<sp/>{</highlight></codeline>
<codeline lineno="3196"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;video_stream_start_with_source<sp/>kept:<sp/>%p&quot;</highlight><highlight class="normal">,<sp/>source);</highlight></codeline>
<codeline lineno="3197"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_start_with_source(call-&gt;videostream,</highlight></codeline>
<codeline lineno="3198"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;video_profile,<sp/>rtp_addr,<sp/>vstream-&gt;rtp_port,</highlight></codeline>
<codeline lineno="3199"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtcp_addr,</highlight></codeline>
<codeline lineno="3200"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_rtcp_enabled(lc)<sp/>?<sp/>(vstream-&gt;rtcp_port<sp/>?<sp/>vstream-&gt;rtcp_port<sp/>:<sp/>vstream-&gt;rtp_port+1)<sp/>:<sp/>0,</highlight></codeline>
<codeline lineno="3201"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>used_pt,<sp/><ref refid="group__media__parameters_1ga324acd967de53ceee413a00f8f6aa82f" kindref="member">linphone_core_get_video_jittcomp</ref>(lc),<sp/>cam,<sp/>source);</highlight></codeline>
<codeline lineno="3202"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>reused_preview<sp/>=<sp/>TRUE;</highlight></codeline>
<codeline lineno="3203"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="3204"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>ok<sp/>=<sp/>TRUE;</highlight></codeline>
<codeline lineno="3205"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(use_rtp_io)<sp/>{</highlight></codeline>
<codeline lineno="3206"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>io.input.type<sp/>=<sp/>io.output.type<sp/>=<sp/>MSResourceRtp;</highlight></codeline>
<codeline lineno="3207"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>io.input.session<sp/>=<sp/>io.output.session<sp/>=<sp/>create_video_rtp_io_session(call);</highlight></codeline>
<codeline lineno="3208"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(io.input.session<sp/>==<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="3209"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ok<sp/>=<sp/>FALSE;</highlight></codeline>
<codeline lineno="3210"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;Cannot<sp/>create<sp/>video<sp/>RTP<sp/>IO<sp/>session&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="3211"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3212"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="3213"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>io.input.type<sp/>=<sp/>MSResourceCamera;</highlight></codeline>
<codeline lineno="3214"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>io.input.camera<sp/>=<sp/>cam;</highlight></codeline>
<codeline lineno="3215"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>io.output.type<sp/>=<sp/>MSResourceDefault;</highlight></codeline>
<codeline lineno="3216"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3217"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ok)<sp/>{</highlight></codeline>
<codeline lineno="3218"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_start_from_io(call-&gt;videostream,</highlight></codeline>
<codeline lineno="3219"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;video_profile,<sp/>rtp_addr,<sp/>vstream-&gt;rtp_port,</highlight></codeline>
<codeline lineno="3220"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtcp_addr,</highlight></codeline>
<codeline lineno="3221"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(linphone_core_rtcp_enabled(lc)<sp/>&amp;&amp;<sp/>!is_multicast)<sp/><sp/>?<sp/>(vstream-&gt;rtcp_port<sp/>?<sp/>vstream-&gt;rtcp_port<sp/>:<sp/>vstream-&gt;rtp_port+1)<sp/>:<sp/>0,</highlight></codeline>
<codeline lineno="3222"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>used_pt,<sp/>&amp;io);</highlight></codeline>
<codeline lineno="3223"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3224"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3225"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_media_stream_sessions_set_encryption_mandatory(&amp;call-&gt;videostream-&gt;ms.sessions,<ref refid="group__media__parameters_1ga47ac30cbcc93c9b7a0bcb28d6e9bc1a7" kindref="member">linphone_core_is_media_encryption_mandatory</ref>(call-&gt;core));</highlight></codeline>
<codeline lineno="3226"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>_linphone_call_set_next_video_frame_decoded_trigger(call);</highlight></codeline>
<codeline lineno="3227"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3228"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;No<sp/>video<sp/>stream<sp/>accepted.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="3229"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="3230"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;No<sp/>valid<sp/>video<sp/>stream<sp/>defined.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="3231"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3232"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(<sp/>reused_preview<sp/>==<sp/>FALSE<sp/>&amp;&amp;<sp/>source<sp/>!=<sp/>NULL<sp/>){</highlight></codeline>
<codeline lineno="3233"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>destroy<sp/>not-reused<sp/>source<sp/>filter<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3234"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;Video<sp/>preview<sp/>(%p)<sp/>not<sp/>reused:<sp/>destroying<sp/>it.&quot;</highlight><highlight class="normal">,<sp/>source);</highlight></codeline>
<codeline lineno="3235"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_destroy(source);</highlight></codeline>
<codeline lineno="3236"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3237"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3238"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3239"><highlight class="normal"></highlight></codeline>
<codeline lineno="3240"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_start_text_stream(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="3241"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc<sp/>=<sp/>call-&gt;core;</highlight></codeline>
<codeline lineno="3242"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>used_pt<sp/>=<sp/>-1;</highlight></codeline>
<codeline lineno="3243"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>SalStreamDescription<sp/>*tstream;</highlight></codeline>
<codeline lineno="3244"><highlight class="normal"></highlight></codeline>
<codeline lineno="3245"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tstream<sp/>=<sp/>sal_media_description_find_best_stream(call-&gt;resultdesc,<sp/>SalText);</highlight></codeline>
<codeline lineno="3246"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tstream<sp/>!=<sp/>NULL<sp/>&amp;&amp;<sp/>tstream-&gt;dir<sp/>!=<sp/>SalStreamInactive<sp/>&amp;&amp;<sp/>tstream-&gt;rtp_port<sp/>!=<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="3247"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*rtp_addr<sp/>=<sp/>tstream-&gt;rtp_addr[0]<sp/>!=<sp/></highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal"><sp/>?<sp/>tstream-&gt;rtp_addr<sp/>:<sp/>call-&gt;resultdesc-&gt;addr;</highlight></codeline>
<codeline lineno="3248"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*rtcp_addr<sp/>=<sp/>tstream-&gt;rtcp_addr[0]<sp/>!=<sp/></highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal"><sp/>?<sp/>tstream-&gt;rtcp_addr<sp/>:<sp/>call-&gt;resultdesc-&gt;addr;</highlight></codeline>
<codeline lineno="3249"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>SalStreamDescription<sp/>*local_st_desc<sp/>=<sp/>sal_media_description_find_stream(call-&gt;localdesc,<sp/>tstream-&gt;proto,<sp/>SalText);</highlight></codeline>
<codeline lineno="3250"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>is_multicast<sp/>=<sp/>ms_is_multicast(rtp_addr);</highlight></codeline>
<codeline lineno="3251"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;text_profile<sp/>=<sp/>make_profile(call,<sp/>call-&gt;resultdesc,<sp/>tstream,<sp/>&amp;used_pt);</highlight></codeline>
<codeline lineno="3252"><highlight class="normal"></highlight></codeline>
<codeline lineno="3253"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(used_pt<sp/>!=<sp/>-1)<sp/>{</highlight></codeline>
<codeline lineno="3254"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;text_codec<sp/>=<sp/>rtp_profile_get_payload(call-&gt;text_profile,<sp/>used_pt);</highlight></codeline>
<codeline lineno="3255"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;realtimetext_enabled<sp/>=<sp/>TRUE;</highlight></codeline>
<codeline lineno="3256"><highlight class="normal"></highlight></codeline>
<codeline lineno="3257"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sal_stream_description_has_srtp(tstream)<sp/>==<sp/>TRUE)<sp/>{</highlight></codeline>
<codeline lineno="3258"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>crypto_idx<sp/>=<sp/>find_crypto_index_from_tag(local_st_desc-&gt;crypto,<sp/>tstream-&gt;crypto_local_tag);</highlight></codeline>
<codeline lineno="3259"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(crypto_idx<sp/>&gt;=<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="3260"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_media_stream_sessions_set_srtp_recv_key_b64(&amp;call-&gt;textstream-&gt;ms.sessions,<sp/>tstream-&gt;crypto[0].algo,<sp/>tstream-&gt;crypto[0].master_key);</highlight></codeline>
<codeline lineno="3261"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_media_stream_sessions_set_srtp_send_key_b64(&amp;call-&gt;textstream-&gt;ms.sessions,<sp/>tstream-&gt;crypto[0].algo,<sp/>local_st_desc-&gt;crypto[crypto_idx].master_key);</highlight></codeline>
<codeline lineno="3262"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3263"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3264"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>configure_rtp_session_for_rtcp_fb(call,<sp/>tstream);</highlight></codeline>
<codeline lineno="3265"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>configure_rtp_session_for_rtcp_xr(lc,<sp/>call,<sp/>SalText);</highlight></codeline>
<codeline lineno="3266"><highlight class="normal"></highlight></codeline>
<codeline lineno="3267"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(is_multicast)<sp/>rtp_session_set_multicast_ttl(call-&gt;textstream-&gt;ms.sessions.rtp_session,tstream-&gt;ttl);</highlight></codeline>
<codeline lineno="3268"><highlight class="normal"></highlight></codeline>
<codeline lineno="3269"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>text_stream_start(call-&gt;textstream,<sp/>call-&gt;text_profile,<sp/>rtp_addr,<sp/>tstream-&gt;rtp_port,<sp/>rtcp_addr,<sp/>(linphone_core_rtcp_enabled(lc)<sp/>&amp;&amp;<sp/>!is_multicast)<sp/><sp/>?<sp/>(tstream-&gt;rtcp_port<sp/>?<sp/>tstream-&gt;rtcp_port<sp/>:<sp/>tstream-&gt;rtp_port<sp/>+<sp/>1)<sp/>:<sp/>0,<sp/>used_pt);</highlight></codeline>
<codeline lineno="3270"><highlight class="normal"></highlight></codeline>
<codeline lineno="3271"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_media_stream_sessions_set_encryption_mandatory(&amp;call-&gt;textstream-&gt;ms.sessions,<ref refid="group__media__parameters_1ga47ac30cbcc93c9b7a0bcb28d6e9bc1a7" kindref="member">linphone_core_is_media_encryption_mandatory</ref>(call-&gt;core));</highlight></codeline>
<codeline lineno="3272"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;No<sp/>text<sp/>stream<sp/>accepted.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="3273"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="3274"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;No<sp/>valid<sp/>text<sp/>stream<sp/>defined.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="3275"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3276"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3277"><highlight class="normal"></highlight></codeline>
<codeline lineno="3278"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>setZrtpCryptoTypesParameters(MSZrtpParams<sp/>*params,<sp/><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc)</highlight></codeline>
<codeline lineno="3279"><highlight class="normal">{</highlight></codeline>
<codeline lineno="3280"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="3281"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MSCryptoSuite<sp/>*srtp_suites;</highlight></codeline>
<codeline lineno="3282"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MsZrtpCryptoTypesCount<sp/>ciphersCount,<sp/>authTagsCount;</highlight></codeline>
<codeline lineno="3283"><highlight class="normal"></highlight></codeline>
<codeline lineno="3284"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(params<sp/>==<sp/>NULL)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="3285"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lc<sp/>==<sp/>NULL)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="3286"><highlight class="normal"></highlight></codeline>
<codeline lineno="3287"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>srtp_suites<sp/>=<sp/>linphone_core_get_srtp_crypto_suites(lc);</highlight></codeline>
<codeline lineno="3288"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(srtp_suites!=NULL)<sp/>{</highlight></codeline>
<codeline lineno="3289"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(i=0;<sp/>srtp_suites[i]!=MS_CRYPTO_SUITE_INVALID<sp/>&amp;&amp;<sp/>i&lt;SAL_CRYPTO_ALGO_MAX<sp/>&amp;&amp;<sp/>i&lt;MS_MAX_ZRTP_CRYPTO_TYPES;<sp/>++i){</highlight></codeline>
<codeline lineno="3290"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(srtp_suites[i])<sp/>{</highlight></codeline>
<codeline lineno="3291"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>MS_AES_128_SHA1_32:</highlight></codeline>
<codeline lineno="3292"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>params-&gt;ciphers[params-&gt;ciphersCount++]<sp/>=<sp/>MS_ZRTP_CIPHER_AES1;</highlight></codeline>
<codeline lineno="3293"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>params-&gt;authTags[params-&gt;authTagsCount++]<sp/>=<sp/>MS_ZRTP_AUTHTAG_HS32;</highlight></codeline>
<codeline lineno="3294"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="3295"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>MS_AES_128_NO_AUTH:</highlight></codeline>
<codeline lineno="3296"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>params-&gt;ciphers[params-&gt;ciphersCount++]<sp/>=<sp/>MS_ZRTP_CIPHER_AES1;</highlight></codeline>
<codeline lineno="3297"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="3298"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>MS_NO_CIPHER_SHA1_80:</highlight></codeline>
<codeline lineno="3299"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>params-&gt;authTags[params-&gt;authTagsCount++]<sp/>=<sp/>MS_ZRTP_AUTHTAG_HS80;</highlight></codeline>
<codeline lineno="3300"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="3301"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>MS_AES_128_SHA1_80:</highlight></codeline>
<codeline lineno="3302"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>params-&gt;ciphers[params-&gt;ciphersCount++]<sp/>=<sp/>MS_ZRTP_CIPHER_AES1;</highlight></codeline>
<codeline lineno="3303"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>params-&gt;authTags[params-&gt;authTagsCount++]<sp/>=<sp/>MS_ZRTP_AUTHTAG_HS80;</highlight></codeline>
<codeline lineno="3304"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="3305"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>MS_AES_256_SHA1_80:</highlight></codeline>
<codeline lineno="3306"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>params-&gt;ciphers[params-&gt;ciphersCount++]<sp/>=<sp/>MS_ZRTP_CIPHER_AES3;</highlight></codeline>
<codeline lineno="3307"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>params-&gt;authTags[params-&gt;authTagsCount++]<sp/>=<sp/>MS_ZRTP_AUTHTAG_HS80;</highlight></codeline>
<codeline lineno="3308"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="3309"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>MS_AES_256_SHA1_32:</highlight></codeline>
<codeline lineno="3310"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>params-&gt;ciphers[params-&gt;ciphersCount++]<sp/>=<sp/>MS_ZRTP_CIPHER_AES3;</highlight></codeline>
<codeline lineno="3311"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>params-&gt;authTags[params-&gt;authTagsCount++]<sp/>=<sp/>MS_ZRTP_AUTHTAG_HS80;</highlight></codeline>
<codeline lineno="3312"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="3313"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>MS_CRYPTO_SUITE_INVALID:</highlight></codeline>
<codeline lineno="3314"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="3315"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3316"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3317"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3318"><highlight class="normal"></highlight></codeline>
<codeline lineno="3319"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>linphone_core_get_srtp_crypto_suites<sp/>is<sp/>used<sp/>to<sp/>determine<sp/>sensible<sp/>defaults;<sp/>here<sp/>each<sp/>can<sp/>be<sp/>overridden<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3320"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ciphersCount<sp/>=<sp/>linphone_core_get_zrtp_cipher_suites(lc,<sp/>params-&gt;ciphers);<sp/></highlight><highlight class="comment">/*<sp/>if<sp/>not<sp/>present<sp/>in<sp/>config<sp/>file,<sp/>params-&gt;ciphers<sp/>is<sp/>not<sp/>modified<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3321"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ciphersCount!=0)<sp/>{<sp/></highlight><highlight class="comment">/*<sp/>use<sp/>zrtp_cipher_suites<sp/>config<sp/>only<sp/>when<sp/>present,<sp/>keep<sp/>config<sp/>from<sp/>srtp_crypto_suite<sp/>otherwise<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3322"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>params-&gt;ciphersCount<sp/>=<sp/>ciphersCount;</highlight></codeline>
<codeline lineno="3323"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3324"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>params-&gt;hashesCount<sp/>=<sp/>linphone_core_get_zrtp_hash_suites(lc,<sp/>params-&gt;hashes);</highlight></codeline>
<codeline lineno="3325"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>authTagsCount<sp/>=<sp/>linphone_core_get_zrtp_auth_suites(lc,<sp/>params-&gt;authTags);<sp/></highlight><highlight class="comment">/*<sp/>if<sp/>not<sp/>present<sp/>in<sp/>config<sp/>file,<sp/>params-&gt;authTags<sp/>is<sp/>not<sp/>modified<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3326"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(authTagsCount!=0)<sp/>{</highlight></codeline>
<codeline lineno="3327"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>params-&gt;authTagsCount<sp/>=<sp/>authTagsCount;<sp/></highlight><highlight class="comment">/*<sp/>use<sp/>zrtp_auth_suites<sp/>config<sp/>only<sp/>when<sp/>present,<sp/>keep<sp/>config<sp/>from<sp/>srtp_crypto_suite<sp/>otherwise<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3328"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3329"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>params-&gt;sasTypesCount<sp/>=<sp/>linphone_core_get_zrtp_sas_suites(lc,<sp/>params-&gt;sasTypes);</highlight></codeline>
<codeline lineno="3330"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>params-&gt;keyAgreementsCount<sp/>=<sp/>linphone_core_get_zrtp_key_agreement_suites(lc,<sp/>params-&gt;keyAgreements);</highlight></codeline>
<codeline lineno="3331"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3332"><highlight class="normal"></highlight></codeline>
<codeline lineno="3333"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_start_media_streams(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/><ref refid="group__call__control_1ga37dad1a4f935d9cc26ec1f9d2b23691a" kindref="member">LinphoneCallState</ref><sp/>next_state){</highlight></codeline>
<codeline lineno="3334"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc=call-&gt;core;</highlight></codeline>
<codeline lineno="3335"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>use_arc<sp/>=<sp/><ref refid="group__media__parameters_1ga7aa556ec95ec30680e2c80c68f2ac22e" kindref="member">linphone_core_adaptive_rate_control_enabled</ref>(lc);</highlight></codeline>
<codeline lineno="3336"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>VIDEO_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3337"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>SalStreamDescription<sp/>*vstream=sal_media_description_find_best_stream(call-&gt;resultdesc,SalVideo);</highlight></codeline>
<codeline lineno="3338"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3339"><highlight class="normal"></highlight></codeline>
<codeline lineno="3340"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(next_state){</highlight></codeline>
<codeline lineno="3341"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaab8684757f565989d4212026f755762ed" kindref="member">LinphoneCallIncomingEarlyMedia</ref>:</highlight></codeline>
<codeline lineno="3342"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__media__parameters_1gaa1fa9a4a525a33c010bed547bebcf492" kindref="member">linphone_core_get_remote_ringback_tone</ref>(lc)){</highlight></codeline>
<codeline lineno="3343"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;playing_ringbacktone<sp/>=<sp/>TRUE;</highlight></codeline>
<codeline lineno="3344"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3345"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa7a8cd38252c1a9d8c0ecbdec1aef899d" kindref="member">LinphoneCallOutgoingEarlyMedia</ref>:</highlight></codeline>
<codeline lineno="3346"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!call-&gt;params-&gt;real_early_media){</highlight></codeline>
<codeline lineno="3347"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;all_muted<sp/>=<sp/>TRUE;</highlight></codeline>
<codeline lineno="3348"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3349"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="3350"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="3351"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;playing_ringbacktone<sp/>=<sp/>FALSE;</highlight></codeline>
<codeline lineno="3352"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;all_muted<sp/>=<sp/>FALSE;</highlight></codeline>
<codeline lineno="3353"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="3354"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3355"><highlight class="normal"></highlight></codeline>
<codeline lineno="3356"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;audio_codec<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="3357"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;video_codec<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="3358"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;text_codec<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="3359"><highlight class="normal"></highlight></codeline>
<codeline lineno="3360"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((call-&gt;audiostream<sp/>==<sp/>NULL)<sp/>&amp;&amp;<sp/>(call-&gt;videostream<sp/>==<sp/>NULL))<sp/>{</highlight></codeline>
<codeline lineno="3361"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_fatal(</highlight><highlight class="stringliteral">&quot;start_media_stream()<sp/>called<sp/>without<sp/>prior<sp/>init<sp/>!&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="3362"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="3363"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3364"><highlight class="normal"></highlight></codeline>
<codeline lineno="3365"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;nb_media_starts++;</highlight></codeline>
<codeline lineno="3366"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>defined(VIDEO_ENABLED)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3367"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(vstream!=NULL<sp/>&amp;&amp;<sp/>vstream-&gt;dir!=SalStreamInactive<sp/>&amp;&amp;<sp/>vstream-&gt;payloads!=NULL){</highlight></codeline>
<codeline lineno="3368"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*when<sp/>video<sp/>is<sp/>used,<sp/>do<sp/>not<sp/>make<sp/>adaptive<sp/>rate<sp/>control<sp/>on<sp/>audio,<sp/>it<sp/>is<sp/>stupid.*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3369"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>use_arc=FALSE;</highlight></codeline>
<codeline lineno="3370"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3371"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3372"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;linphone_call_start_media_streams()<sp/>call=[%p]<sp/>local<sp/>upload_bandwidth=[%i]<sp/>kbit/s;<sp/>local<sp/>download_bandwidth=[%i]<sp/>kbit/s&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="3373"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call,<sp/><ref refid="group__media__parameters_1ga4fe4a5b0770d9517ba9184434df4006d" kindref="member">linphone_core_get_upload_bandwidth</ref>(lc),<ref refid="group__media__parameters_1ga111cddb72d1f515862d10c51e441904b" kindref="member">linphone_core_get_download_bandwidth</ref>(lc));</highlight></codeline>
<codeline lineno="3374"><highlight class="normal"></highlight></codeline>
<codeline lineno="3375"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;audiostream!=NULL)<sp/>{</highlight></codeline>
<codeline lineno="3376"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_start_audio_stream(call,<sp/>next_state,<sp/>use_arc);</highlight></codeline>
<codeline lineno="3377"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="3378"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;DTLS<sp/>no<sp/>audio<sp/>stream!&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="3379"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3380"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;has_video=FALSE;</highlight></codeline>
<codeline lineno="3381"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;videostream!=NULL)<sp/>{</highlight></codeline>
<codeline lineno="3382"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;audiostream)<sp/>audio_stream_link_video(call-&gt;audiostream,call-&gt;videostream);</highlight></codeline>
<codeline lineno="3383"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_start_video_stream(call,<sp/>next_state);</highlight></codeline>
<codeline lineno="3384"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3385"><highlight class="normal"></highlight></codeline>
<codeline lineno="3386"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;up_bw=<ref refid="group__media__parameters_1ga4fe4a5b0770d9517ba9184434df4006d" kindref="member">linphone_core_get_upload_bandwidth</ref>(lc);</highlight></codeline>
<codeline lineno="3387"><highlight class="normal"></highlight></codeline>
<codeline lineno="3388"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*might<sp/>be<sp/>moved<sp/>in<sp/>audio/video<sp/>stream_start*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3389"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;params-&gt;media_encryption==<ref refid="group__media__parameters_1ggac01228dce297dfe24304be6a1d2cfa0ba45e6b6334e661aa1680c48901789495b" kindref="member">LinphoneMediaEncryptionZRTP</ref>)<sp/>{</highlight></codeline>
<codeline lineno="3390"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSZrtpParams<sp/>params;</highlight></codeline>
<codeline lineno="3391"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>memset(&amp;params,0,</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(MSZrtpParams));</highlight></codeline>
<codeline lineno="3392"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*call-&gt;current_params.media_encryption<sp/>will<sp/>be<sp/>set<sp/>later<sp/>when<sp/>zrtp<sp/>is<sp/>activated*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3393"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>params.zid_file=lc-&gt;zrtp_secrets_cache;</highlight></codeline>
<codeline lineno="3394"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>params.uri=<sp/><ref refid="group__linphone__address_1gae14a9f3157cc4421e5e5195c9ece2038" kindref="member">linphone_address_as_string_uri_only</ref>((call-&gt;dir==<ref refid="group__call__logs_1ggaa3077de7d4214529094998ce441f61e1aa4030176bbddea10e361ce320946e202" kindref="member">LinphoneCallIncoming</ref>)<sp/>?<sp/>call-&gt;log-&gt;from<sp/>:<sp/>call-&gt;log-&gt;to);</highlight></codeline>
<codeline lineno="3395"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>setZrtpCryptoTypesParameters(&amp;params,call-&gt;core);</highlight></codeline>
<codeline lineno="3396"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_enable_zrtp(call-&gt;audiostream,&amp;params);</highlight></codeline>
<codeline lineno="3397"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>VIDEO_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3398"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(media_stream_secured((MediaStream<sp/>*)call-&gt;audiostream)<sp/>&amp;&amp;<sp/>media_stream_get_state((MediaStream<sp/>*)call-&gt;videostream)<sp/>==<sp/>MSStreamStarted)<sp/>{</highlight></codeline>
<codeline lineno="3399"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*audio<sp/>stream<sp/>is<sp/>already<sp/>encrypted<sp/>and<sp/>video<sp/>stream<sp/>is<sp/>active*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3400"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>memset(&amp;params,0,</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(MSZrtpParams));</highlight></codeline>
<codeline lineno="3401"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_enable_zrtp(call-&gt;videostream,call-&gt;audiostream,&amp;params);</highlight></codeline>
<codeline lineno="3402"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3403"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3404"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3405"><highlight class="normal"></highlight></codeline>
<codeline lineno="3406"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;params-&gt;realtimetext_enabled)<sp/>{</highlight></codeline>
<codeline lineno="3407"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_start_text_stream(call);</highlight></codeline>
<codeline lineno="3408"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3409"><highlight class="normal"></highlight></codeline>
<codeline lineno="3410"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>set_dtls_fingerprint_on_all_streams(call);</highlight></codeline>
<codeline lineno="3411"><highlight class="normal"></highlight></codeline>
<codeline lineno="3412"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((call-&gt;ice_session<sp/>!=<sp/>NULL)<sp/>&amp;&amp;<sp/>(ice_session_state(call-&gt;ice_session)<sp/>!=<sp/>IS_Completed))<sp/>{</highlight></codeline>
<codeline lineno="3413"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ice_session_start_connectivity_checks(call-&gt;ice_session);</highlight></codeline>
<codeline lineno="3414"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="3415"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*should<sp/>not<sp/>start<sp/>dtls<sp/>until<sp/>ice<sp/>is<sp/>completed*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3416"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>start_dtls_on_all_streams(call);</highlight></codeline>
<codeline lineno="3417"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3418"><highlight class="normal"></highlight></codeline>
<codeline lineno="3419"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3420"><highlight class="normal"></highlight></codeline>
<codeline lineno="3421"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_stop_media_streams_for_ice_gathering(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="3422"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(call-&gt;audiostream<sp/>&amp;&amp;<sp/>call-&gt;audiostream-&gt;ms.state==MSStreamPreparing)<sp/>audio_stream_unprepare_sound(call-&gt;audiostream);</highlight></codeline>
<codeline lineno="3423"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>VIDEO_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3424"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;videostream<sp/>&amp;&amp;<sp/>call-&gt;videostream-&gt;ms.state==MSStreamPreparing)<sp/>{</highlight></codeline>
<codeline lineno="3425"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_unprepare_video(call-&gt;videostream);</highlight></codeline>
<codeline lineno="3426"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3427"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3428"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3429"><highlight class="normal"></highlight></codeline>
<codeline lineno="3430"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>bool_t<sp/>update_stream_crypto_params(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>SalStreamDescription<sp/>*local_st_desc,<sp/>SalStreamDescription<sp/>*old_stream,<sp/>SalStreamDescription<sp/>*new_stream,<sp/>MediaStream<sp/>*ms){</highlight></codeline>
<codeline lineno="3431"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>crypto_idx<sp/>=<sp/>find_crypto_index_from_tag(local_st_desc-&gt;crypto,<sp/>new_stream-&gt;crypto_local_tag);</highlight></codeline>
<codeline lineno="3432"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(crypto_idx<sp/>&gt;=<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="3433"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;localdesc_changed<sp/>&amp;<sp/>SAL_MEDIA_DESCRIPTION_CRYPTO_KEYS_CHANGED)</highlight></codeline>
<codeline lineno="3434"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_media_stream_sessions_set_srtp_send_key_b64(&amp;ms-&gt;sessions,<sp/>new_stream-&gt;crypto[0].algo,local_st_desc-&gt;crypto[crypto_idx].master_key);</highlight></codeline>
<codeline lineno="3435"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(strcmp(old_stream-&gt;crypto[0].master_key,new_stream-&gt;crypto[0].master_key)!=0){</highlight></codeline>
<codeline lineno="3436"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_media_stream_sessions_set_srtp_recv_key_b64(&amp;ms-&gt;sessions,<sp/>new_stream-&gt;crypto[0].algo,new_stream-&gt;crypto[0].master_key);</highlight></codeline>
<codeline lineno="3437"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3438"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>TRUE;</highlight></codeline>
<codeline lineno="3439"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="3440"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;Failed<sp/>to<sp/>find<sp/>local<sp/>crypto<sp/>algo<sp/>with<sp/>tag:<sp/>%d&quot;</highlight><highlight class="normal">,<sp/>new_stream-&gt;crypto_local_tag);</highlight></codeline>
<codeline lineno="3441"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3442"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>FALSE;</highlight></codeline>
<codeline lineno="3443"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3444"><highlight class="normal"></highlight></codeline>
<codeline lineno="3445"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_update_crypto_parameters(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/>SalMediaDescription<sp/>*old_md,<sp/>SalMediaDescription<sp/>*new_md)<sp/>{</highlight></codeline>
<codeline lineno="3446"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalStreamDescription<sp/>*old_stream;</highlight></codeline>
<codeline lineno="3447"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalStreamDescription<sp/>*new_stream;</highlight></codeline>
<codeline lineno="3448"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>SalStreamDescription<sp/>*local_st_desc;</highlight></codeline>
<codeline lineno="3449"><highlight class="normal"></highlight></codeline>
<codeline lineno="3450"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>local_st_desc<sp/>=<sp/>sal_media_description_find_secure_stream_of_type(call-&gt;localdesc,<sp/>SalAudio);</highlight></codeline>
<codeline lineno="3451"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>old_stream<sp/>=<sp/>sal_media_description_find_secure_stream_of_type(old_md,<sp/>SalAudio);</highlight></codeline>
<codeline lineno="3452"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>new_stream<sp/>=<sp/>sal_media_description_find_secure_stream_of_type(new_md,<sp/>SalAudio);</highlight></codeline>
<codeline lineno="3453"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;audiostream<sp/>&amp;&amp;<sp/>local_st_desc<sp/>&amp;&amp;<sp/>old_stream<sp/>&amp;&amp;<sp/>new_stream<sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="3454"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>update_stream_crypto_params(call,local_st_desc,old_stream,new_stream,&amp;call-&gt;audiostream-&gt;ms)){</highlight></codeline>
<codeline lineno="3455"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3456"><highlight class="normal"></highlight></codeline>
<codeline lineno="3457"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>local_st_desc<sp/>=<sp/>sal_media_description_find_secure_stream_of_type(call-&gt;localdesc,<sp/>SalText);</highlight></codeline>
<codeline lineno="3458"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>old_stream<sp/>=<sp/>sal_media_description_find_secure_stream_of_type(old_md,<sp/>SalText);</highlight></codeline>
<codeline lineno="3459"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>new_stream<sp/>=<sp/>sal_media_description_find_secure_stream_of_type(new_md,<sp/>SalText);</highlight></codeline>
<codeline lineno="3460"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;textstream<sp/>&amp;&amp;<sp/>local_st_desc<sp/>&amp;&amp;<sp/>old_stream<sp/>&amp;&amp;<sp/>new_stream<sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="3461"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>update_stream_crypto_params(call,local_st_desc,old_stream,new_stream,&amp;call-&gt;textstream-&gt;ms)){</highlight></codeline>
<codeline lineno="3462"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3463"><highlight class="normal"></highlight></codeline>
<codeline lineno="3464"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>start_dtls_on_all_streams(call);</highlight></codeline>
<codeline lineno="3465"><highlight class="normal"></highlight></codeline>
<codeline lineno="3466"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>VIDEO_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3467"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>local_st_desc<sp/>=<sp/>sal_media_description_find_secure_stream_of_type(call-&gt;localdesc,<sp/>SalVideo);</highlight></codeline>
<codeline lineno="3468"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>old_stream<sp/>=<sp/>sal_media_description_find_secure_stream_of_type(old_md,<sp/>SalVideo);</highlight></codeline>
<codeline lineno="3469"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>new_stream<sp/>=<sp/>sal_media_description_find_secure_stream_of_type(new_md,<sp/>SalVideo);</highlight></codeline>
<codeline lineno="3470"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;videostream<sp/>&amp;&amp;<sp/>local_st_desc<sp/>&amp;&amp;<sp/>old_stream<sp/>&amp;&amp;<sp/>new_stream<sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="3471"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>update_stream_crypto_params(call,local_st_desc,old_stream,new_stream,&amp;call-&gt;videostream-&gt;ms)){</highlight></codeline>
<codeline lineno="3472"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3473"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3474"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3475"><highlight class="normal"></highlight></codeline>
<codeline lineno="3476"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_update_remote_session_id_and_ver(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="3477"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalMediaDescription<sp/>*remote_desc<sp/>=<sp/>sal_call_get_remote_media_description(call-&gt;op);</highlight></codeline>
<codeline lineno="3478"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(remote_desc)<sp/>{</highlight></codeline>
<codeline lineno="3479"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;remote_session_id<sp/>=<sp/>remote_desc-&gt;session_id;</highlight></codeline>
<codeline lineno="3480"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;remote_session_ver<sp/>=<sp/>remote_desc-&gt;session_ver;</highlight></codeline>
<codeline lineno="3481"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3482"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3483"><highlight class="normal"></highlight></codeline>
<codeline lineno="3484"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_delete_ice_session(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="3485"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;ice_session<sp/>!=<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="3486"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ice_session_destroy(call-&gt;ice_session);</highlight></codeline>
<codeline lineno="3487"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;ice_session<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="3488"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;audiostream<sp/>!=<sp/>NULL)<sp/>call-&gt;audiostream-&gt;ms.ice_check_list<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="3489"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;videostream<sp/>!=<sp/>NULL)<sp/>call-&gt;videostream-&gt;ms.ice_check_list<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="3490"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;textstream<sp/>!=<sp/>NULL)<sp/>call-&gt;textstream-&gt;ms.ice_check_list<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="3491"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;stats[LINPHONE_CALL_STATS_AUDIO].ice_state<sp/>=<sp/><ref refid="group__initializing_1gga60b6529245618e6ec7b19670fe7bc71da0d7fd71eae1589116f0c62fb2501f126" kindref="member">LinphoneIceStateNotActivated</ref>;</highlight></codeline>
<codeline lineno="3492"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;stats[LINPHONE_CALL_STATS_VIDEO].ice_state<sp/>=<sp/><ref refid="group__initializing_1gga60b6529245618e6ec7b19670fe7bc71da0d7fd71eae1589116f0c62fb2501f126" kindref="member">LinphoneIceStateNotActivated</ref>;</highlight></codeline>
<codeline lineno="3493"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;stats[LINPHONE_CALL_STATS_TEXT].ice_state<sp/>=<sp/><ref refid="group__initializing_1gga60b6529245618e6ec7b19670fe7bc71da0d7fd71eae1589116f0c62fb2501f126" kindref="member">LinphoneIceStateNotActivated</ref>;</highlight></codeline>
<codeline lineno="3494"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3495"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3496"><highlight class="normal"></highlight></codeline>
<codeline lineno="3497"><highlight class="normal"></highlight></codeline>
<codeline lineno="3498"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_delete_upnp_session(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="3499"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>BUILD_UPNP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3500"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(call-&gt;upnp_session!=NULL)<sp/>{</highlight></codeline>
<codeline lineno="3501"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_upnp_session_destroy(call-&gt;upnp_session);</highlight></codeline>
<codeline lineno="3502"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;upnp_session=NULL;</highlight></codeline>
<codeline lineno="3503"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3504"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/>//BUILD_UPNP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3505"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3506"><highlight class="normal"></highlight></codeline>
<codeline lineno="3507"><highlight class="normal"></highlight></codeline>
<codeline lineno="3508"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_log_fill_stats(<ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*log,<sp/>MediaStream<sp/>*st){</highlight></codeline>
<codeline lineno="3509"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>quality=media_stream_get_average_quality_rating(st);</highlight></codeline>
<codeline lineno="3510"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(quality&gt;=0){</highlight></codeline>
<codeline lineno="3511"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(log-&gt;quality!=-1){</highlight></codeline>
<codeline lineno="3512"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>log-&gt;quality*=quality/5.0f;</highlight></codeline>
<codeline lineno="3513"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>log-&gt;quality=quality;</highlight></codeline>
<codeline lineno="3514"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3515"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3516"><highlight class="normal"></highlight></codeline>
<codeline lineno="3517"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>update_rtp_stats(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>stream_index)<sp/>{</highlight></codeline>
<codeline lineno="3518"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stream_index<sp/>&gt;=<sp/>linphone_call_get_stream_count(call))<sp/>{</highlight></codeline>
<codeline lineno="3519"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="3520"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3521"><highlight class="normal"></highlight></codeline>
<codeline lineno="3522"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;sessions[stream_index].rtp_session)<sp/>{</highlight></codeline>
<codeline lineno="3523"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>rtp_stats_t<sp/>*stats<sp/>=<sp/>rtp_session_get_stats(call-&gt;sessions[stream_index].rtp_session);</highlight></codeline>
<codeline lineno="3524"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>memcpy(&amp;call-&gt;stats[stream_index].rtp_stats,<sp/>stats,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(*stats));</highlight></codeline>
<codeline lineno="3525"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3526"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3527"><highlight class="normal"></highlight></codeline>
<codeline lineno="3528"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_stop_audio_stream(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="3529"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;audiostream!=NULL)<sp/>{</highlight></codeline>
<codeline lineno="3530"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_reporting_update_media_info(call,<sp/>LINPHONE_CALL_STATS_AUDIO);</highlight></codeline>
<codeline lineno="3531"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>media_stream_reclaim_sessions(&amp;call-&gt;audiostream-&gt;ms,&amp;call-&gt;sessions[call-&gt;main_audio_stream_index]);</highlight></codeline>
<codeline lineno="3532"><highlight class="normal"></highlight></codeline>
<codeline lineno="3533"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;audiostream-&gt;ec){</highlight></codeline>
<codeline lineno="3534"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*state_str=NULL;</highlight></codeline>
<codeline lineno="3535"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(call-&gt;audiostream-&gt;ec,MS_ECHO_CANCELLER_GET_STATE_STRING,&amp;state_str);</highlight></codeline>
<codeline lineno="3536"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(state_str){</highlight></codeline>
<codeline lineno="3537"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Writing<sp/>echo<sp/>canceler<sp/>state,<sp/>%i<sp/>bytes&quot;</highlight><highlight class="normal">,(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal">)strlen(state_str));</highlight></codeline>
<codeline lineno="3538"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lp_config_write_relative_file(call-&gt;core-&gt;config,<sp/>EC_STATE_STORE,<sp/>state_str);</highlight></codeline>
<codeline lineno="3539"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3540"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3541"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_get_local_rtp_stats(call-&gt;audiostream,&amp;call-&gt;log-&gt;local_stats);</highlight></codeline>
<codeline lineno="3542"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_log_fill_stats<sp/>(call-&gt;log,(MediaStream*)call-&gt;audiostream);</highlight></codeline>
<codeline lineno="3543"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;endpoint){</highlight></codeline>
<codeline lineno="3544"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_remove_from_conf(call);</highlight></codeline>
<codeline lineno="3545"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3546"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>update_rtp_stats(call,<sp/>call-&gt;main_audio_stream_index);</highlight></codeline>
<codeline lineno="3547"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_stop(call-&gt;audiostream);</highlight></codeline>
<codeline lineno="3548"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;audiostream=NULL;</highlight></codeline>
<codeline lineno="3549"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_handle_stream_events(call,<sp/>call-&gt;main_audio_stream_index);</highlight></codeline>
<codeline lineno="3550"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_unregister_event_queue(call-&gt;sessions[call-&gt;main_audio_stream_index].rtp_session,<sp/>call-&gt;audiostream_app_evq);</highlight></codeline>
<codeline lineno="3551"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ortp_ev_queue_flush(call-&gt;audiostream_app_evq);</highlight></codeline>
<codeline lineno="3552"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ortp_ev_queue_destroy(call-&gt;audiostream_app_evq);</highlight></codeline>
<codeline lineno="3553"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;audiostream_app_evq=NULL;</highlight></codeline>
<codeline lineno="3554"><highlight class="normal"></highlight></codeline>
<codeline lineno="3555"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;audio_codec<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="3556"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3557"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3558"><highlight class="normal"></highlight></codeline>
<codeline lineno="3559"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_stop_video_stream(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="3560"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>VIDEO_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3561"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;videostream!=NULL){</highlight></codeline>
<codeline lineno="3562"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_reporting_update_media_info(call,<sp/>LINPHONE_CALL_STATS_VIDEO);</highlight></codeline>
<codeline lineno="3563"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>media_stream_reclaim_sessions(&amp;call-&gt;videostream-&gt;ms,&amp;call-&gt;sessions[call-&gt;main_video_stream_index]);</highlight></codeline>
<codeline lineno="3564"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_log_fill_stats(call-&gt;log,(MediaStream*)call-&gt;videostream);</highlight></codeline>
<codeline lineno="3565"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>update_rtp_stats(call,<sp/>call-&gt;main_video_stream_index);</highlight></codeline>
<codeline lineno="3566"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_stop(call-&gt;videostream);</highlight></codeline>
<codeline lineno="3567"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;videostream=NULL;</highlight></codeline>
<codeline lineno="3568"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_handle_stream_events(call,<sp/>call-&gt;main_video_stream_index);</highlight></codeline>
<codeline lineno="3569"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_unregister_event_queue(call-&gt;sessions[call-&gt;main_video_stream_index].rtp_session,<sp/>call-&gt;videostream_app_evq);</highlight></codeline>
<codeline lineno="3570"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ortp_ev_queue_flush(call-&gt;videostream_app_evq);</highlight></codeline>
<codeline lineno="3571"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ortp_ev_queue_destroy(call-&gt;videostream_app_evq);</highlight></codeline>
<codeline lineno="3572"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;videostream_app_evq=NULL;</highlight></codeline>
<codeline lineno="3573"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;video_codec<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="3574"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3575"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3576"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3577"><highlight class="normal"></highlight></codeline>
<codeline lineno="3578"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>unset_rtp_profile(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i){</highlight></codeline>
<codeline lineno="3579"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;sessions[i].rtp_session)</highlight></codeline>
<codeline lineno="3580"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_set_profile(call-&gt;sessions[i].rtp_session,&amp;av_profile);</highlight></codeline>
<codeline lineno="3581"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3582"><highlight class="normal"></highlight></codeline>
<codeline lineno="3583"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_stop_text_stream(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="3584"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;textstream<sp/>!=<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="3585"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_reporting_update_media_info(call,<sp/>LINPHONE_CALL_STATS_TEXT);</highlight></codeline>
<codeline lineno="3586"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>media_stream_reclaim_sessions(&amp;call-&gt;textstream-&gt;ms,<sp/>&amp;call-&gt;sessions[call-&gt;main_text_stream_index]);</highlight></codeline>
<codeline lineno="3587"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_log_fill_stats(call-&gt;log,<sp/>(MediaStream*)call-&gt;textstream);</highlight></codeline>
<codeline lineno="3588"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>text_stream_stop(call-&gt;textstream);</highlight></codeline>
<codeline lineno="3589"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;textstream<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="3590"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>update_rtp_stats(call,<sp/>call-&gt;main_text_stream_index);</highlight></codeline>
<codeline lineno="3591"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_handle_stream_events(call,<sp/>call-&gt;main_video_stream_index);</highlight></codeline>
<codeline lineno="3592"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_unregister_event_queue(call-&gt;sessions[call-&gt;main_text_stream_index].rtp_session,<sp/>call-&gt;textstream_app_evq);</highlight></codeline>
<codeline lineno="3593"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ortp_ev_queue_flush(call-&gt;textstream_app_evq);</highlight></codeline>
<codeline lineno="3594"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ortp_ev_queue_destroy(call-&gt;textstream_app_evq);</highlight></codeline>
<codeline lineno="3595"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;textstream_app_evq<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="3596"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;current_params-&gt;text_codec<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="3597"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3598"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3599"><highlight class="normal"></highlight></codeline>
<codeline lineno="3600"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_stop_media_streams(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="3601"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;audiostream<sp/>||<sp/>call-&gt;videostream<sp/>||<sp/>call-&gt;textstream)<sp/>{</highlight></codeline>
<codeline lineno="3602"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;audiostream<sp/>&amp;&amp;<sp/>call-&gt;videostream)</highlight></codeline>
<codeline lineno="3603"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_unlink_video(call-&gt;audiostream,<sp/>call-&gt;videostream);</highlight></codeline>
<codeline lineno="3604"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_stop_audio_stream(call);</highlight></codeline>
<codeline lineno="3605"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_stop_video_stream(call);</highlight></codeline>
<codeline lineno="3606"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_stop_text_stream(call);</highlight></codeline>
<codeline lineno="3607"><highlight class="normal"></highlight></codeline>
<codeline lineno="3608"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;core-&gt;msevq<sp/>!=<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="3609"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_event_queue_skip(call-&gt;core-&gt;msevq);</highlight></codeline>
<codeline lineno="3610"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3611"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3612"><highlight class="normal"></highlight></codeline>
<codeline lineno="3613"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;audio_profile){</highlight></codeline>
<codeline lineno="3614"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_profile_destroy(call-&gt;audio_profile);</highlight></codeline>
<codeline lineno="3615"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;audio_profile=NULL;</highlight></codeline>
<codeline lineno="3616"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>unset_rtp_profile(call,call-&gt;main_audio_stream_index);</highlight></codeline>
<codeline lineno="3617"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3618"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;video_profile){</highlight></codeline>
<codeline lineno="3619"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_profile_destroy(call-&gt;video_profile);</highlight></codeline>
<codeline lineno="3620"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;video_profile=NULL;</highlight></codeline>
<codeline lineno="3621"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>unset_rtp_profile(call,call-&gt;main_video_stream_index);</highlight></codeline>
<codeline lineno="3622"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3623"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;text_profile){</highlight></codeline>
<codeline lineno="3624"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_profile_destroy(call-&gt;text_profile);</highlight></codeline>
<codeline lineno="3625"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;text_profile=NULL;</highlight></codeline>
<codeline lineno="3626"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>unset_rtp_profile(call,call-&gt;main_text_stream_index);</highlight></codeline>
<codeline lineno="3627"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3628"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;rtp_io_audio_profile)<sp/>{</highlight></codeline>
<codeline lineno="3629"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_profile_destroy(call-&gt;rtp_io_audio_profile);</highlight></codeline>
<codeline lineno="3630"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;rtp_io_audio_profile<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="3631"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3632"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;rtp_io_video_profile)<sp/>{</highlight></codeline>
<codeline lineno="3633"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_profile_destroy(call-&gt;rtp_io_video_profile);</highlight></codeline>
<codeline lineno="3634"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;rtp_io_video_profile<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="3635"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3636"><highlight class="normal"></highlight></codeline>
<codeline lineno="3637"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_soundcard_hint_check(call-&gt;core);</highlight></codeline>
<codeline lineno="3638"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3639"><highlight class="normal"></highlight></codeline>
<codeline lineno="3640"><highlight class="normal"></highlight></codeline>
<codeline lineno="3641"><highlight class="normal"></highlight></codeline>
<codeline lineno="3642"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="group__media__parameters_1ga12a525f4175bf236ac55de08117bf746" kindref="member">linphone_call_enable_echo_cancellation</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/>bool_t<sp/>enable)<sp/>{</highlight></codeline>
<codeline lineno="3643"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call!=NULL<sp/>&amp;&amp;<sp/>call-&gt;audiostream!=NULL<sp/>&amp;&amp;<sp/>call-&gt;audiostream-&gt;ec){</highlight></codeline>
<codeline lineno="3644"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>bypass_mode<sp/>=<sp/>!enable;</highlight></codeline>
<codeline lineno="3645"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(call-&gt;audiostream-&gt;ec,MS_ECHO_CANCELLER_SET_BYPASS_MODE,&amp;bypass_mode);</highlight></codeline>
<codeline lineno="3646"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3647"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3648"><highlight class="normal">bool_t<sp/><ref refid="group__media__parameters_1ga376db6955f192b0c9d72d1ca40acfcce" kindref="member">linphone_call_echo_cancellation_enabled</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="3649"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call!=NULL<sp/>&amp;&amp;<sp/>call-&gt;audiostream!=NULL<sp/>&amp;&amp;<sp/>call-&gt;audiostream-&gt;ec){</highlight></codeline>
<codeline lineno="3650"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>val;</highlight></codeline>
<codeline lineno="3651"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(call-&gt;audiostream-&gt;ec,MS_ECHO_CANCELLER_GET_BYPASS_MODE,&amp;val);</highlight></codeline>
<codeline lineno="3652"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>!val;</highlight></codeline>
<codeline lineno="3653"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="3654"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="group__media__parameters_1gaa7e19725835efff9598aaadf23d4df71" kindref="member">linphone_core_echo_cancellation_enabled</ref>(call-&gt;core);</highlight></codeline>
<codeline lineno="3655"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3656"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3657"><highlight class="normal"></highlight></codeline>
<codeline lineno="3658"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="group__media__parameters_1gaa5e8e576eaf802f040a3b18c1ffe5c32" kindref="member">linphone_call_enable_echo_limiter</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/>bool_t<sp/>val){</highlight></codeline>
<codeline lineno="3659"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call!=NULL<sp/>&amp;&amp;<sp/>call-&gt;audiostream!=NULL<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="3660"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(val)<sp/>{</highlight></codeline>
<codeline lineno="3661"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*type=<ref refid="group__misc_1ga9657ebf1d68b43184a796c9bdc68c29a" kindref="member">lp_config_get_string</ref>(call-&gt;core-&gt;config,</highlight><highlight class="stringliteral">&quot;sound&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;el_type&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;mic&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="3662"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(strcasecmp(type,</highlight><highlight class="stringliteral">&quot;mic&quot;</highlight><highlight class="normal">)==0)</highlight></codeline>
<codeline lineno="3663"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_enable_echo_limiter(call-&gt;audiostream,ELControlMic);</highlight></codeline>
<codeline lineno="3664"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(strcasecmp(type,</highlight><highlight class="stringliteral">&quot;full&quot;</highlight><highlight class="normal">)==0)</highlight></codeline>
<codeline lineno="3665"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_enable_echo_limiter(call-&gt;audiostream,ELControlFull);</highlight></codeline>
<codeline lineno="3666"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="3667"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_enable_echo_limiter(call-&gt;audiostream,ELInactive);</highlight></codeline>
<codeline lineno="3668"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3669"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3670"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3671"><highlight class="normal"></highlight></codeline>
<codeline lineno="3672"><highlight class="normal">bool_t<sp/><ref refid="group__media__parameters_1ga5b19034e2ce3fed2be1a172b73e1c00e" kindref="member">linphone_call_echo_limiter_enabled</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="3673"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call!=NULL<sp/>&amp;&amp;<sp/>call-&gt;audiostream!=NULL<sp/>){</highlight></codeline>
<codeline lineno="3674"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>call-&gt;audiostream-&gt;el_type<sp/>!=ELInactive<sp/>;</highlight></codeline>
<codeline lineno="3675"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="3676"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="group__media__parameters_1ga5375503097c7085b9654b62fb7deb5f8" kindref="member">linphone_core_echo_limiter_enabled</ref>(call-&gt;core);</highlight></codeline>
<codeline lineno="3677"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3678"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3679"><highlight class="normal"></highlight></codeline>
<codeline lineno="3689"><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/><ref refid="group__call__misc_1ga7a0ca45e0ff2bf7eaca09e795bba3486" kindref="member">linphone_call_get_play_volume</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="3690"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>AudioStream<sp/>*st=call-&gt;audiostream;</highlight></codeline>
<codeline lineno="3691"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(st<sp/>&amp;&amp;<sp/>st-&gt;volrecv){</highlight></codeline>
<codeline lineno="3692"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>vol=0;</highlight></codeline>
<codeline lineno="3693"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(st-&gt;volrecv,MS_VOLUME_GET,&amp;vol);</highlight></codeline>
<codeline lineno="3694"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>vol;</highlight></codeline>
<codeline lineno="3695"><highlight class="normal"></highlight></codeline>
<codeline lineno="3696"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3697"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="group__call__misc_1ga537911929e31ed4ca388ff40a37f97de" kindref="member">LINPHONE_VOLUME_DB_LOWEST</ref>;</highlight></codeline>
<codeline lineno="3698"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3699"><highlight class="normal"></highlight></codeline>
<codeline lineno="3704"><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/><ref refid="group__call__misc_1gac4f217936eea56196afc126974a92451" kindref="member">linphone_call_get_record_volume</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="3705"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>AudioStream<sp/>*st=call-&gt;audiostream;</highlight></codeline>
<codeline lineno="3706"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(st<sp/>&amp;&amp;<sp/>st-&gt;volsend<sp/>&amp;&amp;<sp/>!call-&gt;audio_muted<sp/>&amp;&amp;<sp/>call-&gt;state==<ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaacebe90cc045331e513d069872f9c84d3" kindref="member">LinphoneCallStreamsRunning</ref>){</highlight></codeline>
<codeline lineno="3707"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>vol=0;</highlight></codeline>
<codeline lineno="3708"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(st-&gt;volsend,MS_VOLUME_GET,&amp;vol);</highlight></codeline>
<codeline lineno="3709"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>vol;</highlight></codeline>
<codeline lineno="3710"><highlight class="normal"></highlight></codeline>
<codeline lineno="3711"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3712"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="group__call__misc_1ga537911929e31ed4ca388ff40a37f97de" kindref="member">LINPHONE_VOLUME_DB_LOWEST</ref>;</highlight></codeline>
<codeline lineno="3713"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3714"><highlight class="normal"></highlight></codeline>
<codeline lineno="3715"><highlight class="normal"></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/><ref refid="group__call__misc_1ga7331e4c738ec41d0eecde98fcd4491c9" kindref="member">linphone_call_get_speaker_volume_gain</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="3716"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(call-&gt;audiostream)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>audio_stream_get_sound_card_output_gain(call-&gt;audiostream);</highlight></codeline>
<codeline lineno="3717"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="3718"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_error(</highlight><highlight class="stringliteral">&quot;Could<sp/>not<sp/>get<sp/>playback<sp/>volume:<sp/>no<sp/>audio<sp/>stream&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="3719"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1.0f;</highlight></codeline>
<codeline lineno="3720"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3721"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3722"><highlight class="normal"></highlight></codeline>
<codeline lineno="3723"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="group__call__misc_1gaa89248d3121edc343324d298297db354" kindref="member">linphone_call_set_speaker_volume_gain</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>volume)<sp/>{</highlight></codeline>
<codeline lineno="3724"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(call-&gt;audiostream)<sp/>audio_stream_set_sound_card_output_gain(call-&gt;audiostream,<sp/>volume);</highlight></codeline>
<codeline lineno="3725"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>ms_error(</highlight><highlight class="stringliteral">&quot;Could<sp/>not<sp/>set<sp/>playback<sp/>volume:<sp/>no<sp/>audio<sp/>stream&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="3726"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3727"><highlight class="normal"></highlight></codeline>
<codeline lineno="3728"><highlight class="normal"></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/><ref refid="group__call__misc_1ga3256a32cca5d521ccf85204eef665f85" kindref="member">linphone_call_get_microphone_volume_gain</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="3729"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(call-&gt;audiostream)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>audio_stream_get_sound_card_input_gain(call-&gt;audiostream);</highlight></codeline>
<codeline lineno="3730"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="3731"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_error(</highlight><highlight class="stringliteral">&quot;Could<sp/>not<sp/>get<sp/>record<sp/>volume:<sp/>no<sp/>audio<sp/>stream&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="3732"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1.0f;</highlight></codeline>
<codeline lineno="3733"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3734"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3735"><highlight class="normal"></highlight></codeline>
<codeline lineno="3736"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="group__call__misc_1ga7a0fa668915898492c82558c7f8c176f" kindref="member">linphone_call_set_microphone_volume_gain</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>volume)<sp/>{</highlight></codeline>
<codeline lineno="3737"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(call-&gt;audiostream)<sp/>audio_stream_set_sound_card_input_gain(call-&gt;audiostream,<sp/>volume);</highlight></codeline>
<codeline lineno="3738"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>ms_error(</highlight><highlight class="stringliteral">&quot;Could<sp/>not<sp/>set<sp/>record<sp/>volume:<sp/>no<sp/>audio<sp/>stream&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="3739"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3740"><highlight class="normal"></highlight></codeline>
<codeline lineno="3758"><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/><ref refid="group__call__misc_1ga62c7d3d08531b0cc634b797e273a0a73" kindref="member">linphone_call_get_current_quality</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="3759"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>audio_rating=-1.f;</highlight></codeline>
<codeline lineno="3760"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>video_rating=-1.f;</highlight></codeline>
<codeline lineno="3761"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>result;</highlight></codeline>
<codeline lineno="3762"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;audiostream){</highlight></codeline>
<codeline lineno="3763"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_rating=media_stream_get_quality_rating((MediaStream*)call-&gt;audiostream)/5.0f;</highlight></codeline>
<codeline lineno="3764"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3765"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;videostream){</highlight></codeline>
<codeline lineno="3766"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_rating=media_stream_get_quality_rating((MediaStream*)call-&gt;videostream)/5.0f;</highlight></codeline>
<codeline lineno="3767"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3768"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(audio_rating&lt;0<sp/>&amp;&amp;<sp/>video_rating&lt;0)<sp/>result=-1;</highlight></codeline>
<codeline lineno="3769"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(audio_rating&lt;0)<sp/>result=video_rating*5.0f;</highlight></codeline>
<codeline lineno="3770"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(video_rating&lt;0)<sp/>result=audio_rating*5.0f;</highlight></codeline>
<codeline lineno="3771"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>result=audio_rating*video_rating*5.0f;</highlight></codeline>
<codeline lineno="3772"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>result;</highlight></codeline>
<codeline lineno="3773"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3774"><highlight class="normal"></highlight></codeline>
<codeline lineno="3780"><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/><ref refid="group__call__misc_1gae3aaa85596484c871b57cdefafd7fd9e" kindref="member">linphone_call_get_average_quality</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="3781"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;audiostream){</highlight></codeline>
<codeline lineno="3782"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>audio_stream_get_average_quality_rating(call-&gt;audiostream);</highlight></codeline>
<codeline lineno="3783"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3784"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1;</highlight></codeline>
<codeline lineno="3785"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3786"><highlight class="normal"></highlight></codeline>
<codeline lineno="3787"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>update_local_stats(<ref refid="struct__LinphoneCallStats" kindref="compound">LinphoneCallStats</ref><sp/>*stats,<sp/>MediaStream<sp/>*stream)<sp/>{</highlight></codeline>
<codeline lineno="3788"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MSQualityIndicator<sp/>*qi<sp/>=<sp/>media_stream_get_quality_indicator(stream);</highlight></codeline>
<codeline lineno="3789"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(qi)<sp/>{</highlight></codeline>
<codeline lineno="3790"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stats-&gt;<ref refid="struct__LinphoneCallStats_1a806b9ddc325b0a07895a366f6a470aaf" kindref="member">local_late_rate</ref>=ms_quality_indicator_get_local_late_rate(qi);</highlight></codeline>
<codeline lineno="3791"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stats-&gt;<ref refid="struct__LinphoneCallStats_1ac5805dd8961d7c7d053f1fcdc14bbc67" kindref="member">local_loss_rate</ref>=ms_quality_indicator_get_local_loss_rate(qi);</highlight></codeline>
<codeline lineno="3792"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3793"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>media_stream_get_local_rtp_stats(stream,<sp/>&amp;stats-&gt;<ref refid="struct__LinphoneCallStats_1ae0bd33c7e9fc456003ab08880403c060" kindref="member">rtp_stats</ref>);</highlight></codeline>
<codeline lineno="3794"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3795"><highlight class="normal"></highlight></codeline>
<codeline lineno="3799"><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="struct__LinphoneCallStats" kindref="compound">LinphoneCallStats</ref><sp/>*<ref refid="group__call__misc_1gaa1203b7ecb6b85a05af700152c1fdf14" kindref="member">linphone_call_get_audio_stats</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="3800"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="struct__LinphoneCallStats" kindref="compound">LinphoneCallStats</ref><sp/>*stats<sp/>=<sp/>&amp;call-&gt;stats[LINPHONE_CALL_STATS_AUDIO];</highlight></codeline>
<codeline lineno="3801"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;audiostream){</highlight></codeline>
<codeline lineno="3802"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>update_local_stats(stats,(MediaStream*)call-&gt;audiostream);</highlight></codeline>
<codeline lineno="3803"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3804"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>stats;</highlight></codeline>
<codeline lineno="3805"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3806"><highlight class="normal"></highlight></codeline>
<codeline lineno="3810"><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="struct__LinphoneCallStats" kindref="compound">LinphoneCallStats</ref><sp/>*<ref refid="group__call__misc_1gae4f745821a59615910c73cf47300c234" kindref="member">linphone_call_get_video_stats</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="3811"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="struct__LinphoneCallStats" kindref="compound">LinphoneCallStats</ref><sp/>*stats<sp/>=<sp/>&amp;call-&gt;stats[LINPHONE_CALL_STATS_VIDEO];</highlight></codeline>
<codeline lineno="3812"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;videostream){</highlight></codeline>
<codeline lineno="3813"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>update_local_stats(stats,(MediaStream*)call-&gt;videostream);</highlight></codeline>
<codeline lineno="3814"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3815"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>stats;</highlight></codeline>
<codeline lineno="3816"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3817"><highlight class="normal"></highlight></codeline>
<codeline lineno="3821"><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="struct__LinphoneCallStats" kindref="compound">LinphoneCallStats</ref><sp/>*<ref refid="group__call__misc_1ga7f8b76f0b4f65fd63842e43cba1aaf60" kindref="member">linphone_call_get_text_stats</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="3822"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="struct__LinphoneCallStats" kindref="compound">LinphoneCallStats</ref><sp/>*stats<sp/>=<sp/>&amp;call-&gt;stats[LINPHONE_CALL_STATS_TEXT];</highlight></codeline>
<codeline lineno="3823"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;textstream){</highlight></codeline>
<codeline lineno="3824"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>update_local_stats(stats,(MediaStream*)call-&gt;textstream);</highlight></codeline>
<codeline lineno="3825"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3826"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>stats;</highlight></codeline>
<codeline lineno="3827"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3828"><highlight class="normal"></highlight></codeline>
<codeline lineno="3829"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>bool_t<sp/>ice_in_progress(<ref refid="struct__LinphoneCallStats" kindref="compound">LinphoneCallStats</ref><sp/>*stats){</highlight></codeline>
<codeline lineno="3830"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>stats-&gt;<ref refid="struct__LinphoneCallStats_1a9986d647f13d56c2d752ae5f78f28428" kindref="member">ice_state</ref>==<ref refid="group__initializing_1gga60b6529245618e6ec7b19670fe7bc71da4159d63afd5be9b12773ba8408ceee6a" kindref="member">LinphoneIceStateInProgress</ref>;</highlight></codeline>
<codeline lineno="3831"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3832"><highlight class="normal"></highlight></codeline>
<codeline lineno="3842"><highlight class="normal">bool_t<sp/><ref refid="group__call__misc_1gac64a301e64dcf00e5487dbb1739d5aaf" kindref="member">linphone_call_media_in_progress</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="3843"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>ret=FALSE;</highlight></codeline>
<codeline lineno="3844"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ice_in_progress(&amp;call-&gt;stats[LINPHONE_CALL_STATS_AUDIO])<sp/>||<sp/>ice_in_progress(&amp;call-&gt;stats[LINPHONE_CALL_STATS_VIDEO])<sp/>||<sp/>ice_in_progress(&amp;call-&gt;stats[LINPHONE_CALL_STATS_TEXT]))</highlight></codeline>
<codeline lineno="3845"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ret=TRUE;</highlight></codeline>
<codeline lineno="3846"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*TODO:<sp/>could<sp/>check<sp/>zrtp<sp/>state,<sp/>upnp<sp/>state*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3847"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>ret;</highlight></codeline>
<codeline lineno="3848"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3849"><highlight class="normal"></highlight></codeline>
<codeline lineno="3854"><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/><ref refid="group__call__misc_1ga4f67c9815b880887550873c592174b97" kindref="member">linphone_call_stats_get_sender_loss_rate</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="struct__LinphoneCallStats" kindref="compound">LinphoneCallStats</ref><sp/>*stats)<sp/>{</highlight></codeline>
<codeline lineno="3855"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>report_block_t<sp/>*srb<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="3856"><highlight class="normal"></highlight></codeline>
<codeline lineno="3857"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!stats<sp/>||<sp/>!stats-&gt;<ref refid="struct__LinphoneCallStats_1a6c4670ac143ef768db848ea7828b0f59" kindref="member">sent_rtcp</ref>)</highlight></codeline>
<codeline lineno="3858"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0.0;</highlight></codeline>
<codeline lineno="3859"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Perform<sp/>msgpullup()<sp/>to<sp/>prevent<sp/>crashes<sp/>in<sp/>rtcp_is_SR()<sp/>or<sp/>rtcp_is_RR()<sp/>if<sp/>the<sp/>RTCP<sp/>packet<sp/>is<sp/>composed<sp/>of<sp/>several<sp/>mblk_t<sp/>structure<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3860"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stats-&gt;<ref refid="struct__LinphoneCallStats_1a6c4670ac143ef768db848ea7828b0f59" kindref="member">sent_rtcp</ref>-&gt;b_cont<sp/>!=<sp/>NULL)</highlight></codeline>
<codeline lineno="3861"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>msgpullup(stats-&gt;<ref refid="struct__LinphoneCallStats_1a6c4670ac143ef768db848ea7828b0f59" kindref="member">sent_rtcp</ref>,<sp/>-1);</highlight></codeline>
<codeline lineno="3862"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rtcp_is_SR(stats-&gt;<ref refid="struct__LinphoneCallStats_1a6c4670ac143ef768db848ea7828b0f59" kindref="member">sent_rtcp</ref>))</highlight></codeline>
<codeline lineno="3863"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>srb<sp/>=<sp/>rtcp_SR_get_report_block(stats-&gt;<ref refid="struct__LinphoneCallStats_1a6c4670ac143ef768db848ea7828b0f59" kindref="member">sent_rtcp</ref>,<sp/>0);</highlight></codeline>
<codeline lineno="3864"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rtcp_is_RR(stats-&gt;<ref refid="struct__LinphoneCallStats_1a6c4670ac143ef768db848ea7828b0f59" kindref="member">sent_rtcp</ref>))</highlight></codeline>
<codeline lineno="3865"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>srb<sp/>=<sp/>rtcp_RR_get_report_block(stats-&gt;<ref refid="struct__LinphoneCallStats_1a6c4670ac143ef768db848ea7828b0f59" kindref="member">sent_rtcp</ref>,<sp/>0);</highlight></codeline>
<codeline lineno="3866"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!srb)</highlight></codeline>
<codeline lineno="3867"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0.0;</highlight></codeline>
<codeline lineno="3868"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>100.0f<sp/>*<sp/>report_block_get_fraction_lost(srb)<sp/>/<sp/>256.0f;</highlight></codeline>
<codeline lineno="3869"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3870"><highlight class="normal"></highlight></codeline>
<codeline lineno="3875"><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/><ref refid="group__call__misc_1ga09496e326d7e82e4b15dbc427d384aa0" kindref="member">linphone_call_stats_get_receiver_loss_rate</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="struct__LinphoneCallStats" kindref="compound">LinphoneCallStats</ref><sp/>*stats)<sp/>{</highlight></codeline>
<codeline lineno="3876"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>report_block_t<sp/>*rrb<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="3877"><highlight class="normal"></highlight></codeline>
<codeline lineno="3878"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!stats<sp/>||<sp/>!stats-&gt;<ref refid="struct__LinphoneCallStats_1ae348f8e725ff57e8b43e1e48a7b9ad15" kindref="member">received_rtcp</ref>)</highlight></codeline>
<codeline lineno="3879"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0.0;</highlight></codeline>
<codeline lineno="3880"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Perform<sp/>msgpullup()<sp/>to<sp/>prevent<sp/>crashes<sp/>in<sp/>rtcp_is_SR()<sp/>or<sp/>rtcp_is_RR()<sp/>if<sp/>the<sp/>RTCP<sp/>packet<sp/>is<sp/>composed<sp/>of<sp/>several<sp/>mblk_t<sp/>structure<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3881"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stats-&gt;<ref refid="struct__LinphoneCallStats_1ae348f8e725ff57e8b43e1e48a7b9ad15" kindref="member">received_rtcp</ref>-&gt;b_cont<sp/>!=<sp/>NULL)</highlight></codeline>
<codeline lineno="3882"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>msgpullup(stats-&gt;<ref refid="struct__LinphoneCallStats_1ae348f8e725ff57e8b43e1e48a7b9ad15" kindref="member">received_rtcp</ref>,<sp/>-1);</highlight></codeline>
<codeline lineno="3883"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rtcp_is_RR(stats-&gt;<ref refid="struct__LinphoneCallStats_1ae348f8e725ff57e8b43e1e48a7b9ad15" kindref="member">received_rtcp</ref>))</highlight></codeline>
<codeline lineno="3884"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rrb<sp/>=<sp/>rtcp_RR_get_report_block(stats-&gt;<ref refid="struct__LinphoneCallStats_1ae348f8e725ff57e8b43e1e48a7b9ad15" kindref="member">received_rtcp</ref>,<sp/>0);</highlight></codeline>
<codeline lineno="3885"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rtcp_is_SR(stats-&gt;<ref refid="struct__LinphoneCallStats_1ae348f8e725ff57e8b43e1e48a7b9ad15" kindref="member">received_rtcp</ref>))</highlight></codeline>
<codeline lineno="3886"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rrb<sp/>=<sp/>rtcp_SR_get_report_block(stats-&gt;<ref refid="struct__LinphoneCallStats_1ae348f8e725ff57e8b43e1e48a7b9ad15" kindref="member">received_rtcp</ref>,<sp/>0);</highlight></codeline>
<codeline lineno="3887"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!rrb)</highlight></codeline>
<codeline lineno="3888"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0.0;</highlight></codeline>
<codeline lineno="3889"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>100.0f<sp/>*<sp/>report_block_get_fraction_lost(rrb)<sp/>/<sp/>256.0f;</highlight></codeline>
<codeline lineno="3890"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3891"><highlight class="normal"></highlight></codeline>
<codeline lineno="3896"><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/><ref refid="group__call__misc_1ga15c9b2c5e5e5d13656c67f60acbf3389" kindref="member">linphone_call_stats_get_sender_interarrival_jitter</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="struct__LinphoneCallStats" kindref="compound">LinphoneCallStats</ref><sp/>*stats,<sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="3897"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gaa91f7e76e8f038ae9acdf42d1bc80a22" kindref="member">LinphoneCallParams</ref><sp/>*params;</highlight></codeline>
<codeline lineno="3898"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>PayloadType<sp/>*pt;</highlight></codeline>
<codeline lineno="3899"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>report_block_t<sp/>*srb<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="3900"><highlight class="normal"></highlight></codeline>
<codeline lineno="3901"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!stats<sp/>||<sp/>!call<sp/>||<sp/>!stats-&gt;<ref refid="struct__LinphoneCallStats_1a6c4670ac143ef768db848ea7828b0f59" kindref="member">sent_rtcp</ref>)</highlight></codeline>
<codeline lineno="3902"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0.0;</highlight></codeline>
<codeline lineno="3903"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>params<sp/>=<sp/><ref refid="group__call__control_1ga768bbd4e2869556bc23830a7b1e4eb5c" kindref="member">linphone_call_get_current_params</ref>(call);</highlight></codeline>
<codeline lineno="3904"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!params)</highlight></codeline>
<codeline lineno="3905"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0.0;</highlight></codeline>
<codeline lineno="3906"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Perform<sp/>msgpullup()<sp/>to<sp/>prevent<sp/>crashes<sp/>in<sp/>rtcp_is_SR()<sp/>or<sp/>rtcp_is_RR()<sp/>if<sp/>the<sp/>RTCP<sp/>packet<sp/>is<sp/>composed<sp/>of<sp/>several<sp/>mblk_t<sp/>structure<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3907"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stats-&gt;<ref refid="struct__LinphoneCallStats_1a6c4670ac143ef768db848ea7828b0f59" kindref="member">sent_rtcp</ref>-&gt;b_cont<sp/>!=<sp/>NULL)</highlight></codeline>
<codeline lineno="3908"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>msgpullup(stats-&gt;<ref refid="struct__LinphoneCallStats_1a6c4670ac143ef768db848ea7828b0f59" kindref="member">sent_rtcp</ref>,<sp/>-1);</highlight></codeline>
<codeline lineno="3909"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rtcp_is_SR(stats-&gt;<ref refid="struct__LinphoneCallStats_1a6c4670ac143ef768db848ea7828b0f59" kindref="member">sent_rtcp</ref>))</highlight></codeline>
<codeline lineno="3910"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>srb<sp/>=<sp/>rtcp_SR_get_report_block(stats-&gt;<ref refid="struct__LinphoneCallStats_1a6c4670ac143ef768db848ea7828b0f59" kindref="member">sent_rtcp</ref>,<sp/>0);</highlight></codeline>
<codeline lineno="3911"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rtcp_is_RR(stats-&gt;<ref refid="struct__LinphoneCallStats_1a6c4670ac143ef768db848ea7828b0f59" kindref="member">sent_rtcp</ref>))</highlight></codeline>
<codeline lineno="3912"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>srb<sp/>=<sp/>rtcp_RR_get_report_block(stats-&gt;<ref refid="struct__LinphoneCallStats_1a6c4670ac143ef768db848ea7828b0f59" kindref="member">sent_rtcp</ref>,<sp/>0);</highlight></codeline>
<codeline lineno="3913"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!srb)</highlight></codeline>
<codeline lineno="3914"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0.0;</highlight></codeline>
<codeline lineno="3915"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stats-&gt;<ref refid="struct__LinphoneCallStats_1af5fbd8dd6f793147e526b105c29d0ee5" kindref="member">type</ref><sp/>==<sp/>LINPHONE_CALL_STATS_AUDIO)</highlight></codeline>
<codeline lineno="3916"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pt<sp/>=<sp/><ref refid="group__call__control_1gac7c352ef2c0c62a890fd870ffa7d0095" kindref="member">linphone_call_params_get_used_audio_codec</ref>(params);</highlight></codeline>
<codeline lineno="3917"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3918"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pt<sp/>=<sp/><ref refid="group__call__control_1ga7e40f1c18563b740cdf15d6a2c7f4fcf" kindref="member">linphone_call_params_get_used_video_codec</ref>(params);</highlight></codeline>
<codeline lineno="3919"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!pt<sp/>||<sp/>(pt-&gt;clock_rate<sp/>==<sp/>0))</highlight></codeline>
<codeline lineno="3920"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0.0;</highlight></codeline>
<codeline lineno="3921"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">float</highlight><highlight class="normal">)report_block_get_interarrival_jitter(srb)<sp/>/<sp/>(float)pt-&gt;clock_rate;</highlight></codeline>
<codeline lineno="3922"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3923"><highlight class="normal"></highlight></codeline>
<codeline lineno="3928"><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/><ref refid="group__call__misc_1ga886b7917491da4828cfa5ca75c1828eb" kindref="member">linphone_call_stats_get_receiver_interarrival_jitter</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="struct__LinphoneCallStats" kindref="compound">LinphoneCallStats</ref><sp/>*stats,<sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="3929"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gaa91f7e76e8f038ae9acdf42d1bc80a22" kindref="member">LinphoneCallParams</ref><sp/>*params;</highlight></codeline>
<codeline lineno="3930"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>PayloadType<sp/>*pt;</highlight></codeline>
<codeline lineno="3931"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>report_block_t<sp/>*rrb<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="3932"><highlight class="normal"></highlight></codeline>
<codeline lineno="3933"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!stats<sp/>||<sp/>!call<sp/>||<sp/>!stats-&gt;<ref refid="struct__LinphoneCallStats_1ae348f8e725ff57e8b43e1e48a7b9ad15" kindref="member">received_rtcp</ref>)</highlight></codeline>
<codeline lineno="3934"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0.0;</highlight></codeline>
<codeline lineno="3935"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>params<sp/>=<sp/><ref refid="group__call__control_1ga768bbd4e2869556bc23830a7b1e4eb5c" kindref="member">linphone_call_get_current_params</ref>(call);</highlight></codeline>
<codeline lineno="3936"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!params)</highlight></codeline>
<codeline lineno="3937"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0.0;</highlight></codeline>
<codeline lineno="3938"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Perform<sp/>msgpullup()<sp/>to<sp/>prevent<sp/>crashes<sp/>in<sp/>rtcp_is_SR()<sp/>or<sp/>rtcp_is_RR()<sp/>if<sp/>the<sp/>RTCP<sp/>packet<sp/>is<sp/>composed<sp/>of<sp/>several<sp/>mblk_t<sp/>structure<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3939"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stats-&gt;<ref refid="struct__LinphoneCallStats_1ae348f8e725ff57e8b43e1e48a7b9ad15" kindref="member">received_rtcp</ref>-&gt;b_cont<sp/>!=<sp/>NULL)</highlight></codeline>
<codeline lineno="3940"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>msgpullup(stats-&gt;<ref refid="struct__LinphoneCallStats_1ae348f8e725ff57e8b43e1e48a7b9ad15" kindref="member">received_rtcp</ref>,<sp/>-1);</highlight></codeline>
<codeline lineno="3941"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rtcp_is_SR(stats-&gt;<ref refid="struct__LinphoneCallStats_1ae348f8e725ff57e8b43e1e48a7b9ad15" kindref="member">received_rtcp</ref>))</highlight></codeline>
<codeline lineno="3942"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rrb<sp/>=<sp/>rtcp_SR_get_report_block(stats-&gt;<ref refid="struct__LinphoneCallStats_1ae348f8e725ff57e8b43e1e48a7b9ad15" kindref="member">received_rtcp</ref>,<sp/>0);</highlight></codeline>
<codeline lineno="3943"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rtcp_is_RR(stats-&gt;<ref refid="struct__LinphoneCallStats_1ae348f8e725ff57e8b43e1e48a7b9ad15" kindref="member">received_rtcp</ref>))</highlight></codeline>
<codeline lineno="3944"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rrb<sp/>=<sp/>rtcp_RR_get_report_block(stats-&gt;<ref refid="struct__LinphoneCallStats_1ae348f8e725ff57e8b43e1e48a7b9ad15" kindref="member">received_rtcp</ref>,<sp/>0);</highlight></codeline>
<codeline lineno="3945"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!rrb)</highlight></codeline>
<codeline lineno="3946"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0.0;</highlight></codeline>
<codeline lineno="3947"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stats-&gt;<ref refid="struct__LinphoneCallStats_1af5fbd8dd6f793147e526b105c29d0ee5" kindref="member">type</ref><sp/>==<sp/>LINPHONE_CALL_STATS_AUDIO)</highlight></codeline>
<codeline lineno="3948"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pt<sp/>=<sp/><ref refid="group__call__control_1gac7c352ef2c0c62a890fd870ffa7d0095" kindref="member">linphone_call_params_get_used_audio_codec</ref>(params);</highlight></codeline>
<codeline lineno="3949"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3950"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pt<sp/>=<sp/><ref refid="group__call__control_1ga7e40f1c18563b740cdf15d6a2c7f4fcf" kindref="member">linphone_call_params_get_used_video_codec</ref>(params);</highlight></codeline>
<codeline lineno="3951"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!pt<sp/>||<sp/>(pt-&gt;clock_rate<sp/>==<sp/>0))</highlight></codeline>
<codeline lineno="3952"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0.0;</highlight></codeline>
<codeline lineno="3953"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">float</highlight><highlight class="normal">)report_block_get_interarrival_jitter(rrb)<sp/>/<sp/>(float)pt-&gt;clock_rate;</highlight></codeline>
<codeline lineno="3954"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3955"><highlight class="normal"></highlight></codeline>
<codeline lineno="3956"><highlight class="normal">rtp_stats_t<sp/>linphone_call_stats_get_rtp_stats(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="struct__LinphoneCallStats" kindref="compound">LinphoneCallStats</ref><sp/>*stats)<sp/>{</highlight></codeline>
<codeline lineno="3957"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_stats_t<sp/>rtp_stats;</highlight></codeline>
<codeline lineno="3958"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>memset(&amp;rtp_stats,<sp/>0,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(rtp_stats));</highlight></codeline>
<codeline lineno="3959"><highlight class="normal"></highlight></codeline>
<codeline lineno="3960"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stats)<sp/>{</highlight></codeline>
<codeline lineno="3961"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>memcpy(&amp;rtp_stats,<sp/>&amp;stats-&gt;<ref refid="struct__LinphoneCallStats_1ae0bd33c7e9fc456003ab08880403c060" kindref="member">rtp_stats</ref>,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(stats-&gt;<ref refid="struct__LinphoneCallStats_1ae0bd33c7e9fc456003ab08880403c060" kindref="member">rtp_stats</ref>));</highlight></codeline>
<codeline lineno="3962"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="3963"><highlight class="normal"></highlight></codeline>
<codeline lineno="3964"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>rtp_stats;</highlight></codeline>
<codeline lineno="3965"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3966"><highlight class="normal"></highlight></codeline>
<codeline lineno="3971"><highlight class="normal">uint64_t<sp/><ref refid="group__call__misc_1gae40d01c01f5124d3a123e83769f4eb7a" kindref="member">linphone_call_stats_get_late_packets_cumulative_number</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="struct__LinphoneCallStats" kindref="compound">LinphoneCallStats</ref><sp/>*stats,<sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="3972"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>linphone_call_stats_get_rtp_stats(stats).outoftime;</highlight></codeline>
<codeline lineno="3973"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3974"><highlight class="normal"></highlight></codeline>
<codeline lineno="3980"><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/><ref refid="group__call__misc_1gae8435a45f96caefc4284575ead6ec636" kindref="member">linphone_call_stats_get_download_bandwidth</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="struct__LinphoneCallStats" kindref="compound">LinphoneCallStats</ref><sp/>*stats)<sp/>{</highlight></codeline>
<codeline lineno="3981"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>stats-&gt;<ref refid="struct__LinphoneCallStats_1a374fba6a87240c558dfbd73a9172ed66" kindref="member">download_bandwidth</ref>;</highlight></codeline>
<codeline lineno="3982"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3983"><highlight class="normal"></highlight></codeline>
<codeline lineno="3989"><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/><ref refid="group__call__misc_1ga75d75cf70afffebed65b9bca234120db" kindref="member">linphone_call_stats_get_upload_bandwidth</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="struct__LinphoneCallStats" kindref="compound">LinphoneCallStats</ref><sp/>*stats)<sp/>{</highlight></codeline>
<codeline lineno="3990"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>stats-&gt;<ref refid="struct__LinphoneCallStats_1a76758bb52b889691f2ea8b25fcbc545c" kindref="member">upload_bandwidth</ref>;</highlight></codeline>
<codeline lineno="3991"><highlight class="normal">}</highlight></codeline>
<codeline lineno="3992"><highlight class="normal"></highlight></codeline>
<codeline lineno="3998"><highlight class="normal"><ref refid="group__initializing_1gaf4faffc512588eda7db03fab8b03adfb" kindref="member">LinphoneIceState</ref><sp/><ref refid="group__call__misc_1gab00ca0a997c7f740948d474062fc663c" kindref="member">linphone_call_stats_get_ice_state</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="struct__LinphoneCallStats" kindref="compound">LinphoneCallStats</ref><sp/>*stats)<sp/>{</highlight></codeline>
<codeline lineno="3999"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>stats-&gt;<ref refid="struct__LinphoneCallStats_1a9986d647f13d56c2d752ae5f78f28428" kindref="member">ice_state</ref>;</highlight></codeline>
<codeline lineno="4000"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4001"><highlight class="normal"></highlight></codeline>
<codeline lineno="4007"><highlight class="normal"><ref refid="group__initializing_1ga2c19554a0988f7600aec5c3a7588d61a" kindref="member">LinphoneUpnpState</ref><sp/><ref refid="group__call__misc_1gab475f621ff3a8a2e2d6faee0ca608f79" kindref="member">linphone_call_stats_get_upnp_state</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="struct__LinphoneCallStats" kindref="compound">LinphoneCallStats</ref><sp/>*stats)<sp/>{</highlight></codeline>
<codeline lineno="4008"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>stats-&gt;<ref refid="struct__LinphoneCallStats_1a6f78c4d4bb974ecd0a12acab3891fcec" kindref="member">upnp_state</ref>;</highlight></codeline>
<codeline lineno="4009"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4010"><highlight class="normal"></highlight></codeline>
<codeline lineno="4015"><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="group__call__misc_1gaa92c7b4c3443ff4ae29f7b57f57cfd35" kindref="member">linphone_call_start_recording</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="4016"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!call-&gt;params-&gt;record_file){</highlight></codeline>
<codeline lineno="4017"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_error(</highlight><highlight class="stringliteral">&quot;linphone_call_start_recording():<sp/>no<sp/>output<sp/>file<sp/>specified.<sp/>Use<sp/>linphone_call_params_set_record_file().&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="4018"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4019"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4020"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;audiostream<sp/>&amp;&amp;<sp/>!call-&gt;params-&gt;in_conference){</highlight></codeline>
<codeline lineno="4021"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_mixed_record_start(call-&gt;audiostream);</highlight></codeline>
<codeline lineno="4022"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4023"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;record_active=TRUE;</highlight></codeline>
<codeline lineno="4024"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4025"><highlight class="normal"></highlight></codeline>
<codeline lineno="4029"><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="group__call__misc_1ga2ef01b6aa5dc8ee76a77e5ef399a7907" kindref="member">linphone_call_stop_recording</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="4030"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;audiostream<sp/>&amp;&amp;<sp/>!call-&gt;params-&gt;in_conference){</highlight></codeline>
<codeline lineno="4031"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_mixed_record_stop(call-&gt;audiostream);</highlight></codeline>
<codeline lineno="4032"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4033"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;record_active=FALSE;</highlight></codeline>
<codeline lineno="4034"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4035"><highlight class="normal"></highlight></codeline>
<codeline lineno="4040"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>report_bandwidth(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/>MediaStream<sp/>*as,<sp/>MediaStream<sp/>*vs){</highlight></codeline>
<codeline lineno="4041"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>as_active<sp/>=<sp/><sp/>as<sp/>?<sp/>(media_stream_get_state(as)<sp/>==<sp/>MSStreamStarted)<sp/>:<sp/>FALSE;</highlight></codeline>
<codeline lineno="4042"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>vs_active<sp/>=<sp/><sp/>vs<sp/>?<sp/>(media_stream_get_state(vs)<sp/>==<sp/>MSStreamStarted)<sp/>:<sp/>FALSE;</highlight></codeline>
<codeline lineno="4043"><highlight class="normal"></highlight></codeline>
<codeline lineno="4044"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;stats[LINPHONE_CALL_STATS_AUDIO].download_bandwidth=(as_active)<sp/>?<sp/>(</highlight><highlight class="keywordtype">float</highlight><highlight class="normal">)(media_stream_get_down_bw(as)*1e-3)<sp/>:<sp/>0.f;</highlight></codeline>
<codeline lineno="4045"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;stats[LINPHONE_CALL_STATS_AUDIO].upload_bandwidth=(as_active)<sp/>?<sp/>(</highlight><highlight class="keywordtype">float</highlight><highlight class="normal">)(media_stream_get_up_bw(as)*1e-3)<sp/>:<sp/>0.f;</highlight></codeline>
<codeline lineno="4046"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;stats[LINPHONE_CALL_STATS_VIDEO].download_bandwidth=(vs_active)<sp/>?<sp/>(</highlight><highlight class="keywordtype">float</highlight><highlight class="normal">)(media_stream_get_down_bw(vs)*1e-3)<sp/>:<sp/>0.f;</highlight></codeline>
<codeline lineno="4047"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;stats[LINPHONE_CALL_STATS_VIDEO].upload_bandwidth=(vs_active)<sp/>?<sp/>(</highlight><highlight class="keywordtype">float</highlight><highlight class="normal">)(media_stream_get_up_bw(vs)*1e-3)<sp/>:<sp/>0.f;</highlight></codeline>
<codeline lineno="4048"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;stats[LINPHONE_CALL_STATS_AUDIO].rtcp_download_bandwidth=(as_active)<sp/>?<sp/>(</highlight><highlight class="keywordtype">float</highlight><highlight class="normal">)(media_stream_get_rtcp_down_bw(as)*1e-3)<sp/>:<sp/>0.f;</highlight></codeline>
<codeline lineno="4049"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;stats[LINPHONE_CALL_STATS_AUDIO].rtcp_upload_bandwidth=(as_active)<sp/>?<sp/>(</highlight><highlight class="keywordtype">float</highlight><highlight class="normal">)(media_stream_get_rtcp_up_bw(as)*1e-3)<sp/>:<sp/>0.f;</highlight></codeline>
<codeline lineno="4050"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;stats[LINPHONE_CALL_STATS_VIDEO].rtcp_download_bandwidth=(vs_active)<sp/>?<sp/>(</highlight><highlight class="keywordtype">float</highlight><highlight class="normal">)(media_stream_get_rtcp_down_bw(vs)*1e-3)<sp/>:<sp/>0.f;</highlight></codeline>
<codeline lineno="4051"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;stats[LINPHONE_CALL_STATS_VIDEO].rtcp_upload_bandwidth=(vs_active)<sp/>?<sp/>(</highlight><highlight class="keywordtype">float</highlight><highlight class="normal">)(media_stream_get_rtcp_up_bw(vs)*1e-3)<sp/>:<sp/>0.f;</highlight></codeline>
<codeline lineno="4052"><highlight class="normal"></highlight></codeline>
<codeline lineno="4053"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;stats[LINPHONE_CALL_STATS_AUDIO].updated|=<ref refid="group__call__misc_1ga0cb8916aede3c1a00a6e9aa176bf4093" kindref="member">LINPHONE_CALL_STATS_PERIODICAL_UPDATE</ref>;</highlight></codeline>
<codeline lineno="4054"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_notify_call_stats_updated(call-&gt;core,<sp/>call,<sp/>&amp;call-&gt;stats[LINPHONE_CALL_STATS_AUDIO]);</highlight></codeline>
<codeline lineno="4055"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;stats[LINPHONE_CALL_STATS_AUDIO].updated=0;</highlight></codeline>
<codeline lineno="4056"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(as)<sp/>update_local_stats(&amp;call-&gt;stats[LINPHONE_CALL_STATS_AUDIO],<sp/>as);</highlight></codeline>
<codeline lineno="4057"><highlight class="normal"></highlight></codeline>
<codeline lineno="4058"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;stats[LINPHONE_CALL_STATS_VIDEO].updated|=<ref refid="group__call__misc_1ga0cb8916aede3c1a00a6e9aa176bf4093" kindref="member">LINPHONE_CALL_STATS_PERIODICAL_UPDATE</ref>;</highlight></codeline>
<codeline lineno="4059"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_notify_call_stats_updated(call-&gt;core,<sp/>call,<sp/>&amp;call-&gt;stats[LINPHONE_CALL_STATS_VIDEO]);</highlight></codeline>
<codeline lineno="4060"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;stats[LINPHONE_CALL_STATS_VIDEO].updated=0;</highlight></codeline>
<codeline lineno="4061"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(vs)<sp/>update_local_stats(&amp;call-&gt;stats[LINPHONE_CALL_STATS_VIDEO],<sp/>vs);</highlight></codeline>
<codeline lineno="4062"><highlight class="normal"></highlight></codeline>
<codeline lineno="4063"><highlight class="normal"></highlight></codeline>
<codeline lineno="4064"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(<sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;Bandwidth<sp/>usage<sp/>for<sp/>call<sp/>[%p]:\n&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4065"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;\tRTP<sp/><sp/>audio=[d=%5.1f,u=%5.1f],<sp/>video=[d=%5.1f,u=%5.1f]<sp/>kbits/sec\n&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4066"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;\tRTCP<sp/>audio=[d=%5.1f,u=%5.1f],<sp/>video=[d=%5.1f,u=%5.1f]<sp/>kbits/sec&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="4067"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call,</highlight></codeline>
<codeline lineno="4068"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;stats[LINPHONE_CALL_STATS_AUDIO].download_bandwidth,</highlight></codeline>
<codeline lineno="4069"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;stats[LINPHONE_CALL_STATS_AUDIO].upload_bandwidth,</highlight></codeline>
<codeline lineno="4070"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;stats[LINPHONE_CALL_STATS_VIDEO].download_bandwidth,</highlight></codeline>
<codeline lineno="4071"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;stats[LINPHONE_CALL_STATS_VIDEO].upload_bandwidth,</highlight></codeline>
<codeline lineno="4072"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;stats[LINPHONE_CALL_STATS_AUDIO].rtcp_download_bandwidth,</highlight></codeline>
<codeline lineno="4073"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;stats[LINPHONE_CALL_STATS_AUDIO].rtcp_upload_bandwidth,</highlight></codeline>
<codeline lineno="4074"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;stats[LINPHONE_CALL_STATS_VIDEO].rtcp_download_bandwidth,</highlight></codeline>
<codeline lineno="4075"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;stats[LINPHONE_CALL_STATS_VIDEO].rtcp_upload_bandwidth</highlight></codeline>
<codeline lineno="4076"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>);</highlight></codeline>
<codeline lineno="4077"><highlight class="normal"></highlight></codeline>
<codeline lineno="4078"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4079"><highlight class="normal"></highlight></codeline>
<codeline lineno="4080"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_lost(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/><ref refid="group__misc_1gabe82a1a1ffc3d6b4e0b51a03028513b7" kindref="member">LinphoneReason</ref><sp/>reason){</highlight></codeline>
<codeline lineno="4081"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc<sp/>=<sp/>call-&gt;core;</highlight></codeline>
<codeline lineno="4082"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*temp<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="4083"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*from=NULL;</highlight></codeline>
<codeline lineno="4084"><highlight class="normal"></highlight></codeline>
<codeline lineno="4085"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>from<sp/>=<sp/><ref refid="group__call__control_1ga89252821dcaee90338937c7adb28db09" kindref="member">linphone_call_get_remote_address_as_string</ref>(call);</highlight></codeline>
<codeline lineno="4086"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal">(reason){</highlight></codeline>
<codeline lineno="4087"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__misc_1ggaf7346e9b3a064155f3d5d3811d684fb2a6018a6fcf4fbf14fc8528e41df772b01" kindref="member">LinphoneReasonIOError</ref>:</highlight></codeline>
<codeline lineno="4088"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>temp<sp/>=<sp/>ms_strdup_printf(</highlight><highlight class="stringliteral">&quot;Call<sp/>with<sp/>%s<sp/>disconnected<sp/>because<sp/>of<sp/>network,<sp/>it<sp/>is<sp/>going<sp/>to<sp/>be<sp/>closed.&quot;</highlight><highlight class="normal">,<sp/>from<sp/>?<sp/>from<sp/>:<sp/></highlight><highlight class="stringliteral">&quot;?&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="4089"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4090"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="4091"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>temp<sp/>=<sp/>ms_strdup_printf(</highlight><highlight class="stringliteral">&quot;Media<sp/>connectivity<sp/>with<sp/>%s<sp/>is<sp/>lost,<sp/>call<sp/>is<sp/>going<sp/>to<sp/>be<sp/>closed.&quot;</highlight><highlight class="normal">,<sp/>from<sp/>?<sp/>from<sp/>:<sp/></highlight><highlight class="stringliteral">&quot;?&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="4092"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4093"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4094"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(from)<sp/>ms_free(from);</highlight></codeline>
<codeline lineno="4095"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;LinphoneCall<sp/>[%p]:<sp/>%s&quot;</highlight><highlight class="normal">,call,<sp/>temp);</highlight></codeline>
<codeline lineno="4096"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_notify_display_warning(lc,<sp/>temp);</highlight></codeline>
<codeline lineno="4097"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1ga2dcc69dfc22e15d3cdadf8e688eedbfe" kindref="member">linphone_core_terminate_call</ref>(lc,call);</highlight></codeline>
<codeline lineno="4098"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_play_named_tone(lc,LinphoneToneCallLost);</highlight></codeline>
<codeline lineno="4099"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(temp);</highlight></codeline>
<codeline lineno="4100"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4101"><highlight class="normal"></highlight></codeline>
<codeline lineno="4102"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>change_ice_media_destinations(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="4103"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*rtp_addr;</highlight></codeline>
<codeline lineno="4104"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*rtcp_addr;</highlight></codeline>
<codeline lineno="4105"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rtp_port;</highlight></codeline>
<codeline lineno="4106"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rtcp_port;</highlight></codeline>
<codeline lineno="4107"><highlight class="normal"><sp/><sp/><sp/><sp/>bool_t<sp/>result;</highlight></codeline>
<codeline lineno="4108"><highlight class="normal"></highlight></codeline>
<codeline lineno="4109"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;audiostream<sp/>&amp;&amp;<sp/>ice_session_check_list(call-&gt;ice_session,<sp/>call-&gt;main_audio_stream_index))<sp/>{</highlight></codeline>
<codeline lineno="4110"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>result<sp/>=<sp/>ice_check_list_selected_valid_remote_candidate(ice_session_check_list(call-&gt;ice_session,<sp/>call-&gt;main_audio_stream_index),<sp/>&amp;rtp_addr,<sp/>&amp;rtp_port,<sp/>&amp;rtcp_addr,<sp/>&amp;rtcp_port);</highlight></codeline>
<codeline lineno="4111"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(result<sp/>==<sp/>TRUE)<sp/>{</highlight></codeline>
<codeline lineno="4112"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Change<sp/>audio<sp/>stream<sp/>destination:<sp/>RTP=%s:%d<sp/>RTCP=%s:%d&quot;</highlight><highlight class="normal">,<sp/>rtp_addr,<sp/>rtp_port,<sp/>rtcp_addr,<sp/>rtcp_port);</highlight></codeline>
<codeline lineno="4113"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_set_symmetric_rtp(call-&gt;audiostream-&gt;ms.sessions.rtp_session,<sp/>FALSE);</highlight></codeline>
<codeline lineno="4114"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_set_remote_addr_full(call-&gt;audiostream-&gt;ms.sessions.rtp_session,<sp/>rtp_addr,<sp/>rtp_port,<sp/>rtcp_addr,<sp/>rtcp_port);</highlight></codeline>
<codeline lineno="4115"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4116"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4117"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>VIDEO_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4118"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;videostream<sp/>&amp;&amp;<sp/>ice_session_check_list(call-&gt;ice_session,<sp/>call-&gt;main_video_stream_index))<sp/>{</highlight></codeline>
<codeline lineno="4119"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>result<sp/>=<sp/>ice_check_list_selected_valid_remote_candidate(ice_session_check_list(call-&gt;ice_session,<sp/>call-&gt;main_video_stream_index),<sp/>&amp;rtp_addr,<sp/>&amp;rtp_port,<sp/>&amp;rtcp_addr,<sp/>&amp;rtcp_port);</highlight></codeline>
<codeline lineno="4120"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(result<sp/>==<sp/>TRUE)<sp/>{</highlight></codeline>
<codeline lineno="4121"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Change<sp/>video<sp/>stream<sp/>destination:<sp/>RTP=%s:%d<sp/>RTCP=%s:%d&quot;</highlight><highlight class="normal">,<sp/>rtp_addr,<sp/>rtp_port,<sp/>rtcp_addr,<sp/>rtcp_port);</highlight></codeline>
<codeline lineno="4122"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_set_symmetric_rtp(call-&gt;videostream-&gt;ms.sessions.rtp_session,<sp/>FALSE);</highlight></codeline>
<codeline lineno="4123"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_set_remote_addr_full(call-&gt;videostream-&gt;ms.sessions.rtp_session,<sp/>rtp_addr,<sp/>rtp_port,<sp/>rtcp_addr,<sp/>rtcp_port);</highlight></codeline>
<codeline lineno="4124"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4125"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4126"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4127"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;textstream<sp/>&amp;&amp;<sp/>ice_session_check_list(call-&gt;ice_session,<sp/>call-&gt;main_text_stream_index))<sp/>{</highlight></codeline>
<codeline lineno="4128"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>result<sp/>=<sp/>ice_check_list_selected_valid_remote_candidate(ice_session_check_list(call-&gt;ice_session,<sp/>call-&gt;main_text_stream_index),<sp/>&amp;rtp_addr,<sp/>&amp;rtp_port,<sp/>&amp;rtcp_addr,<sp/>&amp;rtcp_port);</highlight></codeline>
<codeline lineno="4129"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(result<sp/>==<sp/>TRUE)<sp/>{</highlight></codeline>
<codeline lineno="4130"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Change<sp/>text<sp/>stream<sp/>destination:<sp/>RTP=%s:%d<sp/>RTCP=%s:%d&quot;</highlight><highlight class="normal">,<sp/>rtp_addr,<sp/>rtp_port,<sp/>rtcp_addr,<sp/>rtcp_port);</highlight></codeline>
<codeline lineno="4131"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_set_symmetric_rtp(call-&gt;textstream-&gt;ms.sessions.rtp_session,<sp/>FALSE);</highlight></codeline>
<codeline lineno="4132"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_set_remote_addr_full(call-&gt;textstream-&gt;ms.sessions.rtp_session,<sp/>rtp_addr,<sp/>rtp_port,<sp/>rtcp_addr,<sp/>rtcp_port);</highlight></codeline>
<codeline lineno="4133"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4134"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4135"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4136"><highlight class="normal"></highlight></codeline>
<codeline lineno="4137"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>handle_ice_events(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/>OrtpEvent<sp/>*ev){</highlight></codeline>
<codeline lineno="4138"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>OrtpEventType<sp/>evt=ortp_event_get_type(ev);</highlight></codeline>
<codeline lineno="4139"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>OrtpEventData<sp/>*evd=ortp_event_get_data(ev);</highlight></codeline>
<codeline lineno="4140"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ping_time;</highlight></codeline>
<codeline lineno="4141"><highlight class="normal"></highlight></codeline>
<codeline lineno="4142"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(evt<sp/>==<sp/>ORTP_EVENT_ICE_SESSION_PROCESSING_FINISHED)<sp/>{</highlight></codeline>
<codeline lineno="4143"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1gaa91f7e76e8f038ae9acdf42d1bc80a22" kindref="member">LinphoneCallParams</ref><sp/>*params<sp/>=<sp/><ref refid="group__call__control_1gaaff626b40ba1834c7912aef9fc441544" kindref="member">linphone_call_params_copy</ref>(call-&gt;current_params);</highlight></codeline>
<codeline lineno="4144"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(call-&gt;params-&gt;media_encryption)<sp/>{</highlight></codeline>
<codeline lineno="4145"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__media__parameters_1ggac01228dce297dfe24304be6a1d2cfa0ba45e6b6334e661aa1680c48901789495b" kindref="member">LinphoneMediaEncryptionZRTP</ref>:</highlight></codeline>
<codeline lineno="4146"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__media__parameters_1ggac01228dce297dfe24304be6a1d2cfa0ba62124fc2fc42d6f7f821fd5f6550c776" kindref="member">LinphoneMediaEncryptionDTLS</ref>:</highlight></codeline>
<codeline lineno="4147"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>preserve<sp/>media<sp/>encryption<sp/>param<sp/>because<sp/>at<sp/>that<sp/>time<sp/>ZRTP/SRTP-DTLS<sp/>negociation<sp/>may<sp/>still<sp/>be<sp/>ongoing*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4148"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>params-&gt;media_encryption=call-&gt;params-&gt;media_encryption;</highlight></codeline>
<codeline lineno="4149"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4150"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__media__parameters_1ggac01228dce297dfe24304be6a1d2cfa0baa4bbefa58306fc1c23e2525a44a5ab88" kindref="member">LinphoneMediaEncryptionSRTP</ref>:</highlight></codeline>
<codeline lineno="4151"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__media__parameters_1ggac01228dce297dfe24304be6a1d2cfa0baa30caf910eb4b60f6f5e02156f5bf451" kindref="member">LinphoneMediaEncryptionNone</ref>:</highlight></codeline>
<codeline lineno="4152"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*keep<sp/>all<sp/>values<sp/>to<sp/>make<sp/>sure<sp/>a<sp/>warning<sp/>will<sp/>be<sp/>generated<sp/>by<sp/>compiler<sp/>if<sp/>new<sp/>enum<sp/>value<sp/>is<sp/>added*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4153"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4154"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4155"><highlight class="normal"></highlight></codeline>
<codeline lineno="4156"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(ice_session_state(call-&gt;ice_session))<sp/>{</highlight></codeline>
<codeline lineno="4157"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>IS_Completed:</highlight></codeline>
<codeline lineno="4158"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ice_session_select_candidates(call-&gt;ice_session);</highlight></codeline>
<codeline lineno="4159"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ice_session_role(call-&gt;ice_session)<sp/>==<sp/>IR_Controlling</highlight></codeline>
<codeline lineno="4160"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>&amp;&amp;<sp/><ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(call-&gt;core-&gt;config,<sp/></highlight><highlight class="stringliteral">&quot;sip&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;update_call_when_ice_completed&quot;</highlight><highlight class="normal">,<sp/>TRUE))<sp/>{</highlight></codeline>
<codeline lineno="4161"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>params-&gt;internal_call_update<sp/>=<sp/>TRUE;</highlight></codeline>
<codeline lineno="4162"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1ga1a7819d96573bb8dbcbf2a128145457e" kindref="member">linphone_core_update_call</ref>(call-&gt;core,<sp/>call,<sp/>params);</highlight></codeline>
<codeline lineno="4163"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4164"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>change_ice_media_destinations(call);</highlight></codeline>
<codeline lineno="4165"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>start_dtls_on_all_streams(call);</highlight></codeline>
<codeline lineno="4166"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4167"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>IS_Failed:</highlight></codeline>
<codeline lineno="4168"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ice_session_has_completed_check_list(call-&gt;ice_session)<sp/>==<sp/>TRUE)<sp/>{</highlight></codeline>
<codeline lineno="4169"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ice_session_select_candidates(call-&gt;ice_session);</highlight></codeline>
<codeline lineno="4170"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ice_session_role(call-&gt;ice_session)<sp/>==<sp/>IR_Controlling)<sp/>{</highlight></codeline>
<codeline lineno="4171"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>At<sp/>least<sp/>one<sp/>ICE<sp/>session<sp/>has<sp/>succeeded,<sp/>so<sp/>perform<sp/>a<sp/>call<sp/>update.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4172"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>params-&gt;internal_call_update<sp/>=<sp/>TRUE;</highlight></codeline>
<codeline lineno="4173"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1ga1a7819d96573bb8dbcbf2a128145457e" kindref="member">linphone_core_update_call</ref>(call-&gt;core,<sp/>call,<sp/>params);</highlight></codeline>
<codeline lineno="4174"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4175"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4176"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4177"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="4178"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4179"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4180"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_update_ice_state_in_call_stats(call);</highlight></codeline>
<codeline lineno="4181"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1ga341015ca73484947fca50896432106d2" kindref="member">linphone_call_params_unref</ref>(params);</highlight></codeline>
<codeline lineno="4182"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(evt<sp/>==<sp/>ORTP_EVENT_ICE_GATHERING_FINISHED)<sp/>{</highlight></codeline>
<codeline lineno="4183"><highlight class="normal"></highlight></codeline>
<codeline lineno="4184"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(evd-&gt;info.ice_processing_successful==TRUE)<sp/>{</highlight></codeline>
<codeline lineno="4185"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ice_session_compute_candidates_foundations(call-&gt;ice_session);</highlight></codeline>
<codeline lineno="4186"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ice_session_eliminate_redundant_candidates(call-&gt;ice_session);</highlight></codeline>
<codeline lineno="4187"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ice_session_choose_default_candidates(call-&gt;ice_session);</highlight></codeline>
<codeline lineno="4188"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ping_time<sp/>=<sp/>ice_session_average_gathering_round_trip_time(call-&gt;ice_session);</highlight></codeline>
<codeline lineno="4189"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ping_time<sp/>&gt;=0)<sp/>{</highlight></codeline>
<codeline lineno="4190"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;ping_time=ping_time;</highlight></codeline>
<codeline lineno="4191"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4192"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="4193"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;No<sp/>STUN<sp/>answer<sp/>from<sp/>[%s],<sp/>disabling<sp/>ICE&quot;</highlight><highlight class="normal">,<ref refid="group__network__parameters_1ga2def221f110da2a63bb0bdf957664829" kindref="member">linphone_core_get_stun_server</ref>(call-&gt;core));</highlight></codeline>
<codeline lineno="4194"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_delete_ice_session(call);</highlight></codeline>
<codeline lineno="4195"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4196"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(call-&gt;state)<sp/>{</highlight></codeline>
<codeline lineno="4197"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa29a21291bee6ab53a5595c1d3aaf8bde" kindref="member">LinphoneCallUpdating</ref>:</highlight></codeline>
<codeline lineno="4198"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_start_update_call(call-&gt;core,<sp/>call);</highlight></codeline>
<codeline lineno="4199"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4200"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaad51ee049c7dee729776ef5bc76ddb2c2" kindref="member">LinphoneCallUpdatedByRemote</ref>:</highlight></codeline>
<codeline lineno="4201"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_start_accept_call_update(call-&gt;core,<sp/>call,call-&gt;prevstate,linphone_call_state_to_string(call-&gt;prevstate));</highlight></codeline>
<codeline lineno="4202"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4203"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaae99727dfb0a8e30ef04ff96ce3bf7e36" kindref="member">LinphoneCallOutgoingInit</ref>:</highlight></codeline>
<codeline lineno="4204"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_stop_media_streams_for_ice_gathering(call);</highlight></codeline>
<codeline lineno="4205"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_proceed_with_invite_if_ready(call-&gt;core,<sp/>call,<sp/>NULL);</highlight></codeline>
<codeline lineno="4206"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4207"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa0148699614584db8dbbd7f2af177af39" kindref="member">LinphoneCallIdle</ref>:</highlight></codeline>
<codeline lineno="4208"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_stop_media_streams_for_ice_gathering(call);</highlight></codeline>
<codeline lineno="4209"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_update_local_media_description_from_ice_or_upnp(call);</highlight></codeline>
<codeline lineno="4210"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sal_call_set_local_media_description(call-&gt;op,call-&gt;localdesc);</highlight></codeline>
<codeline lineno="4211"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_notify_incoming_call(call-&gt;core,<sp/>call);</highlight></codeline>
<codeline lineno="4212"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4213"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="4214"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4215"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4216"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(evt<sp/>==<sp/>ORTP_EVENT_ICE_LOSING_PAIRS_COMPLETED)<sp/>{</highlight></codeline>
<codeline lineno="4217"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;state==<ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaad51ee049c7dee729776ef5bc76ddb2c2" kindref="member">LinphoneCallUpdatedByRemote</ref>){</highlight></codeline>
<codeline lineno="4218"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_start_accept_call_update(call-&gt;core,<sp/>call,call-&gt;prevstate,linphone_call_state_to_string(call-&gt;prevstate));</highlight></codeline>
<codeline lineno="4219"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_update_ice_state_in_call_stats(call);</highlight></codeline>
<codeline lineno="4220"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4221"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(evt<sp/>==<sp/>ORTP_EVENT_ICE_RESTART_NEEDED)<sp/>{</highlight></codeline>
<codeline lineno="4222"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ice_session_restart(call-&gt;ice_session);</highlight></codeline>
<codeline lineno="4223"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ice_session_set_role(call-&gt;ice_session,<sp/>IR_Controlling);</highlight></codeline>
<codeline lineno="4224"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1ga1a7819d96573bb8dbcbf2a128145457e" kindref="member">linphone_core_update_call</ref>(call-&gt;core,<sp/>call,<sp/>call-&gt;current_params);</highlight></codeline>
<codeline lineno="4225"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4226"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4227"><highlight class="normal"></highlight></codeline>
<codeline lineno="4228"><highlight class="normal"></highlight></codeline>
<codeline lineno="4229"><highlight class="normal"></highlight><highlight class="comment">/*do<sp/>not<sp/>change<sp/>the<sp/>prototype<sp/>of<sp/>this<sp/>function,<sp/>it<sp/>is<sp/>also<sp/>used<sp/>internally<sp/>in<sp/>linphone-daemon.*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4230"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_stats_fill(<ref refid="struct__LinphoneCallStats" kindref="compound">LinphoneCallStats</ref><sp/>*stats,<sp/>MediaStream<sp/>*ms,<sp/>OrtpEvent<sp/>*ev){</highlight></codeline>
<codeline lineno="4231"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>OrtpEventType<sp/>evt=ortp_event_get_type(ev);</highlight></codeline>
<codeline lineno="4232"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>OrtpEventData<sp/>*evd=ortp_event_get_data(ev);</highlight></codeline>
<codeline lineno="4233"><highlight class="normal"></highlight></codeline>
<codeline lineno="4234"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(evt<sp/>==<sp/>ORTP_EVENT_RTCP_PACKET_RECEIVED)<sp/>{</highlight></codeline>
<codeline lineno="4235"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stats-&gt;<ref refid="struct__LinphoneCallStats_1ae902e24f2fb3ae64a54f3ea25bb12910" kindref="member">round_trip_delay</ref><sp/>=<sp/>rtp_session_get_round_trip_propagation(ms-&gt;sessions.rtp_session);</highlight></codeline>
<codeline lineno="4236"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(stats-&gt;<ref refid="struct__LinphoneCallStats_1ae348f8e725ff57e8b43e1e48a7b9ad15" kindref="member">received_rtcp</ref><sp/>!=<sp/>NULL)</highlight></codeline>
<codeline lineno="4237"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>freemsg(stats-&gt;<ref refid="struct__LinphoneCallStats_1ae348f8e725ff57e8b43e1e48a7b9ad15" kindref="member">received_rtcp</ref>);</highlight></codeline>
<codeline lineno="4238"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stats-&gt;<ref refid="struct__LinphoneCallStats_1ae348f8e725ff57e8b43e1e48a7b9ad15" kindref="member">received_rtcp</ref><sp/>=<sp/>evd-&gt;packet;</highlight></codeline>
<codeline lineno="4239"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>evd-&gt;packet<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="4240"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stats-&gt;<ref refid="struct__LinphoneCallStats_1a8c4a17c47da3942990a657a72855acfd" kindref="member">updated</ref><sp/>=<sp/><ref refid="group__call__misc_1ga7bb50ca7cd1f49ebea13eec5136ef00e" kindref="member">LINPHONE_CALL_STATS_RECEIVED_RTCP_UPDATE</ref>;</highlight></codeline>
<codeline lineno="4241"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>update_local_stats(stats,ms);</highlight></codeline>
<codeline lineno="4242"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(evt<sp/>==<sp/>ORTP_EVENT_RTCP_PACKET_EMITTED)<sp/>{</highlight></codeline>
<codeline lineno="4243"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>memcpy(&amp;stats-&gt;<ref refid="struct__LinphoneCallStats_1a8a8b954105336bfda51e6a1eed7008fb" kindref="member">jitter_stats</ref>,<sp/>rtp_session_get_jitter_stats(ms-&gt;sessions.rtp_session),<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(jitter_stats_t));</highlight></codeline>
<codeline lineno="4244"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stats-&gt;<ref refid="struct__LinphoneCallStats_1a6c4670ac143ef768db848ea7828b0f59" kindref="member">sent_rtcp</ref><sp/>!=<sp/>NULL)</highlight></codeline>
<codeline lineno="4245"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>freemsg(stats-&gt;<ref refid="struct__LinphoneCallStats_1a6c4670ac143ef768db848ea7828b0f59" kindref="member">sent_rtcp</ref>);</highlight></codeline>
<codeline lineno="4246"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stats-&gt;<ref refid="struct__LinphoneCallStats_1a6c4670ac143ef768db848ea7828b0f59" kindref="member">sent_rtcp</ref><sp/>=<sp/>evd-&gt;packet;</highlight></codeline>
<codeline lineno="4247"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>evd-&gt;packet<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="4248"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stats-&gt;<ref refid="struct__LinphoneCallStats_1a8c4a17c47da3942990a657a72855acfd" kindref="member">updated</ref><sp/>=<sp/><ref refid="group__call__misc_1ga4418b7518b1479e9329b6de4129ed8c9" kindref="member">LINPHONE_CALL_STATS_SENT_RTCP_UPDATE</ref>;</highlight></codeline>
<codeline lineno="4249"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>update_local_stats(stats,ms);</highlight></codeline>
<codeline lineno="4250"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4251"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4252"><highlight class="normal"></highlight></codeline>
<codeline lineno="4253"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_stats_uninit(<ref refid="struct__LinphoneCallStats" kindref="compound">LinphoneCallStats</ref><sp/>*stats){</highlight></codeline>
<codeline lineno="4254"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stats-&gt;<ref refid="struct__LinphoneCallStats_1ae348f8e725ff57e8b43e1e48a7b9ad15" kindref="member">received_rtcp</ref>)<sp/>{</highlight></codeline>
<codeline lineno="4255"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>freemsg(stats-&gt;<ref refid="struct__LinphoneCallStats_1ae348f8e725ff57e8b43e1e48a7b9ad15" kindref="member">received_rtcp</ref>);</highlight></codeline>
<codeline lineno="4256"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stats-&gt;<ref refid="struct__LinphoneCallStats_1ae348f8e725ff57e8b43e1e48a7b9ad15" kindref="member">received_rtcp</ref>=NULL;</highlight></codeline>
<codeline lineno="4257"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4258"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stats-&gt;<ref refid="struct__LinphoneCallStats_1a6c4670ac143ef768db848ea7828b0f59" kindref="member">sent_rtcp</ref>){</highlight></codeline>
<codeline lineno="4259"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>freemsg(stats-&gt;<ref refid="struct__LinphoneCallStats_1a6c4670ac143ef768db848ea7828b0f59" kindref="member">sent_rtcp</ref>);</highlight></codeline>
<codeline lineno="4260"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stats-&gt;<ref refid="struct__LinphoneCallStats_1a6c4670ac143ef768db848ea7828b0f59" kindref="member">sent_rtcp</ref>=NULL;</highlight></codeline>
<codeline lineno="4261"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4262"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4263"><highlight class="normal"></highlight></codeline>
<codeline lineno="4264"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_notify_stats_updated(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>stream_index){</highlight></codeline>
<codeline lineno="4265"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="struct__LinphoneCallStats" kindref="compound">LinphoneCallStats</ref><sp/>*stats<sp/>=<sp/>&amp;call-&gt;stats[stream_index];</highlight></codeline>
<codeline lineno="4266"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc<sp/>=<sp/>call-&gt;core;</highlight></codeline>
<codeline lineno="4267"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stats-&gt;<ref refid="struct__LinphoneCallStats_1a8c4a17c47da3942990a657a72855acfd" kindref="member">updated</ref>){</highlight></codeline>
<codeline lineno="4268"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal">(stats-&gt;<ref refid="struct__LinphoneCallStats_1a8c4a17c47da3942990a657a72855acfd" kindref="member">updated</ref>)<sp/>{</highlight></codeline>
<codeline lineno="4269"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__misc_1ga7bb50ca7cd1f49ebea13eec5136ef00e" kindref="member">LINPHONE_CALL_STATS_RECEIVED_RTCP_UPDATE</ref>:</highlight></codeline>
<codeline lineno="4270"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__misc_1ga4418b7518b1479e9329b6de4129ed8c9" kindref="member">LINPHONE_CALL_STATS_SENT_RTCP_UPDATE</ref>:</highlight></codeline>
<codeline lineno="4271"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_reporting_on_rtcp_update(call,<sp/>stream_index<sp/>==<sp/>call-&gt;main_audio_stream_index<sp/>?<sp/>SalAudio<sp/>:<sp/>stream_index<sp/>==<sp/>call-&gt;main_video_stream_index<sp/>?<sp/>SalVideo<sp/>:<sp/>SalText);</highlight></codeline>
<codeline lineno="4272"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4273"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="4274"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4275"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4276"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_notify_call_stats_updated(lc,<sp/>call,<sp/>stats);</highlight></codeline>
<codeline lineno="4277"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stats-&gt;<ref refid="struct__LinphoneCallStats_1a8c4a17c47da3942990a657a72855acfd" kindref="member">updated</ref><sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="4278"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4279"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4280"><highlight class="normal"></highlight></codeline>
<codeline lineno="4281"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_handle_stream_events(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>stream_index){</highlight></codeline>
<codeline lineno="4282"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MediaStream<sp/>*ms<sp/>=<sp/>stream_index<sp/>==<sp/>call-&gt;main_audio_stream_index<sp/>?<sp/>(MediaStream<sp/>*)call-&gt;audiostream<sp/>:<sp/>(stream_index<sp/>==<sp/>call-&gt;main_video_stream_index<sp/>?<sp/>(MediaStream<sp/>*)call-&gt;videostream<sp/>:<sp/>(MediaStream<sp/>*)call-&gt;textstream);</highlight></codeline>
<codeline lineno="4283"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>OrtpEvQueue<sp/>*evq;</highlight></codeline>
<codeline lineno="4284"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>OrtpEvent<sp/>*ev;</highlight></codeline>
<codeline lineno="4285"><highlight class="normal"></highlight></codeline>
<codeline lineno="4286"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ms){</highlight></codeline>
<codeline lineno="4287"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Ensure<sp/>there<sp/>is<sp/>no<sp/>dangling<sp/>ICE<sp/>check<sp/>list.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4288"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;ice_session<sp/>==<sp/>NULL)<sp/>ms-&gt;ice_check_list<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="4289"><highlight class="normal"></highlight></codeline>
<codeline lineno="4290"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal">(ms-&gt;type){</highlight></codeline>
<codeline lineno="4291"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>MSAudio:</highlight></codeline>
<codeline lineno="4292"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_iterate((AudioStream*)ms);</highlight></codeline>
<codeline lineno="4293"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4294"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>MSVideo:</highlight></codeline>
<codeline lineno="4295"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>#ifdef<sp/>VIDEO_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4296"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_iterate((VideoStream*)ms);</highlight></codeline>
<codeline lineno="4297"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4298"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4299"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>MSText:</highlight></codeline>
<codeline lineno="4300"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>text_stream_iterate((TextStream*)ms);</highlight></codeline>
<codeline lineno="4301"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4302"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="4303"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_error(</highlight><highlight class="stringliteral">&quot;linphone_call_handle_stream_events():<sp/>unsupported<sp/>stream<sp/>type.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="4304"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4305"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4306"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4307"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4308"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*yes<sp/>the<sp/>event<sp/>queue<sp/>has<sp/>to<sp/>be<sp/>taken<sp/>at<sp/>each<sp/>iteration,<sp/>because<sp/>ice<sp/>events<sp/>may<sp/>perform<sp/>operations<sp/>re-creating<sp/>the<sp/>streams*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4309"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>((evq<sp/>=<sp/>stream_index<sp/>==<sp/>call-&gt;main_audio_stream_index<sp/>?<sp/>call-&gt;audiostream_app_evq<sp/>:<sp/>(stream_index<sp/>==<sp/>call-&gt;main_video_stream_index<sp/>?<sp/>call-&gt;videostream_app_evq<sp/>:<sp/>call-&gt;textstream_app_evq))<sp/><sp/>&amp;&amp;<sp/>(NULL<sp/>!=<sp/>(ev=ortp_ev_queue_get(evq)))){</highlight></codeline>
<codeline lineno="4310"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>OrtpEventType<sp/>evt=ortp_event_get_type(ev);</highlight></codeline>
<codeline lineno="4311"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>OrtpEventData<sp/>*evd=ortp_event_get_data(ev);</highlight></codeline>
<codeline lineno="4312"><highlight class="normal"></highlight></codeline>
<codeline lineno="4313"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>stats_index<sp/>=<sp/>stream_index<sp/>==<sp/>call-&gt;main_audio_stream_index<sp/>?<sp/>LINPHONE_CALL_STATS_AUDIO<sp/>:<sp/>(stream_index<sp/>==<sp/>call-&gt;main_video_stream_index<sp/>?<sp/>LINPHONE_CALL_STATS_VIDEO<sp/>:<sp/>LINPHONE_CALL_STATS_TEXT);</highlight></codeline>
<codeline lineno="4314"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ms)<sp/>linphone_call_stats_fill(&amp;call-&gt;stats[stats_index],ms,ev);</highlight></codeline>
<codeline lineno="4315"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_notify_stats_updated(call,stats_index);</highlight></codeline>
<codeline lineno="4316"><highlight class="normal"></highlight></codeline>
<codeline lineno="4317"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(evt<sp/>==<sp/>ORTP_EVENT_ZRTP_ENCRYPTION_CHANGED){</highlight></codeline>
<codeline lineno="4318"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stream_index<sp/>==<sp/>call-&gt;main_audio_stream_index)</highlight></codeline>
<codeline lineno="4319"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_audiostream_encryption_changed(call,<sp/>evd-&gt;info.zrtp_stream_encrypted);</highlight></codeline>
<codeline lineno="4320"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stream_index<sp/>==<sp/>call-&gt;main_video_stream_index)</highlight></codeline>
<codeline lineno="4321"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>propagate_encryption_changed(call);</highlight></codeline>
<codeline lineno="4322"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(evt<sp/>==<sp/>ORTP_EVENT_ZRTP_SAS_READY)<sp/>{</highlight></codeline>
<codeline lineno="4323"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stream_index<sp/>==<sp/>call-&gt;main_audio_stream_index)</highlight></codeline>
<codeline lineno="4324"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_audiostream_auth_token_ready(call,<sp/>evd-&gt;info.zrtp_sas.sas,<sp/>evd-&gt;info.zrtp_sas.verified);</highlight></codeline>
<codeline lineno="4325"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(evt<sp/>==<sp/>ORTP_EVENT_DTLS_ENCRYPTION_CHANGED)<sp/>{</highlight></codeline>
<codeline lineno="4326"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stream_index<sp/>==<sp/>call-&gt;main_audio_stream_index)</highlight></codeline>
<codeline lineno="4327"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_audiostream_encryption_changed(call,<sp/>evd-&gt;info.dtls_stream_encrypted);</highlight></codeline>
<codeline lineno="4328"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stream_index<sp/>==<sp/>call-&gt;main_video_stream_index)</highlight></codeline>
<codeline lineno="4329"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>propagate_encryption_changed(call);</highlight></codeline>
<codeline lineno="4330"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((evt<sp/>==<sp/>ORTP_EVENT_ICE_SESSION_PROCESSING_FINISHED)<sp/>||<sp/>(evt<sp/>==<sp/>ORTP_EVENT_ICE_GATHERING_FINISHED)</highlight></codeline>
<codeline lineno="4331"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>||<sp/>(evt<sp/>==<sp/>ORTP_EVENT_ICE_LOSING_PAIRS_COMPLETED)<sp/>||<sp/>(evt<sp/>==<sp/>ORTP_EVENT_ICE_RESTART_NEEDED))<sp/>{</highlight></codeline>
<codeline lineno="4332"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ms)<sp/>handle_ice_events(call,<sp/>ev);</highlight></codeline>
<codeline lineno="4333"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(evt==ORTP_EVENT_TELEPHONE_EVENT){</highlight></codeline>
<codeline lineno="4334"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_dtmf_received(call,evd-&gt;info.telephone_event);</highlight></codeline>
<codeline lineno="4335"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(evt<sp/>==<sp/>ORTP_EVENT_RTT_CHARACTER_RECEIVED)<sp/>{</highlight></codeline>
<codeline lineno="4336"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__chatroom_1ga37902f3fc715b7f6451c241d0efd0299" kindref="member">LinphoneChatRoom</ref><sp/>*<sp/>chat_room<sp/>=<sp/>linphone_call_get_chat_room(call);</highlight></codeline>
<codeline lineno="4337"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_real_time_text_received(call-&gt;core,<sp/>chat_room,<sp/>evd-&gt;info.received_rtt_character,<sp/>call);</highlight></codeline>
<codeline lineno="4338"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4339"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ortp_event_destroy(ev);</highlight></codeline>
<codeline lineno="4340"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4341"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4342"><highlight class="normal"></highlight></codeline>
<codeline lineno="4343"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_background_tasks(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/>bool_t<sp/>one_second_elapsed){</highlight></codeline>
<codeline lineno="4344"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>disconnect_timeout<sp/>=<sp/><ref refid="group__media__parameters_1ga2c7381905af4236ff0e128e7c9a56d32" kindref="member">linphone_core_get_nortp_timeout</ref>(call-&gt;core);</highlight></codeline>
<codeline lineno="4345"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>disconnected=FALSE;</highlight></codeline>
<codeline lineno="4346"><highlight class="normal"></highlight></codeline>
<codeline lineno="4347"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(call-&gt;state)<sp/>{</highlight></codeline>
<codeline lineno="4348"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaacebe90cc045331e513d069872f9c84d3" kindref="member">LinphoneCallStreamsRunning</ref>:</highlight></codeline>
<codeline lineno="4349"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa7a8cd38252c1a9d8c0ecbdec1aef899d" kindref="member">LinphoneCallOutgoingEarlyMedia</ref>:</highlight></codeline>
<codeline lineno="4350"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaab8684757f565989d4212026f755762ed" kindref="member">LinphoneCallIncomingEarlyMedia</ref>:</highlight></codeline>
<codeline lineno="4351"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaaacf737ce5572c4e0e9f28993dcbadf00" kindref="member">LinphoneCallPausedByRemote</ref>:</highlight></codeline>
<codeline lineno="4352"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa59c57a8b9a7a0086a79c85028bb4cefc" kindref="member">LinphoneCallPaused</ref>:</highlight></codeline>
<codeline lineno="4353"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(one_second_elapsed){</highlight></codeline>
<codeline lineno="4354"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>audio_load=0,<sp/>video_load=0;</highlight></codeline>
<codeline lineno="4355"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;audiostream!=NULL){</highlight></codeline>
<codeline lineno="4356"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;audiostream-&gt;ms.sessions.ticker)</highlight></codeline>
<codeline lineno="4357"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_load=ms_ticker_get_average_load(call-&gt;audiostream-&gt;ms.sessions.ticker);</highlight></codeline>
<codeline lineno="4358"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4359"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;videostream!=NULL){</highlight></codeline>
<codeline lineno="4360"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;videostream-&gt;ms.sessions.ticker)</highlight></codeline>
<codeline lineno="4361"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_load=ms_ticker_get_average_load(call-&gt;videostream-&gt;ms.sessions.ticker);</highlight></codeline>
<codeline lineno="4362"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4363"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>report_bandwidth(call,(MediaStream*)call-&gt;audiostream,(MediaStream*)call-&gt;videostream);</highlight></codeline>
<codeline lineno="4364"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Thread<sp/>processing<sp/>load:<sp/>audio=%f\tvideo=%f&quot;</highlight><highlight class="normal">,audio_load,video_load);</highlight></codeline>
<codeline lineno="4365"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4366"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4367"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="4368"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*no<sp/>stats<sp/>for<sp/>other<sp/>states*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4369"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4370"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4371"><highlight class="normal"></highlight></codeline>
<codeline lineno="4372"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>BUILD_UPNP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4373"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_upnp_call_process(call);</highlight></codeline>
<codeline lineno="4374"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/>//BUILD_UPNP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4375"><highlight class="normal"></highlight></codeline>
<codeline lineno="4376"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_handle_stream_events(call,<sp/>call-&gt;main_audio_stream_index);</highlight></codeline>
<codeline lineno="4377"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_handle_stream_events(call,<sp/>call-&gt;main_video_stream_index);</highlight></codeline>
<codeline lineno="4378"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_handle_stream_events(call,<sp/>call-&gt;main_text_stream_index);</highlight></codeline>
<codeline lineno="4379"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((call-&gt;state<sp/>==<sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaacebe90cc045331e513d069872f9c84d3" kindref="member">LinphoneCallStreamsRunning</ref><sp/>||</highlight></codeline>
<codeline lineno="4380"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;state<sp/>==<sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaaacf737ce5572c4e0e9f28993dcbadf00" kindref="member">LinphoneCallPausedByRemote</ref>)<sp/>&amp;&amp;<sp/>one_second_elapsed<sp/>&amp;&amp;<sp/>call-&gt;audiostream!=NULL</highlight></codeline>
<codeline lineno="4381"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>&amp;&amp;<sp/>call-&gt;audiostream-&gt;ms.state==MSStreamStarted<sp/>&amp;&amp;<sp/>disconnect_timeout&gt;0<sp/>)</highlight></codeline>
<codeline lineno="4382"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>disconnected=!audio_stream_alive(call-&gt;audiostream,disconnect_timeout);</highlight></codeline>
<codeline lineno="4383"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(disconnected)</highlight></codeline>
<codeline lineno="4384"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_lost(call,<sp/><ref refid="group__misc_1ggaf7346e9b3a064155f3d5d3811d684fb2a3fa52bc410a926ff5f5aa519cdd90e94" kindref="member">LinphoneReasonUnknown</ref>);</highlight></codeline>
<codeline lineno="4385"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4386"><highlight class="normal"></highlight></codeline>
<codeline lineno="4387"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_log_completed(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="4388"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc=call-&gt;core;</highlight></codeline>
<codeline lineno="4389"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>call_logs_sqlite_db_found<sp/>=<sp/>FALSE;</highlight></codeline>
<codeline lineno="4390"><highlight class="normal"></highlight></codeline>
<codeline lineno="4391"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;log-&gt;duration=<ref refid="group__call__control_1ga0ad1da7a56b11f5e0b2fe6f91d3d6bb5" kindref="member">linphone_call_get_duration</ref>(call);<sp/></highlight><highlight class="comment">/*store<sp/>duration<sp/>since<sp/>connected*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4392"><highlight class="normal"></highlight></codeline>
<codeline lineno="4393"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;log-&gt;status==<ref refid="group__call__logs_1gga0896daf3cb167a43e357c3955ab33f3fad26e9035dad755590a5a724c7ba69656" kindref="member">LinphoneCallMissed</ref>){</highlight></codeline>
<codeline lineno="4394"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*info;</highlight></codeline>
<codeline lineno="4395"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lc-&gt;missed_calls++;</highlight></codeline>
<codeline lineno="4396"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>info=ortp_strdup_printf(ngettext(</highlight><highlight class="stringliteral">&quot;You<sp/>have<sp/>missed<sp/>%i<sp/>call.&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="4397"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;You<sp/>have<sp/>missed<sp/>%i<sp/>calls.&quot;</highlight><highlight class="normal">,<sp/>lc-&gt;missed_calls),</highlight></codeline>
<codeline lineno="4398"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lc-&gt;missed_calls);</highlight></codeline>
<codeline lineno="4399"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_notify_display_status(lc,info);</highlight></codeline>
<codeline lineno="4400"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(info);</highlight></codeline>
<codeline lineno="4401"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4402"><highlight class="normal"></highlight></codeline>
<codeline lineno="4403"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>CALL_LOGS_STORAGE_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4404"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lc-&gt;logs_db)<sp/>{</highlight></codeline>
<codeline lineno="4405"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call_logs_sqlite_db_found<sp/>=<sp/>TRUE;</highlight></codeline>
<codeline lineno="4406"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_store_call_log(lc,<sp/>call-&gt;log);</highlight></codeline>
<codeline lineno="4407"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4408"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4409"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!call_logs_sqlite_db_found)<sp/>{</highlight></codeline>
<codeline lineno="4410"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lc-&gt;call_logs=ms_list_prepend(lc-&gt;call_logs,<ref refid="group__call__logs_1ga2f3af8bb19866a4bbeebefa17bf2b806" kindref="member">linphone_call_log_ref</ref>(call-&gt;log));</highlight></codeline>
<codeline lineno="4411"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ms_list_size(lc-&gt;call_logs)&gt;lc-&gt;max_call_logs){</highlight></codeline>
<codeline lineno="4412"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSList<sp/>*elem,*prevelem=NULL;</highlight></codeline>
<codeline lineno="4413"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*find<sp/>the<sp/>last<sp/>element*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4414"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(elem=lc-&gt;call_logs;elem!=NULL;elem=elem-&gt;next){</highlight></codeline>
<codeline lineno="4415"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>prevelem=elem;</highlight></codeline>
<codeline lineno="4416"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4417"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>elem=prevelem;</highlight></codeline>
<codeline lineno="4418"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__logs_1ga802bbd28cc29824d80a70ad33e5b8ea6" kindref="member">linphone_call_log_unref</ref>((<ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref>*)elem-&gt;data);</highlight></codeline>
<codeline lineno="4419"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lc-&gt;call_logs=ms_list_remove_link(lc-&gt;call_logs,elem);</highlight></codeline>
<codeline lineno="4420"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4421"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call_logs_write_to_config_file(lc);</highlight></codeline>
<codeline lineno="4422"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4423"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_notify_call_log_updated(lc,call-&gt;log);</highlight></codeline>
<codeline lineno="4424"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4425"><highlight class="normal"></highlight></codeline>
<codeline lineno="4430"><highlight class="normal"><ref refid="group__call__control_1ga37dad1a4f935d9cc26ec1f9d2b23691a" kindref="member">LinphoneCallState</ref><sp/>linphone_call_get_transfer_state(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="4431"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>call-&gt;transfer_state;</highlight></codeline>
<codeline lineno="4432"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4433"><highlight class="normal"></highlight></codeline>
<codeline lineno="4434"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_set_transfer_state(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref>*<sp/>call,<sp/><ref refid="group__call__control_1ga37dad1a4f935d9cc26ec1f9d2b23691a" kindref="member">LinphoneCallState</ref><sp/>state)<sp/>{</highlight></codeline>
<codeline lineno="4435"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(state<sp/>!=<sp/>call-&gt;transfer_state)<sp/>{</highlight></codeline>
<codeline lineno="4436"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref>*<sp/>lc<sp/>=<sp/>call-&gt;core;</highlight></codeline>
<codeline lineno="4437"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Transfer<sp/>state<sp/>for<sp/>call<sp/>[%p]<sp/>changed<sp/><sp/>from<sp/>[%s]<sp/>to<sp/>[%s]&quot;</highlight><highlight class="normal">,call</highlight></codeline>
<codeline lineno="4438"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>,linphone_call_state_to_string(call-&gt;transfer_state)</highlight></codeline>
<codeline lineno="4439"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>,linphone_call_state_to_string(state));</highlight></codeline>
<codeline lineno="4440"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;transfer_state<sp/>=<sp/>state;</highlight></codeline>
<codeline lineno="4441"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_notify_transfer_state_changed(lc,<sp/>call,<sp/>state);</highlight></codeline>
<codeline lineno="4442"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4443"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4444"><highlight class="normal"></highlight></codeline>
<codeline lineno="4445"><highlight class="normal">bool_t<sp/><ref refid="group__call__control_1gaf7a3307b98e95c0441c3d70890099e4a" kindref="member">linphone_call_is_in_conference</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="4446"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>call-&gt;params-&gt;in_conference;</highlight></codeline>
<codeline lineno="4447"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4448"><highlight class="normal"></highlight></codeline>
<codeline lineno="4458"><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_zoom_video(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref>*<sp/>call,<sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>zoom_factor,<sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal">*<sp/>cx,<sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal">*<sp/>cy)<sp/>{</highlight></codeline>
<codeline lineno="4459"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>VideoStream*<sp/>vstream<sp/>=<sp/>call-&gt;videostream;</highlight></codeline>
<codeline lineno="4460"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(vstream<sp/>&amp;&amp;<sp/>vstream-&gt;output)<sp/>{</highlight></codeline>
<codeline lineno="4461"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>zoom[3];</highlight></codeline>
<codeline lineno="4462"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>halfsize;</highlight></codeline>
<codeline lineno="4463"><highlight class="normal"></highlight></codeline>
<codeline lineno="4464"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(zoom_factor<sp/>&lt;<sp/>1)</highlight></codeline>
<codeline lineno="4465"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>zoom_factor<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="4466"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>halfsize<sp/>=<sp/>0.5f<sp/>*<sp/>1.0f<sp/>/<sp/>zoom_factor;</highlight></codeline>
<codeline lineno="4467"><highlight class="normal"></highlight></codeline>
<codeline lineno="4468"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((*cx<sp/>-<sp/>halfsize)<sp/>&lt;<sp/>0)</highlight></codeline>
<codeline lineno="4469"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*cx<sp/>=<sp/>0<sp/>+<sp/>halfsize;</highlight></codeline>
<codeline lineno="4470"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((*cx<sp/>+<sp/>halfsize)<sp/>&gt;<sp/>1)</highlight></codeline>
<codeline lineno="4471"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*cx<sp/>=<sp/>1<sp/>-<sp/>halfsize;</highlight></codeline>
<codeline lineno="4472"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((*cy<sp/>-<sp/>halfsize)<sp/>&lt;<sp/>0)</highlight></codeline>
<codeline lineno="4473"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*cy<sp/>=<sp/>0<sp/>+<sp/>halfsize;</highlight></codeline>
<codeline lineno="4474"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((*cy<sp/>+<sp/>halfsize)<sp/>&gt;<sp/>1)</highlight></codeline>
<codeline lineno="4475"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*cy<sp/>=<sp/>1<sp/>-<sp/>halfsize;</highlight></codeline>
<codeline lineno="4476"><highlight class="normal"></highlight></codeline>
<codeline lineno="4477"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>zoom[0]<sp/>=<sp/>zoom_factor;</highlight></codeline>
<codeline lineno="4478"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>zoom[1]<sp/>=<sp/>*cx;</highlight></codeline>
<codeline lineno="4479"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>zoom[2]<sp/>=<sp/>*cy;</highlight></codeline>
<codeline lineno="4480"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(vstream-&gt;output,<sp/>MS_VIDEO_DISPLAY_ZOOM,<sp/>&amp;zoom);</highlight></codeline>
<codeline lineno="4481"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;Could<sp/>not<sp/>apply<sp/>zoom:<sp/>video<sp/>output<sp/>wasn&apos;t<sp/>activated.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="4482"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4483"><highlight class="normal"></highlight></codeline>
<codeline lineno="4484"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref><sp/>*get_fixed_contact(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc,<sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call<sp/>,<sp/><ref refid="group__proxies_1ga1879a0d59e068457b688138da97f2d0b" kindref="member">LinphoneProxyConfig</ref><sp/>*dest_proxy){</highlight></codeline>
<codeline lineno="4485"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref><sp/>*ctt=NULL;</highlight></codeline>
<codeline lineno="4486"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref><sp/>*ret=NULL;</highlight></codeline>
<codeline lineno="4487"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//const<sp/>char<sp/>*localip=call-&gt;localip;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4488"><highlight class="normal"></highlight></codeline>
<codeline lineno="4489"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>first<sp/>use<sp/>user&apos;s<sp/>supplied<sp/>ip<sp/>address<sp/>if<sp/>asked*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4490"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__network__parameters_1ga9de28ff0fd0f8ff65ef82eba9592276c" kindref="member">linphone_core_get_firewall_policy</ref>(lc)==<ref refid="group__network__parameters_1ggadad0a1c27596017d9d9b3c30ef47f5bea823554c78cb93f674464e332af988fe1" kindref="member">LinphonePolicyUseNatAddress</ref>){</highlight></codeline>
<codeline lineno="4491"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ctt=<ref refid="group__proxies_1gae1788b49053b46190f7b305d8d21d6af" kindref="member">linphone_core_get_primary_contact_parsed</ref>(lc);</highlight></codeline>
<codeline lineno="4492"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__linphone__address_1ga947819a2bbf6aedcd8e5903469cffec5" kindref="member">linphone_address_set_domain</ref>(ctt,linphone_core_get_nat_address_resolved(lc));</highlight></codeline>
<codeline lineno="4493"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ret=ctt;</highlight></codeline>
<codeline lineno="4494"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;op<sp/>&amp;&amp;<sp/>sal_op_get_contact_address(call-&gt;op)!=NULL){</highlight></codeline>
<codeline lineno="4495"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>if<sp/>already<sp/>choosed,<sp/>don&apos;t<sp/>change<sp/>it<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4496"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>NULL;</highlight></codeline>
<codeline lineno="4497"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;ping_op<sp/>&amp;&amp;<sp/>sal_op_get_contact_address(call-&gt;ping_op))<sp/>{</highlight></codeline>
<codeline lineno="4498"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>if<sp/>the<sp/>ping<sp/>OPTIONS<sp/>request<sp/>succeeded<sp/>use<sp/>the<sp/>contact<sp/>guessed<sp/>from<sp/>the</highlight></codeline>
<codeline lineno="4499"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>received,<sp/>rport*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4500"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Contact<sp/>has<sp/>been<sp/>fixed<sp/>using<sp/>OPTIONS&quot;</highlight><highlight class="comment">/*<sp/>to<sp/>%s&quot;,guessed*/</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="4501"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ret=<ref refid="group__linphone__address_1ga7b33626eea53bbd5cea9e5c4c58826df" kindref="member">linphone_address_clone</ref>(sal_op_get_contact_address(call-&gt;ping_op));;</highlight></codeline>
<codeline lineno="4502"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dest_proxy<sp/>&amp;&amp;<sp/>dest_proxy-&gt;op<sp/>&amp;&amp;<sp/>sal_op_get_contact_address(dest_proxy-&gt;op)){</highlight></codeline>
<codeline lineno="4503"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*if<sp/>using<sp/>a<sp/>proxy,<sp/>use<sp/>the<sp/>contact<sp/>address<sp/>as<sp/>guessed<sp/>with<sp/>the<sp/>REGISTERs*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4504"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Contact<sp/>has<sp/>been<sp/>fixed<sp/>using<sp/>proxy&quot;</highlight><highlight class="normal"><sp/></highlight><highlight class="comment">/*to<sp/>%s&quot;,fixed_contact*/</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="4505"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ret=<ref refid="group__linphone__address_1ga7b33626eea53bbd5cea9e5c4c58826df" kindref="member">linphone_address_clone</ref>(sal_op_get_contact_address(dest_proxy-&gt;op));</highlight></codeline>
<codeline lineno="4506"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="4507"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ctt=<ref refid="group__proxies_1gae1788b49053b46190f7b305d8d21d6af" kindref="member">linphone_core_get_primary_contact_parsed</ref>(lc);</highlight></codeline>
<codeline lineno="4508"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ctt!=NULL){</highlight></codeline>
<codeline lineno="4509"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*otherwise<sp/>use<sp/>supplied<sp/>localip*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4510"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__linphone__address_1ga947819a2bbf6aedcd8e5903469cffec5" kindref="member">linphone_address_set_domain</ref>(ctt,NULL</highlight><highlight class="comment">/*localip*/</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="4511"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__linphone__address_1gae0b7f4871736c9182db6665fea2a3bf2" kindref="member">linphone_address_set_port</ref>(ctt,-1</highlight><highlight class="comment">/*linphone_core_get_sip_port(lc)*/</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="4512"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Contact<sp/>has<sp/>not<sp/>been<sp/>fixed<sp/>stack<sp/>will<sp/>do&quot;</highlight><highlight class="comment">/*<sp/>to<sp/>%s&quot;,ret*/</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="4513"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ret=ctt;</highlight></codeline>
<codeline lineno="4514"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4515"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4516"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>ret;</highlight></codeline>
<codeline lineno="4517"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4518"><highlight class="normal"></highlight></codeline>
<codeline lineno="4519"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_set_contact_op(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref>*<sp/>call)<sp/>{</highlight></codeline>
<codeline lineno="4520"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref><sp/>*contact;</highlight></codeline>
<codeline lineno="4521"><highlight class="normal"></highlight></codeline>
<codeline lineno="4522"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;dest_proxy<sp/>==<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="4523"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Try<sp/>to<sp/>define<sp/>the<sp/>destination<sp/>proxy<sp/>if<sp/>it<sp/>has<sp/>not<sp/>already<sp/>been<sp/>done<sp/>to<sp/>have<sp/>a<sp/>correct<sp/>contact<sp/>field<sp/>in<sp/>the<sp/>SIP<sp/>messages<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4524"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;dest_proxy<sp/>=<sp/>linphone_core_lookup_known_proxy(call-&gt;core,<sp/>call-&gt;log-&gt;to);</highlight></codeline>
<codeline lineno="4525"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4526"><highlight class="normal"></highlight></codeline>
<codeline lineno="4527"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>contact=get_fixed_contact(call-&gt;core,call,call-&gt;dest_proxy);</highlight></codeline>
<codeline lineno="4528"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(contact){</highlight></codeline>
<codeline lineno="4529"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SalTransport<sp/>tport=sal_address_get_transport((SalAddress*)contact);</highlight></codeline>
<codeline lineno="4530"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sal_address_clean((SalAddress*)contact);<sp/></highlight><highlight class="comment">/*<sp/>clean<sp/>out<sp/>contact_params<sp/>that<sp/>come<sp/>from<sp/>proxy<sp/>config*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4531"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sal_address_set_transport((SalAddress*)contact,tport);</highlight></codeline>
<codeline lineno="4532"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sal_op_set_contact_address(call-&gt;op,<sp/>contact);</highlight></codeline>
<codeline lineno="4533"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__linphone__address_1ga5777f2976c71a48cf2b3f03c61818f13" kindref="member">linphone_address_destroy</ref>(contact);</highlight></codeline>
<codeline lineno="4534"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4535"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4536"><highlight class="normal"></highlight></codeline>
<codeline lineno="4537"><highlight class="normal"><ref refid="group__call__control_1gae1497db82144ec61a4303c7e84d1603a" kindref="member">LinphonePlayer</ref><sp/>*linphone_call_get_player(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="4538"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;player==NULL)</highlight></codeline>
<codeline lineno="4539"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;player=linphone_call_build_player(call);</highlight></codeline>
<codeline lineno="4540"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>call-&gt;player;</highlight></codeline>
<codeline lineno="4541"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4542"><highlight class="normal"></highlight></codeline>
<codeline lineno="4543"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_set_new_params(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gaa91f7e76e8f038ae9acdf42d1bc80a22" kindref="member">LinphoneCallParams</ref><sp/>*params){</highlight></codeline>
<codeline lineno="4544"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1gaa91f7e76e8f038ae9acdf42d1bc80a22" kindref="member">LinphoneCallParams</ref><sp/>*cp=NULL;</highlight></codeline>
<codeline lineno="4545"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(params)<sp/>cp=<ref refid="group__call__control_1gaaff626b40ba1834c7912aef9fc441544" kindref="member">linphone_call_params_copy</ref>(params);</highlight></codeline>
<codeline lineno="4546"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;params)<sp/><ref refid="group__call__control_1ga341015ca73484947fca50896432106d2" kindref="member">linphone_call_params_unref</ref>(call-&gt;params);</highlight></codeline>
<codeline lineno="4547"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;params=cp;</highlight></codeline>
<codeline lineno="4548"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4549"><highlight class="normal"></highlight></codeline>
<codeline lineno="4550"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>send_dtmf_handler(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*data,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>revents){</highlight></codeline>
<codeline lineno="4551"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call<sp/>=<sp/>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref>*)data;</highlight></codeline>
<codeline lineno="4552"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*By<sp/>default<sp/>we<sp/>send<sp/>DTMF<sp/>RFC2833<sp/>if<sp/>we<sp/>do<sp/>not<sp/>have<sp/>enabled<sp/>SIP_INFO<sp/>but<sp/>we<sp/>can<sp/>also<sp/>send<sp/>RFC2833<sp/>and<sp/>SIP_INFO*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4553"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__media__parameters_1gaa107c110a140a5f4cc82053147db772d" kindref="member">linphone_core_get_use_rfc2833_for_dtmf</ref>(call-&gt;core)!=0<sp/>||<sp/><ref refid="group__media__parameters_1ga8f12d74bb017fea6b268d0732924f25d" kindref="member">linphone_core_get_use_info_for_dtmf</ref>(call-&gt;core)==0)</highlight></codeline>
<codeline lineno="4554"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="4555"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>In<sp/>Band<sp/>DTMF<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4556"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;audiostream!=NULL){</highlight></codeline>
<codeline lineno="4557"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_send_dtmf(call-&gt;audiostream,*call-&gt;dtmf_sequence);</highlight></codeline>
<codeline lineno="4558"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4559"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4560"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="4561"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_error(</highlight><highlight class="stringliteral">&quot;Cannot<sp/>send<sp/>RFC2833<sp/>DTMF<sp/>when<sp/>we<sp/>are<sp/>not<sp/>in<sp/>communication.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="4562"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>FALSE;</highlight></codeline>
<codeline lineno="4563"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4564"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4565"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__media__parameters_1ga8f12d74bb017fea6b268d0732924f25d" kindref="member">linphone_core_get_use_info_for_dtmf</ref>(call-&gt;core)!=0){</highlight></codeline>
<codeline lineno="4566"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Out<sp/>of<sp/>Band<sp/>DTMF<sp/>(use<sp/>INFO<sp/>method)<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4567"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sal_call_send_dtmf(call-&gt;op,*call-&gt;dtmf_sequence);</highlight></codeline>
<codeline lineno="4568"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4569"><highlight class="normal"></highlight></codeline>
<codeline lineno="4570"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*this<sp/>check<sp/>is<sp/>needed<sp/>because<sp/>linphone_call_send_dtmf<sp/>does<sp/>not<sp/>set<sp/>the<sp/>timer<sp/>since<sp/>its<sp/>a<sp/>single<sp/>character*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4571"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;dtmfs_timer!=NULL)<sp/>{</highlight></codeline>
<codeline lineno="4572"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>memmove(call-&gt;dtmf_sequence,<sp/>call-&gt;dtmf_sequence+1,<sp/>strlen(call-&gt;dtmf_sequence));</highlight></codeline>
<codeline lineno="4573"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4574"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>continue<sp/>only<sp/>if<sp/>the<sp/>dtmf<sp/>sequence<sp/>is<sp/>not<sp/>empty*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4575"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;dtmf_sequence!=NULL&amp;&amp;*call-&gt;dtmf_sequence!=</highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
<codeline lineno="4576"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>TRUE;</highlight></codeline>
<codeline lineno="4577"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="4578"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_call_cancel_dtmfs(call);</highlight></codeline>
<codeline lineno="4579"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>FALSE;</highlight></codeline>
<codeline lineno="4580"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4581"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4582"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>linphone_call_send_dtmf(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>dtmf){</highlight></codeline>
<codeline lineno="4583"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call==NULL){</highlight></codeline>
<codeline lineno="4584"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;linphone_call_send_dtmf():<sp/>invalid<sp/>call,<sp/>canceling<sp/>DTMF.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="4585"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1;</highlight></codeline>
<codeline lineno="4586"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4587"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;dtmf_sequence<sp/>=<sp/>&amp;dtmf;</highlight></codeline>
<codeline lineno="4588"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>send_dtmf_handler(call,0);</highlight></codeline>
<codeline lineno="4589"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;dtmf_sequence<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="4590"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="4591"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4592"><highlight class="normal"></highlight></codeline>
<codeline lineno="4593"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>linphone_call_send_dtmfs(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*dtmfs)<sp/>{</highlight></codeline>
<codeline lineno="4594"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call==NULL){</highlight></codeline>
<codeline lineno="4595"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;linphone_call_send_dtmfs():<sp/>invalid<sp/>call,<sp/>canceling<sp/>DTMF<sp/>sequence.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="4596"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1;</highlight></codeline>
<codeline lineno="4597"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4598"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;dtmfs_timer!=NULL){</highlight></codeline>
<codeline lineno="4599"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;linphone_call_send_dtmfs():<sp/>a<sp/>DTMF<sp/>sequence<sp/>is<sp/>already<sp/>in<sp/>place,<sp/>canceling<sp/>DTMF<sp/>sequence.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="4600"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-2;</highlight></codeline>
<codeline lineno="4601"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4602"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dtmfs<sp/>!=<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="4603"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>delay_ms<sp/>=<sp/><ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(call-&gt;core-&gt;config,</highlight><highlight class="stringliteral">&quot;net&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;dtmf_delay_ms&quot;</highlight><highlight class="normal">,200);</highlight></codeline>
<codeline lineno="4604"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;dtmf_sequence<sp/>=<sp/>ms_strdup(dtmfs);</highlight></codeline>
<codeline lineno="4605"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;dtmfs_timer<sp/>=<sp/>sal_create_timer(call-&gt;core-&gt;sal,<sp/>send_dtmf_handler,<sp/>call,<sp/>delay_ms,<sp/></highlight><highlight class="stringliteral">&quot;DTMF<sp/>sequence<sp/>timer&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="4606"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4607"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="4608"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4609"><highlight class="normal"></highlight></codeline>
<codeline lineno="4610"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_cancel_dtmfs(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="4611"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*nothing<sp/>to<sp/>do*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4612"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!call<sp/>||<sp/>!call-&gt;dtmfs_timer)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4613"><highlight class="normal"></highlight></codeline>
<codeline lineno="4614"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sal_cancel_timer(call-&gt;core-&gt;sal,<sp/>call-&gt;dtmfs_timer);</highlight></codeline>
<codeline lineno="4615"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>belle_sip_object_unref(call-&gt;dtmfs_timer);</highlight></codeline>
<codeline lineno="4616"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;dtmfs_timer<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="4617"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;dtmf_sequence<sp/>!=<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="4618"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(call-&gt;dtmf_sequence);</highlight></codeline>
<codeline lineno="4619"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;dtmf_sequence<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="4620"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4621"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4622"><highlight class="normal"></highlight></codeline>
<codeline lineno="4623"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*<sp/><ref refid="group__media__parameters_1ga68c6d3279a1182562ca7852cced547a9" kindref="member">linphone_call_get_native_video_window_id</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="4624"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;video_window_id)<sp/>{</highlight></codeline>
<codeline lineno="4625"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>The<sp/>video<sp/>id<sp/>was<sp/>previously<sp/>set<sp/>by<sp/>the<sp/>app.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4626"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>call-&gt;video_window_id;</highlight></codeline>
<codeline lineno="4627"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4628"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>VIDEO_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4629"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;videostream)<sp/>{</highlight></codeline>
<codeline lineno="4630"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>It<sp/>was<sp/>not<sp/>set<sp/>but<sp/>we<sp/>want<sp/>to<sp/>get<sp/>the<sp/>one<sp/>automatically<sp/>created<sp/>by<sp/>mediastreamer2<sp/>(desktop<sp/>versions<sp/>only).<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4631"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>video_stream_get_native_window_id(call-&gt;videostream);</highlight></codeline>
<codeline lineno="4632"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4633"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4634"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="4635"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4636"><highlight class="normal"></highlight></codeline>
<codeline lineno="4637"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="group__media__parameters_1ga64f3a1382be5366f476d806c18293a6d" kindref="member">linphone_call_set_native_video_window_id</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*</highlight><highlight class="keywordtype">id</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
<codeline lineno="4638"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;video_window_id<sp/>=<sp/>id;</highlight></codeline>
<codeline lineno="4639"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>VIDEO_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4640"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;videostream)<sp/>{</highlight></codeline>
<codeline lineno="4641"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>video_stream_set_native_window_id(call-&gt;videostream,<sp/></highlight><highlight class="keywordtype">id</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="4642"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4643"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4644"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4645"><highlight class="normal"></highlight></codeline>
<codeline lineno="4646"><highlight class="normal">MSWebCam<sp/>*linphone_call_get_video_device(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="4647"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1ga37dad1a4f935d9cc26ec1f9d2b23691a" kindref="member">LinphoneCallState</ref><sp/>state<sp/>=<sp/><ref refid="group__call__control_1ga4e66e41e6557ea35a07f266918741ffc" kindref="member">linphone_call_get_state</ref>(call);</highlight></codeline>
<codeline lineno="4648"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>paused<sp/>=<sp/>(state<sp/>==<sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaaaa35a1564a5ce1bcc4719ab523edec98" kindref="member">LinphoneCallPausing</ref>)<sp/>||<sp/>(state<sp/>==<sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa59c57a8b9a7a0086a79c85028bb4cefc" kindref="member">LinphoneCallPaused</ref>);</highlight></codeline>
<codeline lineno="4649"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(paused<sp/>||<sp/>call-&gt;all_muted<sp/>||<sp/>(call-&gt;camera_enabled<sp/>==<sp/>FALSE))</highlight></codeline>
<codeline lineno="4650"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>get_nowebcam_device();</highlight></codeline>
<codeline lineno="4651"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4652"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>call-&gt;core-&gt;video_conf.device;</highlight></codeline>
<codeline lineno="4653"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4654"><highlight class="normal"></highlight></codeline>
<codeline lineno="4655"><highlight class="normal"></highlight></codeline>
<codeline lineno="4656"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1gae1f3643e3be0f499f2c60bd363cdc56e" kindref="member">linphone_call_set_audio_route</ref>(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/><ref refid="group__call__control_1gaf4fc5f57d28e7c0189e687746f58ead1" kindref="member">LinphoneAudioRoute</ref><sp/>route)<sp/>{</highlight></codeline>
<codeline lineno="4657"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call<sp/>!=<sp/>NULL<sp/>&amp;&amp;<sp/>call-&gt;audiostream<sp/>!=<sp/>NULL){</highlight></codeline>
<codeline lineno="4658"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>audio_stream_set_audio_route(call-&gt;audiostream,<sp/>(MSAudioRoute)<sp/>route);</highlight></codeline>
<codeline lineno="4659"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4660"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4661"><highlight class="normal"></highlight></codeline>
<codeline lineno="4662"><highlight class="normal"><ref refid="group__chatroom_1ga37902f3fc715b7f6451c241d0efd0299" kindref="member">LinphoneChatRoom</ref><sp/>*<sp/>linphone_call_get_chat_room(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="4663"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!call-&gt;chat_room){</highlight></codeline>
<codeline lineno="4664"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;state<sp/>!=<sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaac4a81296a6835482e65d51174eb16de4" kindref="member">LinphoneCallReleased</ref><sp/>&amp;&amp;<sp/>call-&gt;state<sp/>!=<sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaafbeebb1285a2aab5d34e99d2e695e5be" kindref="member">LinphoneCallEnd</ref>){</highlight></codeline>
<codeline lineno="4665"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;chat_room<sp/>=<sp/>_linphone_core_create_chat_room_from_call(call);</highlight></codeline>
<codeline lineno="4666"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4667"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4668"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>call-&gt;chat_room;</highlight></codeline>
<codeline lineno="4669"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4670"><highlight class="normal"></highlight></codeline>
<codeline lineno="4671"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>linphone_call_get_stream_count(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call)<sp/>{</highlight></codeline>
<codeline lineno="4672"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Revisit<sp/>when<sp/>multiple<sp/>media<sp/>streams<sp/>will<sp/>be<sp/>implemented</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4673"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>VIDEO_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4674"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__media__parameters_1gac93f1c5212a71362a315b6ed310ea9e8" kindref="member">linphone_call_params_realtime_text_enabled</ref>(<ref refid="group__call__control_1ga768bbd4e2869556bc23830a7b1e4eb5c" kindref="member">linphone_call_get_current_params</ref>(call)))<sp/>{</highlight></codeline>
<codeline lineno="4675"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>3;</highlight></codeline>
<codeline lineno="4676"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4677"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>2;</highlight></codeline>
<codeline lineno="4678"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4679"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__media__parameters_1gac93f1c5212a71362a315b6ed310ea9e8" kindref="member">linphone_call_params_realtime_text_enabled</ref>(<ref refid="group__call__control_1ga768bbd4e2869556bc23830a7b1e4eb5c" kindref="member">linphone_call_get_current_params</ref>(call)))<sp/>{</highlight></codeline>
<codeline lineno="4680"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>2;</highlight></codeline>
<codeline lineno="4681"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4682"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>1;</highlight></codeline>
<codeline lineno="4683"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4684"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4685"><highlight class="normal"></highlight></codeline>
<codeline lineno="4686"><highlight class="normal">MSFormatType<sp/>linphone_call_get_stream_type(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>stream_index)<sp/>{</highlight></codeline>
<codeline lineno="4687"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Revisit<sp/>when<sp/>multiple<sp/>media<sp/>streams<sp/>will<sp/>be<sp/>implemented</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4688"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stream_index<sp/>==<sp/>call-&gt;main_video_stream_index)<sp/>{</highlight></codeline>
<codeline lineno="4689"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>MSVideo;</highlight></codeline>
<codeline lineno="4690"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(stream_index<sp/>==<sp/>call-&gt;main_text_stream_index)<sp/>{</highlight></codeline>
<codeline lineno="4691"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>MSText;</highlight></codeline>
<codeline lineno="4692"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4693"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>MSAudio;</highlight></codeline>
<codeline lineno="4694"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4695"><highlight class="normal"></highlight></codeline>
<codeline lineno="4696"><highlight class="normal">RtpTransport*<sp/>linphone_call_get_meta_rtp_transport(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>stream_index)<sp/>{</highlight></codeline>
<codeline lineno="4697"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>RtpTransport<sp/>*meta_rtp;</highlight></codeline>
<codeline lineno="4698"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>RtpTransport<sp/>*meta_rtcp;</highlight></codeline>
<codeline lineno="4699"><highlight class="normal"></highlight></codeline>
<codeline lineno="4700"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!call<sp/>||<sp/>stream_index<sp/>&lt;<sp/>0<sp/>||<sp/>stream_index<sp/>&gt;=<sp/>linphone_call_get_stream_count(call))<sp/>{</highlight></codeline>
<codeline lineno="4701"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>NULL;</highlight></codeline>
<codeline lineno="4702"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4703"><highlight class="normal"></highlight></codeline>
<codeline lineno="4704"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_get_transports(call-&gt;sessions[stream_index].rtp_session,<sp/>&amp;meta_rtp,<sp/>&amp;meta_rtcp);</highlight></codeline>
<codeline lineno="4705"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>meta_rtp;</highlight></codeline>
<codeline lineno="4706"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4707"><highlight class="normal"></highlight></codeline>
<codeline lineno="4708"><highlight class="normal">RtpTransport*<sp/>linphone_call_get_meta_rtcp_transport(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>stream_index)<sp/>{</highlight></codeline>
<codeline lineno="4709"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>RtpTransport<sp/>*meta_rtp;</highlight></codeline>
<codeline lineno="4710"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>RtpTransport<sp/>*meta_rtcp;</highlight></codeline>
<codeline lineno="4711"><highlight class="normal"></highlight></codeline>
<codeline lineno="4712"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!call<sp/>||<sp/>stream_index<sp/>&lt;<sp/>0<sp/>||<sp/>stream_index<sp/>&gt;=<sp/>linphone_call_get_stream_count(call))<sp/>{</highlight></codeline>
<codeline lineno="4713"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>NULL;</highlight></codeline>
<codeline lineno="4714"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4715"><highlight class="normal"></highlight></codeline>
<codeline lineno="4716"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_get_transports(call-&gt;sessions[stream_index].rtp_session,<sp/>&amp;meta_rtp,<sp/>&amp;meta_rtcp);</highlight></codeline>
<codeline lineno="4717"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>meta_rtcp;</highlight></codeline>
<codeline lineno="4718"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4719"><highlight class="normal"></highlight></codeline>
<codeline lineno="4720"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_set_broken(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="4721"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal">(call-&gt;state){</highlight></codeline>
<codeline lineno="4722"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*for<sp/>all<sp/>the<sp/>early<sp/>states,<sp/>we<sp/>prefer<sp/>to<sp/>drop<sp/>the<sp/>call*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4723"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaae99727dfb0a8e30ef04ff96ce3bf7e36" kindref="member">LinphoneCallOutgoingInit</ref>:</highlight></codeline>
<codeline lineno="4724"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa229cfe72a8dfee15bdae9f2125b43c67" kindref="member">LinphoneCallOutgoingRinging</ref>:</highlight></codeline>
<codeline lineno="4725"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa7a8cd38252c1a9d8c0ecbdec1aef899d" kindref="member">LinphoneCallOutgoingEarlyMedia</ref>:</highlight></codeline>
<codeline lineno="4726"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa0998d4c2bce14ae88b0ae84fbef5c33a" kindref="member">LinphoneCallIncomingReceived</ref>:</highlight></codeline>
<codeline lineno="4727"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaab8684757f565989d4212026f755762ed" kindref="member">LinphoneCallIncomingEarlyMedia</ref>:</highlight></codeline>
<codeline lineno="4728"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*during<sp/>the<sp/>early<sp/>states,<sp/>the<sp/>SAL<sp/>layer<sp/>reports<sp/>the<sp/>failure<sp/>from<sp/>the<sp/>dialog<sp/>or<sp/>transaction<sp/>layer,</highlight></codeline>
<codeline lineno="4729"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>hence,<sp/>there<sp/>is<sp/>nothing<sp/>special<sp/>to<sp/>do*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4730"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4731"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaacebe90cc045331e513d069872f9c84d3" kindref="member">LinphoneCallStreamsRunning</ref>:</highlight></codeline>
<codeline lineno="4732"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa59c57a8b9a7a0086a79c85028bb4cefc" kindref="member">LinphoneCallPaused</ref>:</highlight></codeline>
<codeline lineno="4733"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaaacf737ce5572c4e0e9f28993dcbadf00" kindref="member">LinphoneCallPausedByRemote</ref>:</highlight></codeline>
<codeline lineno="4734"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*during<sp/>these<sp/>states,<sp/>the<sp/>dialog<sp/>is<sp/>established.<sp/>A<sp/>failure<sp/>of<sp/>a<sp/>transaction<sp/>is<sp/>not<sp/>expected<sp/>to<sp/>close<sp/>it.</highlight></codeline>
<codeline lineno="4735"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>Instead<sp/>we<sp/>have<sp/>to<sp/>repair<sp/>the<sp/>dialog<sp/>by<sp/>sending<sp/>a<sp/>reINVITE*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4736"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>call-&gt;broken<sp/>=<sp/>TRUE;</highlight></codeline>
<codeline lineno="4737"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4738"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="4739"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_error(</highlight><highlight class="stringliteral">&quot;linphone_call_set_broken()<sp/>unimplemented<sp/>case.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="4740"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4741"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4742"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4743"><highlight class="normal"></highlight></codeline>
<codeline lineno="4744"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_repair_if_broken(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="4745"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1gaa91f7e76e8f038ae9acdf42d1bc80a22" kindref="member">LinphoneCallParams</ref><sp/>*params;</highlight></codeline>
<codeline lineno="4746"><highlight class="normal"></highlight></codeline>
<codeline lineno="4747"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!call-&gt;broken)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4748"><highlight class="normal"></highlight></codeline>
<codeline lineno="4749"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*First,<sp/>make<sp/>sure<sp/>that<sp/>the<sp/>proxy<sp/>from<sp/>which<sp/>we<sp/>received<sp/>this<sp/>call,<sp/>or<sp/>to<sp/>which<sp/>we<sp/>routed<sp/>this<sp/>call<sp/>is<sp/>registered*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4750"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!call-&gt;dest_proxy<sp/>||<sp/><ref refid="group__proxies_1ga5ae722780e8c0a03545736c01bb7018b" kindref="member">linphone_proxy_config_get_state</ref>(call-&gt;dest_proxy)<sp/>!=<sp/><ref refid="group__proxies_1ggaea1b64a739b1faf0b490fe0f52cfe65ea73e009ef868a552c580b179578b87366" kindref="member">LinphoneRegistrationOk</ref>)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4751"><highlight class="normal"></highlight></codeline>
<codeline lineno="4752"><highlight class="normal"></highlight></codeline>
<codeline lineno="4753"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(call-&gt;state){</highlight></codeline>
<codeline lineno="4754"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaacebe90cc045331e513d069872f9c84d3" kindref="member">LinphoneCallStreamsRunning</ref>:</highlight></codeline>
<codeline lineno="4755"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaa59c57a8b9a7a0086a79c85028bb4cefc" kindref="member">LinphoneCallPaused</ref>:</highlight></codeline>
<codeline lineno="4756"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__control_1ggafc310fd9ba742f7730c632fd72b875eaaacf737ce5572c4e0e9f28993dcbadf00" kindref="member">LinphoneCallPausedByRemote</ref>:</highlight></codeline>
<codeline lineno="4757"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;LinphoneCall[%p]<sp/>is<sp/>going<sp/>to<sp/>be<sp/>updated<sp/>(reINVITE)<sp/>in<sp/>order<sp/>to<sp/>recover<sp/>from<sp/>lost<sp/>connectivity&quot;</highlight><highlight class="normal">,<sp/>call);</highlight></codeline>
<codeline lineno="4758"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(call-&gt;ice_session){</highlight></codeline>
<codeline lineno="4759"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ice_session_restart(call-&gt;ice_session);</highlight></codeline>
<codeline lineno="4760"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ice_session_set_role(call-&gt;ice_session,<sp/>IR_Controlling);</highlight></codeline>
<codeline lineno="4761"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4762"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>params<sp/>=<sp/><ref refid="group__call__control_1ga438f864cacbed06b139e56a2160396c3" kindref="member">linphone_core_create_call_params</ref>(call-&gt;core,<sp/>call);</highlight></codeline>
<codeline lineno="4763"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1ga1a7819d96573bb8dbcbf2a128145457e" kindref="member">linphone_core_update_call</ref>(call-&gt;core,<sp/>call,<sp/>params);</highlight></codeline>
<codeline lineno="4764"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__control_1ga341015ca73484947fca50896432106d2" kindref="member">linphone_call_params_unref</ref>(params);</highlight></codeline>
<codeline lineno="4765"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4766"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="4767"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_error(</highlight><highlight class="stringliteral">&quot;linphone_call_resume_if_broken():<sp/>don&apos;t<sp/>know<sp/>what<sp/>to<sp/>do<sp/>in<sp/>state<sp/>[%s]&quot;</highlight><highlight class="normal">,<sp/>linphone_call_state_to_string(call-&gt;state));</highlight></codeline>
<codeline lineno="4768"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="4769"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4770"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4771"><highlight class="normal"></highlight></codeline>
<codeline lineno="4772"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_call_refresh_sockets(<ref refid="group__call__control_1gac0a4861d7c4702c64f7106f2b893c69e" kindref="member">LinphoneCall</ref><sp/>*call){</highlight></codeline>
<codeline lineno="4773"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="4774"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i=0;<sp/>i<sp/>&lt;<sp/>SAL_MEDIA_DESCRIPTION_MAX_STREAMS;<sp/>++i){</highlight></codeline>
<codeline lineno="4775"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSMediaStreamSessions<sp/>*mss<sp/>=<sp/>&amp;call-&gt;sessions[i];</highlight></codeline>
<codeline lineno="4776"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(mss-&gt;rtp_session){</highlight></codeline>
<codeline lineno="4777"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rtp_session_refresh_sockets(mss-&gt;rtp_session);</highlight></codeline>
<codeline lineno="4778"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4779"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="4780"><highlight class="normal">}</highlight></codeline>
<codeline lineno="4781"><highlight class="normal"></highlight></codeline>
    </programlisting>
    <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/linphonecall.c"/>
  </compounddef>
</doxygen>
