Added XML config for H.323 User Input Indication (DTMF) mode
This commit is contained in:
parent
45609f8986
commit
75c3e36009
|
@ -1,15 +1,21 @@
|
||||||
<configuration name="opal.conf" description="Opal Endpoints">
|
<configuration name="opal.conf" description="Opal Endpoints">
|
||||||
<settings>
|
<settings>
|
||||||
<param name="trace-level" value="4"/>
|
<param name="trace-level" value="3"/>
|
||||||
<param name="context" value="default"/>
|
<param name="context" value="default"/>
|
||||||
<param name="dialplan" value="XML"/>
|
<param name="dialplan" value="XML"/>
|
||||||
<param name="codec-prefs" value="PCMU"/>
|
<param name="dtmf-type" value="signal"/> <!-- string, signal, rfc2833, in-band -->
|
||||||
</settings>
|
<param name="jitter-size" value="40,100"/> <!-- Jitter buffer min/max size, milliseconds -->
|
||||||
<listeners>
|
<!-- <param name="codec-prefs" value="PCMU,PCMA"/> --> <!-- list, and preferecnce order, of codecs -->
|
||||||
<listener name="default">
|
<!-- <param name="disable-transcoding" value="true"/> --> <!-- do not transcode, use source channel codec only -->
|
||||||
<param name="h323-ip" value="$${local_ip_v4}"/>
|
<param name="gk-address" value=""/> <!-- empty to disable, "*" to search LAN -->
|
||||||
<param name="h323-port" value="1720"/>
|
<param name="gk-identifer" value=""/> <!-- optional name of gk -->
|
||||||
</listener>
|
<param name="gk-interface" value="$${local_ip_v4}"/> <!-- optional listener interface name -->
|
||||||
</listeners>
|
</settings>
|
||||||
|
<listeners>
|
||||||
|
<listener name="default">
|
||||||
|
<param name="h323-ip" value="$${local_ip_v4}"/>
|
||||||
|
<param name="h323-port" value="1720"/>
|
||||||
|
</listener>
|
||||||
|
</listeners>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,21 @@
|
||||||
<configuration name="opal.conf" description="Opal Endpoints">
|
<configuration name="opal.conf" description="Opal Endpoints">
|
||||||
<settings>
|
<settings>
|
||||||
<param name="trace-level" value="4"/>
|
<param name="trace-level" value="3"/>
|
||||||
<param name="context" value="default"/>
|
<param name="context" value="default"/>
|
||||||
<param name="dialplan" value="XML"/>
|
<param name="dialplan" value="XML"/>
|
||||||
<param name="codec-prefs" value="PCMU"/>
|
<param name="dtmf-type" value="signal"/> <!-- string, signal, rfc2833, in-band -->
|
||||||
</settings>
|
<param name="jitter-size" value="40,100"/> <!-- Jitter buffer min/max size, milliseconds -->
|
||||||
<listeners>
|
<!-- <param name="codec-prefs" value="PCMU,PCMA"/> --> <!-- list, and preferecnce order, of codecs -->
|
||||||
<listener name="default">
|
<!-- <param name="disable-transcoding" value="true"/> --> <!-- do not transcode, use source channel codec only -->
|
||||||
<param name="h323-ip" value="$${local_ip_v4}"/>
|
<param name="gk-address" value=""/> <!-- empty to disable, "*" to search LAN -->
|
||||||
<param name="h323-port" value="1720"/>
|
<param name="gk-identifer" value=""/> <!-- optional name of gk -->
|
||||||
</listener>
|
<param name="gk-interface" value="$${local_ip_v4}"/> <!-- optional listener interface name -->
|
||||||
</listeners>
|
</settings>
|
||||||
|
<listeners>
|
||||||
|
<listener name="default">
|
||||||
|
<param name="h323-ip" value="$${local_ip_v4}"/>
|
||||||
|
<param name="h323-port" value="1720"/>
|
||||||
|
</listener>
|
||||||
|
</listeners>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,21 @@
|
||||||
<configuration name="opal.conf" description="Opal Endpoints">
|
<configuration name="opal.conf" description="Opal Endpoints">
|
||||||
<settings>
|
<settings>
|
||||||
<param name="trace-level" value="3"/>
|
<param name="trace-level" value="3"/>
|
||||||
<param name="context" value="default"/>
|
<param name="context" value="default"/>
|
||||||
<param name="dialplan" value="XML"/>
|
<param name="dialplan" value="XML"/>
|
||||||
<param name="jitter-size" value="40,100"/> <!-- Jitter buffer min/max size, milliseconds -->
|
<param name="dtmf-type" value="signal"/> <!-- string, signal, rfc2833, in-band -->
|
||||||
<!-- <param name="codec-prefs" value="PCMU,PCMA"/> --> <!-- list, and preferecnce order, of codecs -->
|
<param name="jitter-size" value="40,100"/> <!-- Jitter buffer min/max size, milliseconds -->
|
||||||
<!-- <param name="disable-transcoding" value="true"/> --> <!-- do not transcode, use source channel codec only -->
|
<!-- <param name="codec-prefs" value="PCMU,PCMA"/> --> <!-- list, and preferecnce order, of codecs -->
|
||||||
<param name="gk-address" value=""/> <!-- empty to disable, "*" to search LAN -->
|
<!-- <param name="disable-transcoding" value="true"/> --> <!-- do not transcode, use source channel codec only -->
|
||||||
<param name="gk-identifer" value=""/> <!-- optional name of gk -->
|
<param name="gk-address" value=""/> <!-- empty to disable, "*" to search LAN -->
|
||||||
<param name="gk-interface" value="$${local_ip_v4}"/> <!-- optional listener interface name -->
|
<param name="gk-identifer" value=""/> <!-- optional name of gk -->
|
||||||
</settings>
|
<param name="gk-interface" value="$${local_ip_v4}"/> <!-- optional listener interface name -->
|
||||||
<listeners>
|
</settings>
|
||||||
<listener name="default">
|
<listeners>
|
||||||
<param name="h323-ip" value="$${local_ip_v4}"/>
|
<listener name="default">
|
||||||
<param name="h323-port" value="1720"/>
|
<param name="h323-ip" value="$${local_ip_v4}"/>
|
||||||
</listener>
|
<param name="h323-port" value="1720"/>
|
||||||
</listeners>
|
</listener>
|
||||||
|
</listeners>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
||||||
|
|
|
@ -364,6 +364,15 @@ switch_status_t FSManager::ReadConfig(int reload)
|
||||||
m_codecPrefs = val;
|
m_codecPrefs = val;
|
||||||
} else if (var == "disable-transcoding") {
|
} else if (var == "disable-transcoding") {
|
||||||
m_disableTranscoding = switch_true(val);
|
m_disableTranscoding = switch_true(val);
|
||||||
|
} else if (var == "dtmf-type") {
|
||||||
|
if (val == "string")
|
||||||
|
m_h323ep->SetSendUserInputMode(OpalConnection::SendUserInputAsString);
|
||||||
|
else if (val == "signal")
|
||||||
|
m_h323ep->SetSendUserInputMode(OpalConnection::SendUserInputAsTone);
|
||||||
|
else if (val == "rfc2833")
|
||||||
|
m_h323ep->SetSendUserInputMode(OpalConnection::SendUserInputAsRFC2833);
|
||||||
|
else if (val == "in-band")
|
||||||
|
m_h323ep->SetSendUserInputMode(OpalConnection::SendUserInputInBand);
|
||||||
} else if (var == "jitter-size") {
|
} else if (var == "jitter-size") {
|
||||||
SetAudioJitterDelay(val.AsUnsigned(), val.Mid(val.Find(',')+1).AsUnsigned()); // In milliseconds
|
SetAudioJitterDelay(val.AsUnsigned(), val.Mid(val.Find(',')+1).AsUnsigned()); // In milliseconds
|
||||||
} else if (var == "gk-address") {
|
} else if (var == "gk-address") {
|
||||||
|
@ -649,6 +658,7 @@ PBoolean FSConnection::SendUserInputTone(char tone, unsigned duration)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
switch_dtmf_t dtmf = { tone, duration };
|
switch_dtmf_t dtmf = { tone, duration };
|
||||||
|
PTRACE(4, "mod_opal\tSending DTMF to FS: tone=" << tone << ", duration=" << duration);
|
||||||
return switch_channel_queue_dtmf(m_fsChannel, &dtmf) == SWITCH_STATUS_SUCCESS;
|
return switch_channel_queue_dtmf(m_fsChannel, &dtmf) == SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -925,6 +935,7 @@ switch_status_t FSConnection::kill_channel(int sig)
|
||||||
|
|
||||||
switch_status_t FSConnection::send_dtmf(const switch_dtmf_t *dtmf)
|
switch_status_t FSConnection::send_dtmf(const switch_dtmf_t *dtmf)
|
||||||
{
|
{
|
||||||
|
PTRACE(4, "mod_opal\tReceived DTMF from FS: tone=" << dtmf->digit << ", duration=" << dtmf->duration);
|
||||||
OnUserInputTone(dtmf->digit, dtmf->duration);
|
OnUserInputTone(dtmf->digit, dtmf->duration);
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue