Skip to main content

mod_sofia variables

About

These channel variables are used in mod_sofia.

Click here to expand Table of Contents

acl_token

If an incoming SIP INVITE message matches against a user ACL, this variable is set to the user ID and domain name.

alert_info

Add an Alert-Info Header like Snom and other Phones need for Ring or Ringtone information.

Usage:

Load an external Wav Ringtone on all Calls.

<action application="export" data="alert_info=http://192.168.181.5/sounds/ctu.wav"/> 

Use the External Ringer (Change the Ringtone for the alert-external, alert-group and alert-internal in Snom under Setup > Preferences > Alert-Info Ringer)

<action application="export" data="alert_info=http://www.notused.com;info=alert-external;x-line-id=0"/>

See also

auto_answer_destination

In an inbound call, the remote side may send a SIP NOTIFY message with the event type "talk", telling Sofia endpoint to answer the call. In this case, the variable "auto_answer_destination" is set to the channel's "destination_number", and the call is transferred to the extension "auto_answer" within current dialplan and context.

call_clientcode

This is used by SNOM phones. When FreeSWITCH receives a SIP INFO message with x-clientcode header, this variable is set to the value of that header.

Implemented By:

Module NameSource FileLast Revised
mod_sofiasofia.c6987

codec_string

Sets the base codec string to use.

Usage:

<action application="set" data="codec_string=PCMU,GSM"/>

Implemented By:

Module NameSource FileLast Revised
mod_opalmod_opal.cpp10567
mod_sofiasofia_glue.c5114

disable_q850_reason

When set to "true", this disables sending of the Reason header, which includes the Q.850 reason code, in responses and BYE's. For a list of hangup causes and their Q.850 codes, see Hangup Causes.

Usage:

<action application="set" data="disable_q850_reason=true"/>

Implemented By:

Module NameSource FileLast Revised
mod_sofia15850 committed 12/8/2009.

drop_dtmf

Set this on an inbound channel before answer or on an outbound channel before the bridge/originate in order to prevent DTMF events from being sent to the channel.

Only tested with RFC2833, may also work for INFO / inband. See Jira issue FS-4769. Commit 60f7849cbe72.

Usage:

<action application="set" data="drop_dtmf=true"/>
<action application="answer"/>

or,

<action application="export" data="nolocal:drop_dtmf=true"/>
<action application="bridge" data="sofia/internal/100@1.2.3.4"/>

or,

<action application="bridge" data="{drop_dtmf=true}sofia/internal/100@1.2.3.4"/>

Implemented By:

Module NameSource FileLast Revised
mod_sofiasofia_glue.c

dtmf_type

For inband DTMF, Misc. Dialplan Tools start_dtmf must be used in the dialplan.

Usage:

<action application="set" data="dtmf_type=info"/> 

or,

<action application="set" data="dtmf_type=rfc2833"/> 

or,

 <action application="set" data="dtmf_type=none"/>

Implemented By:

Module NameSource FileLast Revised
mod_sofiasofia_glue.c6952

execute_on_sip_extra_headers

Execute a command when SIP extra headers are detected in a SIP message.

execute_on_sip_reinvite

Execute a command when SIP Reinvite is received.

rtp_disable_hold

When set to true the user may not put the call on hold.

Usage:

<action application="set" data="rtp_disable_hold=true"/>

Implemented By:

  • mod_sofia

sip_acl_authed_by

Contains the name of the ACL node that authorized this call.

Implemented By:

  • mod_sofia

sip_acl_token

Contains the ACL auth token for the current call.

Implemented By:

  • [Mod_sofia]

sip_auth_password

For mod_sofia use with sip_auth_username to answer auth challenges without defining a full gateway.

Usage:

originate {sip_auth_username=<your_user_name>,sip_auth_password=<your_password>}sofia/external/1xxxxxxx@12.34.56.78 &echo

See also:

  • sip_auth_username

Implemented By:

Module NameSource FileLast Revised
mod_sofiasofia_reg.c12819

sip_auth_username

For mod_sofia answer auth challenges without defining a full gateway. Used in tandem with sip_auth_password. Also indicates the SIP username a device successfully registered to FreeSWITCH with.

Usage:

originate {sip_auth_username=<your_user_name>,sip_auth_password=<your_password>}sofia/external/1xxxxxxx@12.34.56.78 &echo

Notes:

This should contain the username of the authenticated user that has triggered this request, if applicable.

Depending on how your FreeSWITCH instance is configured, you may experience problems with this variable being incorrect or blank after calling the 'bridge' application. If this happens, you may want to force the channel variable, for example;

<action application="bridge" data="{sip_auth_username=${sip_auth_username}}sofia/gateway/external/2000"/>

See also:

  • sip_auth_password
  • sip_authorized

Implemented By:

Module NameSource FileLast Revised
mod_sofiasofia_reg.c12819

sip_authorized

sip_authorized indicates whether the SIP device accessing the dialplan is authorized to FreeSWITCH or not. The SIP device can be authorized either via an ACL or via digest authentication.

Usage:

Example needed! Please contribute one.

See also:

  • sip_auth_username
  • sip_acl_authed_by
  • sip_acl_token_vars

Implemented By:

Module NameSource FileLast Revised
mod_sofiasofia.c5299

Comments:

The variables on this document have been reconciled into the Variables Master List. Posted by ryharris at Feb 07, 2018 13:42