...
Sofia Profiles
Create two sip profiles, changing the SIP domain from sip.corp.ezuce.com to the SIP domain of your sipXecs system:
Note |
---|
The username and password in the gateways section listed below are important. This is for FreeSWITCH to properly respond to 407 requests from sipX. These credentials are found in the file /etc/sipxpbx/freeswitch/conf/sip_profiles/sipX_profile.xml on the sipX server |
internal and external:
Code Block |
---|
language | html/xml |
---|
title | /etc/freeswitch/sip_profiles/internal.xml |
---|
|
<profile name="sip.corp.ezuce.comto-sipx">
<aliases>
<!--
<alias name="outbound"/>
<alias name="nat"/>
-->
</aliases>
<domains>
<domain name="all" alias="false" parse="true"/>
</domains>
<settings>
<param name="debug" value="0"/>
<param name="sip-trace" value="no"/>
<param name="rfc2833-pt" value="101"/>
<param name="sip-port" value="$${internal_sip_port}"/>
<param name="dialplan" value="XML"/>
<param name="context" value="private"/>
<param name="dtmf-duration" value="100"/>
<param name="codec-prefs" value="G722,PCMU@20i,PCMA@20i,speex,L16"/>
<param name="hold-music" value="$${hold_music}"/>
<param name="rtp-timer-name" value="soft"/>
<param name="inbound-late-negotiation" value="true"/>
<!--<param name="enable-100rel" value="true"/>-->
<!-- This could be set to "passive" -->
<param name="local-network-acl" value="localnet.auto"/>
<param name="manage-presence" value="false"/>
<!-- used to share presence info across sofia profiles
manage-presence needs to be set to passive on this profile
if you want it to behave as if it were the internal profile
for presence.
-->
<!-- Name of the db to use for this profile -->
<!--<param name="dbname" value="share_presence"/>-->
<!--<param name="presence-hosts" value="$org.sipfoundry.sipxconfig.domain.Domain@1"/>-->
<!--<param name="force-register-domain" value="$org.sipfoundry.sipxconfig.domain.Domain@1"/>-->
<!--all inbound reg will stored in the db using this domain -->
<!--<param name="force-register-db-domain" value="$org.sipfoundry.sipxconfig.domain.Domain@1"/>-->
<!-- ************************************************* -->
<!--<param name="aggressive-nat-detection" value="true"/>-->
<param name="inbound-codec-negotiation" value="generous"/>
<param name="nonce-ttl" value="60"/>
<param name="auth-calls" value="false"/>
<param name="accept-blind-auth" value="true"/>
<!--
DO NOT USE HOSTNAMES, ONLY IP ADDRESSES IN THESE SETTINGS!
-->
<param name="rtp-ip" value="$${local_ip_v4}"/>
<param name="sip-ip" value="$${local_ip_v4}"/>
<param name="ext-rtp-ip" value="$${local_ip_v4}"/>
<param name="ext-sip-ip" value="$${local_ip_v4}"/>
<param name="rtp-timeout-sec" value="300"/>
<param name="rtp-hold-timeout-sec" value="1800"/>
<!-- <param name="enable-3pcc" value="true"/>
--> <!-- TLS: disabled by default, set to "true" to enable --<param name="ext-rtp-ip" value="$${local_ip_v4}"/>
<param name="tlsext-sip-ip" value="$${externallocal_sslip_enablev4}"/>
<!-- additional bind parameters for TLS --<param name="rtp-timeout-sec" value="300"/>
<param name="tlsrtp-hold-bindtimeout-paramssec" value="transport=tls1800"/>
<!-- Port to listen on for TLS requests. (5081 will be used if unspecified) -->
<param name="tlsenable-sip-port3pcc" value="$${external_tls_port}true"/> -->
<!-- Location of the agent.pem and cafile.pem ssl certificates (needed for TLS server)<!-- TLS: disabled by default, set to "true" to enable -->
<param name="tls-cert-dir" value="$${external_ssl_direnable}"/>
<!-- TLSadditional version ("sslv23" (default), "tlsv1"). NOTE: Phones may not work with TLSv1 bind parameters for TLS -->
<param name="tls-bind-versionparams" value="$${sip_tls_version}transport=tls"/>
</settings> <!-- Port to listen on <gateways>for TLS requests. (5081 will be used if <gateway name="sip.corp.ezuce.com">
unspecified) -->
<param name="proxytls-sip-port" value="sip.corp.ezuce.com$${external_tls_port}"/>
<!-- Location of <param name="realm" value="sip.corp.ezuce.com"/>
the agent.pem and cafile.pem ssl certificates (needed for TLS server) -->
<param name="usernametls-cert-dir" value="~~id~media$${external_ssl_dir}"/>
<!-- TLS version <param name="password" value="hHcmlhKtwC"/>
("sslv23" (default), "tlsv1"). NOTE: Phones may not work with TLSv1 -->
<param name="registertls-version" value="false$${sip_tls_version}"/>
</gateway>
settings>
</gateways>
</profile> |
Code Block |
---|
language | html/xml |
---|
title | /etc/freeswitch/sip_profiles/external.xml |
---|
|
<profile name="external">
<!-- http://wiki.freeswitch.org/wiki/Sofia_Configuration_Files -->
<!-- This profile is only for outbound registrations to providers -->
<gateways>
<X-PRE-PROCESS cmd="include" data="external/*.xml"/>
</gateways>
<aliases>
<!--
<alias name="outbound"/>
<alias name="nat"/>
-->
</aliases>
<domains>
<domain name="all" alias="false" parse="true"/>
</domains>
<settings>
<param name="debug" value="1"/>
<!-- If you want FreeSWITCH to shutdown if this profile fails to load, uncomment the next line. -->
<!-- <param name="shutdown-on-fail" value="true"/> -->
<param name="sip-trace" value="no"/>
<param name="sip-capture" value="no"/>
<param name="rfc2833-pt" value="101"/>
<!-- RFC 5626 : Send reg-id and sip.instance -->
<!--<param name="enable-rfc-5626" value="true"/> -->
<param name="sip-port" value="$${external_sip_port}"/>
<param name="dialplan" value="XML"/>
<param name="context" value="public"/>
<param name="dtmf-duration" value="2000"/>
<param name="inbound-codec-prefs" value="$${global_codec_prefs}"/>
<param name="outbound-codec-prefs" value="$${outbound_codec_prefs}"/>
<param name="hold-music" value="$${hold_music}"/>
<param name="rtp-timer-name" value="soft"/>
<!--<param name="enable-100rel" value="true"/>-->
<!--<param name="disable-srv503" value="true"/>-->
<!-- This could be set to "passive" -->
<param name="local-network-acl" value="localnet.auto"/>
<param name="manage-presence" value="false"/>
<!-- used to share presence info across sofia profiles
manage-presence needs to be set to passive on this profile
if you want it to behave as if it were the internal profile
for presence.
-->
<!-- Name of the db to use for this profile -->
<!--<param name="dbname" value="share_presence"/>-->
<!--<param name="presence-hosts" value="$${domain}"/>-->
<!--<param name="force-register-domain" value="$${domain}"/>-->
<!--all inbound reg will stored in the db using this domain -->
<!--<param name="force-register-db-domain" value="$${domain}"/>-->
<!-- ************************************************* -->
<param name="aggressive-nat-detection" value="true"/>
<param name="inbound-codec-negotiation" value="generous"/>
<param name="nonce-ttl" value="60"/>
<param name="auth-calls" value="false"/>
<param name="inbound-late-negotiation" value="true"/>
<param name="inbound-zrtp-passthru" value="true"/> <!-- (also enables late negotiation) -->
<!--
DO NOT USE HOSTNAMES, ONLY IP ADDRESSES IN THESE SETTINGS!
-->
<param name="rtp-ip" value="$${local_ip_v4}"/>
<param name="sip-ip" value="$${local_ip_v4}"/>
<param name="ext-sip-ip" value="auto-nat"/>
<param name="ext-rtp-ip" value="auto-nat"/>
<param name="rtp-timeout-sec" value="300"/>
<param name="rtp-hold-timeout-sec" value="1800"/>
<!--<param name="enable-3pcc" value="true"/>-->
<!-- TLS: disabled by default, set to "true" to enable -->
<param name="tls" value="$${external_ssl_enable}"/>
<!-- Set to true to not bind on the normal sip-port but only on the TLS port -->
<param name="tls-only" value="false"/>
<!-- additional bind parameters for TLS -->
<param name="tls-bind-params" value="transport=tls"/>
<!-- Port to listen on for TLS requests. (5081 will be used if unspecified) -->
<param name="tls-sip-port" value="$${external_tls_port}"/>
<!-- Location of the agent.pem and cafile.pem ssl certificates (needed for TLS server) -->
<param name="tls-cert-dir" value="$${external_ssl_dir}"/>
<!-- Optionally set the passphrase password used by openSSL to encrypt/decrypt TLS private key files -->
<param name="tls-passphrase" value=""/>
<!-- Verify the date on TLS certificates -->
<param name="tls-verify-date" value="true"/>
<!-- TLS verify policy, when registering/inviting gateways with other servers (outbound) or handling inbound registration/invite requests how should we verify their certificate -->
<!-- set to 'in' to only verify incoming connections, 'out' to only verify outgoing connections, 'all' to verify all connections, also 'in_subjects', 'out_subjects' and 'all_subjects' for subject validation. Multiple policies can be split with a '|' pipe -->
<param name="tls-verify-policy" value="none"/>
<!-- Certificate max verify depth to use for validating peer TLS certificates when the verify policy is not none -->
<param name="tls-verify-depth" value="2"/>
<!-- If the tls-verify-policy is set to subjects_all or subjects_in this sets which subjects are allowed, multiple subjects can be split with a '|' pipe -->
<param name="tls-verify-in-subjects" value=""/>
<!-- TLS version ("sslv23" (default), "tlsv1"). NOTE: Phones may not work with TLSv1 -->
<param name="tls-version" value="$${sip_tls_version}"/>
</settings>
</profile> |
...
Code Block |
---|
language | html/xml |
---|
title | /etc/freeswitch/dialplan/default.xml |
---|
|
<include>
<context name="private">
<extension name="going-out">
<condition field="destination_number" expression="^(\d{7,20})$">
<action application="set" data="transfer_ringback=$${us-ring}"/>
<!--Set this for a generic Caller ID -->
<action application="set" data="effective_caller_id_number=5553211234"/>
<action application="bridge" data="sofia/gateway/voip.ms/$1"/>
<action application="answer"/>
<anti-action application="set" data="transfer_ringback=$${us-ring}"/>
<anti-action application="bridge" data="sofia/gateway/sipto-openuc/${destination_number}@sip.corp.ezuce.com/${destination_number}"/>
<anti-action application="answer"/>
</condition>
</extension>
</context>
</include> |
...
Code Block |
---|
language | html/xml |
---|
title | /etc/freeswitch/dialplan/public.xml |
---|
|
<include>
<context name="public">
<extension name="going-in">
<condition>
<action application="set" data="transfer_ringback=$${us-ring}"/>
<action application="bridge" data="sofia/gateway/sipto-openuc/${destination_number}@sip.corp.ezuce.com/${destination_number}"/>
<action application="answer"/>
</condition>
</extension>
</context>
</include>
|
...